Giter Site home page Giter Site logo

concertim-ansible-playbook's Introduction

Concertim Ansible Playbook

Concertim Ansible Playbook deploys Alces Concertim services and infrastructure components in Docker containers.

Getting Started

You are viewing the development version of Alces Concertim Ansible Playbook. To deploy this version of Alces Concertim follow these instructions.

To deploy a released version of Alces Concertim select the tag for that release and follow the deployment instructions there.

Concertim services

Concertim Ansible Playbook deploys containers for the following Concertim projects:

Infrastructure components

Concertim Ansible Playbook deploys containers for the following infrastructure components:

  • Kill Bill an open source billing and payments platform.
  • MariaDB for MySQL database.
  • Nginx a HTTP and reverse proxy server.
  • Postgresql an open source object-relational database system.

Directories

  • ansible - Contains an Ansible playbook to deploy Concertim services and infrastructure components in Docker containers.
  • contrib - Contains a Vagrant development environment for developing the playbook in the ansible directory. Also contains an alternate Ansible playbook that can be used to create a development environment for the Concertim Components.
  • docs - Contains documentation

Developing

For details on how to develop and test the ansible deployment playbook see docs/DEVELOPMENT.md.

If you are looking for details on how to develop the Concertim services themselves see the contrib/dev/README.md.

Contributing

Fork the project. Make your feature addition or bug fix. Send a pull request. Bonus points for topic branches.

Read CONTRIBUTING.md for more details.

Copyright and License

Eclipse Public License 2.0, see LICENSE.txt for details.

Copyright (C) 2024-present Alces Flight Ltd.

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0, or alternative license terms made available by Alces Flight Ltd - please direct inquiries about licensing to [email protected].

Concertim Ansible Playbook is distributed in the hope that it will be useful, but WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the Eclipse Public License 2.0 for more details.

concertim-ansible-playbook's People

Contributors

benarmston avatar timalces avatar jamesremuscat avatar logans56 avatar

Watchers

Mark J. Titorenko avatar  avatar Steve Norledge avatar

concertim-ansible-playbook's Issues

How do we want to handle SSL certificates for MIA?

Previously, Concurrent/Concertim used self-signed certificates. The full chain for the certificate was installed on the MIAs/ISLAs allowing internal communication to be validated. Customers were required to either install the certificate authority(?) or simply accept the SSL validation warning.

Currently, we have MIA use the default SSL certificate on the machine. This is self-signed causing SSL validation issues, requiring the user to accept the certificate.

Going forwards, we could use a similar mechanism as Concurrent/Concertim. Or we could use Let's Encrypt certificates.

Using a similar mechanism as before, requires that we have a secure machine somewhere on which we can create the certificates.

Let's Encrypt have a short life span, so we would need an mechanism to automatically renew them. Such mechanism should be easy to develop, we've already done so before for OpenFlight's flight-www, but it does require that the MIA is internet accessible. There may or may not be automatic solutions available that do not require an internet accessible MIA.

Improve experience when upgrading concertim deployment

When upgrading concertim et al there are two situations that could require the images to be rebuilt and the containers to be recreated.

  1. The git repository for the service, e.g., visualiser or the middleware, has been updated.
  2. The git repository for the ansible playbook, i.e., this repository, has been updated.

Currently, the playbook automatically detects if the service repository has been updated, and rebuilds the image/recreates the container appropriately. That is case (1) above is handled correctly.

The playbook does not currently, detect that the ansible playbook (this repo) has been updated, and does not automatically rebuild the image/recreate the containers. That is case (2) above is not automatically handled and requires user intervention.

The user intervention is as follows:

concertim_images=$(docker compose -f /opt/concertim/opt/docker/docker-compose.yml ps --all --format '{{.Image}}' | grep '^concertim-')
docker compose -f /opt/concertim/opt/docker/docker-compose.yml down
for i in ${concertim_images} ; do docker image rm $i ; done

With that done the playbook can be re-ran and will create new images appropriately.


For many upgrades, upgrading the playbook will go hand-in-hand with upgrading the services, however this is not necessarily the case. The most reliable way to ensure that the images / containers are rebuilt as necessary, would be to automate removing the existing containers and images. A more targetted approach that attempts to detect when this is necessary and thereby limit the down time might be desirable in the long term, but for now a simpler approach is preferable.

A new playbook should be added to this repo to remove the concertim containers and images, such that upgrading an installation is done as follows:

cd /opt/concertim/opt/ansible-playbook/ansible

ansible-playbook \
  --inventory inventory.ini \
  --extra-vars "gh_token=$GH_TOKEN" \
  --extra-vars @etc/globals.yaml \
  down.yml

ansible-playbook \
  --inventory inventory.ini \
  --extra-vars "gh_token=$GH_TOKEN" \
  --extra-vars @etc/globals.yaml \
  playbook.yml

or perhaps

cd /opt/concertim/opt/ansible-playbook/ansible

ansible-playbook \
  --inventory inventory.ini \
  --extra-vars "gh_token=$GH_TOKEN" \
  --extra-vars @etc/globals.yaml \
  upgrade.yml

Possible gotcha with static assets when upgrading a concertim deployment

On initial deployment a docker volume is created and automatically populated by docker with the contents of visualisers public/ directory. This volume is then shared with the proxy container to have nginx serve the static assets. There is a potential gotcha here when upgrading concertim.

If a new version of concertim has additional content under public/ say at public/images/irv/concertim/ is that additional content automatically copied to the volume too or do we need to manage this ourselves?

What about it content is removed in an upgrade? Is that removed automatically by docker?

Vagrant dev workflow - asset changes often not being auto reloaded

I've had some inconsistent issues after using the vagrant workflow to build visualiser & set it to dev mode, where changes to css are not being auto reloaded.

I haven't been able to determine what makes it sometimes work and sometimes not. But the vast majority of the time it does not work. I've tried rebuilding multiple times and stopping and restarting visualiser. I've had some success by shutting down the VM, deleting assets/builds/application.css and then restarting, but this is not consistent. There are no errors reported in the ct-vis-app screen. Once it is working it seems to continue working until visualiser is stopped.

I'm not sure if this is due to recent changes to this repo or visualiser itself. This was first experienced on 19th October - I pulled from main on the afternoon of the 18th but I'm not sure how far behind my main branch was before that (/what commits were added, that could be the cause). I'm using dev-2023-10-17

Add monit support for emma and mia. Improve support for phoenix modules.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.