This repo provides the metadata datasource for cloud-init during bootstrap and recovery.
The sister-service, CRAY-BSS, provides this same capability to scale through Kubernetes. Baecamp can be used in Docker or Podman quickly for bootstrapping a kubernetes cluster. The data served by Basecamp is compatible with Cray-BSS, and is handed-off as part of the deployment process.
Basecamp can be ran multiple ways. For the full experience, we suggest using the Docker image. Developers should use whichever environment they like, whether that’s the Docker container or their local Go-lang env.
-
Create configuration directories
mkdir -p configs touch configs/server.yaml # fill this in touch configs/data.json # fill this in
-
Run the container:
image='arti.dev.cray.com/csm-docker-master-local/metal-basecamp' podman create --net host --volume $(pwd)/configs:/app/configs --name basecamp "$image"
-
You should now be able to run queries against the container:
curl http://localhost:8888/meta-data curl http://localhost:8888/user-data
There is a systemd-daemon in this repo for running the Basecamp container in the background. The daemon can be obtained through linux package managers.
The daemon will setup configs/data.json
and configs/server.yaml
if they do not already exist.
systemctl enable basecamp
systemctl start basecamp
Basecamp outputs logs in two places; container logs and daemon logs.
Two steps for usage.
-
Install cloud-init
zypper install cloud-init systemctl enable cloud-configs cloud-init-local cloud-init cloud-final
-
Configure cloud-init
-
Option 1: Add the following to
/etc/cloud/cloud.cfg
datasource: NoCloud: seedfrom: http://{IP OF METADATA SERVER}:{PORT}/
-
Option 2: Boot the server with the
ds
kernel parameter set tonocloud-net
ds=nocloud-net;s=http://{IP OF METADATA SERVER}:{PORT}/
For scripts such as iPXE scripts or GRUB config files, the;
must be escaped with a\
.ds=nocloud-net\;s=http://{IP OF METADATA SERVER}:{PORT}/
-