Setup Gitlab Continuous (CI/CD) on Azure

MVP
  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 https://gitlab.com/daveRendon/ubuntu-vm-with-docker-engine/blob/master/README.md 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 https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | 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="https://gitlab.example.com" 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> http://gitlabs.eastus.cloudapp.azure.com

 

Deploy webapp on azure

 

  1. Deploy ARM Template using Azure Portal:
    1. https://gitlab.com/daveRendon/ifreeze/blob/master/webapp.js
  2. Create Gitlab project on Azure
  3. Access to Gitlab on Azure
    1. http://gitlabs.eastus.cloudapp.azure.com
  4. Create new project
  5. Generate your SSH Key
    1. https://gitlab.com/help/ssh/README#generating-a-new-ssh-key-pair

 

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

https://youtu.be/naSdpfOuaUo

0 Replies