[KUBEV] Adjust VMCompute configuration for hybrid labs.
- Install docker.io to run loadtool tests.
- Add static route to reach kubernetes services.
Related: KUBEV-496
Change-Id: I1d5c2daf24f7c4225cb6f68b801281cdfe3c7341
diff --git a/hco/env/system-phys-2488.yaml b/hco/env/system-phys-2488.yaml
index dfd5d58..cc6922b 100644
--- a/hco/env/system-phys-2488.yaml
+++ b/hco/env/system-phys-2488.yaml
@@ -30,3 +30,5 @@
hybrid_lab: true
pxe_network: system-phys-2488
pxe_subnet: system-phys-2488-subnet
+ k8s_vip: 172.16.45.126
+ k8s_svc_network_cidr: 10.95.0.0/16
diff --git a/hco/fragments/VMCompute.yaml b/hco/fragments/VMCompute.yaml
index e8e25ab..e7f44c8 100644
--- a/hco/fragments/VMCompute.yaml
+++ b/hco/fragments/VMCompute.yaml
@@ -18,7 +18,7 @@
boot_timeout:
type: number
description: Boot timeout for instance
- default: 450
+ default: 600
image:
type: string
description: Name of image to use for servers
@@ -28,6 +28,12 @@
key_name:
type: string
description: Name of keypair to assign to servers
+ k8s_vip:
+ type: string
+ description: VIP of kubernetes (child cluster)
+ k8s_svc_network_cidr:
+ type: string
+ description: CIDR of kubernetes service network
resources:
@@ -93,6 +99,7 @@
- virtinst
- python3-virtualbmc
- ipmitool
+ - docker.io
write_files:
- path: /etc/systemd/system/virtualbmc.service
content: |
@@ -117,9 +124,14 @@
br_pxe:
interfaces: [ens4]
addresses: [ip_addr/ip_mask]
+ routes:
+ - to: k8s_svc_network_cidr
+ via: k8s_vip
params:
ip_addr: { get_attr: [ ip_addr_pxe, value ] }
ip_mask: { get_attr: [ ip_mask_pxe, value ] }
+ k8s_vip: { get_param: k8s_vip }
+ k8s_svc_network_cidr: { get_param: k8s_svc_network_cidr }
runcmd:
- str_replace:
template: |
@@ -145,6 +157,7 @@
wc_notify: { get_attr: [ wait_handle, curl_cli ] }
server:
+ # TODO: set attribute no_fixed_ips: https://bugs.launchpad.net/ubuntu/+source/heat/+bug/2085409
type: OS::Nova::Server
properties:
availability_zone: { get_param: availability_zone }
diff --git a/hco/top.yaml b/hco/top.yaml
index 7e5f4af..f8104b2 100644
--- a/hco/top.yaml
+++ b/hco/top.yaml
@@ -82,6 +82,10 @@
pxe_subnet:
type: string
default: ''
+ k8s_vip:
+ type: string
+ k8s_svc_network_cidr:
+ type: string
conditions:
@@ -234,6 +238,8 @@
image: { get_param: image }
flavor: { get_param: vm_compute_flavor }
key_name: { get_attr: [ keypair_name, value ] }
+ k8s_vip: { get_param: k8s_vip }
+ k8s_svc_network_cidr: { get_param: k8s_svc_network_cidr }
outputs:
masters_ips: