From 0d6907e04a51aface7ed6cd456f4e20f2d2ad0e2 Mon Sep 17 00:00:00 2001 From: nikoskarandreas Date: Fri, 22 Feb 2019 13:04:29 +0200 Subject: 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 --- xci/playbooks/configure-localhost.yml | 6 +++--- xci/playbooks/roles/bootstrap-host/templates/osh | 1 + .../roles/create-nodes/tasks/baremetalhoststojson.yml | 11 ++++++++++- xci/playbooks/roles/create-nodes/tasks/create_vm.yml | 11 ++++++++++- 4 files changed, 24 insertions(+), 5 deletions(-) create mode 120000 xci/playbooks/roles/bootstrap-host/templates/osh (limited to 'xci/playbooks') diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml index 5b64c785..a84f1aa0 100644 --- a/xci/playbooks/configure-localhost.yml +++ b/xci/playbooks/configure-localhost.yml @@ -46,21 +46,21 @@ repo: "{{ kubespray_git_url }}" dest: "{{ xci_cache }}/repos/kubespray" version: "{{ kubespray_version }}" - when: installer_type == "kubespray" + when: installer_type in ["kubespray", "osh"] - role: clone-repository project: "openstack/openstack-ansible-haproxy_server" repo: "{{ openstack_osa_haproxy_git_url }}" dest: roles/haproxy_server version: "{{ haproxy_version }}" when: - - installer_type == "kubespray" + - installer_type == "kubespray" or installer_type == "osh" - role: clone-repository project: "ansible-keepalived" repo: "{{ keepalived_git_url }}" dest: roles/keepalived version: "{{ keepalived_version }}" when: - - installer_type == "kubespray" + - installer_type == "kubespray" or installer_type == "osh" tasks: - name: create log directory {{log_path}} diff --git a/xci/playbooks/roles/bootstrap-host/templates/osh b/xci/playbooks/roles/bootstrap-host/templates/osh new file mode 120000 index 00000000..f820fd11 --- /dev/null +++ b/xci/playbooks/roles/bootstrap-host/templates/osh @@ -0,0 +1 @@ +osa \ No newline at end of file diff --git a/xci/playbooks/roles/create-nodes/tasks/baremetalhoststojson.yml b/xci/playbooks/roles/create-nodes/tasks/baremetalhoststojson.yml index 8aeea321..740bfac6 100644 --- a/xci/playbooks/roles/create-nodes/tasks/baremetalhoststojson.yml +++ b/xci/playbooks/roles/create-nodes/tasks/baremetalhoststojson.yml @@ -29,7 +29,16 @@ block: - set_fact: - node_name: "{{ ('kubespray' in installer_type) | ternary(idf.kubespray.hostnames[item.name], idf.osa.hostnames[item.name]) }}" + node_name: idf.kubespray.hostnames[item.name] + when: installer_type == "kubespray" + + - set_fact: + node_name: idf.osa.hostnames[item.name] + when: installer_type == "osa" + + - set_fact: + node_name: idf.osh.hostnames[item.name] + when: installer_type == "osh" - set_fact: host_group: "{{ node_default_groups }}" diff --git a/xci/playbooks/roles/create-nodes/tasks/create_vm.yml b/xci/playbooks/roles/create-nodes/tasks/create_vm.yml index 8934fb6a..ac55bf32 100644 --- a/xci/playbooks/roles/create-nodes/tasks/create_vm.yml +++ b/xci/playbooks/roles/create-nodes/tasks/create_vm.yml @@ -2,7 +2,16 @@ - name: "Creating VM" block: - set_fact: - vm_name: "{{ ('kubespray' in installer_type) | ternary(idf.kubespray.hostnames[item.1.name], idf.osa.hostnames[item.1.name]) }}" + vm_name: "{{ idf.kubespray.hostnames[item.1.name] }}" + when: installer_type == "kubespray" + + - set_fact: + vm_name: "{{ idf.osa.hostnames[item.1.name] }}" + when: installer_type == "osa" + + - set_fact: + vm_name: "{{ idf.osh.hostnames[item.1.name] }}" + when: installer_type == "osh" - set_fact: vm_log_file: "{{ node_logdir }}/{{ vm_name }}_console.log" -- cgit 1.2.3-korg