From 8f8cca4be38c5d8658de6a7dec484a82194dddce Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Wed, 9 Oct 2024 12:18:56 +0100 Subject: [PATCH] Add new projects for devops roadmap --- src/data/projects/basic-dockerfile.md | 2 +- src/data/projects/configuration-management.md | 54 +++++++++++++++++++ src/data/projects/iac-digitalocean.md | 40 ++++++++++++++ src/data/projects/server-stats.md | 2 +- 4 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 src/data/projects/configuration-management.md create mode 100644 src/data/projects/iac-digitalocean.md diff --git a/src/data/projects/basic-dockerfile.md b/src/data/projects/basic-dockerfile.md index 30f0c8898..d0b9d7f08 100644 --- a/src/data/projects/basic-dockerfile.md +++ b/src/data/projects/basic-dockerfile.md @@ -4,7 +4,7 @@ description: 'Build a basic Dockerfile to create a Docker image.' isNew: false sort: 9 difficulty: 'beginner' -nature: 'CLI' +nature: 'Docker' skills: - 'docker' - 'dockerfile' diff --git a/src/data/projects/configuration-management.md b/src/data/projects/configuration-management.md new file mode 100644 index 000000000..895ada1cd --- /dev/null +++ b/src/data/projects/configuration-management.md @@ -0,0 +1,54 @@ +--- +title: 'Configuration Management' +description: 'Write an Ansible playbook to configure a Linux server.' +isNew: false +sort: 10 +difficulty: 'intermediate' +nature: 'Ansible' +skills: + - 'ansible' + - 'linux' + - 'devops' +seo: + title: 'Configuration Management' + description: 'Write an Ansible playbook to configure a Linux server.' + keywords: + - 'Configuration Management' + - 'Ansible' + - 'Linux' +roadmapIds: + - 'devops' +--- + +The goal of this project is to introduce you to the basics of configuration management using Ansible. You will write an Ansible playbook to configure a Linux server. + +## Requirements + +If you have been doing the previous projects, you should already have a Linux server running. If not, setup a Linux server on [DigitalOcean](https://m.do.co/c/b29aa8845df8), AWS or another cloud provider. + +You are required to write an Ansible playbook called `setup.yml` and create the following roles: + +- `base` — basic server setup (installs utilities, updates the server, installs `fail2ban`, etc.) +- `nginx` — installs and configures `nginx` +- `app` — uploads the given tarball of a static HTML website to the server and unzips it. +- `ssh` - adds the given public key to the server + +Set up the inventory file `inventory.ini` to include the server you are going to configure When you run the playbook, it should run the roles above in sequence. You should also assign proper tags to the roles so that you can run only specific roles. + +Example: + +```bash +# Run all the roles +ansible-playbook setup.yml + +# Run only the app role +ansible-playbook setup.yml --tags "app" +``` + +### Stretch goal + +Modify the `app` role to pull the repository from GitHub and deploy it. + +
+ +Once you are done with the project, you should have a basic understanding of how Ansible works and how it can be used to manage server configuration. diff --git a/src/data/projects/iac-digitalocean.md b/src/data/projects/iac-digitalocean.md new file mode 100644 index 000000000..4fcafcb95 --- /dev/null +++ b/src/data/projects/iac-digitalocean.md @@ -0,0 +1,40 @@ +--- +title: 'IaC on DigitalOcean' +description: 'Write Terraform code to create a Droplet on DigitalOcean' +isNew: false +sort: 10 +difficulty: 'intermediate' +nature: 'Terraform' +skills: + - 'terraform' + - 'linux' + - 'devops' +seo: + title: 'IaC on DigitalOcean' + description: 'Write Terraform code to create a Droplet on DigitalOcean' + keywords: + - 'IaC' + - 'Terraform' + - 'DigitalOcean' +roadmapIds: + - 'devops' +--- + +The goal of this project is to introduce you to the basics of IaC using Terraform. You will create a DigitalOcean Droplet and configure it using Terraform. + +## Requirements + +If you have been doing the previous projects, you should already have a Linux server running. If not, setup a Linux server on [DigitalOcean](https://m.do.co/c/b29aa8845df8), AWS or another cloud provider. + +You are required to write a Terraform script that will create a Droplet on DigitalOcean. The Droplet should have a public IP address, and SSH access. You should also be able to SSH into the Droplet using the private key. + +You can use [this guide from Digital Ocean](https://www.digitalocean.com/community/tutorials/how-to-use-terraform-with-digitalocean) and [Digital Ocean provider documentation](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs) to get started. + +## Stretch goal + +Write Ansible playbook that will configure the server. You can use the same playbook from [the previous project](/projects/configuration-management). + +
+ +Once you are done with the project, you should have a good understanding of setting up a basic infrastructure on DigitalOcean using Terraform and configuring it using Ansible. + diff --git a/src/data/projects/server-stats.md b/src/data/projects/server-stats.md index ad83b14db..53c525679 100644 --- a/src/data/projects/server-stats.md +++ b/src/data/projects/server-stats.md @@ -4,7 +4,7 @@ description: 'Write a script to analyse basic server performance stats.' isNew: true sort: 0 difficulty: 'beginner' -nature: 'Server Stats' +nature: 'CLI' skills: - 'linux' - 'bash'