aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh7
-rw-r--r--build/build.conf7
-rwxr-xr-xbuild/make_repo.sh4
-rw-r--r--build/os/centos/rhel7/kilo/Dockerfile.tmpl27
-rw-r--r--build/templates/RedHat_kilo.tmpl100
-rw-r--r--deploy/adapters/ansible/openstack/templates/nova.conf2
-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
-rw-r--r--deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_config.yml2
-rw-r--r--deploy/adapters/ansible/roles/common/tasks/main.yml39
-rw-r--r--deploy/adapters/ansible/roles/common/vars/Debian.yml4
-rw-r--r--deploy/adapters/ansible/roles/common/vars/RedHat.yml6
-rw-r--r--deploy/adapters/ansible/roles/dashboard/tasks/main.yml5
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/main.yml3
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mongodb.yml6
-rw-r--r--deploy/adapters/ansible/roles/database/vars/Debian.yml4
-rw-r--r--deploy/adapters/ansible/roles/database/vars/RedHat.yml10
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/glance_config.yml2
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml2
-rw-r--r--deploy/adapters/ansible/roles/setup-network/tasks/main.yml2
-rw-r--r--deploy/adapters/cobbler/kickstarts/default.seed2
-rw-r--r--deploy/compass_vm.sh1
-rw-r--r--deploy/conf/cluster.conf11
-rw-r--r--deploy/conf/virtual_cluster.yml1
25 files changed, 231 insertions, 55 deletions
diff --git a/build.sh b/build.sh
index cffceecf..6ec5bfb3 100755
--- a/build.sh
+++ b/build.sh
@@ -65,7 +65,8 @@ function download_local()
function download_packages()
{
for i in $CENTOS_BASE $COMPASS_CORE $COMPASS_WEB $COMPASS_INSTALL $TRUSTY_JUNO_PPA $UBUNTU_ISO \
- $CENTOS_ISO $CENTOS7_JUNO_PPA $LOADERS $CIRROS $APP_PACKAGE $COMPASS_PKG $PIP_REPO $ANSIBLE_MODULE; do
+ $CENTOS_ISO $CENTOS7_JUNO_PPA $CENTOS7_KILO_PPA $LOADERS $CIRROS $APP_PACKAGE $COMPASS_PKG \
+ $PIP_REPO $ANSIBLE_MODULE; do
if [[ ! $i ]]; then
continue
@@ -111,6 +112,10 @@ function copy_file()
cp $CACHE_DIR/`basename $CENTOS7_JUNO_PPA` $new/repos/cobbler/centos/ppa/ -rf
fi
+ if [[ $CENTOS7_KILO_PPA ]]; then
+ cp $CACHE_DIR/`basename $CENTOS7_KILO_PPA` $new/repos/cobbler/centos/ppa/ -rf
+ fi
+
cp $CACHE_DIR/`basename $LOADERS` $new/ -rf || exit 1
cp $CACHE_DIR/`basename $APP_PACKAGE` $new/app_packages/ -rf || exit 1
cp $CACHE_DIR/`basename $ANSIBLE_MODULE | sed 's/.git//g'` $new/ansible/ -rf || exit 1
diff --git a/build/build.conf b/build/build.conf
index c6f0bdef..2f2025c3 100644
--- a/build/build.conf
+++ b/build/build.conf
@@ -6,10 +6,11 @@ export CENTOS_BASE=${CENTOS_BASE:-$PACKAGE_URL/centos_base.iso}
export COMPASS_CORE=${COMPASS_CORE:-http://github.com/baigk/compass-core.git}
export COMPASS_WEB=${COMPASS_WEB:-http://github.com/baigk/compass-web.git}
export COMPASS_INSTALL=${COMPASS_INSTALL:-http://github.com/baigk/compass-install.git}
-export TRUSTY_JUNO_PPA=${TRUSTY_JUNO_PPA:-$PACKAGE_URL/trusty-juno-ppa.tar.gz}
export UBUNTU_ISO=${UBUNTU_ISO:-$PACKAGE_URL/ubuntu-14.04.3-server-amd64.iso}
+export TRUSTY_JUNO_PPA=${TRUSTY_JUNO_PPA:-$PACKAGE_URL/trusty-juno-ppa.tar.gz}
export CENTOS_ISO=${CENTOS_ISO:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1503-01.iso}
export CENTOS7_JUNO_PPA=${CENTOS7_JUNO_PPA:-$PACKAGE_URL/centos7-juno-ppa.tar.gz}
+#export CENTOS7_KILO_PPA=${CENTOS7_KILO_PPA:-$PACKAGE_URL/centos7-kilo-ppa.tar.gz}
export COMPASS_PKG=${COMPASS_PKG:-$PACKAGE_URL/centos6-package.tar.gz}
export LOADERS=${LOADERS:-$PACKAGE_URL/loaders.tar.gz}
export CIRROS=${CIRROS:-$PACKAGE_URL/cirros-0.3.3-x86_64-disk.img}
@@ -71,4 +72,6 @@ export PIP_CONF="https://bootstrap.pypa.io/ez_setup.py \
https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.0.tar.gz \
https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz \
https://pypi.python.org/packages/source/l/lazypy/lazypy-0.5.tar.gz \
- https://pypi.python.org/packages/source/p/pycrypto-on-pypi/pycrypto-on-pypi-2.3.tar.gz"
+ https://pypi.python.org/packages/source/p/pycrypto-on-pypi/pycrypto-on-pypi-2.3.tar.gz \
+ https://pypi.python.org/packages/2.6/p/pymongo/pymongo-3.0.3-cp26-none-macosx_10_10_intel.whl \
+ https://pypi.python.org/packages/source/c/crudini/crudini-0.7.tar.gz"
diff --git a/build/make_repo.sh b/build/make_repo.sh
index 7ed4c249..61c40aef 100755
--- a/build/make_repo.sh
+++ b/build/make_repo.sh
@@ -197,6 +197,10 @@ function make_all_repo()
make_repo --os-ver rhel7 --package-tag juno \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
--default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.3 dracut-network-033-241.el7_1.3"
+
+ make_repo --os-ver rhel7 --package-tag kilo \
+ --ansible-dir $WORK_PATH/deploy/adapters/ansible \
+ --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.5 dracut-network-033-241.el7_1.5"
}
function main()
diff --git a/build/os/centos/rhel7/kilo/Dockerfile.tmpl b/build/os/centos/rhel7/kilo/Dockerfile.tmpl
new file mode 100644
index 00000000..34945d00
--- /dev/null
+++ b/build/os/centos/rhel7/kilo/Dockerfile.tmpl
@@ -0,0 +1,27 @@
+FROM centos:7.1.1503
+MAINTAINER Chigang(Justin) <chigang@huawei.com>
+
+# set cache enable
+RUN sed -i 's/keepcache=0/keepcache=1/g' /etc/yum.conf
+#set packages = $getVar('spcial_packages', [])
+#for package in $packages
+ADD ./RedHat/packages/$package /var/cache/yum/x86_64/7/base/packages/
+#end for
+#set scripts = $getVar('scripts', [])
+#for script in $scripts
+ADD ./RedHat/script/$script /tmp/chigang/$script
+RUN chmod +x /tmp/chigang/$script
+RUN /tmp/chigang/$script
+#end for
+ADD ./comps.xml /
+ADD ./ceph_key_release.asc /
+ADD ./install_packages.sh /tmp/chigang/install_packages.sh
+RUN chmod +x /tmp/chigang/install_packages.sh
+RUN /tmp/chigang/install_packages.sh
+
+ADD ./cp_repo.sh /tmp/chigang/cp_repo.sh
+RUN chmod +x /tmp/chigang/cp_repo.sh
+RUN mkdir /result
+
+CMD ["/tmp/chigang/cp_repo.sh"]
+#VOLUME /tmp/chigang
diff --git a/build/templates/RedHat_kilo.tmpl b/build/templates/RedHat_kilo.tmpl
new file mode 100644
index 00000000..3d587250
--- /dev/null
+++ b/build/templates/RedHat_kilo.tmpl
@@ -0,0 +1,100 @@
+#!/bin/bash
+set -x
+
+yum remove systemd -y
+# add 163 repo
+yum install wget -y
+wget -O /epel-release-7-5.noarch.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
+yum remove wget iptables-services -y
+yum update -y
+#rm -f /etc/yum.repos.d/CentOS-*.repo
+yum repolist
+yum clean all
+# add openstack kilo repo
+yum install yum-plugin-priorities -y
+yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -y
+yum install http://rdo.fedorapeople.org/openstack-kilo/rdo-release-kilo.rpm -y
+
+# modify centos7 repo for workaround
+sed -i 's/epel-Derived from Red Hat Enterprise Linux 7.1 (Source)/epel-7/g' /etc/yum.repos.d/rdo-release.repo
+
+# add galeracluster repo
+cat <<EOF >/etc/yum.repos.d/MariaDB.repo
+[mariadb]
+name =MariaDB
+baseurl = http://yum.mariadb.org/5.5/centos7-amd64
+gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
+gpgcheck=1
+EOF
+
+cat <<EOF >/etc/yum.repos.d/syslog.repo
+[rsyslog_v7]
+name=rsyslog
+baseurl="http://rpms.adiscon.com/v7-stable/epel-7/x86_64"
+enabled=1
+gpgcheck=0
+gpgkey=http://rpms.adiscon.com/RPM-GPG-KEY-Adiscon
+protect=1
+EOF
+
+cat <<EOF >/etc/yum.repos.d/ceph.repo
+[ceph]
+name=Ceph packages for x86_64
+baseurl=http://ceph.com/rpm-hammer/rhel7/x86_64
+enabled=1
+priority=2
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
+
+[ceph-noarch]
+name=Ceph noarch packages
+baseurl=http://ceph.com/rpm-hammer/rhel7/noarch
+enabled=1
+priority=2
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
+EOF
+
+cat <<EOF >/etc/yum.repos.d/mongo.repo
+[10gen]
+name=10gen Repository
+baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
+gpgcheck=0
+EOF
+
+yum update -y
+yum install createrepo -y
+yum install tar -y
+
+#download packages
+#set packages = $getVar('default_packages', [])
+#for pkg in $packages
+yum -y install $pkg --downloadonly
+#end for
+#set packages = $getVar('packages', [])
+#for pkg in $packages
+yum -y install $pkg --downloadonly
+#end for
+
+#make repo
+
+mkdir -p /centos7-kilo-ppa/{Packages,repodata}
+
+find /var/cache/yum/ -name "*.rpm" | xargs -i cp {} /centos7-kilo-ppa/Packages/
+
+rm /centos7-kilo-ppa/Packages/selinux-policy* -f
+rm /centos7-kilo-ppa/Packages/systemd* -f
+rm /centos7-kilo-ppa/Packages/openssl-1.0.1e-42.el7.9.x86_64.rpm
+rm /centos7-kilo-ppa/Packages/libnl3-3.2.21-9.el7_1.x86_64.rpm
+
+mv /epel-release-7-5.noarch.rpm /centos7-kilo-ppa/Packages/
+cp /comps.xml /centos7-kilo-ppa/
+cp /ceph_key_release.asc /centos7-kilo-ppa/
+createrepo -g comps.xml /centos7-kilo-ppa
+mkdir /centos7-kilo-ppa/noarch
+mkdir /centos7-kilo-ppa/noarch/Packages
+cp -r /centos7-kilo-ppa/Packages/ceph* /centos7-kilo-ppa/noarch/Packages/
+cp -r /centos7-kilo-ppa/repodata/ /centos7-kilo-ppa/noarch/
+tar -zcvf /centos7-kilo-ppa.tar.gz /centos7-kilo-ppa
diff --git a/deploy/adapters/ansible/openstack/templates/nova.conf b/deploy/adapters/ansible/openstack/templates/nova.conf
index ed415915..b15032f5 100644
--- a/deploy/adapters/ansible/openstack/templates/nova.conf
+++ b/deploy/adapters/ansible/openstack/templates/nova.conf
@@ -49,6 +49,8 @@ notify_on_state_change = vm_and_task_state
notification_driver = nova.openstack.common.notifier.rpc_notifier
notification_driver = ceilometer.compute.nova_notifier
+memcached_servers = {{ internal_vip.ip }}:11211
+
[database]
# The SQLAlchemy connection string used to connect to the database
connection = mysql://nova:{{ NOVA_DBPASS }}@{{ db_host }}/nova
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/cinder-controller/tasks/cinder_config.yml b/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_config.yml
index 85556a5a..b06aac50 100644
--- a/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_config.yml
+++ b/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_config.yml
@@ -4,6 +4,6 @@
- name: sync cinder db
#cinder_manage: action=dbsync
- shell: cinder-manage db sync
+ shell: su -s /bin/sh -c 'cinder-manage db sync' cinder
notify:
- restart cinder control serveice
diff --git a/deploy/adapters/ansible/roles/common/tasks/main.yml b/deploy/adapters/ansible/roles/common/tasks/main.yml
index 0b72d6e2..3114e638 100644
--- a/deploy/adapters/ansible/roles/common/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/common/tasks/main.yml
@@ -1,20 +1,17 @@
---
- include_vars: "{{ ansible_os_family }}.yml"
-- name: first update pkgs
- shell: "{{ ansible_pkg_mgr }} update"
+- name: speed up ansible by purging landscape-common
+ apt: pkg=landscape-common state=absent purge=yes
+ when: ansible_os_family == "Debian"
-- name: install packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest"
- with_items: packages | union(packages_noarch)
-- name: update hosts files to all hosts
- template: src=hosts
- dest=/etc/hosts
- backup=yes
+- name: install pip packages
+ pip: name={{ item }} state=present extra_args='--pre'
+ with_items: pip_packages
-- name: make config template dir exist
- file: path=/opt/os_templates state=directory mode=0755
+- name: update hosts files to all hosts
+ template: src=hosts dest=/etc/hosts backup=yes
- name: get compass-core hostname
local_action: shell hostname
@@ -22,22 +19,28 @@
- name: get compass-core addr
shell: awk -F'=' '/compass_server/ {print $2}' /etc/compass.conf
- register: ip
+ register: COMPASS_SERVER
- name: update compass-core name and ip to hosts files
shell: |
echo "# compass" >> /etc/hosts
- echo {{ ip.stdout_lines[0] }} {{ name.stdout_lines[0] }} >> /etc/hosts
+ echo {{ COMPASS_SERVER.stdout_lines[0] }} {{ name.stdout_lines[0] }} >> /etc/hosts
+
+- name: first update pkgs
+ shell: "{{ ansible_pkg_mgr }} update"
+
+- name: install packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest"
+ with_items: packages | union(packages_noarch)
+
+- name: make config template dir exist
+ file: path=/opt/os_templates state=directory mode=0755
- name: create pip config directory
file: path=~/.pip state=directory
-- name: get pip source server addr
- shell: awk -F'=' '/compass_server/ {print $2}' /etc/compass.conf
- register: COMPASS_SERVER
-
- name: update pip.conf
- template: src=pip.conf dest=~/.pip/pip.conf
+ template: src=pip.conf dest=~/.pip/{{ pip_conf }}
- 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 c471d148..bc273a10 100644
--- a/deploy/adapters/ansible/roles/common/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/common/vars/Debian.yml
@@ -6,6 +6,10 @@ packages:
- openvswitch-switch
- crudini
+pip_packages: []
+
+pip_conf: pip.conf
+
services: []
ntp_service: ntp
diff --git a/deploy/adapters/ansible/roles/common/vars/RedHat.yml b/deploy/adapters/ansible/roles/common/vars/RedHat.yml
index 57172b7f..10aa7715 100644
--- a/deploy/adapters/ansible/roles/common/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/common/vars/RedHat.yml
@@ -1,8 +1,12 @@
---
packages:
- - python-devel
- openvswitch
+pip_packages:
+ - crudini
+
+pip_conf: .pip.conf
+
services:
- openvswitch
diff --git a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
index dd5c6fd0..01c7ebb3 100644
--- a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
@@ -23,6 +23,11 @@
dest=/etc/openstack-dashboard/local_settings.py
backup=yes
+- name: update memcached conf
+ lineinfile: dest=/etc/memcached.conf state=present
+ regexp="-l *"
+ line="-l {{ internal_vip.ip }}"
+
- name: restart dashboard services
service: name={{ item }} state=restarted enabled=yes
with_items: services | union(services_noarch)
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/main.yml b/deploy/adapters/ansible/roles/dashboard/vars/main.yml
index b6a965c2..39843a3e 100644
--- a/deploy/adapters/ansible/roles/dashboard/vars/main.yml
+++ b/deploy/adapters/ansible/roles/dashboard/vars/main.yml
@@ -3,4 +3,5 @@ packages_noarch:
- memcached
- openstack-dashboard
-services_noarch: []
+services_noarch:
+ - memcached
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
index 5ca23a19..c46a2932 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
@@ -3,6 +3,10 @@
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items: mongodb_packages | union(packages_noarch)
+- name: install pymongod packages
+ pip: name={{ item }} state=present extra_args='--pre'
+ with_items: pip_packages
+
- name: copy ceilometer configs
template: src=mongodb.conf dest=/opt/os_templates backup=yes
@@ -17,7 +21,7 @@
- /var/lib/mongodb/journal/*
- name: manually restart mongodb server
- service: name=mongodb state=restarted
+ service: name={{ mongodb_serveice }} state=restarted
- wait_for: port=27017 delay=3 timeout=60 host={{ internal_vip.ip }}
diff --git a/deploy/adapters/ansible/roles/database/vars/Debian.yml b/deploy/adapters/ansible/roles/database/vars/Debian.yml
index 6f085ffd..7035c2bf 100644
--- a/deploy/adapters/ansible/roles/database/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/database/vars/Debian.yml
@@ -15,8 +15,12 @@ maridb_packages:
- mysql-wsrep-server-5.5
- galera-3
+pip_packages: []
+
services: []
+mongodb_serveice: mongodb
+
mysql_config_file_path: "/etc/mysql"
mysql_config_file_name: ["my.cnf"]
wsrep_config_file_path: "/etc/mysql/conf.d"
diff --git a/deploy/adapters/ansible/roles/database/vars/RedHat.yml b/deploy/adapters/ansible/roles/database/vars/RedHat.yml
index a4171559..ac2f2f22 100644
--- a/deploy/adapters/ansible/roles/database/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/database/vars/RedHat.yml
@@ -4,13 +4,23 @@ mysql_packages:
- mysql-server
maridb_packages:
+ - MySQL-python
- MariaDB-Galera-server
- MariaDB-client
- galera
- MySQL-python
+mongodb_packages:
+ - mongo-10gen-server
+ - mongo-10gen
+
+pip_packages:
+ - pymongo
+
services: []
+mongodb_serveice: mongod
+
mysql_config_file_path: "/etc/my.cnf.d"
mysql_config_file_name: ["my-huge.cnf", "server.cnf"]
wsrep_config_file_path: "/etc/my.cnf.d"
diff --git a/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml b/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml
index 4cd71ffc..2e024675 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml
@@ -1,7 +1,7 @@
---
- name: sync glance db
#glance_manage: action=dbsync
- shell: glance-manage db sync
+ shell: su -s /bin/sh 'glance-manage db sync' glance
ignore_errors: True
notify:
- restart glance services
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml
index 6c39da8d..2ef7803d 100644
--- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml
+++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml
@@ -1,7 +1,7 @@
---
- name: keystone-manage db-sync
#keystone_manage: action=dbsync
- shell: keystone-manage db_sync
+ shell: su -s /bin/sh -c 'keystone-manage db_sync' keystone
- name: wait for keystone ready
wait_for: port=35357 delay=3 timeout=10 host={{ internal_vip.ip }}
diff --git a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
index 8667a9b1..818ac57a 100644
--- a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
@@ -24,7 +24,7 @@
- setup_networks/setup_networks.py
- name: copy boot scripts
- copy: src={{ item }} dest=/etc/init.d mode=0755
+ copy: src={{ item }} dest=/etc/init.d/ mode=0755
with_items:
- setup_networks/net_init
diff --git a/deploy/adapters/cobbler/kickstarts/default.seed b/deploy/adapters/cobbler/kickstarts/default.seed
index 7461f83d..64be15ab 100644
--- a/deploy/adapters/cobbler/kickstarts/default.seed
+++ b/deploy/adapters/cobbler/kickstarts/default.seed
@@ -132,6 +132,8 @@ d-i cdrom-detect/eject boolean false
# packages and run commands in the target system.
# d-i preseed/late_command string [command]
d-i preseed/late_command string \
+in-target sed -i '$a UseDNS no' /etc/ssh/sshd_config; \
+in-target sed -i 's/.*GSSAPIAuthentication.*/GSSAPIAuthentication no/g' /etc/ssh/sshd_config; \
wget -O- \
http://$http_server/cblr/svc/op/script/$what/$name/?script=preseed_late_default | \
chroot /target /bin/sh -s; cp /target/etc/network/interfaces /etc/network/interfaces
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index 3ba20266..958bf33b 100644
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -38,6 +38,7 @@ function wait_ok() {
sleep 1
let retry+=1
if [[ $retry -ge $1 ]];then
+ timeout 1s ssh $ssh_args root@$MGMT_IP "exit"
log_error "os install time out"
exit 1
fi
diff --git a/deploy/conf/cluster.conf b/deploy/conf/cluster.conf
index b905957d..39e6d467 100644
--- a/deploy/conf/cluster.conf
+++ b/deploy/conf/cluster.conf
@@ -1,9 +1,14 @@
export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)ubuntu-14\.04\.3.*'}
-#export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)CentOS-7.*1503-01.*'}
export REPO_NAME=${REPO_NAME:-"trusty-juno-ppa"}
-#export REPO_NAME=${REPO_NAME:-"centos7-juno-ppa"}
export ADAPTER_NAME="openstack_juno"
export ADAPTER_TARGET_SYSTEM_PATTERN="^openstack$"
-export ADAPTER_FLAVOR_PATTERN="HA-ansible-multinodes"
+export ADAPTER_FLAVOR_PATTERN="HA-ansible-multinodes-juno"
+
+#export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)CentOS-7.*1503-01.*'}
+#export REPO_NAME=${REPO_NAME:-"centos7-kilo-ppa"}
+#export ADAPTER_NAME="openstack_kilo"
+#export ADAPTER_TARGET_SYSTEM_PATTERN="^openstack$"
+#export ADAPTER_FLAVOR_PATTERN="HA-ansible-multinodes-kilo"
+
export DEFAULT_ROLES=""
export VIP="10.1.0.222"
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: