xci: kubespray: Use bootstrap role for k8s deployments 45/56145/8
authorMarkos Chandras <mchandras@suse.de>
Fri, 20 Apr 2018 12:37:32 +0000 (13:37 +0100)
committerMarkos Chandras <mchandras@suse.de>
Fri, 18 May 2018 10:40:46 +0000 (11:40 +0100)
The bootstrap role configures NTP and networking on hosts so we
should use it on k8s deployments as well.

installer-type:kubespray
deploy-scenario:k8-nosdn-nofeature

Change-Id: I04bd1e1c2c325baabfb836bd8cca60c5f59344c7
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/installer/kubespray/playbooks/configure-opnfvhost.yml
xci/installer/kubespray/playbooks/configure-targethosts.yml
xci/playbooks/roles/bootstrap-host/templates/kubespray [new symlink]

index 7141f51..5886d3e 100644 (file)
@@ -11,7 +11,7 @@
   vars_files:
     - "{{ xci_path }}/xci/var/opnfv.yml"
 
-  tasks:
+  pre_tasks:
     - name: Load distribution variables
       include_vars:
         file: "{{ item }}"
         remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{ installer_type }}/files/{{ xci_flavor }}"
         remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"
 
+  roles:
+    - role: bootstrap-host
+      configure_network: xci_flavor != 'aio'
+
+  tasks:
     - name: Copy releng-xci to remote host
       synchronize:
         src: "{{ xci_path }}/"
index c744eae..7989bfb 100644 (file)
@@ -1,6 +1,19 @@
 ---
 - hosts: k8s-cluster
   remote_user: root
+  vars_files:
+    - "{{ xci_path }}/xci/var/opnfv.yml"
+
+  pre_tasks:
+    - name: Load distribution variables
+      include_vars:
+        file: "{{ item }}"
+      with_items:
+        - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
+
+  roles:
+    - role: bootstrap-host
+
   tasks:
     - name: Manage SSH keys
       include_tasks: "{{ xci_path }}/xci/playbooks/manage-ssh-keys.yml"
diff --git a/xci/playbooks/roles/bootstrap-host/templates/kubespray b/xci/playbooks/roles/bootstrap-host/templates/kubespray
new file mode 120000 (symlink)
index 0000000..f820fd1
--- /dev/null
@@ -0,0 +1 @@
+osa
\ No newline at end of file