Setup Gitlab Continuous (CI/CD) on Azure

  1.  Deploy Ubuntu VM with Docker Engine
  2.  Setup Gitlab on Ubuntu
  3.  Deploy Webapp
  4.  Setup Gitlab Continuous (CI/CD)
  5.  Step-by-step video



Deploy Ubuntu VM with Docker Engine



  1. Go to and deploy to Azure
  2. Provide the parameters for the VM and click purchase
  3. Once the VM is provisioned go to the VM configuration and change the IP Address to Static
  4. Connect to the VM using SSH



Setup Gitlab


  1. Connect to the Ubuntu VM via SSH
  2. Install and configure the necessary dependencies
    1. sudo apt-get update
    2. sudo apt-get install -y curl openssh-server ca-certificates
  3. Install Postfix
    1. sudo apt-get install -y postfix
    2. During Postfix installation a configuration screen may appear. Select 'Internet Site' and press enter. Use your server's external DNS for 'mail name' and press enter. If additional screens appear, continue to press enter to accept the defaults
  4. Add the GitLab package repository
    1. curl | sudo bash
  5. Install the GitLab package. Change https://gitlab.example.comto the URL at which you want to access your GitLab instance.
    1. sudo EXTERNAL_URL="" apt-get install gitlab-ee
  6. Browse to the hostname and login using the default account's username root to login
    1. In this case>


Deploy webapp on azure


  1. Deploy ARM Template using Azure Portal:
  2. Create Gitlab project on Azure
  3. Access to Gitlab on Azure
  4. Create new project
  5. Generate your SSH Key


Setup Gitlab Continuous (CI/CD) on Azure


  1. Go to the Azure web app
  2. Choose Deployment Center
  3. Select Source Control "External" and click Continue
  4. Now in Build Provider select "App Service Build Service"
  5. Add the Gitlab URL and the master branch
  6. In choose Private Repository "YES" and provide the credentials, in this case user root and the password previously created
  7. Test changes on the Gitlab project running on Azure


Step-by-Step video

0 Replies