Commit 8f6889d7 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Łukasz Nowak

repo: Make install.sh script reusable

Thanks to using install.rc it is possible to easily select any playbook
to be used during the installation.
parent 0bade643
...@@ -27,6 +27,9 @@ Building ...@@ -27,6 +27,9 @@ Building
Compile ERP5 with erp5-standalone script. Compile ERP5 with erp5-standalone script.
Note: You can modify `install.rc` and use different playbook, than keep in mind
to use proper script or just a playbook in above step.
Go to ``~/rpmbuild/SPECS``. Go to ``~/rpmbuild/SPECS``.
Build all RPMs with: Build all RPMs with:
...@@ -40,7 +43,12 @@ Usage - instruction to user installing with RPMs ...@@ -40,7 +43,12 @@ Usage - instruction to user installing with RPMs
Required machine is CentOS 7.4 with at least Netinstall. Required machine is CentOS 7.4 with at least Netinstall.
Provide all RPMs with `install.sh` in one directory (eg. tarball). Create tarball with:
* `install.sh`
* `install.rc`
* RPMs generated
* slapos.node RPM
Ask user to run `install.sh` as `root`. Ask user to run `install.sh` as `root`.
......
PLAYBOOK=erp5-standalone.yml
\ No newline at end of file
#!/bin/sh #!/bin/bash
source install.rc
LOG_FILE=install.log LOG_FILE=install.log
echo -n "Started at " >> $LOG_FILE 2>&1 echo -n "Started at " >> $LOG_FILE 2>&1
...@@ -31,7 +34,7 @@ echo "done." ...@@ -31,7 +34,7 @@ echo "done."
echo -n "Instantiating ERP5 instance..." echo -n "Instantiating ERP5 instance..."
for i in `seq 10` ; do for i in `seq 10` ; do
ansible-playbook /opt/slapos.playbook/erp5-standalone.yml >> $LOG_FILE 2>&1 ansible-playbook /opt/slapos.playbook/$PLAYBOOK >> $LOG_FILE 2>&1
ANSIBLE_RESULT=$? ANSIBLE_RESULT=$?
if [ "$ANSIBLE_RESULT" == "0" ] ; then if [ "$ANSIBLE_RESULT" == "0" ] ; then
break break
......
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