Skip to content

Commit

Permalink
Merge pull request #1702 from rolling-scopes-school/fix/react2024q3-f…
Browse files Browse the repository at this point in the history
…inal-task-corrections

Made corrections to the final task
  • Loading branch information
kravaring authored Sep 15, 2024
2 parents ac4a22d + 5b3fa07 commit 871fde9
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 12 deletions.
4 changes: 3 additions & 1 deletion devops/modules/1_basic-configuration/task_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ In this task, you will install and configure the required software on your local
## Steps

1. **Install AWS CLI and Terraform**

- Follow the instructions to install [AWS CLI 2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
- Follow the instructions to install [Terraform 1.4+](https://developer.hashicorp.com/terraform/install?product_intent=terraform).

2. **Create IAM User and Configure MFA**

- In your AWS account, navigate to IAM and create a new user with the following policies attached:
- AmazonEC2FullAccess
- AmazonRoute53FullAccess
Expand All @@ -29,4 +31,4 @@ In this task, you will install and configure the required software on your local
## Submission

- Provide a screenshot of the non-root account secured by MFA (ensure sensitive information is not shared).
- Ensure that the AWS CLI and Terraform installations are verified using `aws --version` and `terraform version`.
- Ensure that the AWS CLI and Terraform installations are verified using `aws --version` and `terraform version`.
9 changes: 8 additions & 1 deletion devops/modules/1_basic-configuration/task_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,25 @@ In this task, you will write Terraform code to configure the basic networking in
## Steps

1. **Write Terraform Code**

- Create Terraform code to configure the following:
- VPC
- 2 private subnets in different AZs
- Internet Gateway
- Proper routing configuration

2. **Organize Code**

- Define variables in a separate variables file.
- Separate resources into different files for better organization.

3. **Verify Configuration**

- Execute `terraform plan` to ensure the configuration is correct.
- Provide a resource map screenshot (VPC -> Your VPCs -> your_VPC_name -> Resource map).

4. **Submit Code**

- Create a PR with the Terraform code in a new repository.
- (Optional) Set up a GitHub Actions (GHA) pipeline for the Terraform code.

Expand All @@ -33,17 +37,20 @@ In this task, you will write Terraform code to configure the basic networking in
## Evaluation Criteria (100 points for covering all criteria)

1. **Terraform Code Implementation (60 points)**

- Terraform code is created to configure the following:
- VPC
- 2 private subnets in different AZs
- Internet Gateway
- Proper routing configuration

2. **Code Organization (10 points)**

- Variables are defined in a separate variables file.
- Resources are separated into different files for better organization.

3. **Verification (10 points)**

- Terraform plan is executed successfully.
- A resource map screenshot is provided (VPC -> Your VPCs -> your_VPC_name -> Resource map).

Expand All @@ -55,4 +62,4 @@ In this task, you will write Terraform code to configure the basic networking in
- **Documentation (5 points)**
- Document the infrastructure setup and usage in a README file.
- **Submission (5 points)**
- A GitHub Actions (GHA) pipeline is set up for the Terraform code.
- A GitHub Actions (GHA) pipeline is set up for the Terraform code.
11 changes: 10 additions & 1 deletion devops/modules/2_cluster-configuration/task_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ In this task, you will configure and deploy a Kubernetes (K8s) cluster on AWS us
## Steps

1. **Choose Deployment Method**

- Get familiar with both [kOps](https://kops.sigs.k8s.io/) and [k3s](https://k3s.io/).
- Decide which deployment method is more suitable for you based on the following considerations:
- kOps handles the creation of most resources for you, while k3s requires you to manage the underlying infrastructure.
Expand All @@ -15,18 +16,22 @@ In this task, you will configure and deploy a Kubernetes (K8s) cluster on AWS us
- Use AWS EC2 instances from the Free Tier to avoid additional expenses.

2. **Create or Extend Terraform Code**

- Create or extend Terraform code to manage AWS resources required for the cluster creation.
- Ensure the code includes the creation of a bastion host.

3. **Deploy the Cluster**

- Deploy the K8s cluster using the chosen method (kOps or k3s).
- Ensure the cluster is accessible from your local computer.

4. **Verify the Cluster**

- Run the `kubectl get nodes` command from your local computer to get information about the cluster.
- Provide a screenshot of the `kubectl get nodes` command output.

5. **Deploy a Simple Workload**

- Deploy a simple workload on the cluster using the following command:
```sh
kubectl apply -f https://k8s.io/examples/pods/simple-pod.yaml
Expand All @@ -48,20 +53,24 @@ In this task, you will configure and deploy a Kubernetes (K8s) cluster on AWS us
## Evaluation Criteria (100 points for covering all criteria)

1. **Terraform Code for AWS Resources (10 points)**

- Terraform code is created or extended to manage AWS resources required for the cluster creation.
- The code includes the creation of a bastion host.

2. **Cluster Deployment (60 points)**

- A K8s cluster is deployed using either kOps or k3s.
- The deployment method is chosen based on the user's preference and understanding of the trade-offs.
3. **Cluster Verification (10 points)**
- The cluster is verified by running the `kubectl get nodes` command from the local computer.
- A screenshot of the `kubectl get nodes` command output is provided.
4. **Workload Deployment (10 points)**
- A simple workload is deployed on the cluster using `kubectl apply -f https://k8s.io/examples/pods/simple-pod.yaml`.
- The workload runs successfully on the cluster.
5. **Additional Tasks (10 points)**
- Document the cluster setup and deployment process in a README file.
- Document the cluster setup and deployment process in a README file.
11 changes: 10 additions & 1 deletion devops/modules/3_ci-configuration/task_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ In this task, you will install Jenkins CI server on your Kubernetes (K8s) cluste
## Steps

1. **Install Helm**

- Follow the instructions to install [Helm](https://helm.sh/).
- Verify your Helm installation by deploying and removing the Nginx chart from [Bitnami](https://artifacthub.io/packages/helm/bitnami/nginx).

2. **Prepare the Cluster**

- Ensure your cluster has a solution for managing persistent volumes (PV) and persistent volume claims (PVC). Refer to the [K8s documentation](https://kubernetes.io/docs/concepts/storage/volumes/) and [k3s documentation](https://docs.k3s.io/storage) for more details.
- Install and configure an ingress controller to serve traffic via HTTPS. Obtain a certificate and private key from services like Letsencrypt or ZeroSSL. If you don't have a domain name, you may use a self-signed certificate (not recommended).

3. **Install Jenkins**

- Follow the instructions from the [Jenkins documentation](https://www.jenkins.io/doc/book/installing/kubernetes/#install-jenkins-with-helm-v3) to install Jenkins using Helm. Ensure Jenkins is installed in a separate namespace.

4. **Verify Jenkins Installation**

- Create a simple freestyle project in Jenkins that writes "Hello world" into the log.

5. **Additional Tasks**
Expand All @@ -36,25 +40,30 @@ In this task, you will install Jenkins CI server on your Kubernetes (K8s) cluste
## Evaluation Criteria (100 points for covering all criteria)

1. **Helm Installation and Verification (10 points)**

- Helm is installed and verified by deploying the Nginx chart.

2. **Cluster Requirements (30 points)**

- The cluster has a solution for managing persistent volumes (PV) and persistent volume claims (PVC).
- An ingress controller is installed and configured to serve traffic via HTTPS.
- A certificate and private key are configured for TLS.

3. **Jenkins Installation (30 points)**

- Jenkins is installed using Helm in a separate namespace.
- Jenkins is available from the internet via an encrypted connection.

4. **Jenkins Configuration (10 points)**

- Jenkins configuration is stored on a persistent volume and is not lost when Jenkins' pod is terminated.

5. **Verification (10 points)**

- A simple Jenkins freestyle project is created and runs successfully, writing "Hello world" into the log.

6. **Additional Tasks (10 points)**
- **GitHub Actions (GHA) Pipeline (5 points)**
- A GHA pipeline is set up to deploy Jenkins.
- **Authentication and Security (5 points)**
- Authentication and security settings are configured for Jenkins.
- Authentication and security settings are configured for Jenkins.
10 changes: 9 additions & 1 deletion devops/modules/3_ci-configuration/task_5.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ In this task, you will create a Helm chart for a simple application and deploy i
## Steps

1. **Create Helm Chart**

- Create a Helm chart for your application.

2. **Deploy the Application**

- Deploy the application using the Helm chart.
- Ensure the application is accessible from the internet.

3. **Store Artifacts in Git**

- Store the application and Helm chart in a new git repository.

4. **Verify the Application**

- Verify that the application is running and accessible.

5. **Additional Tasks**
Expand All @@ -33,20 +37,24 @@ In this task, you will create a Helm chart for a simple application and deploy i
## Evaluation Criteria (100 points for covering all criteria)

1. **Helm Chart Creation (40 points)**

- A Helm chart for the application is created.

2. **Application Deployment (30 points)**

- The application is deployed using the Helm chart.
- The application is accessible from the internet.

3. **Repository Submission (5 points)**

- A new repository is created with the application and Helm chart.

4. **Verification (5 points)**

- The application is verified to be running and accessible.

5. **Additional Tasks (20 points)**
- **CI/CD Pipeline (10 points)**
- A CI/CD pipeline is set up to automate the deployment of the application.
- **Documentation (10 points)**
- The application setup and deployment process are documented in a README file.
- The application setup and deployment process are documented in a README file.
11 changes: 10 additions & 1 deletion devops/modules/3_ci-configuration/task_6.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ In this task, you will configure a Jenkins pipeline to deploy your application o
## Steps

1. **Create Docker Image and Store in ECR**

- Create a Docker image for your application.
- Store the Docker image in an AWS ECR repository.
- Ensure your K8s nodes can access the ECR repository by adjusting or creating a new instance profile for your EC2 instances.

2. **Create Helm Chart**

- Create a Helm chart for your application.
- Test the Helm chart manually from your local machine.

3. **Store Artifacts in Git**

- Store the Dockerfile and Helm chart in a git repository accessible to Jenkins.

4. **Configure Jenkins Pipeline**

- Create a Jenkins pipeline and store it as a Jenkinsfile in your main git repository.
- Configure the pipeline to be triggered on each push event to the repository.

5. **Pipeline Steps**

- The pipeline should include the following steps:
1. Application build
2. Unit test execution
Expand All @@ -44,6 +49,7 @@ In this task, you will configure a Jenkins pipeline to deploy your application o
## Evaluation Criteria (100 points for covering all criteria)

1. **Pipeline Configuration (40 points)**

- A Jenkins pipeline is configured and stored as a Jenkinsfile in the main git repository.
- The pipeline includes the following steps:
- Application build
Expand All @@ -53,12 +59,15 @@ In this task, you will configure a Jenkins pipeline to deploy your application o
- Deployment to K8s cluster with Helm (dependent on the previous step)

2. **Artifact Storage (20 points)**

- Built artifacts (Dockerfile, Helm chart) are stored in git and ECR (Docker image).

3. **Repository Submission (5 points)**

- A repository is created with the application, Helm chart, and Jenkinsfile.

4. **Verification (5 points)**

- The pipeline runs successfully and deploys the application to the K8s cluster.

5. **Additional Tasks (30 points)**
Expand All @@ -67,4 +76,4 @@ In this task, you will configure a Jenkins pipeline to deploy your application o
- **Notification System (10 points)**
- A notification system is set up to alert on pipeline failures or successes.
- **Documentation (10 points)**
- The pipeline setup and deployment process, are documented in a README file.
- The pipeline setup and deployment process, are documented in a README file.
3 changes: 3 additions & 0 deletions devops/modules/4_monitoring-configuration/task_7.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ In this task, you will install Prometheus on your Kubernetes (K8s) cluster using
## Steps

1. **Install Prometheus**

- Follow the instructions to install Prometheus using the Helm chart by Bitnami. Refer to the [Prometheus documentation](https://prometheus.io/docs/introduction/overview/) for more details.
- Ensure Prometheus is not exposed outside (i.e., it cannot be accessed directly from the internet).

Expand All @@ -23,10 +24,12 @@ In this task, you will install Prometheus on your Kubernetes (K8s) cluster using
## Evaluation Criteria (100 points for covering all criteria)

1. **Prometheus Installation (50 points)**

- Prometheus is installed on the K8s cluster using the Helm chart by Bitnami.
- Prometheus is not exposed outside (i.e., it cannot be accessed directly from the internet).

2. **Metrics Collection (40 points)**

- Prometheus is collecting essential cluster-specific metrics, such as nodes' CPU and memory usage.
- Metrics can be checked via Prometheus web interface using `kubectl proxy` or `port-forward`.

Expand Down
8 changes: 7 additions & 1 deletion devops/modules/4_monitoring-configuration/task_8.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ In this task, you will install Grafana on your Kubernetes (K8s) cluster using a
## Steps

1. **Install Grafana**

- Follow the instructions to install Grafana using the Helm chart by Bitnami. Refer to the [Grafana documentation](https://grafana.com/docs/) for more details.
- Ensure Grafana is available from the internet via an encrypted connection.

2. **Create Dashboard**

- Add a new data source pointing to the existing Prometheus installation.
- Create a dashboard with main K8s metrics visualized, such as CPU and memory utilization, nodes capacity, etc.

3. **Store Artifacts in Git**

- Store the Helm chart and configuration files for Grafana deployment in a new git repository.

4. **Additional Tasks**
Expand All @@ -30,18 +33,21 @@ In this task, you will install Grafana on your Kubernetes (K8s) cluster using a
## Evaluation Criteria (100 points for covering all criteria)

1. **Grafana Installation (40 points)**

- Grafana is installed on the K8s cluster using the Helm chart by Bitnami.
- Grafana is available from the internet via an encrypted connection.

2. **Dashboard Creation (30 points)**

- A new data source pointing to the existing Prometheus installation is added.
- A dashboard is created with main K8s metrics visualized, such as CPU and memory utilization, nodes capacity, etc.

3. **Repository Submission (10 points)**

- A repository is created with the Helm chart and configuration files for Grafana deployment.

4. **Additional Tasks (20 points)**
- **Documentation (10 points)**
- The Grafana setup, including the dashboard creation, is documented in a README file.
- **Security Configuration (10 points)**
- Grafana is configured with proper authentication and security settings.
- Grafana is configured with proper authentication and security settings.
Loading

0 comments on commit 871fde9

Please sign in to comment.