Added the required initialization to start the docker swarm cluster.
Converted yet more dos format files to unix format. Updated the
document on building voltha on a QEMU/KVM virtualization environment
using vagrant. Added a configuration file for the install vagrant to
eventually enable multiple users on a single compute node all able to
run independent voltha docker swarm clusters as VMs. More work is
required to finalize multi-user test mode which will be submitted in a
subsequent update.
This update continues to address Jira VOL-6
Change-Id: I88bc41aa6484877cb76ad38f8bab894f141cebdb
diff --git a/install/ansible/roles/cluster-host/files/ssh_config b/install/ansible/roles/cluster-host/files/ssh_config
new file mode 100644
index 0000000..990a43d
--- /dev/null
+++ b/install/ansible/roles/cluster-host/files/ssh_config
@@ -0,0 +1,3 @@
+Host *
+ StrictHostKeyChecking no
+ UserKnownHostsFile=/dev/null
diff --git a/install/ansible/roles/cluster-host/tasks/cluster-host.yml b/install/ansible/roles/cluster-host/tasks/cluster-host.yml
index 20dcd15..20330c4 100644
--- a/install/ansible/roles/cluster-host/tasks/cluster-host.yml
+++ b/install/ansible/roles/cluster-host/tasks/cluster-host.yml
@@ -2,6 +2,39 @@
# is running to install voltha in the cluster hosts.
# Whe the target == "installer" the installer is being
# created.
+- name: A .ssh directory for the voltha user exists
+ file:
+ #path: "{{ ansible_env['HOME'] }}/.ssh"
+ path: "/home/voltha/.ssh"
+ state: directory
+ owner: voltha
+ group: voltha
+ tags: [cluster_host]
+
+- name: known_hosts file is absent for the voltha user
+ file:
+ path: "/home/voltha/.ssh/known_hosts"
+ state: absent
+ tags: [cluster_host]
+
+- name: Known host checking is disabled
+ copy:
+ src: files/ssh_config
+ dest: "/home/voltha/.ssh/config"
+ owner: voltha
+ group: voltha
+ mode: 0600
+ tags: [cluster_host]
+
+- name: Cluster host keys are propagated to all hosts in the cluster
+ copy:
+ src: files/.keys
+ dest: "/home/voltha"
+ owner: voltha
+ group: voltha
+ mode: 0600
+ tags: [cluster_host]
+
- name: Required configuration directories are copied
copy:
src: "/home/vinstall/{{ item }}"
@@ -13,7 +46,7 @@
- netifaces
- deb_files
when: target == "cluster"
- tags: [voltha]
+ tags: [cluster_host]
- name: Dependent software is installed
command: dpkg -i "{{ target_voltha_home }}/deb_files/{{ item }}"
@@ -21,20 +54,20 @@
when: target == "cluster"
ignore_errors: true
when: target == "cluster"
- tags: [voltha]
+ tags: [cluster_host]
- name: Dependent software is initialized
command: apt-get -f install
when: target == "cluster"
- tags: [voltha]
+ tags: [cluster_host]
-- name: Python packages are installe
+- name: Python packages are installed
command: pip install {{ item }} --no-index --find-links "file://{{ target_voltha_home }}/{{ item }}"
with_items:
- docker-py
- netifaces
when: target == "cluster"
- tags: [voltha]
+ tags: [cluster_host]
- name: Configuration directories are deleted
file:
@@ -45,5 +78,5 @@
- netifaces
- deb_files
when: target == "cluster"
- tags: [voltha]
+ tags: [cluster_host]