Commit 5b3a34f7 authored by Rafael Monnerat's avatar Rafael Monnerat

Implement unstable channel

parent 17062c5d
......@@ -11,7 +11,9 @@
command: mkdir -p {{ base_path }}/{{ item }}
with_items:
- install/gnet/
- install/unstable/gnet/
- install/imt/
- install/unstable/imt/
- name: generate scripts
template: src=roles/install-script/templates/base_setup.j2 dest={{ base_path }}/install/base-setup mode=0666
......@@ -36,18 +38,36 @@
copy: src=roles/install-script/files/index.html dest={{ base_path }}/install/imt/index.html mode=0666
roles:
- { role: "install-script", playbook_yml: "slapos.yml", script_path: "install/slapos" }
- { role: "install-script", playbook_yml: "re6stnet.yml", script_path: "install/re6st"}
- { role: "install-script", playbook_yml: "vifib.yml", script_path: "install/vifib"}
- { role: "install-script", playbook_yml: "vifib-shuttle.yml", script_path: "install/vifib-shuttle"}
- { role: "install-script", playbook_yml: "erp5-standalone.yml", script_path: "install/erp5-standalone"}
- { role: "install-script", playbook_yml: "wendelin-standalone.yml", script_path: "install/wendelin-standalone"}
- { role: "install-script", playbook_yml: "slapos-test-node.yml", script_path: "install/slapos-test-node"}
- { role: "install-script", playbook_yml: "gnet-re6stnet.yml", script_path: "install/gnet/re6st"}
- { role: "install-script", playbook_yml: "gnet-server.yml", script_path: "install/gnet/slapos"}
- { role: "install-script", playbook_yml: "imt-server-update.yml", script_path: "install/imt/slapos-update"}
- { role: "install-script", playbook_yml: "imt-server.yml", script_path: "install/imt/slapos"}
- { role: "install-script", playbook_yml: "imt-vm-bootstrap.yml", script_path: "install/imt/vm-bootstrap"}
- { role: "install-script", playbook_yml: "imt-vm-cloudera-manager.yml", script_path: "install/imt/vm-cloudera-manager"}
- { role: "install-script", playbook_yml: "imt-re6stnet.yml", script_path: "install/imt/re6st"}
- { role: "install-script", playbook_yml: "test-suite.yml", script_path: "install/test-suite"}
- { role: "install-script", channel: "stable", playbook_yml: "slapos.yml", script_path: "install/slapos" }
- { role: "install-script", channel: "stable", playbook_yml: "re6stnet.yml", script_path: "install/re6st"}
- { role: "install-script", channel: "stable", playbook_yml: "vifib.yml", script_path: "install/vifib"}
- { role: "install-script", channel: "stable", playbook_yml: "vifib-shuttle.yml", script_path: "install/vifib-shuttle"}
- { role: "install-script", channel: "stable", playbook_yml: "erp5-standalone.yml", script_path: "install/erp5-standalone"}
- { role: "install-script", channel: "stable", playbook_yml: "wendelin-standalone.yml", script_path: "install/wendelin-standalone"}
- { role: "install-script", channel: "stable", playbook_yml: "slapos-test-node.yml", script_path: "install/slapos-test-node"}
- { role: "install-script", channel: "stable", playbook_yml: "gnet-re6stnet.yml", script_path: "install/gnet/re6st"}
- { role: "install-script", channel: "stable", playbook_yml: "gnet-server.yml", script_path: "install/gnet/slapos"}
- { role: "install-script", channel: "stable", playbook_yml: "imt-server-update.yml", script_path: "install/imt/slapos-update"}
- { role: "install-script", channel: "stable", playbook_yml: "imt-server.yml", script_path: "install/imt/slapos"}
- { role: "install-script", channel: "stable", playbook_yml: "imt-vm-bootstrap.yml", script_path: "install/imt/vm-bootstrap"}
- { role: "install-script", channel: "stable", playbook_yml: "imt-vm-cloudera-manager.yml", script_path: "install/imt/vm-cloudera-manager"}
- { role: "install-script", channel: "stable", playbook_yml: "imt-re6stnet.yml", script_path: "install/imt/re6st"}
- { role: "install-script", channel: "stable", playbook_yml: "test-suite.yml", script_path: "install/test-suite"}
- { role: "install-script", channel: "unstable", playbook_yml: "slapos.yml", script_path: "install/unstable/slapos" }
- { role: "install-script", channel: "unstable", playbook_yml: "re6stnet.yml", script_path: "install/unstable/re6st"}
- { role: "install-script", channel: "unstable", playbook_yml: "vifib.yml", script_path: "install/unstable/vifib"}
- { role: "install-script", channel: "unstable", playbook_yml: "vifib-shuttle.yml", script_path: "install/unstable/vifib-shuttle"}
- { role: "install-script", channel: "unstable", playbook_yml: "erp5-standalone.yml", script_path: "install/unstable/erp5-standalone"}
- { role: "install-script", channel: "unstable", playbook_yml: "wendelin-standalone.yml", script_path: "install/unstable/wendelin-standalone"}
- { role: "install-script", channel: "unstable", playbook_yml: "slapos-test-node.yml", script_path: "install/unstable/slapos-test-node"}
- { role: "install-script", channel: "unstable", playbook_yml: "gnet-re6stnet.yml", script_path: "install/unstable/gnet/re6st"}
- { role: "install-script", channel: "unstable", playbook_yml: "gnet-server.yml", script_path: "install/unstable/gnet/slapos"}
- { role: "install-script", channel: "unstable", playbook_yml: "imt-server-update.yml", script_path: "install/unstable/imt/slapos-update"}
- { role: "install-script", channel: "unstable", playbook_yml: "imt-server.yml", script_path: "install/unstable/imt/slapos"}
- { role: "install-script", channel: "unstable", playbook_yml: "imt-vm-bootstrap.yml", script_path: "install/unstable/imt/vm-bootstrap"}
- { role: "install-script", channel: "unstable", playbook_yml: "imt-vm-bootstrap.yml", script_path: "install/imt-dev-bootstrap"}
- { role: "install-script", channel: "unstable", playbook_yml: "imt-vm-cloudera-manager.yml", script_path: "install/unstable/imt/vm-cloudera-manager"}
- { role: "install-script", channel: "unstable", playbook_yml: "imt-re6stnet.yml", script_path: "install/unstable/imt/re6st"}
- { role: "install-script", channel: "unstable", playbook_yml: "test-suite.yml", script_path: "install/unstable/test-suite"}
---
- name: generate scripts
template: src=install.j2 dest={{ base_path }}/{{ script_path }} mode=0666
when: channel == "stable"
- name: generate scripts
template: src=install_unstable.j2 dest={{ base_path }}/{{ script_path }} mode=0666
when: channel == "unstable"
- name: Set ansible playbook on scripts
lineinfile: dest={{ base_path }}/{{ script_path }} line="ansible-playbook {{ playbook_yml }} -i hosts --connection=local" state=present
#!/bin/bash
set -e
#### Setup Ansible and load few libraries #####
BASE_SETUP_SCRIPT_MD5={{ base_setup.stat.md5 }}
type wget >/dev/null 2>&1 || { echo >&2 "I require wget but it's not installed. Aborting."; exit 1; }
wget --no-check-certificate https://deploy.erp5.cn/base-setup -O /tmp/base-setup
if [ "`md5sum /tmp/base-setup | cut -f1 -d\ `" != "$BASE_SETUP_SCRIPT_MD5" ]; then
echo "ERROR: base-setup has wrong md5 `md5sum /tmp/base-setup | cut -f1 -d\ ` != $BASE_SETUP_SCRIPT_MD5"
exit 1
fi
source /tmp/base-setup
download_playbook
sed -i "s/key = slapos-global-key/key = slapos-global-unstable-key/g" /etc/opt/slapcache.cfg
clear
echo "Starting Ansible playbook:"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment