Dev Box
This document contains the necessary information to start the development basebox locally with Vagrant. Instructions for building the image for the development basebox can be found here.
Preconditions
Applications
The following applications must be installed:
- kubectl - Command line tool for managing the Kubernetes cluster
- Helm - package manager for Kubernetes
The following applications are recommended for easier handling:
- kubectx + kubens - Easier switching between Kubernetes contexts and namespaces
- k9s - UI (in the terminal) for easier management of the cluster
File system
- If necessary, the folder
~/.kubemust be created - Add the following entry to
/etc/hosts:192.168.56.2 k3ces.local - Set environment variable:
export KUBECONFIG=~/.kube/config:~/.kube/k3ces.local - add the following entry to
/etc/docker/daemon.json:{ "insecure-registries": ["k3ces.local:30099"] }(required to push custom images to the Helm registry during development)
Configuration
The configuration for the dev box is done via a .vagrant.rb file. There is a template file .vagrant.rb.template,
which can serve as a good starting point. The .vagrant.rb file is read in from the Vagrantfile and can
overwrite the configuration values from the Vagrantfile.
To ensure that special characters are treated literally by the Vagrantfile or subsequent shell scripts, please provide
your passwords with base64-encoding. Use the following command: printf '%s' 'password' | base64 -w0
The following configuration values can be specified (among others):
| value | description |
|---|---|
| dogu_registry_url | The URL of the dogu registry |
| dogu_registry_username | The username to login to the dogu registry |
| dogu_registry_password | The password to login to the dogu Registry |
| image_registry_url | The URL of the image registry |
| image_registry_username | The username to login to the image registry |
| image_registry_password | The password to login to the image registry |
| image_registry_email | The e-mail address of the image registry user |
| helm_registry_host | The host of the helm registry |
| helm_registry_schema | The schema of the helm registry |
| helm_registry_plain_http | Is the helm registry accessed via HTTP or HTTPS? |
| helm_registry_username | The username to login to the helm registry |
| helm_registry_password | The password to login to the helm registry |
| vm_memory | The VMs memory |
| vm_cpus | The number of CPUs in the VMs |
| worker_count | The number of worker nodes of the cluster |
| main_k3s_ip_address | The IP address of the main node of the cluster |
| certificate_type | selfsigned or mkcert; see certificates |
| forceUpgradeEcosystem | default: false; if true, the ecosystem-core Helm release and the blueprint are updated with every vagrant up; see Blueprint & Update of the Ecosystem |
Encryption of the configuration
Since the configuration contains sensitive data, it should not be stored in plain text.
Therefore it is possible to encrypt the data with gpg and the Yubi key and store it this way.
If encrypted configuration data is present, it will be decrypted from the vagrantfile with gpg and the Yubi key.
To encrypt the configuration in the .vagrant.rb file, the following command must be executed:
gpg --encrypt --armor --default-recipient-self .vagrant.rb
The encrypted file is named .vagrant.rb.asc.
Then the unencrypted .vagrant.rb file can be deleted.
The following command can be used to decrypt it:
gpg --decrypt .vagrant.rb.asc > .vagrant.rbNote: If changes are made to the
.vagrant.rb, it must be re-encrypted and then deleted!
Certificates
In the DEV box the CES setup creates a self-signed SSL certificate by default to secure the HTTPS connections. This has the disadvantage that browsers do not trust this certificate and exceptions have to be set up in the browser for this. To avoid this, a certificate can be used for development when creating the dev box, which can be created with the tool mkcert. This certificate is trusted locally on the development computer.
After mkcertinstalled is installed, it must be initialized once
with the following command:
mkcert -installThen in the configuration the value for certificate_type can be set to mkcert.
If no certificate exists yet, the vagrantfile then creates a new certificate with mkcert which is used by the CES.
Blueprint & Update of the Ecosystem
When initially starting the DEV-Box with vagrant up, the "ecosystem-core" Helm chart and a blueprint with the following Dogus are installed:
- ldap
- postfix
- cas
- usermgt
The Dogus are entered in the blueprint with their latest versions.
Once the blueprint has been successfully applied (condition Completed: True), it is set to stopped: true.
As a result, the blueprint is no longer applied automatically, allowing additional Dogus to be installed manually without the blueprint-operator deleting or modifying them.
Force update
After the initial start of the DEV-box, subsequent starts with vagrant up check whether the Helm release ecosystem-core is already installed.
If this is the case, no further steps are taken.
This behavior can be disabled via the forceUpgradeEcosystem configuration in the .vagrant.rb file.
Then the Helm release ecosystem-core and the blueprint will be updated with every vagrant up.
Blueprint override
To install additional Dogus or special configurations, a file named .blueprint-override.yaml can be stored in the root directory.
If this file exists, it will be used instead of the generated blueprint.
Procedure:
- Copy the template:
cp .blueprint-override.yaml.template .blueprint-override.yaml - Customize the content (e.g., define additional Dogus or specific versions).
- Run
vagrant up. The file is automatically merged into the blueprint and applied.
Notes:
- The file must be named exactly
.blueprint-override.yamland located in the root directory. - Syntax and structure must correspond to the blueprint schema.
Last updated on 10/2/2025