georchestra / ansible

Ansible playbooks to deploy a fullblown geOrchestra instance
ISC License
16 stars 12 forks source link
ansible georchestra playbook sdi

geOrchestra-ansible

A simple ansible playbook to deploy a fullblown geOrchestra SDI instance.

Right now, this will deploy a working geOrchestra from the master branch with mostly default configs and empty databases/datadirs.

Prerequisite

setup

In order to deploy all the middleware and components of a geOrchestra instance, you just need to:

... and run:

ansible-playbook playbooks/georchestra.yml

👉 If you run the playbook with a remote access (ssh) you maybe need to run the playbook with this command :

`ansible-playbook playbook.yml -i hosts --user=<username> --extra-vars "ansible_sudo_pass=<yourPassword>"`

additional config

To import plugins, Tomcat (or Jetty) will need to write into a plugins folder. He can't by default and you get some errors. In fact, this folder could be the default datadir (/etc/georchestra/datadir) but it's not fully recomended.

More details here

So, we suggest you to set an alternative mapstore plugins directory. To do that, open /etc/default/tomcat-georchestra and add this JVM option :

-Dgeorchestra.extensions=/target/path/extensions \

Don't forget to restart the service next... and be sure this path is writable by tomcat.

If you really want to use datadir, you have to set correct right to the /mapstore directory.

If an extensions.json file is missing, just add it manually with empty {} json content.

cleanup

If you want to remove/cleanup the webapps, databases, LDAP DIT and datadirs, sub-tasks have been added and can be run using

ansible-playbook -t cleanup -e "cleanup=true" playbooks/georchestra.yml

Those sub-tasks aren't run by default, you need to specify the cleanup=true variable.

example setup with vagrant

Install the dependencies with:

sudo apt-get install vagrant virtualbox ansible

Optionally, to install the "guest additions", you may run:

vagrant plugin install vagrant-vbguest

Finally, create a virtual machine and provision it (according to the playbook), with:

vagrant up

When the machine is provisioned, you can vagrant ssh into it, look around, and once you're done, you may halt the machine (vagrant halt) or destroy it (vagrant destroy).

To browse your SDI, just drop a line in your /etc/hosts file, registering the IP of the VM with the FQDN you declared in the playbook, eg:

192.168.0.19 georchestra.example.org

... and open https://georchestra.example.org/geonetwork/ in your browser.

Serverspec

a serverspec testsuite is provided to test the vagrant environments Once the box is up (see previous section), you can test the setup with the following command:

$ rake spec

This will require the ruby-serverspec package to be installed on the host.