This is a DevOps project demonstrating the various steps to deliver a product from development to release through a continuous integration (CI) deployment pipeline.
βοΈ 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.
- 16GB of memory (ideally 32GB)
- Quadcore processor (ideally 8-core processor)
- Unix-based OS (no Apple Silicon chip)
- VirtualBox (v6.0 or higher)
- Vagrant (v2.2.5 or higher)
- Ansible (v.2.7.5 or higher)
-
Go to the folder of your choice and clone the repository:
git clone /~https://github.com/Flavio8699/see-devops-project.git
-
Get into the working directory (root directory of repository):
cd see-devops-project
-
Create the shared folder in the working directory (to store and share the runner token between the environments):
mkdir shared-data
-
[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
- Vagrant VM specification (Vagrantfile)
- Ansible playbooks and shell scripts to provision the VM
- GitLab as VSC running in the VM
- Docker service running in the VM
- GitLab-runner based on docker
π¬ Note: Not necessary if you performed step 4 of Section 2.
- Start the CI Server:
vagrant up ci-server
- The CI Server is up and running.
- Go to http://192.168.33.94/gitlab
- Log in with the following credentials:
- username:
Owner
- password:
12345678
- username:
- You successfully logged in with the non-root account that will hold the project repositories.
- Vagrant VM specification (Vagrantfile)
- Ansible playbooks and shell scripts to provision the VM
- Java v1.8
- MySQL v8.0.25
- Gradle v6.7.1
- Node v15.14.0
- NPM v7.7.6
- Folder /lu.uni.e4l.platform.frontend.dev with the frontend repository
- Folder /lu.uni.e4l.platform.api.dev with the backend repository
π¬ Note: Not necessary if you performed step 4 of Section 2.
- Start the Development Environment VM:
vagrant up dev-env
- The CI Server is up and running.
- The Development Environment VM is up and running.
- Go to http://192.168.33.94/gitlab
- If not already logged in, log in with the following credentials:
- username:
Owner
- password:
12345678
- username:
- Verify that the repository lu.uni.e4l.platform.api.dev (accessible here) exists
- Verify that the repository lu.uni.e4l.platform.frontend.dev (accessible here) exists
- The project repositories of the backend and frontend were successfully created during the provisioning of the Development Environment.
π¬ Note: To save resources, the Development Environment VM can be stopped using the command vagrant halt dev-env
.
- Vagrant VM specification (Vagrantfile)
- Ansible playbooks and shell scripts to provision the VM
- File gitlab-runner-token.txt in folder /shared-data
- GitLab-runner based on shell
- Nginx v1.10.3
- MySQL v8.0.25
- Java v1.8
π¬ Note: Not necessary if you performed step 4 of Section 2.
- Start the Staging Environment VM:
vagrant up stage-env
- The CI Server is up and running.
- The Staging Environment VM is up and running.
- For each repository:
- Go to https://192.168.33.96/
- The product was successfully deployed to the Staging 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
.
- Vagrant VM specification (Vagrantfile)
- Ansible playbooks and shell scripts to provision the VM
- File gitlab-runner-token.txt in folder /shared-data
- GitLab-runner based on shell
- Nginx v1.10.3
- MySQL v8.0.25
- Java v1.8
π¬ Note: Not necessary if you performed step 4 of Section 2.
- Start the Production Environment VM:
vagrant up prod-env
- The CI Server is up and running.
- The Production Environment VM is up and running.
- The product was successfully deployed on the Staging Environment and passed the User-Acceptance tests.
- For each repository:
- Go to https://192.168.33.97/
- The product was successfully released to the Production Environment.