GithubHelp home page GithubHelp logo

sonarqube-stack's Introduction

A containerized, automated SonarQube deployment

Quick setup instructions for a modern, tiny-yet-good SonarQube on-premises deployment.

We'll do it in the IaC way, using Docker Swarm and Ansible.

At the end, it will look like this (here we have a dummy, single-node Swarm):

Our SonarQube deployment

NGINX will be used as TLS-offloading HTTPS reverse proxy.

PostgreSQL will be our database.

Let's go!

  • install Docker and create a Swarm

  • set your vm.max_map_count to the right value:

    sudo echo "vm.max_map_count=262144" >> /etc/sysctl.conf
    
  • clone this repo to your Ansible machine

    git clone https://github.com/marcobellaccini/sonarqube-stack.git
    
  • prepare your Ansible-Vault-encrypted configuration files:

    ansible-vault create secrets/postgres_db # file containing db name
    
    ansible-vault create secrets/postgres_user # file containing PostgreSQL username
    
    ansible-vault create secrets/postgres_password # file containing PostgreSQL password
    
    ansible-vault create secrets/sonar.properties # sonarqube config file (with db connection specs: see https://docs.sonarqube.org/latest/setup/install-server/ )
    
    ansible-vault encrypt secrets/sonarqube.key # encrypt cert private key for HTTPS
    
    # certificate for HTTPS should be put in secrets/sonarqube.crt
    
  • edit Ansible inventory (inventory.yml)

  • deploy everything with Ansible:

    ansible-playbook -i inventory.yml sonarqube.yml -u <SSHUSER> --ask-pass --ask-become-pass
    

    Of course, you will be better off with ssh public key authentication!

sonarqube-stack's People

Contributors

marcobellaccini avatar

Watchers

 avatar  avatar  avatar

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.