Deploy a Azure Web App using Gitlab – Part 2

So in Deploy a Azure Web App using Gitlab – Part 1 the Gitlab server was deployed and the url was changed by using an ssh connection.

In the second part I wanted to share how to implement a SSL certificate into your Gitlab server so you can have a secure connection. Please note that I bought a certificate for my sub domain. There is also documentation available on Gitlab, but I will show every step I took to accomplish this. Furthermore I came across some issues synchronizing Gitlab with my local PC. This was caused by not having the appropriate Root Certificates on the Gitlab server, however this was not explained in the Gitlab documentation.

Getting started

OK so you will need your key and .crt file. These files will be copied to Gitlab. If you enable HTTPS on your Gitlab server, Gitlab will check the /etc/gitlab/ssl/ directory for the key and certificate. This directory does not exist by default so this has to be created by running

[cc lang=”bash”]sudo mkdir -p /etc/gitlab/ssl
sudo chmod 700 /etc/gitlab/ssl
cd /etc/gitlab/ssl/[/cc]

Continue reading “Deploy a Azure Web App using Gitlab – Part 2”

Deploy a Azure Web App using Gitlab – Part 1

So recently I decided to start writing about things that I want to learn and that interest me. One of the first things I thought of doing was to use Gitlab to deploy virtual machines on Azure. I recently saw the power of using Desired State Configuration (DSC) to manage Windows machines, which were deployed from Gitlab. Basically you can deploy entire environments with some simple code. I thought this was amazing and I wanted to learn how to do this.

But I wanted to start small, and first set up an environment from where I can build more complex projects. So I decided to create a simple Azure Web app to test my environment. This Web App should be connected to a private Gitlab repository. In the process of building this environment I was faced with some challenges, so I thought why not make this the subject of my first blog post. I will show some basic configurations, including enabling HTTPS on Gitlab. And I will show how to deploy a simple website using Gitlab, by pushing code from a local pc.

Continue reading “Deploy a Azure Web App using Gitlab – Part 1”