{"id":27772307,"url":"https://github.com/extermachraf/inceptionofthings","last_synced_at":"2026-05-05T20:42:12.423Z","repository":{"id":290144867,"uuid":"973507739","full_name":"extermachraf/inceptionOfThings","owner":"extermachraf","description":"This repository implements a GitOps workflow using K3d and Argo CD for continuous deployment. It provides a lightweight Kubernetes environment where applications are automatically deployed from Git repositories using a declarative approach. The implementation includes scripts for cluster setup, application deployment, and version updates.","archived":false,"fork":false,"pushed_at":"2025-04-27T06:24:13.000Z","size":2094,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T23:58:25.919Z","etag":null,"topics":["argocd","bash-script","deployment","docker","k3d","k3s","scripting"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/extermachraf.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,"zenodo":null}},"created_at":"2025-04-27T06:16:35.000Z","updated_at":"2025-04-27T06:28:48.000Z","dependencies_parsed_at":"2025-04-27T07:26:13.151Z","dependency_job_id":"30febb32-7df7-4a95-acf3-942d780bc8c6","html_url":"https://github.com/extermachraf/inceptionOfThings","commit_stats":null,"previous_names":["extermachraf/inceptionofthings"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extermachraf%2FinceptionOfThings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extermachraf%2FinceptionOfThings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extermachraf%2FinceptionOfThings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extermachraf%2FinceptionOfThings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/extermachraf","download_url":"https://codeload.github.com/extermachraf/inceptionOfThings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251602817,"owners_count":21615963,"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","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","bash-script","deployment","docker","k3d","k3s","scripting"],"created_at":"2025-04-29T23:58:30.842Z","updated_at":"2026-05-05T20:42:12.390Z","avatar_url":"https://github.com/extermachraf.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inception-of-Things (IoT) - Part 3: K3d and Argo CD\n\nThis repository contains the implementation for Part 3 of the Inception-of-Things project, focusing on Kubernetes deployment with K3d and Argo CD.\n\n## Overview\n\nPart 3 implements a GitOps workflow using K3d (a lightweight Kubernetes distribution running in Docker) and Argo CD (a declarative continuous delivery tool for Kubernetes). The setup enables automatic deployment of applications from a GitHub repository, demonstrating the GitOps approach to application deployment and management.\n\n## Architecture\n\nThe implementation includes:\n\n- **K3d**: Lightweight Kubernetes cluster running in Docker containers\n- **Argo CD**: GitOps continuous delivery tool for Kubernetes\n- **Namespace Structure**:\n  - `argocd`: Contains all Argo CD components\n  - `dev`: Contains the application deployed by Argo CD\n- **GitHub Integration**: Automatic syncing with a repository containing Kubernetes manifests\n- **Docker Hub Integration**: Application images pulled from Docker Hub\n\n## Directory Structure\n\n```\n./\n├── conf/\n│   ├── application.yaml     # Argo CD application definition\n│   ├── deployment.yaml      # Kubernetes deployment manifest\n│   └── k3d-cluster.yaml     # K3d cluster configuration\n└── scripts/\n    ├── clean.sh             # Cleanup script for resetting the environment\n    ├── cluster-setup.sh     # Script to create and configure the K3d cluster and Argo CD\n    ├── install-script.sh    # Script to install prerequisites (Docker, kubectl, K3d)\n    ├── setup-argocd-app.sh  # Script to set up the Argo CD application\n    └── update-version.sh    # Script to update the application version\n```\n\n## Prerequisites\n\n- Linux-based operating system\n- Internet connection\n- Sufficient disk space (~2GB) and memory (~2GB)\n- Permissions to run Docker and install software\n\n## Setup Instructions\n\n### 1. Install Required Software\n\nRun the installation script to set up all prerequisites:\n\n```bash\nsudo ./scripts/install-script.sh\n```\n\nThis installs:\n\n- Docker\n- kubectl\n- K3d\n- Helm\n\n### 2. Create the K3d Cluster and Install Argo CD\n\n```bash\n./scripts/cluster-setup.sh\n```\n\nThis script:\n\n- Creates a K3d cluster with the configuration in `conf/k3d-cluster.yaml`\n- Creates `argocd` and `dev` namespaces\n- Installs Argo CD in the `argocd` namespace\n- Configures Argo CD with admin credentials\n\n### 3. Deploy the Application using Argo CD\n\n```bash\n./scripts/setup-argocd-app.sh\n```\n\nThis script:\n\n- Configures Argo CD to monitor the GitHub repository\n- Applies the application definition to deploy the application in the `dev` namespace\n- Sets up port forwarding to access the application and Argo CD UI\n\n### 4. Access the Applications\n\n- Argo CD UI: https://localhost:9090 (Username: admin, Password: password)\n- Deployed application: http://localhost:8888\n\n### 5. Updating the Application Version\n\nTo demonstrate the GitOps workflow, you can update the application version:\n\n```bash\n# Navigate to your GitHub repository clone first\ncd /path/to/your/repo\n./scripts/update-version.sh\n```\n\nThis updates the image version in the deployment manifest, commits and pushes the change to GitHub.\nArgo CD automatically detects the change and updates the deployment.\n\n### 6. Cleanup\n\nTo clean up the environment and remove all resources:\n\n```bash\n./scripts/clean.sh\n```\n\n## GitOps Workflow\n\nThis setup demonstrates the GitOps principles:\n\n1. **Declarative Configuration**: All application configurations are defined in Git\n2. **Version Control**: Changes are tracked through Git commits\n3. **Automated Deployment**: Argo CD automatically applies changes from Git\n4. **Drift Detection**: Argo CD ensures the cluster state matches the declared state in Git\n\n## Troubleshooting\n\n- **Image Pull Errors**: If you encounter image pull issues, uncomment and configure the Docker registry secret in `cluster-setup.sh`\n- **Port Conflicts**: Ensure ports 8888, 9090, and 8080 are available\n- **Empty Responses**: Try direct port-forwarding to check if the application is running properly\n- **Connection Issues**: Use `kubectl describe pod` to check for container status and events\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextermachraf%2Finceptionofthings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fextermachraf%2Finceptionofthings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextermachraf%2Finceptionofthings/lists"}