Commit f26d8ba1 authored by Rafael Monnerat's avatar Rafael Monnerat

playbook: Update Install Scripts

  Spin-off Channels for SlapOS/VIFIB/Grandenet from VM related ones.
  Fixes for dev/ansible-only installation
  Include more index.html with autoredirect.
  Include README file with explanation for the channels.
parent 00bbd6cd
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
connection: local connection: local
vars: vars:
- playbook_file: https://lab.nexedi.cn/rafael/slapos.playbook/repository/archive.tar.gz?ref=master
- base_path: . - base_path: .
pre_tasks: pre_tasks:
...@@ -12,6 +11,7 @@ ...@@ -12,6 +11,7 @@
with_items: with_items:
- install/gnet/ - install/gnet/
- install/unstable/gnet/ - install/unstable/gnet/
- install/testing/gnet/
- install/imt/ - install/imt/
- install/unstable/imt/ - install/unstable/imt/
...@@ -28,42 +28,53 @@ ...@@ -28,42 +28,53 @@
- name: generate ansible-only - name: generate ansible-only
template: src=roles/install-script/templates/ansible-only.j2 dest={{ base_path }}/install/ansible mode=0666 template: src=roles/install-script/templates/ansible-only.j2 dest={{ base_path }}/install/ansible mode=0666
- name: generate index.html - name: generate main index.html
copy: src=roles/install-script/files/index.html dest={{ base_path }}/install/index.html mode=0666 copy: src=roles/install-script/files/main_index.html dest={{ base_path }}/install/index.html mode=0666
- name: generate index.html - name: generate index.html
copy: src=roles/install-script/files/index.html dest={{ base_path }}/install/gnet/index.html mode=0666 copy: src=roles/install-script/files/index.html dest={{ base_path }}/{{ item }}/index.html mode=0666
with_items:
- install/gnet
- install/imt
- install/unstable
- install/unstable/imt
- install/testing/gnet
- install/testing
- name: generate index.html post_tasks:
copy: src=roles/install-script/files/index.html dest={{ base_path }}/install/imt/index.html mode=0666 - shell: tree | grep -v index.html | grep -v \ directories > map.txt
args:
chdir: install/
roles: roles:
- { role: "install-script", channel: "stable", playbook_yml: "slapos.yml", script_path: "install/slapos" } - { role: "install-script", channel: "slapos", 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: "slapos", 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: "slapos", 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: "slapos", 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: "slapos", 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: "slapos", 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: "slapos", 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: "slapos", 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: "slapos", playbook_yml: "gnet-server.yml", script_path: "install/gnet/slapos"}
- { role: "install-script", channel: "slapos", playbook_yml: "test-suite.yml", script_path: "install/test-suite"}
- { 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-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-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-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-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: "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: "slapos_testing", playbook_yml: "slapos.yml", script_path: "install/testing/slapos" }
- { role: "install-script", channel: "slapos_testing", playbook_yml: "re6stnet.yml", script_path: "install/testing/re6st"}
- { role: "install-script", channel: "slapos_testing", playbook_yml: "vifib.yml", script_path: "install/testing/vifib"}
- { role: "install-script", channel: "slapos_testing", playbook_yml: "vifib-shuttle.yml", script_path: "install/testing/vifib-shuttle"}
- { role: "install-script", channel: "slapos_testing", playbook_yml: "erp5-standalone.yml", script_path: "install/testing/erp5-standalone"}
- { role: "install-script", channel: "slapos_testing", playbook_yml: "wendelin-standalone.yml", script_path: "install/testing/wendelin-standalone"}
- { role: "install-script", channel: "slapos_testing", playbook_yml: "slapos-test-node.yml", script_path: "install/testing/slapos-test-node"}
- { role: "install-script", channel: "slapos_testing", playbook_yml: "gnet-re6stnet.yml", script_path: "install/testing/gnet/re6st"}
- { role: "install-script", channel: "slapos_testing", playbook_yml: "gnet-server.yml", script_path: "install/testing/gnet/slapos"}
- { role: "install-script", channel: "slapos_testing", playbook_yml: "test-suite.yml", script_path: "install/testing/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-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-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/unstable/imt/vm-bootstrap"}
......
The installation scripts are splited on 4 diferent keys or channels:
slapos-global-key: Fully stable playbook, Dedicated to KVM cluster autosetup images and
computers who host KVM clusters on IMT infraestructure.
slapos-global-unstable-key: Unstable or Development playbook alternative for
slapos-global-key.
slapos-global-vifib-official-key: Official VIFIB and Grandenet Stable Playbook, it include
either stable versions of the Cluster/Standalone servers.
slapos-global-vifib-testing-key: Testing Playbook VIFIB and Grandenet Stable Playbook, it
include unstable (or more recently versions) of the Cluster/Standalone servers.
Developers channels (or keys) are not included on this list, only official ones.
<html> <html>
<head> <head>
<meta http-equiv="refresh" content="0; url=http://deploy.erp5.cn/" />
<title></tile> <title></tile>
</head> </head>
<body> <body>
Redirectng to https://deploy.erp5.cn/
</body> </body>
</html> </html>
<html>
<head>
<title></tile>
</head>
<body>
<h1> Quick Installation Scripts for Nexedi's Related Open Source Projects </h1>
<p> Please use the full url for download the right script... </p>
</body>
</html>
...@@ -7,5 +7,13 @@ ...@@ -7,5 +7,13 @@
template: src=install_unstable.j2 dest={{ base_path }}/{{ script_path }} mode=0666 template: src=install_unstable.j2 dest={{ base_path }}/{{ script_path }} mode=0666
when: channel == "unstable" when: channel == "unstable"
- name: generate scripts
template: src=install_slapos.j2 dest={{ base_path }}/{{ script_path }} mode=0666
when: channel == "slapos"
- name: generate scripts
template: src=install_slapos_testing.j2 dest={{ base_path }}/{{ script_path }} mode=0666
when: channel == "slapos_testing"
- name: Set ansible playbook on scripts - name: Set ansible playbook on scripts
lineinfile: dest={{ base_path }}/{{ script_path }} line="ansible-playbook {{ playbook_yml }} -i hosts --connection=local" state=present lineinfile: dest={{ base_path }}/{{ script_path }} line="ansible-playbook {{ playbook_yml }} -i hosts --connection=local" state=present
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#### Setup Ansible and load few libraries ##### #### Setup Ansible and load few libraries #####
BASE_SETUP_SCRIPT_MD5={{ base_setup.stat.md5 }} BASE_SETUP_SCRIPT_MD5={{ base_setup.stat.md5 }}
wget --no-check-certificate https://deploy.nexedi.cn/base-setup -O /tmp/base-setup 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 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" echo "ERROR: base-setup has wrong md5 `md5sum /tmp/base-setup | cut -f1 -d\ ` != $BASE_SETUP_SCRIPT_MD5"
......
...@@ -5,7 +5,7 @@ PLAYBOOK_REPOSITORY_URL=https://lab.nexedi.com/nexedi/slapos.package.git ...@@ -5,7 +5,7 @@ PLAYBOOK_REPOSITORY_URL=https://lab.nexedi.com/nexedi/slapos.package.git
#### Setup Ansible and load few libraries ##### #### Setup Ansible and load few libraries #####
BASE_SETUP_SCRIPT_MD5={{ base_setup.stat.md5 }} BASE_SETUP_SCRIPT_MD5={{ base_setup.stat.md5 }}
wget --no-check-certificate https://deploy.nexedi.cn/base-setup -O /tmp/base-setup 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 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" echo "ERROR: base-setup has wrong md5 `md5sum /tmp/base-setup | cut -f1 -d\ ` != $BASE_SETUP_SCRIPT_MD5"
......
#!/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
# Include Additional Functions
if [ ! -f /etc/opt/slapcache.cfg ]; then
slapcache-conf
fi
sed -i "s/key = slapos-global-key/key = slapos-global-official-vifib-key/g" /etc/opt/slapcache.cfg
DFILE="/tmp/tmpplaybook_unstable$(basename $0).$$/"
TFILE="archive.tar.gz"
mkdir -p $DFILE
cd $DFILE
slapcache-download --destination=$TFILE
tar -xzvf $TFILE
rm $TFILE
clear
echo "Starting Ansible playbook:"
#!/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
# Include Additional Functions
if [ ! -f /etc/opt/slapcache.cfg ]; then
slapcache-conf
fi
sed -i "s/key = slapos-global-key/key = slapos-global-official-vifib-testing-key/g" /etc/opt/slapcache.cfg
DFILE="/tmp/tmpplaybook_unstable$(basename $0).$$/"
TFILE="archive.tar.gz"
mkdir -p $DFILE
cd $DFILE
slapcache-download --destination=$TFILE
tar -xzvf $TFILE
rm $TFILE
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