{"id":15891307,"url":"https://github.com/dbritto-dev/udacity-cloud-devops-engineer-capstone","last_synced_at":"2026-04-08T21:31:49.926Z","repository":{"id":69762210,"uuid":"249583478","full_name":"dbritto-dev/udacity-cloud-devops-engineer-capstone","owner":"dbritto-dev","description":"Capstone Project for Cloud DevOps Engineer on Udacity","archived":false,"fork":false,"pushed_at":"2020-08-29T21:32:40.000Z","size":1524,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-10T22:15:51.568Z","etag":null,"topics":["capstone","covid19","eks","eksctl","flask","jenkins","kubernetes","pipeline","scraped-data","udacity-devops-nanodegree"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbritto-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-24T01:28:05.000Z","updated_at":"2022-06-10T09:05:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"663c6b95-78a6-4210-a7d2-35f3ca3357e2","html_url":"https://github.com/dbritto-dev/udacity-cloud-devops-engineer-capstone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbritto-dev/udacity-cloud-devops-engineer-capstone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fudacity-cloud-devops-engineer-capstone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fudacity-cloud-devops-engineer-capstone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fudacity-cloud-devops-engineer-capstone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fudacity-cloud-devops-engineer-capstone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbritto-dev","download_url":"https://codeload.github.com/dbritto-dev/udacity-cloud-devops-engineer-capstone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fudacity-cloud-devops-engineer-capstone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31575456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capstone","covid19","eks","eksctl","flask","jenkins","kubernetes","pipeline","scraped-data","udacity-devops-nanodegree"],"created_at":"2024-10-06T07:21:31.339Z","updated_at":"2026-04-08T21:31:49.910Z","avatar_url":"https://github.com/dbritto-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Overview\n\nThis application simplies the access to the covid 19 stats of the world (stats for each country). \nThis application is used to implement all the knowledge acquired on the Cloud DevOps Engineer\nNano Degree on Udacity. The app has a simple api with two endpoints, the app is built it on top of \nPython using `Flask` and `BeautifulSoup 4` (to scrape the data).\n\n**API URL:** `\u003cyour-api-url\u003e` (see the [Verifying](#verifying) section to get the url of your api).\n\n| Endpoints | Path           | Description                                                                             |\n| --------- | -------------- | --------------------------------------------------------------------------------------- |\n| GET       | `/`            | Returns a `Hello World!` message with the current state of the app (`blue` or `green`). |\n| GET       | `/world-stats` | Returns covid stats of the world.                                                       |\n\n**PROJECT STRUCTURE**\n\n| File Name 　　　　　　　　　　　　　　 | Description 　　　　　　　                                                     |\n| :------------------------------------- | :-------------------------------------------------------------------- |\n| `├── code/`                            | _This directory contains the Python Flask app and Tests_              |\n| `　　├── capstone/`                     | Python Flask App.                                                     |\n| `　　├── tests/`                        | Tests for the Python Flask App.                                       |\n| `　　├── .coveragerc`                   | Python Coverage configuration file.                                   |\n| `　　├── requirements-ci.txt`           | Python dependencies file for Continuous Integration (CI).             |\n| `　　├── requirements-dev.txt`          | Python dependencies file for development.                             |\n| `　　├── requirements.txt`              | Python dependencies file for production.                              |\n| `　　├── run.py`                        | Python script to run the application.                                 |\n| `　　└── tox.ini`                       | Flask8 configuration file.                                            |\n| `├── infra/`                           | _This directory contains the files for docker and kubernetes._        |\n| `　　├── docker/`                       | Docker files for blue and green images.                               |\n| `　　├── k8s/`                          | Kubernetes files for blue and green deployments.                      |\n| `　　└── server.yaml`                   | Template to create the cluster on Amazon EKS using EKSCTL.            |\n| `├── nginx/`                           | _This directory contains the files for a custom NGINX configuration._ |\n| `├── screenshots/`                     | _This directory contains the screenshots for the project validation._ |\n| `├── .editorconfig`                    | Configuration file for editorconfig.                                  |\n| `├── .gitignore`                       | Configuration file for gitignore.                                     |\n| `├── Jenkinsfile`                      | Configuration file for Jenkins Pipelines.                             |\n| `├── Makefile`                         | Set of custom scripts.                                                |\n| `├── README.md`                        | Description of the app.                                               |\n| `└── TODO.md`                          | Project TODO.                                                         |\n\n\n# Pre-requisites\n\n-   AWS CLI: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html\n-   AWS IAM Roles for EKS: https://docs.aws.amazon.com/eks/latest/userguide/security_iam_service-with-iam.html\n-   Jenkins: https://www.jenkins.io/download/\n-   Docker: https://docs.docker.com/engine/install/\n-   Kubernetes: https://kubernetes.io/es/docs/tasks/tools/install-kubectl/\n-   EKSCTL: https://eksctl.io/introduction/#installation\n\n\u003e **Note:** Jenkins needs Java to run. To install Java for jenkins run this \n\u003e command: `sudo apt install default-jdk -y` (only Debian distros)\n\n\n# Setup\n\n### 1. Create the Cluster\n\nTo create a cluster you can use the following command.\n\n```sh\n$ eksctl create cluster -f ./infra/eks/cluster.yaml\n```\n\n\u003e **Note:** You can create the cluster manually following this guide: \n\u003e https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html\n\n### 2. Create a Kubernetes config for Amazon EKS\n\nTo create/update a Kubernetes config (kubeconfig) you can use following command.\n\n```sh\n$ aws eks --region us-east-1 update-kubeconfig --name capstone-cluster\n```\n\n\u003e **Note:** Read more about kubeconfig files for EKS on: https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html\n\n### 3. Configure Jenkins\n\n**Plugins**\n\n-   AWS Pipeline: https://plugins.jenkins.io/pipeline-aws\n-   Aqua MicroScanner: https://plugins.jenkins.io/aqua-microscanner/\n-   BlueOcean: https://plugins.jenkins.io/blueocean/, https://plugins.jenkins.io/blueocean-executor-info/\n\n**Credentials**\n\n-   **Docker (Steps):** \n    -   ➡️ Jenkins (Dashboard)\n    -   ➡️ Manage Jenkins\n    -   ➡️ Configure System\n    -   ➡️ Declarative Pipeline (Docker)\n-   **Kubernetes Config File (Steps):**\n    -   ➡️ Jenkins (Dashboard)\n    -   ➡️ Job (github repo) \n    -   ➡️ Credentials\n    -   ➡️ Store scoped to `\u003cgithub-repo\u003e`\n    -   ➡️ Global\n    -   ➡️ Add credentials\n        -   **Kind:** `Secret Text`\n        -   **ID:** `k8s-confige-file`\n        -   **Secret:** `/path/to/your/kubeconfig-file` **(absolute paths)** e.g: `/home/ubuntu/.kube/kubeconfig`\n-   **AWS (Steps):** \n    -   ➡️ Jenkins (Dashboard)\n    -   ➡️ Job (github repo)\n    -   ➡️ Credentials\n    -   ➡️ Store scoped to `\u003cgithub-repo\u003e`\n    -   ➡️ Global\n    -   ➡️ Add credentials\n        -   **Kind:** `AWS Credentials`\n        -   **ID:** `aws-creds`\n        -   Fill the other fields.\n\n**Pipelines** \n\nTo create a pipeline using `BlueOcean` follow this guide: https://www.jenkins.io/doc/book/blueocean/creating-pipelines/\n\n# Deploying\n\n**Automate deploys**\n\nYou can trigger the deployments just pushing update the right branch. If you want to a `blue deployment` push your\nchanges to the `blue branch`.\n\n**Manual deploys**\n\nYou can trigger manual deploy using the following command: \n\n```\n$ kubectl apply -f ./infra/k8s/deployments/blue.yaml\n$ kubectl apply -f ./infra/k8s/services/blue.yaml\n```\nor\n\n```sh\n$ kubectl apply -f ./infra/k8s/deployments/blue.yaml -f ./infra/k8s/services/blue.yaml\n```\n\n\u003e **Note:** This step require to access to your ec2 instance before. \n\u003e Check the [Verifying](#verifying) section to get help.\n\n# Verifying\n\n### 1. Connect to the EC2 instance using ssh\n\nTo connect to your EC2 instance follow this guide: https://docs.aws.amazon.com/quickstarts/latest/vmlaunch/step-2-connect-to-instance.html\n\n### 2. Get the link to the appplication\n\nTo get the external ip of our service you can use the following command:\n\n```sh\n$ kubectl get services -l app=capstone --output jsonpath='{.items[].status.loadBalancer.ingress[].hostname}'\n```\n\nWith the link you can access to the app. If all is working yo can see a message like this:\n\n```json\n{\"message\":\"Hello GREEN APP!\"}\n```\nor\n```json\n{\"message\":\"Hello BLUE APP!\"}\n```\n\n# Thanks to\n\nA big thanks to \n\n* Udacity\n* Raul Hugo @RaulHugo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbritto-dev%2Fudacity-cloud-devops-engineer-capstone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbritto-dev%2Fudacity-cloud-devops-engineer-capstone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbritto-dev%2Fudacity-cloud-devops-engineer-capstone/lists"}