Skip to content
Snippets Groups Projects
Commit 1000f4c8 authored by marcoemi.poleggi's avatar marcoemi.poleggi
Browse files

Update README.md

parent c08eb87c
No related branches found
No related tags found
No related merge requests found
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
Simple app deployment exercise (DevOps) with GitLab CI/CD. Simple app deployment exercise (DevOps) with GitLab CI/CD.
## Pedagogical objectives ##
* Become familiar with DevOps practices
* Learn how to automatically deploy things via GitLab CD/CD
## Scenario ## ## Scenario ##
...@@ -40,10 +36,6 @@ is playing: ...@@ -40,10 +36,6 @@ is playing:
## Tasks ## ## Tasks ##
In this lab you will perform a number of tasks and document your progress in a
lab report. Each task specifies one or more deliverables to be
produced. Collect all the deliverables in your lab report.
**N.B.** Some tasks require interacting with your local machine's OS: any **N.B.** Some tasks require interacting with your local machine's OS: any
related commands are supposed to be run into a terminal with the following related commands are supposed to be run into a terminal with the following
conventions about the *command line prompt*: conventions about the *command line prompt*:
...@@ -58,21 +50,26 @@ conventions about the *command line prompt*: ...@@ -58,21 +50,26 @@ conventions about the *command line prompt*:
**Goal:** set up your GitLab CI/CD via its Web GUI. **Goal:** set up your GitLab CI/CD via its Web GUI.
Our GitLab instance comes with a shared Docker-based CI/CD *runner*. Fork this project into your personal namespace and configure it (menu `Settings`):
- In `General > Visibility,...`:
* [x] `Repository > CI/CD:` active with "Only project members" (or empty)
* [x] `Operations`: active with "Only project members" (or empty)
Deploy [SSH keys for the Docker Our GitLab instance comes with a shared Docker-based CI/CD *runner* (or executor).
executor](https://docs.gitlab.com/ee/ci/ssh_keys/). :bulb: All secrets should Generate your [SSH key pair](https://docs.gitlab.com/ee/ci/ssh_keys/) to interact with your VM instance.
be **protected** and possibly **masked**. The following variables have to be added:
`SSH_PRIVATE_KEY`, `SSH_KNOWN_HOSTS` and `PRODUCTION_IP`.
Configure the CI/CD system as it follows in section **Settings > CI/CD > Configure the CI/CD system as it follows (menu `Settings > CI/CD`):
General pipelines**: - In `General pipelines`:
- [ ] Public pipelines * [ ] `Public pipelines`
- [x] Auto-cancel redundant pipelines * [x] `Auto-cancel redundant pipelines`
- [x] Skip outdated deployment jobs * [x] `Skip outdated deployment jobs`
- Git strategy: fetch * `Git strategy:` fetch
- Git shallow clone: 1 * `Git shallow clone:` 1
- Timeout: 10m * `Timeout:` 10m
- In `Runners`:
* [x] `Enable shared runners...`
- In `Variables`: add the following variables: `SSH_PRIVATE_KEY`, `SSH_KNOWN_HOSTS` and `PRODUCTION_IP`.
:bulb: All secrets should be **protected** and possibly **masked** (SSH public keys cannot by masked).
### Task #2: CI/CD pipeline ### ### Task #2: CI/CD pipeline ###
...@@ -100,7 +97,6 @@ before_script: ...@@ -100,7 +97,6 @@ before_script:
unit_test1: unit_test1:
stage: test stage: test
script: script:
- # clone our repo locally
- # check the app version number and exit != 0 if it's wrong - # check the app version number and exit != 0 if it's wrong
deploy_prod: deploy_prod:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment