summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-07-16 14:14:26 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-07-16 14:14:26 +0000
commitb5e2f1f65dee0cd692fe275d6bce69a8e410cac3 (patch)
treecc212ff450702320fb1330e5c1add769fc708729 /lib
parent320cbf7d8b69fefb467b85a713c791f6a29b662a (diff)
parent10c4d35315d7ffd909520a1c7bc6a3b5b9b871ab (diff)
Merge "Add support for kubernetes deployment"
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/playbooks/deploy_dependencies.yml6
-rw-r--r--lib/ansible/playbooks/deploy_overcloud.yml3
-rw-r--r--lib/ansible/playbooks/k8s_remove_pkgs.yml5
-rw-r--r--lib/ansible/playbooks/post_deploy_undercloud.yml5
4 files changed, 16 insertions, 3 deletions
diff --git a/lib/ansible/playbooks/deploy_dependencies.yml b/lib/ansible/playbooks/deploy_dependencies.yml
index fb1da46f..1cc304a5 100644
--- a/lib/ansible/playbooks/deploy_dependencies.yml
+++ b/lib/ansible/playbooks/deploy_dependencies.yml
@@ -8,6 +8,12 @@
- python-lxml
- libvirt-python
- libguestfs-tools
+ - python-netaddr
+ - python2-pip
+ - pip:
+ name: ansible-modules-hashivault,hvac,Jinja2
+ state: latest
+ executable: pip2
- sysctl:
name: net.ipv4.ip_forward
state: present
diff --git a/lib/ansible/playbooks/deploy_overcloud.yml b/lib/ansible/playbooks/deploy_overcloud.yml
index 0039256d..c3094cb1 100644
--- a/lib/ansible/playbooks/deploy_overcloud.yml
+++ b/lib/ansible/playbooks/deploy_overcloud.yml
@@ -15,6 +15,7 @@
- deploy_command
- virtual-environment.yaml
- baremetal-environment.yaml
+ - kubernetes-environment.yaml
- "{{ apex_env_file }}"
- name: Copy network data to undercloud
copy:
@@ -112,7 +113,7 @@
become: yes
- name: Show Keystone output
shell: "{{ overcloudrc }} && {{ item }}"
- when: debug
+ when: debug and vim == 'openstack'
with_items:
- openstack endpoint list
- openstack service list
diff --git a/lib/ansible/playbooks/k8s_remove_pkgs.yml b/lib/ansible/playbooks/k8s_remove_pkgs.yml
new file mode 100644
index 00000000..f9fa7787
--- /dev/null
+++ b/lib/ansible/playbooks/k8s_remove_pkgs.yml
@@ -0,0 +1,5 @@
+---
+- hosts: all
+ tasks:
+ - name: Removing existing docker related packages
+ shell: "rpm -e --nodeps docker docker-common docker-client container-selinux"
diff --git a/lib/ansible/playbooks/post_deploy_undercloud.yml b/lib/ansible/playbooks/post_deploy_undercloud.yml
index d0206f87..24be1ded 100644
--- a/lib/ansible/playbooks/post_deploy_undercloud.yml
+++ b/lib/ansible/playbooks/post_deploy_undercloud.yml
@@ -9,6 +9,7 @@
- name: Configure external network
shell: "{{ overcloudrc }} && {{ item }}"
with_items: "{{ external_network_cmds }}"
+ when: vim == 'openstack'
- name: Configure gluon networks
shell: "{{ overcloudrc }} && {{ item }}"
when: gluon
@@ -76,8 +77,7 @@
- name: Register OS Region
shell: "{{ overcloudrc }} && openstack endpoint list -c Region -f json"
register: region
- become: yes
- become_user: stack
+ when: vim == 'openstack'
- name: Write Region into overcloudrc
lineinfile:
line: "export OS_REGION_NAME={{(region.stdout|from_json)[1]['Region']}}"
@@ -86,6 +86,7 @@
become: yes
become_user: stack
with_items: "{{ overcloudrc_files }}"
+ when: vim == 'openstack'
- name: Create congress datasources
shell: "{{ overcloudrc }} && openstack congress datasource create {{ item }}"
become: yes