🔏
starhackit
  • README
  • Getting started
    • Requirements
    • Quick Start
  • Frontend
    • The Frontend
      • Npm scripts
    • Unit testing
    • End 2 End Testing
    • Multi Application
    • Production Build
    • Internationalization
    • Configuration
    • Cut and Paste detector
    • Webpack
  • Backend
    • Node Backend
      • Npm scripts
    • Development Enviromnent with docker-compose
    • Testing
      • Code Coverage
    • Configuration
    • Debugging
    • Database
    • Http Server
      • CORS
    • Authentication
      • Social Authentication
      • Local Authentication with JWT
    • Email
    • Redis
    • Api Model
      • Api Mocking
  • Deployment
    • Build, Tag and Push Docker Images
    • Releasing
    • Deploy Infrastructure with GruCloud
    • Deploy with Ansible
Powered by GitBook
On this page
  • Deployment - Ansible
  • Minimal Requirements
  • What is installed and deployed:
  • Configuration
  • Ansible roles download
  • Deployment to production

Was this helpful?

  1. Deployment

Deploy with Ansible

PreviousDeploy Infrastructure with GruCloud

Last updated 1 year ago

Was this helpful?

Deployment - Ansible

Minimal Requirements

Ansible scripts are written for the Ubuntu 16.04 or higher

To install ansible with brew:

$ brew install ansible

Check the ansible version:

$ ansible --version
ansible 2.15.4

What is installed and deployed:

Ansible enables the automation of the installation and configuration of the various stack components: All components are dockerised

  • Docker

  • Postgres

  • Certbot to generate and renew ssl certificate

  • The node backend

  • The frontend packaged inside an nginx container

Configuration

The configuration depends on the phase on the system: dev, prod, uat etc ... Each phase has its own directory which contains the configuration files and the inventory of the remote machines.

The strict necessary is the docker configuration.

Please create a new access token from https://hub.docker.com/settings/security for docker_hub_password

Ansible roles download

Get ansible dependencies

deploy/playbook$ ansible-galaxy install -r roles/requirements.yml

Deployment to production

Check the connection to the production servers:

$ ./deploy_prod.sh

The global configuration which is independent on the phase is at

To set the production configuration parameters, create :

Then to change the remote machine connection settings (ip address, username, ssh key location), edit the production inventory: :

Copy the file to a file called vault.yml

Ansible
group_vars/all/vars.yml
group_vars/production.yml
production.ini
vault example
include