{"id":20735395,"url":"https://github.com/yashpimple/devops-assesment","last_synced_at":"2025-09-13T08:31:26.946Z","repository":{"id":190467124,"uuid":"681773148","full_name":"YashPimple/DevOps-Assesment","owner":"YashPimple","description":"Markerable DevOps Assesment","archived":false,"fork":false,"pushed_at":"2024-01-06T14:42:48.000Z","size":102,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T07:22:13.590Z","etag":null,"topics":["argocd","docker","docker-compose","ingress","kubernetes","tekton"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/YashPimple.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":"2023-08-22T18:18:24.000Z","updated_at":"2024-06-04T17:57:54.000Z","dependencies_parsed_at":"2024-11-17T05:38:07.811Z","dependency_job_id":"4f3c6b40-b18f-4fdb-bf9d-457a372ff931","html_url":"https://github.com/YashPimple/DevOps-Assesment","commit_stats":null,"previous_names":["yashpimple/ci-cd-project","yashpimple/ruby_on_rails","yashpimple/devops-assesment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YashPimple/DevOps-Assesment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashPimple%2FDevOps-Assesment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashPimple%2FDevOps-Assesment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashPimple%2FDevOps-Assesment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashPimple%2FDevOps-Assesment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YashPimple","download_url":"https://codeload.github.com/YashPimple/DevOps-Assesment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashPimple%2FDevOps-Assesment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274937837,"owners_count":25377374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["argocd","docker","docker-compose","ingress","kubernetes","tekton"],"created_at":"2024-11-17T05:37:30.023Z","updated_at":"2025-09-13T08:31:26.913Z","avatar_url":"https://github.com/YashPimple.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevOps Assessment\n\nThis assessment involves deploying a simple web application with an Database using Docker, Kubernetes, and ArgoCD. Follow the steps below to complete the tasks.\n\n## Step 1: Docker\n### Task\nBuild a Dockerfile for deploying a simple web application with Postgress enabled. The application and the database should run on different containers.\n\n### Steps\n1. Create a new Rails application or use an existing one.\n2. Write a Dockerfile to containerize the Rails application.\n   ```Dockerfile\n   FROM ruby:3.1\n   RUN mkdir /app\n   WORKDIR /app\n\n   COPY Gemfile Gemfile.lock ./\n\n   RUN apt-get update \u0026\u0026 apt-get install -y nodejs yarn\n   RUN gem install bundler\n   RUN bundle install\n\n   COPY . .\n\n   RUN rake assets:precompile\n\n   EXPOSE 3000\n\n   CMD [\"rails\", \"server\", \"-b\", \"0.0.0.0\"]\n   \n3. Build Docker container for the Rails application and Postgress and push it on Docker-Hub\n   \n   ```docker build -t yashpimple22/railsapp:1.0 .```\n   \n   ```docker push yashpimple22/railsapp:1.0```\n\n## Step 2: Kubernetes\n\n### Task\n#### Build a YAML file to deploy the application and Postgres on Kubernetes. Use an EC2 instance to deploy the standalone Postgress pod using Kubernetes StatefulSet. You can choose an ingress controller or service mesh for networking.\n\n```bash\nKubectl apply -f Manifests/deployment.yaml\n\nKubectl apply -f Manifests/Ingress.yaml\n```\n\n## Step 3: ArgoCD\n### Task\n#### Deploy ArgoCD to manage the deployment of the application using GitOps. Create a private GitHub repository to manage the YAML files and for GitOps purposes. All ArgoCD config files must be present in the GitHub repository. Required files include application.yaml, argocd-cm, argocd-rbac-cm, a config file for the private GitHub repository, and Kubernetes manifest files.\n\nArgoCD can be installed using the following commands:\n\n- To create a namespace \"argocd\", execute the following command. However, this step is optional and you can proceed with the \"default\" namespace as well:\u003cbr\u003e\n  `kubectl create namespace argocd`\n\n- Run the install ArgoCD script by executing the following command: \u003cbr\u003e\n  `kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml`\n\n- Install the CLI using brew to use argocd commands: \u003cbr\u003e\n  `brew install argocd`\n\n- To retrieve the password, execute the following command: \u003cbr\u003e\n  `kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=\"{.data.password}\" | base64 -d; echo`\n\n- To access ArgoCD on a browser, forward the port to 8080 by executing the following command: \u003cbr\u003e\n `kubectl port-forward svc/argocd-server -n argocd 8080:443`\n\n- Deployment the YAML configuration\n  - create `argoproject.yaml` which will have our argo-cd configuration\n\n```yaml\napiVersion: argoproj.io/v1alpha1\nkind: Application\nmetadata:\n  name: rails-app\n  namespace: argocd  \nspec:\n  destination:\n    name: default\n    namespace: ruby-rails   \n    server: https://kubernetes.default.svc \n  project: default\n  source:\n    repoURL: 'https://github.com/YashPimple/Ruby_on_rails.git'  \n    path: \"Manifests\"  \n    targetRevision: HEAD \n  syncPolicy:\n    automated:\n      prune: true  # Remove resources not defined in Git\n      selfHeal: true  # Automatically recover from sync failures\n```\n\n## Step 4: Tekton\n\n### Task\nSet up Tekton pipelines and the Tekton dashboard. The pipeline should download the source code from the public fork of the sample project (Which you’ve containerized in the first step), build the image, and push it to Docker Hub. The candidate is expected to manually run the pipeline from the Tekton dashboard.\n\n### Steps\n1. Install and configure Tekton on your Kubernetes cluster.\n2. Create Tekton Tasks ([clone-and-build-task.yaml](https://github.com/YashPimple/Ruby_on_rails/blob/main/Tekton/clone-and-build-task.yaml)) for building the application image.\n3. Define a Tekton Pipeline ([build-pipeline.yaml](https://github.com/YashPimple/Ruby_on_rails/blob/main/Tekton/build-pipeline.yaml)) that includes the Task.\n4. Create a PipelineRun ([build-pipeline-run.yaml](https://github.com/YashPimple/Ruby_on_rails/blob/main/Tekton/build-pipeline-run.yaml)) to trigger the pipeline.\n5. Access the Tekton dashboard and manually run the pipeline.\n6. Verify that the source code is downloaded, the image is built, and it is pushed to Docker Hub.\n\n## Working\n\n- Start with installing Tekton\n```bash\nkubectl apply --filename \\\nhttps://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml\n```\n\n- Create a Docker Hub Secret\n```bash\nkubectl create secret docker-registry regcred \\\n  --docker-server=https://index.docker.io/v1/ \\\n  --docker-username=\"your-docker-username\" \\\n  --docker-password=\"your-docker-password\"\n```\n\n- Apply the changes\n```bash\nkubectl apply -f clone-task.yaml\nkubectl apply -f clone-taskrun.yaml\nkubectl apply -f build-and-push-task.yaml\nkubectl apply -f build-and-push-pipeline.yaml\nkubectl apply -f build-and-push-pipelinerun.yaml\n```\n\n- Run the Pipeline \n```bash\ntkn pipeline start build-and-push-pipeline --param gitrepo=https://github.com/YashPimple/Ruby_on_rails.git --param context-dir=\"Ruby_on_rails\" --param dockerfile=\"./Dockerfile\" --param docker-image=\"https://hub.docker.com/r/yashpimple22/railsapp:latest\"\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashpimple%2Fdevops-assesment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashpimple%2Fdevops-assesment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashpimple%2Fdevops-assesment/lists"}