This guide explains how to set up and use the DevOps-OS development container, a comprehensive multi-language development environment with integrated CI/CD capabilities.
DevOps-OS is a development container that provides a pre-configured environment for multi-language development and DevOps operations. It includes support for:
- Multiple programming languages (Python, Java, JavaScript/TypeScript, Go)
- CI/CD tools and pipelines
- Kubernetes and container orchestration
- Infrastructure as Code (IaC)
- Testing and code quality tools
Before getting started, ensure you have the following installed:
- Docker (Latest version)
- Visual Studio Code (Latest version)
- Dev Containers extension for VS Code
-
Clone your project repository:
git clone https://github.com/yourusername/your-project.git cd your-project -
Copy the DevOps-OS .devcontainer files to your project:
mkdir -p .devcontainer cp -r /path/to/devops-os/.devcontainer/* ./.devcontainer/ -
Open the project in VS Code and click "Reopen in Container" when prompted, or run the "Dev Containers: Reopen in Container" command from the Command Palette.
-
Create a new directory for your project:
mkdir my-devops-project cd my-devops-project -
Generate the dev container configuration using the CLI:
# Generate devcontainer.json and devcontainer.env.json python -m cli.scaffold_devcontainer \ --languages python,java,go \ --cicd-tools docker,terraform,kubectl,helm \ --kubernetes-tools k9s,kustomize,argocd_cli,flux \ --output-dir .
This creates
.devcontainer/devcontainer.jsonand.devcontainer/devcontainer.env.jsonwith the correct build args, VS Code extensions, and forwarded ports for your selected tools.Run
python -m cli.scaffold_devcontainer --helpto see all options, including version overrides (e.g.--python-version 3.12).Alternative: create the files manually
Create a
.devcontainerdirectory and add the following files:devcontainer.json:
{ "name": "DevOps-OS", "build": { "dockerfile": "Dockerfile", "context": ".", "args": {} }, "runArgs": [ "--init", "--privileged" ], "overrideCommand": false, "customizations": { "vscode": { "extensions": [ "ms-python.python", "ms-azuretools.vscode-docker", "redhat.vscode-yaml", "ms-kubernetes-tools.vscode-kubernetes-tools", "redhat.java", "vscjava.vscode-java-debug", "dbaeumer.vscode-eslint", "golang.go", "hashicorp.terraform" ] } }, "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], "postCreateCommand": "python3 .devcontainer/configure.py" }devcontainer.env.json:
{ "languages": { "python": true, "java": true, "javascript": true, "go": true }, "cicd": { "docker": true, "terraform": true, "kubectl": true, "helm": true, "github_actions": true }, "kubernetes": { "k9s": true, "kustomize": true, "argocd_cli": true, "lens": false, "kubeseal": true, "flux": true, "kind": true, "minikube": true, "openshift_cli": false }, "versions": { "python": "3.11", "java": "17", "node": "20", "go": "1.21" } } -
Copy the Dockerfile from this repository to your
.devcontainerdirectory. -
Open the project in VS Code and click "Reopen in Container" when prompted, or run the "Dev Containers: Reopen in Container" command from the Command Palette.
The easiest way to reconfigure the container is with the CLI:
python -m cli.scaffold_devcontainer \
--languages python,go \
--cicd-tools docker,terraform \
--kubernetes-tools k9s,flux \
--devops-tools prometheus,grafanaThis regenerates both devcontainer.json and devcontainer.env.json.
You can also edit devcontainer.env.json by hand. This file lets you specify which languages, tools, and features to include in your environment.
Enable or disable languages by setting their value to true or false:
"languages": {
"python": true,
"java": true,
"javascript": true,
"go": false
}Enable or disable various CI/CD and DevOps tools:
"cicd": {
"docker": true,
"terraform": true,
"kubectl": true,
"helm": true,
"github_actions": true
}Select which Kubernetes tools to install:
"kubernetes": {
"k9s": true,
"kustomize": true,
"argocd_cli": true,
"lens": false,
"kubeseal": true,
"flux": true
}Specify the versions of languages and tools to use:
"versions": {
"python": "3.11",
"java": "17",
"node": "20",
"go": "1.21"
}Once the container is built and running, you can:
- Use the integrated terminal in VS Code to run commands with all tools pre-installed
- Develop in any of the enabled languages with full IDE support
- Build and run containers using Docker
- Deploy to Kubernetes clusters
- Set up automated CI/CD pipelines (see companion README files)
Depending on your configuration, DevOps-OS includes:
- Languages: Python, Java, JavaScript/TypeScript, Go
- Build Tools: Maven, Gradle, npm, pip, Go tools
- Container Tools: Docker, Docker Compose
- Kubernetes: kubectl, helm, k9s, kustomize, ArgoCD CLI, Flux
- IaC: Terraform, AWS CLI, Azure CLI
- CI/CD: GitHub Actions configs, Jenkins pipelines
- Code Quality: SonarQube, ESLint, Pylint, CheckStyle
If the container fails to build:
- Check Docker is running
- Ensure you have sufficient disk space
- Review Docker build logs for specific errors
If a specific tool isn't working properly:
- Check the tool is enabled in
devcontainer.env.json - Run the configuration script again:
python3 .devcontainer/configure.py - Check if the tool requires additional configuration
After setting up DevOps-OS, consider exploring: