Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flanksource/konfigadm
konfigadm is a declarative configuration management tool and image builder focused on bootstrapping nodes for container-based environments.
https://github.com/flanksource/konfigadm
cloud-init containerd containers docker kubeadm kubernetes
Last synced: 7 days ago
JSON representation
konfigadm is a declarative configuration management tool and image builder focused on bootstrapping nodes for container-based environments.
- Host: GitHub
- URL: https://github.com/flanksource/konfigadm
- Owner: flanksource
- License: apache-2.0
- Archived: true
- Created: 2019-04-22T09:32:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-14T06:53:58.000Z (over 1 year ago)
- Last Synced: 2024-09-23T12:32:54.449Z (10 days ago)
- Topics: cloud-init, containerd, containers, docker, kubeadm, kubernetes
- Language: Go
- Homepage: https://konfigadm.docs.flanksource.com
- Size: 2.16 MB
- Stars: 24
- Watchers: 8
- Forks: 14
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Installation •
Kubernetes •
Key Features •
Compatibility •
Design •
Prebuilt Images •
Full Documentation`konfigadm` is a declarative configuration management tool and image builder focused on bootstrapping nodes for container based environments.
## Usage
```
Usage:
konfigadm [command]Available Commands:
apply Apply the configuration to the local machine
build-image Build a new image using the specified image and konfig
cloud-init Exports the configuration in cloud-init format
help Help about any command
minify Resolve all lookups and dependencies and export a single config file
verify Verify that the configuration has been applied and is in a healthy state
version Print the version of konfigadmFlags:
-c, --config strings Config files in YAML or JSON format
-d, --detect Detect tags to use
-h, --help help for konfigadm
-v, --loglevel count Increase logging level
-t, --tag strings Runtime tags to use, valid tags: debian,ubuntu,redhat,rhel,fedora,redhat-like,debian-like,centos,aws,vmware
-e, --var strings Extra Variables to in key=value format
```## Installation
### Binary
```bash
wget -O /usr/bin/konfigadm https://github.com/flanksource/konfigadm/releases/latest/download/konfigadm && chmod +x /usr/bin/konfigadm
```## Getting Started
### Installing Kubernetes on the local machine
```bash
sudo konfigadm apply -c - <<-EOF
kubernetes:
version: 1.21.2
container_runtime:
type: docker
commands:
- kubeadm init
EOF
```[![asciicast](https://asciinema.org/a/250079.png)](https://asciinema.org/a/250079)
### Building a kubernetes image
```bash
sudo konfigadm images build --image ubuntu1804 -c - <<-EOF
kubernetes:
version: 1.21.2
container_runtime:
type: docker
cleanup: true
EOF
```Cloud Images are downloaded and then configured with `--build-driver` 2 drivers are supported:
1. `qemu` (default) - Launches the image with KVM and attaches a cloud-init ISO to configure on boot
2. `libguestfs` - Uses virt-customize to launch an appliance and chroot into the disk, does not require cloud-init in the image, but also cannot test/verify systemd based services due to the chroot.[![asciicast](https://asciinema.org/a/252399.svg)](https://asciinema.org/a/252399)
## Features
* **Dependency Free** and easily embeddable into an image builder.
* **Declarative**, The order of operations cannot be changed, there are no implicit or explicit dependencies between items, no conditionals (besides for os/cloud tags) or control flows
* **Typed**, can validate the configuration (e.g. docker image name is valid, systemd.unit file only includes valid keys, and the values are typed correctly)
* Has built-in higher-order abstractions for kubernetes, containers, cri, cni, etc.
* Supports multiple operating systems and package managers
* Abstractions and many of the built-in elements are easily unit-testable due to the use of virtual filesystem and command execution list.
* Automatic testing / verification based on intent, not just command success code
* Generate cloud-init or shell scripts to be used by other systems## Compatibility
Compatibility is tested via the docker systemd images created by [jrei](https://github.com/j8r/dockerfiles/tree/master/systemd), All example fixtures are first verified as false, applied, and then verified as true.
To run integration tests:
```bash
make ubuntu
```## TODO
* Incremental mode
* Merge duplicate command dependencies (e.g. installing curl)
* Support templating everywhere (currently only supported in files)
* Packer/QEMU/VirtualBox/Fusion drivers for building images
* AMI/OVA Image upload
* Multi-OS cleanup scripts for building images