- 27th April 2017
- Posted by: Stephen Downie
- Category: DevOps, Git, JuJu
Gitlab is commonly used in businesses globally and its user base is rapidly expanding, there is a hosted version much like Github, but they also ship a self hosted version which is great for businesses wanted to deploy private git services either at company or department level.
Here at Spicule we’re great fans of Juju for its speed and simplicity when it comes to deploying applications and so we have taken the default installation and pimped it up a little.
juju deploy ~spiculecharms/gitlab-server
Running the above will give you a running gitlab server, you can then expose it with
juju expose gitlab-server
Thats how simple it is to setup. Of course we didn’t just leave it there though we believe that deployments in the cloud should be secure.
juju deploy cs:~spiculecharms/bundle/gitlab-ssl
If you deploy the above bundle it will spin up Gitlab but this time it will add a second machine with a special NGINX reverse proxy in it. The SSL Termination Proxy is a cool charm from Tengu which provides integration into Lets Encrypt to provide out of the box SSL encryption. All you need to do is provide an FQDN and email address and you’ll have a secured Gitlab server ready to rock.
Once your Gitlab server is in production there are of course plenty of other things that can and should be set, email addresses, smtp servers, authentication configs and so on. This can all be achieved from within the Juju Charm configuration block, allowing you to deploy Gitlab quickly and easily in a highly repeatable manner.