Skip to content

Collaborative project for the Software Engineering Environments course of the Master in Information and Computer Sciences at the University of Luxembourg.

Notifications You must be signed in to change notification settings

TimKie/see-devops-project

Β 
Β 

Repository files navigation

Software Engineering Environments DevOps Project

This is a DevOps project demonstrating the various steps to deliver a product from development to release through a continuous integration (CI) deployment pipeline.

  1. Prerequisites
  2. Setup
  3. CI Server
  4. Development Environment
  5. Staging Environment
  6. Production Environment

❗️ Note: When accessing the frontend in the Staging or Production Environment for the first time, your Browser will display a security warning. The reason for this is because the website is using a self-signed SSL certificate by an invalid certificate authority. This can be ignored and you have to tell your browser to continue to the website. This allows the images from the backend to be loaded in the frontend.

1. Prerequisites

Hardware

  1. 16GB of memory (ideally 32GB)
  2. Quadcore processor (ideally 8-core processor)

Software

  1. Unix-based OS (no Apple Silicon chip)
  2. VirtualBox (v6.0 or higher)
  3. Vagrant (v2.2.5 or higher)
  4. Ansible (v.2.7.5 or higher)

2. Setup

  1. Go to the folder of your choice and clone the repository:

    git clone https://github.com/Flavio8699/see-devops-project.git
  2. Get into the working directory (root directory of repository):

    cd see-devops-project
  3. Create the shared folder in the working directory (to store and share the runner token between the environments):

    mkdir shared-data
  4. [Optional] Setup the Deployment Pipeline

    vagrant up

πŸ’¬ Notes:

  • Step 4 starts the CI Server as well as the development, staging and production environments.
  • After following the steps above and completing step 4, the Deployment Pipeline and all its related components are up and running.
  • A detailed explanation for each environment can be found in the following sections.
  • Steps 1-3 are still required even if you want to start all the VMs manually (i.e. you skip step 4 and follow the guidelines in the following sections).
  • The project was tested on a Macbook Pro 16" with the following specs:
    • Processor: 2,4 GHz 8-Core Intel Core i9
    • Memory: 32GB
    • Operating System: MacOS Sonoma 14.1
  • The machine specified above took 25 minutes to run the vagrant up command. More precisely:
    • CI Server: 12 minutes
    • Development Environment VM: 4 minutes
    • Staging Environment VM: 4,5 minutes
    • Production Environment VM: 4,5 minutes

3. CI Server

Asset Composition

  1. Vagrant VM specification (Vagrantfile)
  2. Ansible playbooks and shell scripts to provision the VM
  3. GitLab as VSC running in the VM
  4. Docker service running in the VM
  5. GitLab-runner based on docker

Guidelines

πŸ’¬ Note: Not necessary if you performed step 4 of Section 2.

  1. Start the CI Server:
    vagrant up ci-server

**** Test Case ****

Initial conditions:

  1. The CI Server is up and running.

Test steps:

  1. Go to http://192.168.33.94/gitlab
  2. Log in with the following credentials:
    • username: Owner
    • password: 12345678

Post conditions:

  1. You successfully logged in with the non-root account that will hold the project repositories.

4. Development Environment

Asset Composition

  1. Vagrant VM specification (Vagrantfile)
  2. Ansible playbooks and shell scripts to provision the VM
  3. Java v1.8
  4. MySQL v8.0.25
  5. Gradle v6.7.1
  6. Node v15.14.0
  7. NPM v7.7.6
  8. Folder /lu.uni.e4l.platform.frontend.dev with the frontend repository
  9. Folder /lu.uni.e4l.platform.api.dev with the backend repository

Guidelines

πŸ’¬ Note: Not necessary if you performed step 4 of Section 2.

  1. Start the Development Environment VM:
    vagrant up dev-env

**** Test Case ****

Initial conditions:

  1. The CI Server is up and running.
  2. The Development Environment VM is up and running.

Test steps:

  1. Go to http://192.168.33.94/gitlab
  2. If not already logged in, log in with the following credentials:
    • username: Owner
    • password: 12345678
  3. Verify that the repository lu.uni.e4l.platform.api.dev (accessible here) exists
  4. Verify that the repository lu.uni.e4l.platform.frontend.dev (accessible here) exists

Post conditions:

  1. The project repositories of the backend and frontend were successfully created during the provisioning of the Development Environment.

5. Staging Environment

πŸ’¬ Note: To save resources, the Development Environment VM can be stopped using the command vagrant halt dev-env.

Asset Composition

  1. Vagrant VM specification (Vagrantfile)
  2. Ansible playbooks and shell scripts to provision the VM
  3. File gitlab-runner-token.txt in folder /shared-data
  4. GitLab-runner based on shell
  5. Nginx v1.10.3
  6. MySQL v8.0.25
  7. Java v1.8

Guidelines

πŸ’¬ Note: Not necessary if you performed step 4 of Section 2.

  1. Start the Staging Environment VM:
    vagrant up stage-env

**** Test Case ****

Initial conditions:

  1. The CI Server is up and running.
  2. The Staging Environment VM is up and running.

Test steps:

  1. For each repository:
    • Open the repository
    • In the sidebar menu, click on CI/CD
    • Click on the status of the first (and only) pipeline (accessible here: frontend or backend)
    • Wait and check if the Deploy stage of the pipeline has passed
  2. Go to https://192.168.33.96/

Post conditions:

  1. The product was successfully deployed to the Staging Environment.

6. Production Environment

πŸ’¬ Note: To save resources, the Development and Staging Environment VMs can be stopped using the respective commands vagrant halt dev-env and vagrant halt stage-env.

Asset Composition

  1. Vagrant VM specification (Vagrantfile)
  2. Ansible playbooks and shell scripts to provision the VM
  3. File gitlab-runner-token.txt in folder /shared-data
  4. GitLab-runner based on shell
  5. Nginx v1.10.3
  6. MySQL v8.0.25
  7. Java v1.8

Guidelines

πŸ’¬ Note: Not necessary if you performed step 4 of Section 2.

  1. Start the Production Environment VM:
    vagrant up prod-env

**** Test Case ****

Initial conditions:

  1. The CI Server is up and running.
  2. The Production Environment VM is up and running.
  3. The product was successfully deployed on the Staging Environment and passed the User-Acceptance tests.

Test steps:

  1. For each repository:
    • Open the repository
    • In the sidebar menu, click on CI/CD
    • Click on the status of the first (and only) pipeline (accessible here: frontend or backend)
    • Manually release the product to the Production Environment by clicking on the play-button (next to 'release') in the Release stage
  2. Go to https://192.168.33.97/

Post conditions:

  1. The product was successfully released to the Production Environment.

About

Collaborative project for the Software Engineering Environments course of the Master in Information and Computer Sciences at the University of Luxembourg.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 61.6%
  • Java 26.5%
  • Shell 5.4%
  • HTML 3.6%
  • SCSS 1.5%
  • CSS 1.1%
  • Ruby 0.3%