랭킹으로 돌아가기

ChristianLempa/boilerplates

Pythongetboilerplates.app

Create reusable templates and turn them into configurable workloads for homelabs and self-hosted infrastructure. Free and Open-Source.

ansibledockerdocker-composekubernetespackerterraformbashdocker-swarmpython
스타 성장
스타
7.9k
포크
1.8k
주간 성장
이슈
11
2k4k6k
2021년 6월2023년 2월2024년 11월2026년 7월
아티팩트PyPIpip install boilerplates
README

Welcome

Create reusable templates and turn them into configurable workloads for homelabs and self-hosted infrastructure. Free and Open-Source.

How it works

Create reusable templates for infrastructure expertise like Docker, Kubernetes, Terraform, Ansible, static files, Python, and more. Use the built-in Jinja2-like templating syntax with << >> variables, <% %> blocks, and <# #> comments to keep configuration modular and conditional. Sync with Git in both directions or manage everything locally. Render templates, configure variables through a guided wizard, and wire up secrets. Copy them to remote servers and environments or any local directory.

✨ Explore 100+ template presets for homelabs and self-hosted infrastructure: https://github.com/ChristianLempa/boilerplates-library

Boilerplates CLI

The Boilerplates CLI is the main interface for working with template libraries locally. It lets you discover available templates, inspect their metadata and variables, validate them, and generate ready-to-use files.

It combines template-defined variables and defaults, guided interactive prompts, CLI variable overrides, and git-backed template libraries into one workflow. In practice, that means you can keep reusable boilerplates in a repository and turn them into concrete, environment-specific configurations with a single command.

⚠️ Boilerplates 0.2.0 introduced the new template format. Legacy template.yaml / template.yml manifests and .j2 template files are no longer supported.

ℹ️ New templates must use template.json, keep renderable content under files/, and use the custom Jinja2-like delimiters << >>, <% %>, and <# #> instead of default Jinja2 syntax.

Template kinds

Use a dedicated kind when the template's primary output matches that technology. Use python for Python-oriented project scaffolds, automation helpers, packages, and service/tooling skeletons. Use bash for Bash-oriented scripts, bootstrap flows, maintenance tasks, and automation snippets. Keep Python or Bash files inside another kind, such as compose or terraform, when they are only supporting files for that primary infrastructure template.

Initial python and bash validation is intentionally minimal: the CLI validates template syntax, declared variables, rendering, and generic semantic checks where applicable. Language-specific validation such as Python compilation, shell syntax checks, formatting, or test execution can be added as follow-up work once template conventions are established.

Installation

Automated installer script

Install the Boilerplates CLI using the automated installer:

# Install latest version
curl -fsSL https://raw.githubusercontent.com/christianlempa/boilerplates/main/scripts/install.sh | bash

# Install specific version
curl -fsSL https://raw.githubusercontent.com/christianlempa/boilerplates/main/scripts/install.sh | bash -s -- --version v1.2.3

The installer uses pipx to create an isolated environment for the CLI tool. Once installed, the boilerplates command will be available in your terminal.

Nixos

If you are using nix flakes

# Run without installing
nix run github:christianlempa/boilerplates -- --help

# Install to your profile
nix profile install github:christianlempa/boilerplates

# Or directly in your flake
{
  inputs.boilerplates.url = "github:christianlempa/boilerplates";

  outputs = { self, nixpkgs, boilerplates }: {
    # Use boilerplates.packages.${system}.default
  };
}

# Use in a temporary shell
nix shell github:christianlempa/boilerplates

Quick Start

# Explore
boilerplates --help

# Update Repository Library
boilerplates repo update

# List all available templates for a Docker Compose stack
boilerplates compose list

# List technology-agnostic static file templates
boilerplates static list

# Show details about a specific template
boilerplates compose show nginx

# Generate a template (interactive mode)
boilerplates compose generate authentik

# Generate with custom output directory
boilerplates compose generate nginx --output my-nginx-server

# Non-interactive mode with variable overrides
boilerplates compose generate traefik --output my-proxy \
  --var service_name=traefik \
  --var traefik_enabled=true \
  --var traefik_host=proxy.example.com \
  --no-interactive

Managing Defaults

Save time by setting default values for variables you use frequently:

# Set a default value
boilerplates compose defaults set container_timezone="America/New_York"
boilerplates compose defaults set restart_policy="unless-stopped"

Template Libraries

Boilerplates uses git-based libraries to manage templates. You can add custom repositories:

# List configured libraries
boilerplates repo list

# Update all libraries
boilerplates repo update

# Add a custom library
boilerplates repo add my-templates https://github.com/user/templates \
  --directory library \
  --branch main

# Remove a library
boilerplates repo remove my-templates

Contribution

Contributions are welcome. Feel free to open an issue or submit a pull request!

License

This repository is licensed under the MIT License.

관련 저장소
bregman-arie/devops-exercises

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

PythonPyPIOtherdevopsaws
83.3k19.8k
ansible/ansible

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.

PythonPyPIGNU General Public License v3.0pythonansible
ansible.com
69.7k24.2k
trailofbits/algo

Set up a personal VPN in the cloud

PythonPyPIGNU Affero General Public License v3.0vpn-serverstrongswan
blog.trailofbits.com/2016/12/12/meet-algo-the-vpn-that-works/
30.3k2.4k
MichaelCade/90DaysOfDevOps

This repository started out as a learning in public project for myself and has now become a structured learning map for many in the community. We have 3 years under our belt covering all things DevOps, including Principles, Processes, Tooling and Use Cases surrounding this vast topic.

ShellOtherdevopskubernetes
90daysofdevops.com
29.6k6.8k
StreisandEffect/streisand

Streisand sets up a new server running your choice of WireGuard, OpenConnect, OpenSSH, OpenVPN, Shadowsocks, sslh, Stunnel, or a Tor bridge. It also generates custom instructions for all of these services. At the end of the run you are given an HTML file with instructions that can be shared with friends, family members, and fellow activists.

ShellOthervpnansible
twitter.com/streisandvpn
23.5k2k
kubernetes-sigs/kubespray

Deploy a Production Ready Kubernetes Cluster

JinjaApache License 2.0kubernetes-clusteransible
18.6k6.9k
ansible/awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.

PythonPyPIOtherpythonansible
15.5k3.7k
semaphoreui/semaphore

Modern UI and powerful API for Ansible, Terraform/OpenTofu/Terragrunt, PowerShell and other DevOps tools.

GoGo ModulesMIT Licenseansibledevops
semaphoreui.com
13.9k1.3k
netbootxyz/netboot.xyz

Your favorite operating systems in one place. A network-based bootable operating system installer based on iPXE.

JinjaApache License 2.0ipxenetboot
netboot.xyz
12k832
easzlab/kubeasz

使用Ansible脚本安装K8S集群,介绍组件交互原理,方便直接,不受国内网络环境影响

Jinjakubernetesansible
github.com/easzlab/kubeasz
11.4k3.7k
geerlingguy/ansible-for-devops

Ansible for DevOps examples.

PythonPyPIMIT Licenseansibledevops
ansiblefordevops.com
9.8k3.8k
khuedoan/homelab

Fully automated homelab from empty disk to running services with a single command.

PythonPyPIGNU General Public License v3.0kubernetespxe
homelab.khuedoan.com
9.5k881