summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible
diff options
context:
space:
mode:
authorcarey.xu <carey.xuhan@huawei.com>2015-12-19 18:39:49 +0800
committercarey.xu <carey.xuhan@huawei.com>2015-12-21 14:46:08 +0800
commit98fa75b0d85d57ad715634a4561fbaa5d443f370 (patch)
treedfc3be1a2cb703f68d13c1b8bd0a0a98e502c1e9 /deploy/adapters/ansible
parentf6ab1777425407be147878bbdd54f1852075d1b2 (diff)
bugfix: ssh disconnect error
JIRA: COMPASS-148 Change-Id: I65542e6078e3c21080b23fa61560dc8210770971 Signed-off-by: carey.xu <carey.xuhan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible')
-rw-r--r--deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml24
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh2
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh2
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/files/losetup.sh2
-rw-r--r--deploy/adapters/ansible/roles/common/tasks/main.yml5
-rw-r--r--deploy/adapters/ansible/roles/common/vars/Debian.yml7
-rwxr-xr-xdeploy/adapters/ansible/roles/storage/files/create_img.sh2
-rwxr-xr-xdeploy/adapters/ansible/roles/storage/files/get_var_size.sh2
-rwxr-xr-xdeploy/adapters/ansible/roles/storage/files/losetup.sh2
9 files changed, 35 insertions, 13 deletions
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
index a60b3d05..83479167 100644
--- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
@@ -3,15 +3,22 @@
remote_user: root
roles:
- common
+
+- hosts: all
+ remote_user: root
+ accelerate: true
+ roles:
- setup-network
- hosts: ha
remote_user: root
+ accelerate: true
roles:
- ha
- hosts: controller
remote_user: root
+ accelerate: true
roles:
- memcached
- database
@@ -30,12 +37,13 @@
- hosts: all
remote_user: root
- sudo: True
- roles:
- - storage
+ accelerate: true
+ roles: [] # just test
+ # - storage
- hosts: compute
remote_user: root
+ accelerate: true
roles:
- nova-compute
- neutron-compute
@@ -44,11 +52,13 @@
- hosts: all
remote_user: root
+ accelerate: true
roles:
- odl_cluster
- hosts: all
remote_user: root
+ accelerate: true
roles:
- onos_cluster
@@ -60,20 +70,24 @@
- hosts: controller
remote_user: root
+ accelerate: true
roles:
- ext-network
- hosts: ceph_adm
remote_user: root
- roles:
- - ceph-deploy
+ accelerate: true
+ roles: [] # just test
+ #- ceph-deploy
- hosts: all
remote_user: root
+ accelerate: true
roles:
- monitor
- hosts: all
remote_user: root
+ accelerate: true
roles:
- secgroup
diff --git a/deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh b/deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh
index 2e734188..5d64143e 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh
+++ b/deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh
@@ -1,3 +1,3 @@
-if [[ ! -f /var/cinder.img ]]; then
+if [ ! -f /var/cinder.img ]; then
dd if=/dev/zero of=/var/cinder.img bs=1 count=0 seek=$1
fi
diff --git a/deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh b/deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh
index 55041c6e..6f690375 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh
+++ b/deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh
@@ -1,5 +1,5 @@
size=`df /var | awk '$3 ~ /[0-9]+/ { print $4 }'`;
-if [[ $size -gt 2000000000 ]]; then
+if [ $size -gt 2000000000 ]; then
echo -n 2000000000000;
else
echo -n $((size * 1000 / 512 * 512));
diff --git a/deploy/adapters/ansible/roles/cinder-volume/files/losetup.sh b/deploy/adapters/ansible/roles/cinder-volume/files/losetup.sh
index d0e6c776..1f0b2b0e 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/files/losetup.sh
+++ b/deploy/adapters/ansible/roles/cinder-volume/files/losetup.sh
@@ -1,5 +1,5 @@
loop_dev=`losetup -a |grep "/var/cinder.img"|awk -F':' '{print $1}'`
-if [[ -z $loop_dev ]]; then
+if [ -z $loop_dev ]; then
losetup -f --show /var/cinder.img
else
echo $loop_dev
diff --git a/deploy/adapters/ansible/roles/common/tasks/main.yml b/deploy/adapters/ansible/roles/common/tasks/main.yml
index c4c10099..da114631 100644
--- a/deploy/adapters/ansible/roles/common/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/common/tasks/main.yml
@@ -38,6 +38,11 @@
pip: name={{ item }} state=present extra_args='--pre'
with_items: pip_packages
+- name: install keyczar for accelerate
+ pip: name=python-keyczar state=present extra_args='--pre'
+ delegate_to: 127.0.0.1
+ run_once: true
+
- name: update ntp conf
template: src=ntp.conf dest=/etc/ntp.conf backup=yes
diff --git a/deploy/adapters/ansible/roles/common/vars/Debian.yml b/deploy/adapters/ansible/roles/common/vars/Debian.yml
index 5b159da7..304517a6 100644
--- a/deploy/adapters/ansible/roles/common/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/common/vars/Debian.yml
@@ -4,10 +4,13 @@ packages:
#- python-dev
- openvswitch-datapath-dkms
- openvswitch-switch
- - crudini
- python-memcache
+ - python-iniparse
+ - python-d* #TODO, need remove
-pip_packages: []
+pip_packages:
+ - crudini
+ - python-keyczar
pip_conf: pip.conf
diff --git a/deploy/adapters/ansible/roles/storage/files/create_img.sh b/deploy/adapters/ansible/roles/storage/files/create_img.sh
index 4b9ac534..13565bdc 100755
--- a/deploy/adapters/ansible/roles/storage/files/create_img.sh
+++ b/deploy/adapters/ansible/roles/storage/files/create_img.sh
@@ -1,4 +1,4 @@
seek_num=`echo $1 | sed -e 's/.* //g'`
-if [[ ! -f /var/storage.img ]]; then
+if [ ! -f /var/storage.img ]; then
dd if=/dev/zero of=/var/storage.img bs=1 count=0 seek=$seek_num
fi
diff --git a/deploy/adapters/ansible/roles/storage/files/get_var_size.sh b/deploy/adapters/ansible/roles/storage/files/get_var_size.sh
index 55041c6e..6f690375 100755
--- a/deploy/adapters/ansible/roles/storage/files/get_var_size.sh
+++ b/deploy/adapters/ansible/roles/storage/files/get_var_size.sh
@@ -1,5 +1,5 @@
size=`df /var | awk '$3 ~ /[0-9]+/ { print $4 }'`;
-if [[ $size -gt 2000000000 ]]; then
+if [ $size -gt 2000000000 ]; then
echo -n 2000000000000;
else
echo -n $((size * 1000 / 512 * 512));
diff --git a/deploy/adapters/ansible/roles/storage/files/losetup.sh b/deploy/adapters/ansible/roles/storage/files/losetup.sh
index 8cb9bd7d..3e95069f 100755
--- a/deploy/adapters/ansible/roles/storage/files/losetup.sh
+++ b/deploy/adapters/ansible/roles/storage/files/losetup.sh
@@ -1,5 +1,5 @@
loop_dev=`losetup -a |grep "/var/storage.img"|awk -F':' '{print $1}'`
-if [[ -z $loop_dev ]]; then
+if [ -z $loop_dev ]; then
losetup -f --show /var/storage.img
else
echo $loop_dev