{"id":19044553,"url":"https://github.com/brakmic/minidevops","last_synced_at":"2025-04-23T23:29:16.939Z","repository":{"id":153215959,"uuid":"627002238","full_name":"brakmic/miniDevOps","owner":"brakmic","description":"A DevOps Toolkit","archived":false,"fork":false,"pushed_at":"2025-02-05T13:51:51.000Z","size":8850,"stargazers_count":27,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-18T08:39:31.150Z","etag":null,"topics":["containers","devops","docker","helm","kubernetes","terraform"],"latest_commit_sha":null,"homepage":"https://blog.brakmic.com","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brakmic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-04-12T15:29:00.000Z","updated_at":"2025-02-05T13:51:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"f56fc228-ef52-4c77-911f-c6a9bf23e47d","html_url":"https://github.com/brakmic/miniDevOps","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FminiDevOps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FminiDevOps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FminiDevOps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FminiDevOps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brakmic","download_url":"https://codeload.github.com/brakmic/miniDevOps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250531467,"owners_count":21445993,"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":["containers","devops","docker","helm","kubernetes","terraform"],"created_at":"2024-11-08T22:46:42.241Z","updated_at":"2025-04-23T23:29:16.901Z","avatar_url":"https://github.com/brakmic.png","language":"Dockerfile","readme":"# miniDevOps: A DevOps Toolkit Operated within Docker\n\n`miniDevOps` is a Docker image designed to provide a comprehensive set of DevOps tools and utilities, all within a Debian Linux environment.\n\n![shell_welcome_msg](./gifs/miniDevOps.gif)\n\n![Docker Pulls](https://badgen.net/docker/pulls/brakmic/devops?icon=docker)\n[![Docker Image Size](https://badgen.net/docker/size/brakmic/devops?icon=docker\u0026label=image%20size)](https://hub.docker.com/r/brakmic/devops/)\n\n## Included DevOps Tools\n\n* [kubectl](https://github.com/kubernetes/kubectl) (aliased with [`kubecolor`](https://github.com/kubecolor/kubecolor))\n* [k9s](https://k9scli.io/)\n* [kube-shell](https://github.com/cloudnativelabs/kube-shell)\n* [helm](https://github.com/helm/helm)\n* [terraform](https://github.com/hashicorp/terraform)\n* [flux](https://fluxcd.io)\n* [operator-sdk](https://sdk.operatorframework.io/)\n* [kind](https://github.com/kubernetes-sigs/kind)\n* [docker compose v2](https://github.com/docker/compose)\n* [krew](https://github.com/kubernetes-sigs/krew) (kubectl's plugin manager)\n* [kubens](https://github.com/ahmetb/kubectx#kubens)\n* [kubectx](https://github.com/ahmetb/kubectx)\n* [stern](howtos/stern.md)\n* [skaffold](howtos/skaffold.md)\n* [kubeseal](howtos/kubeseal.md)\n* [kubelogin](https://github.com/Azure/kubelogin)\n* [lazydocker](https://github.com/jesseduffield/lazydocker)\n* [usql](https://github.com/xo/usql)\n\n## Additional Packages\n\n* bash (with completion functionality)\n* nano (featuring syntax highlighting)\n* vim\n* git\n* gcc\n* go\n* python3\n* pip3\n* make\n* zip\n* lynx\n* curl\n* wget\n* jq\n* ncurses\n* apache2-ssl, accompanied by apache2-utils\n\n## Python and Pipenv Development Environment\n\n`miniDevOps` includes Python and Pipenv, making it a convenient environment for Python development. Whether you're creating scripts to manage your infrastructure or developing full-fledged applications, this Docker image is equipped to handle your Python needs.\n\n* **Python**: The image includes Python 3, allowing you to run and develop Python applications.\n\n* **Pipenv**: It automatically creates and manages a virtual environment for your projects, as well as adds/removes packages from your `Pipfile` as you install/uninstall packages. It also generates the `Pipfile.lock`, which is used to produce deterministic builds.\n\nExample usage:\n```bash\n$ pipenv install requests\n$ pipenv run python my_script.py\n```\n\n## Setup\n\nThe [config.yml](./config.yml) file contains a suggested Kind cluster configuration. Feel free to modify it according to your specific needs.\n\nTo run the `miniDevOps` Docker image, execute the following command:\n\n```bash\n$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock --network=host --workdir /root brakmic/devops:latest\n```\n\nThe `/var/run/docker.sock` volume binding allows for communication with the host's Docker instance.\n\nOnce inside the container's shell, establish a new cluster using the command:\n\n```bash\n$ kind create cluster --name my-cluster\n```\n\n![mini_devops](./images/minidevops.png)\n\nWith this setup, you can now establish a new cluster and then copy the updated `.kube/config` into `/root/local`. This directory will persist its content, even after a Docker shutdown.\n\nAdditionally, a shell script titled `create_cluster.sh` is available. This script sets up the cluster and deploys the NGINX IngressController.\n\nExecute it with:\n\n```bash\n$ ./create_cluster.sh my-cluster\n```\n\n![create_cluster_script](./images/setup_cluster.png)\n\n## For Windows Users:\nIf you are running Docker on Windows, an alternative PowerShell script is available. This script provides a similar functionality as the bash script for setting up the cluster and deploying the NGINX IngressController. You can run this script in PowerShell with:\n\n```powershell\n.\\create_cluster.ps1 -CLUSTERNAME MyClusterName\n```\n\nPlease ensure that both kind and kubectl command-line tools are installed and available in your PATH when you run this PowerShell script.\n\n## Maintaining Persistent Kubernetes Clusters Across Docker Sessions\n\nTo retain your cluster between sessions, copy the current `.kube/config` to a local volume. Upon your next `miniDevOps` launch, replace the default `.kube/config` with the one you saved. Here's an example:\n\n```bash\n$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}:/root/local --network=host --workdir /root brakmic/devops:latest\n```\n\nThis setup allows you to create a new cluster and then copy the updated `.kube/config` to `/root/local`. The contents of this directory will be preserved, even after the Docker system is shut down.\n\n## Docker Image\n\nThe Docker image for `miniDevOps` is available at: [Docker Hub](https://hub.docker.com/r/brakmic/devops)\n\n## HOWTOs\n\nThe following guides provide detailed instructions on how to use some of the included DevOps tools in the `miniDevOps` Docker image:\n\n1. **kubeseal**: Learn how to [seal a secret](https://github.com/brakmic/miniDevOps/blob/main/howtos/kubeseal.md) in Kubernetes. \n   \n2. **skaffold**: Understand the [automated workflow](https://github.com/brakmic/miniDevOps/blob/main/howtos/skaffold.md) for building, pushing, and deploying applications with Skaffold.  \n   \n3. **stern**: Get to know how to [stream logs](https://github.com/brakmic/miniDevOps/blob/main/howtos/stern.md) from multiple pods in real-time.\n\n\n## Useful Commands and Examples\n\n### kubectl\n\nCheck the status of all the nodes within namespace `dev` in your Kubernetes cluster:\n\n```bash\n$ kubectl get nodes -n dev\n```\n\nLearn more with the [Kubernetes Official Documentation](https://kubernetes.io/docs/tutorials/)\n\n### helm\n\nInstall a package on your Kubernetes cluster. In this example, we are installing the stable release of Prometheus:\n\n```bash\n$ helm install prometheus stable/prometheus\n```\n\nGet started with the [Helm Official Documentation](https://helm.sh/docs/intro/using_helm/)\n\n### terraform\n\nInitialize a new Terraform working directory and apply the configurations:\n\n```bash\n$ terraform init\n$ terraform apply\n```\n\nExplore more with the [Terraform Learn](https://learn.hashicorp.com/terraform)\n\n### operator-sdk\n\n[Operator SDK](https://sdk.operatorframework.io/) is a toolkit to accelerate building Kubernetes native applications. With the Operator SDK, developers can build, test, and deploy Operators - applications that can manage and automate complex systems within a Kubernetes cluster. The SDK provides high-level APIs, useful abstractions, and project scaffolding that facilitates the fast development of Operators, without requiring deep Kubernetes API knowledge. The Operator SDK supports various operator types including Helm, Ansible, and Go, allowing developers to choose the best tool for their use case.\n\nExample usage:\n```bash\n# Create a new operator project\n$ operator-sdk init --domain=example.com --repo=github.com/example-inc/memcached-operator\n\n# Create a new API for the custom resource\n$ operator-sdk create api --group cache --version v1alpha1 --kind Memcached --resource --controller\n\n# Build and push the operator image\n$ make docker-build docker-push IMG=\u003csome-registry\u003e/memcached-operator:v0.0.1\n\n# Deploy the operator to a cluster\n$ make install\n$ make deploy IMG=\u003csome-registry\u003e/memcached-operator:v0.0.1\n```\n\nThis sets up the basic scaffolding for your operator project, creates the necessary CRDs (Custom Resource Definitions), and allows you to push your operator to a container registry and deploy it to a Kubernetes cluster. From here, you can define your operator’s logic and specify how it should manage the application’s lifecycle.\n\n### flux\n\n[Flux](https://fluxcd.io) is a toolset for keeping Kubernetes clusters in sync with infrastructure-as-code systems, like Git repositories, and automating updates to configuration and images. It uses a pull-based approach to continuously deploy and monitor applications. With Flux, you can ensure that your cluster's state matches the versioned sources, allowing for GitOps practices in your workflow.\n\nFlux supports multi-tenancy and scales to multiple clusters, ensuring declarative infrastructure for both small-scale applications and large-scale operations. It comes with powerful features like automatic updates, policy-driven deployments, and integrations with prominent Kubernetes-native tools.\n\nExample usage:\n```bash\n# Bootstrap Flux on your cluster\n$ flux bootstrap github \\\n  --owner=\u003cyour-user\u003e \\\n  --repository=\u003cyour-repository\u003e \\\n  --branch=main \\\n  --path=./clusters/your-cluster \\\n  --personal\n\n# Check components status\n$ flux check\n\n# Sync your cluster state with the Git repository\n$ flux reconcile source git flux-system\n```\n\nWith these commands, you've set up Flux to manage your Kubernetes cluster according to the infrastructure-as-code definitions in your Git repository. Flux will now automatically ensure that your cluster's state matches the configurations in the Git repository, and any change to the repository will be promptly applied to the cluster.\n\nDive deeper with the [Flux Official Documentation](https://fluxcd.io/docs/introduction/).\n\n### docker compose v2\n\nStart all services defined in a `docker-compose.yml` file in detached mode:\n\n```bash\n$ docker compose up -d\n```\n\nRead more in the [Docker Compose Documentation](https://docs.docker.com/compose/migrate/)\n\n### kind\n\nCreate a Kubernetes cluster with a specific name:\n\n```bash\n$ kind create cluster --name my-cluster\n```\n\nLearn how to get started with the [kind GitHub Quick Start Guide](https://kind.sigs.k8s.io/docs/user/quick-start/)\n\n### lazydocker\n\nA simple terminal UI for both docker and docker-compose, to quickly manage projects with containers:\n\n![lazydocker](./gifs/lazydocker.gif)\n\n```bash\n$ lazydocker\n```\n\nCheck out the [lazydocker GitHub Repository](https://github.com/jesseduffield/lazydocker) for more information.\n\n### kubeseal\n\nSeal a Kubernetes secret using a public certificate:\n\n```bash\n$ kubeseal --cert=publicCert.pem --format=yaml \u003c secret.yaml \u003e sealedsecret.yaml\n```\n\nRead the [kubeseal GitHub Usage Guide](https://github.com/bitnami-labs/sealed-secrets#usage) to learn more.\n\n### stern\n\nStream logs from multiple pods in real-time. For example, to stream logs from all pods with the label `app=myapp` in the `dev` namespace:\n\n```bash\n$ stern -n dev app=myapp\n```\n\nLearn more about Stern with its [GitHub Repository](https://github.com/stern/stern#usage)\n\n### skaffold\n\nAutomate the workflow for building, pushing, and deploying applications in a Kubernetes environment. Here's how to start a development cycle on your local cluster:\n\n```bash\n$ skaffold dev\n```\n\nGet started with [Skaffold Documentation](https://skaffold.dev/docs/)\n\n### kubelogin\n\nAuthenticate to a Kubernetes cluster using an OpenID Connect identity provider. For example:\n\n```bash\n$ kubelogin convert-kubeconfig -l azure\n```\n\nLearn more from [kubelogin GitHub Repository](https://github.com/Azure/kubelogin)\n\n### krew\n\nKrew is a plugin manager for `kubectl`. Use it to install and manage kubectl plugins. For example, to list all available plugins:\n\n```bash\n$ kubectl krew search\n```\n\nExplore [krew GitHub Repository](https://github.com/kubernetes-sigs/krew) to learn more.\n\n### kubens\n\nSwitch between Kubernetes namespaces smoothly. For example, to switch to the `dev` namespace:\n\n```bash\n$ kubens dev\n```\n\nCheck out [kubens GitHub Repository](https://github.com/ahmetb/kubectx#kubens) for more information.\n\n### kubectx\n\nSwitch between Kubernetes contexts (clusters). For example, to switch to a context named `my-cluster`:\n\n```bash\n$ kubectx my-cluster\n```\n\nLearn more from the [kubectx GitHub Repository](https://github.com/ahmetb/kubectx)\n\n### uSQL\n\nuSQL is a modern query language and execution engine that facilitates data querying across different platforms and data sources. It provides a unified SQL interface for various databases and file formats.\n\n#### Features\n\n* **Unified Querying**: Write SQL queries that work across different databases and file formats.\n* **Optimization Engine**: Automatic optimization for complex queries to ensure efficient execution.\n* **Extensibility**: Easy to extend with custom functions and data sources.\n\nuSQL supports a wide range of databases and file formats including MySQL, PostgreSQL, SQLite, CSV, Excel, and more.\n#### Usage\n\nYou can execute queries using the uSQL command-line interface:\n\n```sql\nusql \"SELECT * FROM file.csv WHERE column \u003e 10\"\n```\n\nFor more detailed information, visit the [official documentation](https://github.com/xo/usql#features-and-compatibility).\n\n\n## License\n\n[MIT](./LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fminidevops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrakmic%2Fminidevops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fminidevops/lists"}