summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh25
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml5
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml9
-rwxr-xr-xdeploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml6
-rw-r--r--deploy/conf/base.conf4
-rw-r--r--deploy/conf/virtual_cluster.yml1
6 files changed, 24 insertions, 26 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh b/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh
index 02860bde..d0c631fb 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh
+++ b/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh
@@ -5,17 +5,6 @@ umount /var/local/osd
rm -r /var/local/osd
fi
-if [ ! -d "/ceph/images" ]; then
-mkdir -p /ceph/images
-fi
-
-rm -f /ceph/images/ceph-volumes.img
-
-if [ ! -f "/ceph/images/ceph-volumes.img" ]; then
-echo "create ceph-volumes.img"
-dd if=/dev/zero of=/ceph/images/ceph-volumes.img bs=1K seek=$(df / | awk '$3 ~ /[0-9]+/ { print $4 }') count=0 oflag=direct
-sgdisk -g --clear /ceph/images/ceph-volumes.img
-fi
#safe check
ps -ef |grep lvremove |awk '{print $2}' |xargs kill -9
@@ -23,24 +12,20 @@ ps -ef |grep vgremove |awk '{print $2}' |xargs kill -9
ps -ef |grep vgcreate |awk '{print $2}' |xargs kill -9
ps -ef |grep lvcreate |awk '{print $2}' |xargs kill -9
-if [ -L "/dev/ceph-volumes/ceph0" ]; then
+if [ -L "/dev/cinder-volumes/ceph0" ]; then
echo "remove lv vg"
-lvremove -f /dev/ceph-volumes/ceph0
-vgremove -f ceph-volumes
-rm -r /dev/ceph-volumes
+lvremove -f /dev/cinder-volumes/ceph0
fi
-echo "vgcreate"
-vgcreate -y ceph-volumes $(losetup --show -f /ceph/images/ceph-volumes.img)
echo "lvcreate"
-lvcreate -l 100%FREE -nceph0 ceph-volumes
+lvcreate -l 100%FREE -nceph0 cinder-volumes
echo "mkfs"
-mkfs.xfs -f /dev/ceph-volumes/ceph0
+mkfs.xfs -f /dev/cinder-volumes/ceph0
if [ ! -d "/var/local/osd" ]; then
echo "mount osd"
mkdir -p /var/local/osd
-mount /dev/ceph-volumes/ceph0 /var/local/osd
+mount /dev/cinder-volumes/ceph0 /var/local/osd
fi
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
index 3959d466..744120b8 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
+++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
@@ -4,6 +4,9 @@
tags:
- create_ceph_cluster
+- name: default config for ceph
+ shell: cd {{ ceph_cluster_dir[0] }} && echo "osd_journal_size = 1024" >> ceph.conf && echo "osd_pool_default_size = 2" >> ceph.conf
+
- name: install ceph for every nodes includes jumpserver
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy install {{ ceph_cluster_hosts.stdout_lines[0]}}
@@ -11,7 +14,7 @@
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy --overwrite-conf mon create-initial
- name: gather keys
- shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy gatherkeys {{ ceph_cluster_hosts.stdout_lines[0] }}
+ shell: sleep 5 && cd {{ ceph_cluster_dir[0] }} && ceph-deploy gatherkeys {{ inventory_hostname }}
ignore_errors: True
- name: copy create_osd.sh to host1
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
index 97d925d6..385c7571 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
+++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
@@ -4,6 +4,9 @@
tags:
- create_ceph_cluster
+- name: default config for ceph
+ shell: cd {{ ceph_cluster_dir[0] }} && echo "osd_journal_size = 1024" >> ceph.conf && echo "osd_pool_default_size = 2" >> ceph.conf
+
- name: install ceph for every nodes includes jumpserver
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy install --no-adjust-repos --repo-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa --gpg-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa/ceph_key_release.asc {{ ceph_cluster_hosts.stdout_lines[0]}}
@@ -11,7 +14,7 @@
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy --overwrite-conf mon create-initial
- name: gather keys
- shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy gatherkeys {{ ceph_cluster_hosts.stdout_lines[0] }}
+ shell: sleep 5 && cd {{ ceph_cluster_dir[0] }} && ceph-deploy gatherkeys {{ inventory_hostname }}
ignore_errors: True
- name: copy create_osd.sh to host1
@@ -34,7 +37,7 @@
- create_osd
- name: prepare create osd
- shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy --repo-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa --gpg-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa/ceph_key_release.asc osd prepare {{ item }}:/var/local/osd
+ shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy osd prepare {{ item }}:/var/local/osd
with_items:
- "{{ groups['compute'] }}"
tags:
@@ -42,7 +45,7 @@
- name: activate osd
- shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy --repo-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa --gpg-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa/ceph_key_release.asc osd activate {{ item }}:/var/local/osd
+ shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy osd activate {{ item }}:/var/local/osd
with_items:
- "{{ groups['compute'] }}"
tags:
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml
index f301cba2..e52b18ff 100755
--- a/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml
@@ -17,6 +17,12 @@
- name: shut down and disable Neutron's openvswitch agent services
service: name=neutron-plugin-openvswitch-agent state=stopped
+- name: Stop the Open vSwitch service and clear existing OVSDB
+ shell: >
+ ovs-vsctl del-br br-int ;
+ ovs-vsctl del-br br-tun ;
+ ovs-vsctl del-manager ;
+
#- name: remove Neutron's openvswitch agent services
# shell: >
# update-rc.d neutron-plugin-openvswitch-agent remove
diff --git a/deploy/conf/base.conf b/deploy/conf/base.conf
index 21be0bbf..a77fa9b2 100644
--- a/deploy/conf/base.conf
+++ b/deploy/conf/base.conf
@@ -5,8 +5,8 @@ export INSTALL_GW=${INSTALL_GW:-10.1.0.1}
export INSTALL_IP_START=${INSTALL_IP_START:-10.1.0.1}
export INSTALL_IP_END=${INSTALL_IP_END:-10.1.0.254}
export MGMT_IP=${MGMT_IP:-192.168.200.2}
-export MGMT_MASK=${MAGMT_MASK:-255.255.252.0}
-export MGMT_GW=${MAGMT_GW:-192.168.200.1}
+export MGMT_MASK=${MGMT_MASK:-255.255.252.0}
+export MGMT_GW=${MGMT_GW:-192.168.200.1}
export MGMT_IP_START=${MGMT_IP_START:-192.168.200.3}
export MGMT_IP_END=${MGMT_IP_END:-192.168.200.254}
export EXTERNAL_NIC=${EXTERNAL_NIC:-eth0}
diff --git a/deploy/conf/virtual_cluster.yml b/deploy/conf/virtual_cluster.yml
index b3bd9e77..6ee8c95c 100644
--- a/deploy/conf/virtual_cluster.yml
+++ b/deploy/conf/virtual_cluster.yml
@@ -6,6 +6,7 @@ hosts:
roles:
- controller
- ha
+ - ceph
- name: host2
roles: