Documentation: Activemq Ansible Role

Created on 15 Aug 2017  路  8Comments  路  Source: Islandora/documentation

Description

Create an Ansible role to install activemq and add it to the CLAW playbook.

As with all Ansible roles, check Galaxy for an existing role. If one is found, look to see if it supports both Ubuntu and CENTOS. If it does not support CENTOS, ask the maintainer if they would be receptive to a pull request later on. If it looks well used and either supports CENTOS or is agreeable to a PR for supporting CENTOS, we should use it instead of creating new one.

If creating a new role, start by looking at https://github.com/Islandora-CLAW/claw_vagrant as a starting point. Be sure that it is idempotent and can be run over and over again with no new effect. Use Jinja templating to alter config when deploying instead of using sed a la claw_vagrant.

Testing Instructions

Test the role by running the CLAW playbook after pulling in the changes. Be sure to execute it multiple times to confirm it is idempotent.

Ansible Community Sprint Small

Most helpful comment

All 8 comments

@dannylamb This looks like a self contained ticket. You can assign this one to me for next week.

@jonathangreen @dannylamb @MarcusBarnes

Please review this role here: https://github.com/Natkeeran/activemq-role. I have not integrated into https://github.com/Islandora-Devops/claw-playbook yet.

I did review several ansible roles from galaxy, including this one. They seemed bit complicated to duplicate the activemq.sh functionality. Thus I followed @jonathangreen fits example to create this role.

Note that I had to add the "Move activemq" task because the creates flag was note working as expected for me for unarchive.

Testing

To test it, you will need a bare metal ubuntu machine with java installed:

# Java
apt-get -y install openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre
sed -i '$iJAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64' /etc/environment
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

The default ActiveMQ login details are:

  • username: admin
  • password: admin

You can access the ActiveMQ administrative interface at: http://localhost:8161/admin

Ansible Notes

Please see further notes here about setting up ansible here

To execute this playbook:

activemq-role$ ansible-playbook -i inventory/vagrant/hosts  playbook.yml

I'll give this a run through this afternoon and or tomorrow morning and report back. Thanks!

@Natkeeran Do you think you could make it part of claw-playbook and issue a PR against that? It would make it easier to review as a diff.

@dannylamb @jonathangreen Pushed a branch here: https://github.com/Islandora-Devops/claw-playbook/tree/activemq.

Please note that I am running into some issues such as below that I am not able to test this properly.

TASK [webserver-app : Trusted Host Settings] ***********************************
fatal: [default]: FAILED! => {"changed": false, "failed": true, "msg": "unsupported parameter for module: path"}
TASK [fits : Set fits.home in catalina.properties] *****************************
fatal: [default]: FAILED! => {"changed": false, "failed": true, "msg": "unsupported parameter for module: path"}

@Natkeeran cool I'll try testing your branch and see what I get. If you want to make a PR from you branch it makes it way easier to give feedback on the code.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonathangreen picture jonathangreen  路  4Comments

acoburn picture acoburn  路  4Comments

jonathangreen picture jonathangreen  路  3Comments

dannylamb picture dannylamb  路  3Comments

acoburn picture acoburn  路  4Comments