diff options
author | nikoskarandreas <nick@intracom-telecom.com> | 2019-02-22 13:04:29 +0200 |
---|---|---|
committer | nikoskarandreas <nick@intracom-telecom.com> | 2019-08-01 07:13:40 -0400 |
commit | 0d6907e04a51aface7ed6cd456f4e20f2d2ad0e2 (patch) | |
tree | a3ee23be9aee9cea0032b1df89de01ee486b8728 /xci/installer/osh/playbooks/roles/prepare-osh | |
parent | 3bfb68f11c8f2579a0daff825fb54c64641a26b0 (diff) |
Introduction of Openstack-helm as installer
This patch creates a new installer tree in xci that uses
openstack-helm to deploy openstack on a kubernetes cluster.
USAGE: Export INSTALLER_TYPE=osh, DEPLOY_SCENARIO=k8-calico-nofeature
and XCI_FLAVOR=noha or mini and run xci-deploy.sh as in documentation.
deploy-scenario:k8-calico-nofeature
installer-type:osh
Change-Id: I212f70eb51c2a38c798c11367d2ebb8bf5f4a1de
Signed-off-by: nikoskarandreas <nick@intracom-telecom.com>
Diffstat (limited to 'xci/installer/osh/playbooks/roles/prepare-osh')
3 files changed, 42 insertions, 0 deletions
diff --git a/xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml b/xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml new file mode 100644 index 00000000..d9718ea4 --- /dev/null +++ b/xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml @@ -0,0 +1,32 @@ +- name: Write new resolv.conf file + template: + src: resolv.conf.j2 + dest: /etc/resolv.conf + +- name: Make resolv.conf immutable + shell: "chattr +i /etc/resolv.conf" + changed_when: false + args: + executable: /bin/bash + tags: + - skip_ansible_lint + +#TODO Fetch the value from a file generated by k8s deployer +- name: Get kube service addresses + shell: "grep -r 'kube_service_addresses:' /root/releng-xci/.cache/repos/kubespray/opnfv_inventory/group_vars/k8s-cluster.yml | awk '{print $2}'" + changed_when: false + args: + executable: /bin/bash + register: kube_service_addresses + tags: + - skip_ansible_lint + +#This rule allows openstack client in OPNFV VM to reach openstack +- name: Update routing table with kube service addresses + shell: "ip route add {{ kube_service_addresses.stdout }} via 192.168.122.3 dev br-vlan onlink" + changed_when: false + args: + executable: /bin/bash + tags: + - skip_ansible_lint + diff --git a/xci/installer/osh/playbooks/roles/prepare-osh/templates/resolv.conf.j2 b/xci/installer/osh/playbooks/roles/prepare-osh/templates/resolv.conf.j2 new file mode 100644 index 00000000..ae706e02 --- /dev/null +++ b/xci/installer/osh/playbooks/roles/prepare-osh/templates/resolv.conf.j2 @@ -0,0 +1,4 @@ +{{ dns_var }} +{% for nameserver in external_dns_nameservers %} +nameserver {{ nameserver }} +{% endfor %} diff --git a/xci/installer/osh/playbooks/roles/prepare-osh/vars/main.yml b/xci/installer/osh/playbooks/roles/prepare-osh/vars/main.yml new file mode 100644 index 00000000..abb0d6eb --- /dev/null +++ b/xci/installer/osh/playbooks/roles/prepare-osh/vars/main.yml @@ -0,0 +1,6 @@ +kube_dns_ip: "10.233.0.3" +external_dns_nameservers: +- '{{kube_dns_ip}}' +- '192.168.122.1' +dns_var: "search svc.cluster.local cluster.local" + |