Skip to content

A set of Ansible Roles to install Bika LIMS/Health on Ubuntu

License

Notifications You must be signed in to change notification settings

andersonsmith/bika.ansible

 
 

Repository files navigation

Bika Ansible

Build Status

Bika Ansible provides a set of Ansible Roles to set up a Bika LIMS installation on a Linux server.

Each role contains a README.md with further documentation.

Note: Ansible Version >= 2 is required

Getting started

Install dependencies using ansible-galaxy

ansible-galaxy install -r requirements.yml

Create an Ansible Playbook, e.g. name it bika.yml:

---
- hosts: all
  become: yes
  gather_facts: yes
  pre_tasks:
    - name: Update APT package cache
      action: apt update_cache=yes
  roles:
    - role: bika

Note: The bika role does a full monty installation.

If you want to selectively choose which parts you want to install, use a configuration like this:

---
- hosts: all
  become: yes
  gather_facts: yes
  pre_tasks:
    - name: Update APT package cache
      action: apt update_cache=yes
  roles:
    - role: bika_base
    - role: bika_plone
    - role: bika_haproxy
    - role: bika_varnish
    - role: bika_nginx
    - role: bika_security
    - role: bika_munin
    - role: bika_postfix

Create an Ansible Inventory file, e.g. name it bika_hosts.cfg:

[bika]
bika ansible_ssh_host=192.168.33.10 ansible_ssh_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/app/virtualbox/private_key

Run your Ansible Playbook:

ansible-playbook -i bika_hosts.cfg bika.yml

Please refer to the vagrant.yml Ansible Playbook for a working example.

Vagrant

This repository contains a running Vagrant setup, which creates a full Bika LIMS installation, containing the following components:

  • Bika Base Setup
  • Bika Plone Installation
  • Bika HAProxy (Load Balancer)
  • Bika Varnish (Cache Proxy)
  • Bika NGINX (Webserver)
  • Bika Security (Firewall/Fail2Ban)
  • Bika Munin (Monitoring)
  • Bika Postfix (Mail)

Vagrant Prerequisites

Please ensure you have a recent version of Vagrant installed on your machine:

vagrant version
Installed Version: 1.9.1
Latest Version: 1.9.1

To upgrade to the latest version, visit the downloads page and
download and install the latest version of Vagrant from the URL
below:

  http://www.vagrantup.com/downloads.html

If you're curious what changed in the latest release, view the
CHANGELOG below:

  https://github.com/mitchellh/vagrant/blob/v1.9.1/CHANGELOG.md

Vagrant Commands

List available Vagrant commands:

vagrant list-commands

List downloaded boxes:

vagrant box list
[...]
trusty64        (virtualbox, 0)
ubuntu/xenial64 (virtualbox, 20161209.0.0)

Vagrant Setup

Start the Vagrant machine:

vagrant up

This will download a Linux machine according to the Vagrantfile within this repository. The server will listen on 192.168.33.10.

You can access it via SSH:

vagrant ssh

As soon as the machine is running, you can start the provisioning process:

ansible-playbook -i vagrant_hosts.cfg vagrant.yml

If you are using Vagrant < 1.7, you should read vagrant_hosts.cfg first, and uncomment the line with the correct private_key file path, or ansible will not be able to connect.

Open a browser and navigate to: http://192.168.33.10/bika_control_panel

Stop the Vagrant machine:

vagrant halt

Destroy the Vagrant machine:

vagrant destroy

Dependencies

This role depends on the following Ansible Roles:

Troubleshooting

Problem:

The plone_server role is complaining about initial password not being set.

Solutions:

  • Please ensure that your variables (where bika_plone_initial_password is set) are included in a pre_task of your playbook. See vagrant.yml and vagrant_configure.yml for details.

  • Please ensure that your config is valid. E.g. the version pinning bika_plone_additional_versions is a list, so if you want to define no versions, add an empty list [] as its value.

  • Please ensure you actually have an initial password set.

About

A set of Ansible Roles to install Bika LIMS/Health on Ubuntu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%