Skip to content

Commit 20623ce

Browse files
authored
Merge branch 'master' into lab05
2 parents 18e7d70 + bd0ce7e commit 20623ce

File tree

26 files changed

+1332
-7
lines changed

26 files changed

+1332
-7
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,6 @@ cython_debug/
178178
.pypirc
179179
terraform/yandex_cloud/key.json
180180
terraform/yandex_cloud/terraform.rc
181+
ansible/roles/web_app/vars/main.yml
182+
ansible/ansible.builtin.env
183+
terraform/yandex_cloud/authorized_key.json

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44

55
Welcome to the DevOps Engineering course labs! These hands-on labs are designed to guide you through various aspects of DevOps practices and principles. As you progress through the labs, you'll gain practical experience in application development, containerization, testing, infrastructure setup, CI/CD processes, and more.
66

7+
## Lab Syllabus
8+
9+
Lab 1: Web Application Development
10+
Lab 2: Containerization
11+
Lab 3: Continuous Integration
12+
Lab 4: Infrastructure as Code & Terraform
13+
Lab 5: Configuration Management
14+
Lab 6: Ansible Automation
15+
Lab 7: Observability, Logging, Loki Stack
16+
Lab 8: Monitoring & Prometheus
17+
Lab 9: Kubernetes & Declarative Manifests
18+
Lab 10: Helm Charts & Library Charts
19+
Lab 11: Kubernetes Secrets Management (Vault, ConfigMaps)
20+
Lab 12: Kubernetes ConfigMaps & Environment Variables
21+
Lab 13: GitOps with ArgoCD
22+
Lab 14: StatefulSet Optimization
23+
Lab 15: Kubernetes Monitoring & Init Containers
24+
Lab 16: IPFS & Fleek Decentralization
25+
726
## Architecture
827

928
This repository has a master branch containing an introduction. Each new lab assignment will be added as a markdown file with a lab number.

ansible/inventory/default_aws_ec2.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
---
23
all:
34
hosts:

ansible/playbooks/dev/main.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
12
---
23
- name: install Docker
34
hosts: all
45
become: true
56
roles:
6-
- role: docker
7+
- role: docker

ansible/roles/docker/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Docker Role
22

3+
34
This role installs and configures Docker and Docker Compose.
45

56
## Requirements
@@ -33,3 +34,18 @@ This role installs and configures Docker and Docker Compose.
3334
7. Install completion check
3435
3536
37+
=======
38+
Docker and Docker Compose installation via Ansible role.
39+
40+
## Requirements
41+
42+
- Ansible 2.9+
43+
44+
## Playbook Instance
45+
46+
```yaml
47+
- hosts: all
48+
49+
roles:
50+
- roles/docker
51+
```
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
3+
docker_edition: 'ce'
4+
docker_packages:
5+
- "docker-{{ docker_edition }}"
6+
- "docker-{{ docker_edition }}-cli"
7+
- "docker-{{ docker_edition }}-rootless-extras"
8+
- "containerd.io"
9+
- docker-buildx-plugin
10+
docker_packages_state: present
11+
docker_obsolete_packages:
12+
- docker
13+
- docker.io
14+
- docker-engine
15+
- docker-doc
16+
- docker-compose
17+
- docker-compose-v2
18+
- podman-docker
19+
- containerd
20+
- runc
21+
22+
# Service options.
23+
docker_service_manage: true
24+
docker_service_state: started
25+
docker_service_enabled: true
26+
docker_restart_handler_state: restarted
27+
28+
# Docker Compose Plugin options.
29+
docker_install_compose_plugin: true
30+
docker_compose_package: docker-compose-plugin
31+
docker_compose_package_state: present
32+
33+
# Docker Compose options.
34+
docker_install_compose: false
35+
docker_compose_version: "v2.32.1"
36+
docker_compose_arch: "{{ ansible_architecture }}"
37+
docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-linux-{{ docker_compose_arch }}"
38+
docker_compose_path: /usr/local/bin/docker-compose
39+
40+
# Enable repo setup
41+
docker_add_repo: true
42+
43+
# Docker repo URL.
44+
docker_repo_url: https://download.docker.com/linux
45+
46+
# Used only for Debian/Ubuntu/Pop!_OS/Linux Mint. Switch 'stable' to 'nightly' if needed.
47+
docker_apt_release_channel: stable
48+
# docker_apt_ansible_distribution is a workaround for Ubuntu variants which can't be identified as such by Ansible,
49+
# and is only necessary until Docker officially supports them.
50+
docker_apt_ansible_distribution: "{{ 'ubuntu' if ansible_distribution in ['Pop!_OS', 'Linux Mint'] else ansible_distribution }}"
51+
docker_apt_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'armhf' if ansible_architecture == 'armv7l' else 'amd64' }}"
52+
docker_apt_repository: "deb [arch={{ docker_apt_arch }} signed-by=/etc/apt/keyrings/docker.asc] {{ docker_repo_url }}/{{ docker_apt_ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
53+
docker_apt_ignore_key_error: true
54+
docker_apt_gpg_key: "{{ docker_repo_url }}/{{ docker_apt_ansible_distribution | lower }}/gpg"
55+
docker_apt_gpg_key_checksum: "sha256:1500c1f56fa9e26b9b8f42452a553675796ade0807cdce11975eb98170b3a570"
56+
docker_apt_filename: "docker"
57+
58+
# Used only for RedHat/CentOS/Fedora.
59+
docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo"
60+
docker_yum_repo_enable_nightly: '0'
61+
docker_yum_repo_enable_test: '0'
62+
docker_yum_gpg_key: "{{ docker_repo_url }}/centos/gpg"
63+
64+
# A list of users who will be added to the docker group.
65+
docker_users: []
66+
67+
# Docker daemon options as a dict
68+
docker_daemon_options: {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
12
- name: Install Docker Compose
23
ansible.builtin.apt:
34
name: "docker-compose-plugin"
45
state: present
5-

ansible/roles/docker/tasks/install_docker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
- name: Install prerequisites
23
apt:
34
name:
@@ -37,4 +38,4 @@
3738
name: docker
3839
state: started
3940
enabled: true
40-
41+

ansible/roles/docker/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
- name: Install Docker & compose
23
include_tasks: install_docker.yml
34

app_go/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ USER $ADMIN_USER
1616
RUN go build -o randomizer main.go
1717

1818
# Explicitly specify port
19-
EXPOSE 3000
19+
EXPOSE 5500
2020

2121
CMD ["./randomizer"]

0 commit comments

Comments
 (0)