cloud-init Basecamp Configuration

Metal Basecamp is a cloud-init DataSource available on the LiveCD. Basecamp’s configuration file offers many inputs for various cloud-init scripts baked into the NCN images.

This page details what those settings are.

Generally these settings are determined by the cray-site-init tool. See csi config --help for more information. Manual adjustments typically are for debug and development.

Basecamp

Config Files

  • The cloud-init configuration file is located at /var/www/ephemeral/configs/data.json.
  • The basecamp server configuration file is located at /var/www/ephemeral/configs/server.yaml
  • The static artifact directory served by basecamp can be leveraged at /var/www/ephemeral/static

NOTE The jq tool is provided on the LiveCD to facilitate viewing JSON files like these.

Purging Basecamp

If the desire to reset basecamp to defaults comes up, you can do so by following these commands.

pit# systemctl stop basecamp
pit# podman rm basecamp
pit# podman rmi basecamp
pit# rm -f /var/www/ephemeral/configs/server.yaml
pit# systemctl start basecamp

Basecamp is now entirely fresh.

CAN

Customer Access Network.


Key: can-gw

data:

{
  // ...
  "can-gw": "10.102.9.20",
  // ...
}

Key: can-if

data:

{
  // ...
  "can-if": "vlan007",
  // ...
}

CEPH


Key: num_storage_nodes

data:

{
  // ...
  "num_storage_nodes": "3",
  // ...
}

Certificate Authority


Key: ca-certs

data:

{
  // ...
  "ca-certs": {"remove-defaults":false,"trusted":["-----BEGIN CERTIFICATE-----\nM,"]}
  // ...
}

RADOS Gateway


Key: rgw-virtual-ip

data:

{
  // ...
  "rgw-virtual-ip": "10.252.1.3",
  // ...
}

Wiping


Key: wipe-ceph-osds

data:

{
  // ...
  "wipe-ceph-osds": "yes",
  // ...
}

DNS

cloud-init modifications to DNS.

Resolution Configuration

Paves over bootstrap provisions by adjusting /etc/sysconfig/network/config to match the dns-server value. Updates /etc/resolv.conf by invoking netconfig update -f.

script: /srv/cray/scripts/metal/set-dns-config.sh


Key: dns-server

data:

{
  // ...
  "dns-server": "10.92.100.225 10.252.1.4",
  // ...
}

Key: domain

data:

{
  // ...
  "domain": "nmn hmn",
  // ...
}

Static Fallback

Safety-net script for installing static-fallback resolution when Kubernetes is offline.

script: /srv/cray/scripts/metal/set-host-records.sh

Key: host_records

data:

{
  // ...
  "host_records": [
      {
        "aliases": [
          "ncn-s003.nmn",
          "ncn-s003"
        ],
        "ip": "10.252.1.4"
      },
      {
        "aliases": [
          "ncn-s003.mtl"
        ],
        "ip": "10.1.1.2"
      },
      {
        "aliases": [
          "ncn-s003.hmn",
          // ...
  // ...
}

Kubernetes


Key: k8s_virtual_ip

data:

{
  // ...
  "k8s_virtual_ip": "10.252.1.2",
  // ...
}


Key: first_master_hostname

data:

{
  // ...
  "first_master_hostname": "ncn-m002",
  // ...
}

NTP

cloud-init modifications to NTP.

script: /srv/cray/scripts/metal/set-ntp-config.sh


Key: ntp_peers

data:

{
  // ...
  "ntp_peers": "ncn-m003 ncn-w001 ncn-s001 ncn-s002 ncn-s003 ncn-m002 ncn-w003 ncn-m001 ncn-w002",
  // ...
}

Key: ntp_local_nets

data:

{
  // ...
  "ntp_local_nets": "10.252.0.0/17 10.254.0.0/17",
  // ...
}

Key: upstream_ntp_server

WARNING at this time, multiple upstream-NTP servers cannot be specified.

data:

{
  // ...
  "upstream_ntp_server": "time.nist.gov",
  // ...
}

Node Auditing


Key: ncn-mgmt-node-auditing-enabled

data:

{
  // ...
  "ncn-mgmt-node-auditing-enabled": false,
  // ...
}