Hi all,
I noticed that there were a lot of issues in the installers instructions. For example, missing instructions regarding database user, database name, issues in the db.sql dump. Instead of correcting them, I thought I'd try to re-make the installation experience by automating it in Ansible for Linux at least.
At the end, I'll end up with a simple yaml file alá
setting: value-x
setting2: value-y
I'm pretty far gone atm and hope to be done in the coming week or sooner. Please note that this makes the installer omnipotent as well, meaning you can re-run it without problems. Also, this fixes that db.sql contains statement for setting the root user password and allows the user to encrypt database / hi-ce user passwords using an Ansible vault.
Anyways. This turns the complete installations into editing the yaml settings file and running three commands:
[root@ip-172-31-24-100 ansible-installer]# yum -y install python-pip && pip install ansible
[root@ip-172-31-24-100 ansible-installer]# vi vars/settings.yml
[root@ip-172-31-24-100 ansible-installer]# ansible-playbook -i hosts install_helical.yml
PLAY [localhost] *****************************************************************************************************************************************
TASK [Enable EPEL] ***************************************************************************************************************************************
ok: [localhost]
TASK [Register to RHN and auto-subscribe to available content.] ******************************************************************************************
ok: [localhost]
TASK [Enable RHSM repositories (extras, optional)] *******************************************************************************************************
ok: [localhost] => (item=rhel-7-server-extras-rpms)
ok: [localhost] => (item=rhel-7-server-optional-rpms)
TASK [Install prerequisites] *****************************************************************************************************************************
[WARNING]: Consider using the yum module rather than running 'yum'. If you need to use command because yum is insufficient you can add 'warn: false' to
this command task or set 'command_warnings=False' in ansible.cfg to get rid of this message.
changed: [localhost]
TASK [Enable MariaDB service] ****************************************************************************************************************************
ok: [localhost]
TASK [Create the Helical database user] ******************************************************************************************************************
ok: [localhost]
TASK [Import sample report to Helical database] **********************************************************************************************************
changed: [localhost]
TASK [Set hi-repository path] ****************************************************************************************************************************
ok: [localhost]
TASK [Set BaseURL to listen to] **************************************************************************************************************************
ok: [localhost]
TASK [Configure app with correct helical database user] **************************************************************************************************
ok: [localhost]
TASK [Configure app with correct helical database password] **********************************************************************************************
ok: [localhost]
TASK [Configure app with correct helical database source] ************************************************************************************************
ok: [localhost]
TASK [Deploy hi-ce war file] *****************************************************************************************************************************
changed: [localhost]
TASK [Restart tomcat] ************************************************************************************************************************************
changed: [localhost]
TASK [Print BaseURL] *************************************************************************************************************************************
ok: [localhost] => {
"msg": "Helical Insights will be reachable at: http://35.157.136.233:8080/hi-ce/hi.html"
}
PLAY RECAP ***********************************************************************************************************************************************
localhost : ok=15 changed=4 unreachable=0 failed=0