From 6db2a303546afa13d356f93eb26e76034a7208ef Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Sat, 24 Feb 2018 15:38:47 +0800 Subject: Seprate compass-tasks JIRA: - Keep three compass-tasks: compass-tasks - merge both OSA and kubespray compass-tasks-osa - only OSA compass-tasks-k8s - only kubespray Change-Id: Ia790da1b5080322c5e2efe0980aabe9a76867c10 Signed-off-by: Harry Huang --- compass-tasks-osa/run.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 compass-tasks-osa/run.sh (limited to 'compass-tasks-osa/run.sh') diff --git a/compass-tasks-osa/run.sh b/compass-tasks-osa/run.sh new file mode 100644 index 0000000..63e5cb0 --- /dev/null +++ b/compass-tasks-osa/run.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# add ansible-playbook for normal use +ln -s /root/.virtualenvs/compass-core/bin/ansible-playbook /usr/bin/ansible-playbook + +yum install https://rdoproject.org/repos/openstack-pike/rdo-release-pike.rpm -y +yum install git ntp wget ntpdate openssh-server python-devel sudo '@Development Tools' -y + +systemctl stop firewalld +systemctl mask firewalld + +mkdir -p /opt/git/ +cd /opt/git/ +wget artifacts.opnfv.org/compass4nfv/package/openstack_pike.tar.gz +tar -zxvf openstack_pike.tar.gz +rm -rf openstack_pike.tar.gz + +git clone https://git.openstack.org/openstack/openstack-ansible /opt/openstack-ansible + +cd /opt/openstack-ansible + +git checkout 16c69046bfd90d1b984de43bc6267fece6b75f1c +#git checkout 4cde8f86aaea1fde7c43016f661119879068a133 + +git checkout -b stable/pike + +/bin/cp -rf /opt/tacker_conf/ansible-role-requirements.yml /opt/openstack-ansible/ +/bin/cp -rf /opt/tacker_conf/openstack_services.yml /opt/openstack-ansible/playbooks/defaults/repo_packages/ +/bin/cp -rf /opt/tacker_conf/os-tacker-install.yml /opt/openstack-ansible/playbooks/ +/bin/cp -rf /opt/tacker_conf/tacker.yml /opt/openstack-ansible/playbooks/inventory/env.d/ +/bin/cp -rf /opt/tacker_conf/tacker_all.yml /opt/openstack-ansible/group_vars/ +/bin/cp -rf /opt/tacker_conf/user_secrets.yml /opt/openstack-ansible/etc/openstack_deploy/ + +/bin/cp -rf /opt/openstack-ansible/etc/openstack_deploy /etc/openstack_deploy + +cd /opt/openstack-ansible + +scripts/bootstrap-ansible.sh + +rm -f /usr/local/bin/ansible-playbook + +cd /opt/openstack-ansible/scripts/ +python pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml + +cd /opt/openstack-ansible/group_vars +sed -i 's/#repo_build_git_cache/repo_build_git_cache/g' repo_all.yml + +cp /opt/setup-complete.yml /opt/openstack-ansible/playbooks/ +echo "- include: setup-complete.yml" >> /opt/openstack-ansible/playbooks/setup-infrastructure.yml -- cgit 1.2.3-korg