Skip to content

albertocapella/sonar-postgres-docker-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Sonarqube PostgreSQL

This playbook install docker and deploy Sonarqube using PostgreSQL with JDBC over Amazon Linux

Requirements

Software for bastion host:

  • ansible 2.9.26. An extra-simple tool/framework/API for doing 'remote things'. It is the simplest way to automate apps and IT infrastructure. Application Deployment + Configuration Management + Continuous Delivery.

The bastion host will execute this playbook

Software for remote host:

  • OpenSSH Server.
  • Docker API >= 1.20
  • Docker SDK for Python

Read more information here.

AWS EC2 instance or a bare metal server with the following requirements:

  • At least 1GB of RAM.
  • At least 10GB of storage.

Role Variables

external_vars.yml

  • DOCKER_PRUNE use in case of uninstall sonarqube and pogres. This command delete all containers, images, and volumes. By default is false.

secret.yml

  • CUSTOM_PASSWORD is the password of the postgreSQL username.

Dependencies

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
  become: yes
  roles:
     - docker
     - sonarqube

Instructions

  • Update the host file with the IPv4 of the remote server.
  • Update the variable ansible_user in the host file if you needed. The user must be in sudoers group.
  • Update CUSTOM_PASSWORD variable in the secret.yml file. See docs for more details.
  • Execute the following command:
$ ansible-playbook -i hosts playbook.yml --ask-vault-pass
  • If you need to undeploy sonarqube and postgres, you can execute the following:
$ ansible-playbook -i hosts playbook.yml -e DOCKER_PRUNE=true --ask-vault-pass

About

sonar-postgres-docker-ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published