Commit 9d5e79b7 by Łukasz Nowak

deploy: Install separate SlapOS Ansible

As distribution provided packages can vary in the same version of distribution,
install pinned version of ansible.
1 parent e7940670
Showing 39 changed files with 53 additions and 41 deletions
......@@ -124,7 +124,19 @@ fi
is_package_installed unzip || install_package unzip
is_package_installed openssl || install_package openssl
is_package_installed ansible || install_package ansible
ANSIBLE=/opt/slapos-ansible/bin/ansible
ANSIBLE_PLAYBOOK=$ANSIBLE-playbook
if [ ! -x $ANSIBLE ] ; then
ANSIBLE_DEST=/opt/slapos-ansible
mkdir -p $ANSIBLE_DEST
VENV_TMP=`mktemp -d`
wget -O $VENV_TMP/venv.tar.gz https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz
tar -C $VENV_TMP -xzf $VENV_TMP/venv.tar.gz
venvpy=$VENV_TMP/virtualenv*/virtualenv.py
python2 $venvpy $ANSIBLE_DEST/
$ANSIBLE_DEST/bin/pip install ansible==2.4.4.0
fi
is_package_installed python-setuptools || install_package python-setuptools
......@@ -237,8 +249,8 @@ class CallbackModule(baseModule):
EOF
ansible localhost -m easy_install -a name=slapcache --connection=local
ansible localhost -m easy_install -a name=requests --connection=local
$ANSIBLE localhost -m easy_install -a name=slapcache --connection=local
$ANSIBLE localhost -m easy_install -a name=requests --connection=local
if [ ! -f /usr/share/ansible_plugins/mitogen.zip ]; then
wget -O /usr/share/ansible_plugins/mitogen.zip https://github.com/dw/mitogen/archive/2d7821b824a77930812847c87ea385cf37198c3f.zip
......
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook erp5-standalone.yml -i hosts --connection=local
\ No newline at end of file
$ANSIBLE_PLAYBOOK erp5-standalone.yml -i hosts --connection=local
\ No newline at end of file
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook gnet-re6stnet.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK gnet-re6stnet.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_unstable_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-vm-bootstrap.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-vm-bootstrap.yml -i hosts --connection=local
......@@ -24,7 +24,7 @@ download_playbook
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-vm-bootstrap.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-vm-bootstrap.yml -i hosts --connection=local
# Check if playbook has been correctly extracted
......
......@@ -13,4 +13,4 @@ download_playbook
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-re6stnet.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-re6stnet.yml -i hosts --connection=local
......@@ -13,4 +13,4 @@ download_playbook
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-server.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-server.yml -i hosts --connection=local
......@@ -13,4 +13,4 @@ download_playbook
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-server-update.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-server-update.yml -i hosts --connection=local
......@@ -13,4 +13,4 @@ download_playbook
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-vm-bootstrap.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-vm-bootstrap.yml -i hosts --connection=local
......@@ -13,4 +13,4 @@ download_playbook
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-vm-cloudera-manager.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-vm-cloudera-manager.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook re6stnet.yml -i hosts --connection=local
\ No newline at end of file
$ANSIBLE_PLAYBOOK re6stnet.yml -i hosts --connection=local
\ No newline at end of file
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook slapos.yml -i hosts --connection=local
\ No newline at end of file
$ANSIBLE_PLAYBOOK slapos.yml -i hosts --connection=local
\ No newline at end of file
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook slapos-master-standalone.yml -i hosts --connection=local
\ No newline at end of file
$ANSIBLE_PLAYBOOK slapos-master-standalone.yml -i hosts --connection=local
\ No newline at end of file
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook slapos-test-node.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK slapos-test-node.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook test-suite.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK test-suite.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook erp5-standalone.yml -i hosts --connection=local
\ No newline at end of file
$ANSIBLE_PLAYBOOK erp5-standalone.yml -i hosts --connection=local
\ No newline at end of file
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook gnet-re6stnet.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK gnet-re6stnet.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook gnet-server.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK gnet-server.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook re6stnet.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK re6stnet.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook slapos.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK slapos.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook slapos-master-standalone.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK slapos-master-standalone.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook slapos-test-node.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK slapos-test-node.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook test-suite.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK test-suite.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook vifib.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK vifib.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook vifib-shuttle.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK vifib-shuttle.yml -i hosts --connection=local
......@@ -14,4 +14,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook webrunner-standalone.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK webrunner-standalone.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_testing_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook wendelin-standalone.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK wendelin-standalone.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_unstable_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-re6stnet.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-re6stnet.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_unstable_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-server.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-server.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_unstable_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-server-update.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-server-update.yml -i hosts --connection=local
......@@ -26,7 +26,7 @@ ${slapos_unstable_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-vm-bootstrap.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-vm-bootstrap.yml -i hosts --connection=local
# Check if playbook has been correctly extracted
......
......@@ -15,4 +15,4 @@ ${slapos_unstable_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook imt-vm-cloudera-manager.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK imt-vm-cloudera-manager.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_unstable_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook test-suite.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK test-suite.yml -i hosts --connection=local
......@@ -21,4 +21,4 @@ rm -rf /opt/upgrader/playbook-tmp
rm -rf /opt/upgrader/playbook
echo "Starting Ansible playbook:"
ansible-playbook upgrader-run.yml --extra-vars "upgrader_playbook=vifib-kernel-upgrade.yml" -i hosts --connection=local
\ No newline at end of file
$ANSIBLE_PLAYBOOK upgrader-run.yml --extra-vars "upgrader_playbook=vifib-kernel-upgrade.yml" -i hosts --connection=local
\ No newline at end of file
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook vifib.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK vifib.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook vifib-shuttle.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK vifib-shuttle.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook vifib-upgrader-install.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK vifib-upgrader-install.yml -i hosts --connection=local
......@@ -14,4 +14,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook webrunner-standalone.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK webrunner-standalone.yml -i hosts --connection=local
......@@ -15,4 +15,4 @@ ${slapos_install_content}
clear
echo "Starting Ansible playbook:"
ansible-playbook wendelin-standalone.yml -i hosts --connection=local
$ANSIBLE_PLAYBOOK wendelin-standalone.yml -i hosts --connection=local
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!