26.11. drp-community-content

The following documentation is for drp-community-content content package at version v1.13.1-tip-42-5e060684d6a9a1201a792c7567e894ad45f56554.

26.11.1. workflows

The content package provides the following workflows.

26.11.1.1. discover-base

This workflow is the most basic provisioning process for DRP.

It starts the discover Stage which sets up the sledgehammer BootEnv. After Sledgehammer starts, it leaves the DRP runner in a waiting state so that DRP will automatically detect and start a new workflow if the Machine.Workflow is updated.

NOTE: To enable, upload Sledgehammer as per the sledgehammer BootEnv

26.11.2. bootenvs

The content package provides the following bootenvs.

26.11.2.1. debian-9-install

This BootEnv installs Debian 9 via the “mini” ISO file.

26.11.2.2. ubuntu-18.04-install

Installs Ubuntu Bionic Beaver (18.04) LTS version. This BootEnv will install the General Available (GA) kernel. If you wish to install the HWE (Hardware Enablement) version, please use the Stage “ubuntu-18.04-hwe-install”.

Both amd64 and arm64 architectures are supported.

NOTE - Default Ubuntu ISOs will attempt to check internet repositories, this can cause problems during provisioning if your environment does not have outbound access. Workaround this by defining Options 3 (Gateway) and 6 (DNS) for your Subnet settings.

26.11.2.3. ubuntu-18.04-arm64-hwe-install

Installs Ubuntu Bionic Beaver (18.04) HWE version for ARM64 architecture.

NOTE - Default Ubuntu ISOs will attempt to check internet repositories, this can cause problems during provisioning if your environment does not have outbound access. Workaround this by defining Options 3 (Gateway) and 6 (DNS) for your Subnet settings.

26.11.2.4. centos-7-install

This BootEnv installs the CentOS 7 Minimal operating system. Both x86_64 and aarch64 architectures are supported.

26.11.2.5. centos-7.6.1810-install

This BootEnv installs the CentOS 7 Minimal operating system. Both x86_64 and aarch64 architectures are supported.

26.11.2.6. custom-ipxe

This bootenv allows you to specify a custom iPXE config file to boot the system via. You’re PXE kernel file should be named “ipxe.pxe”.

26.11.2.7. debian-8-install

This BootEnv installs Debian 8 via the “mini” ISO file.

26.11.2.8. discovery

Normal option of this bootenv is to provision physical services using sledgehammer.

To join EXISTING machines or CLOUD machines into DRP, you can use run join-up.sh. Add the following line to the machines initialization script:

#!/bin/bash
curl -fsSL [internal ip]:8091/machines/join-up.sh | sudo bash --

26.11.2.9. sledgehammer

The Sledgehammer BootEnv is used in conjunction with Discovery to boot a machine in to an in-memory (RAM only) operating system. The Machine will be enrolled in the DRP Endpoint via Sledgehammer.

Many maintenance and hardware related workflows require to be run from the Sledgehammer BootEnv.

26.11.2.10. ubuntu-16.04-install

NOTE: Default Ubuntu ISOs will attempt to check internet repositories, this can cause problems during provisioning if your environment does not have outbound access. Workaround this by defining Options 3 (Gateway) and 6 (DNS) for your machines defined Subnet.

26.11.3. params

The content package provides the following params.

26.11.3.1. operating-system-disk

Defines the disk the installer should use for OS installation. The usage of this parameter inside a template should add a /dev/ if required. The value should just be the disk simple name.

e.g. sda

26.11.3.2. package-repositories

This provides a list of repositories to install packages from. It includes dedicated OS installation repositories and more general ones.

An example:
  • tag: “centos-7-install” # Every repository needs a unique tag. # A repository can be used by multiple operating systems. # The usual example of this is the EPEL repository, which # can be used by all of the RHEL variants of a given generation. os:

    • “centos-7”

    # We also need to know what system architecture this repo is for. # If this repo is valid for all arches (like a Debian or Ubuntu # mirror), this can be set to “any”, although it cannot be # an installSource if that is the case arch: x86_64 # If installSource is true, then the URL points directly # to the location we should use for all OS install purposes # save for fetching kernel/initrd pairs from (for now, we will # still assume that they will live on the DRP server). # When installSounrce is true, the os field must contain a single # entry that is an exact match for the bootenv’s OS.Name field. installSource: true # For redhat-ish distros when installSource is true, # this URL must contain distro, component, and arch components, # and as such they do not need to be further specified. url: “http://mirrors.kernel.org/centos/7/os/x86_64

  • tag: “centos-7-everything” # Since installSource is not true here, # we can define several package sources at once by # providing a distribution and a components section, # and having the URL point at the top-level directory # where everything is housed. # DRP knows how to expand repo definitions for CentOS and # ScientificLinux provided that they follow the standard # mirror directory layout for each distro. os:

    • centos-7

    arch: x86_64 url: “http://mirrors.kernel.org/centos” distribution: “7” components:

    • atomic
    • centosplus
    • cloud
    • configmanagement
    • cr
    • dotnet
    • extras
    • fasttrack
    • opstools
    • os
    • paas
    • rt
    • sclo
    • storage
    • updates
  • tag: “debian-9-install” os:

    • “debian-9”

    arch: amd64 installSource: true # Debian URLs always follow the same rules, no matter # whether the OS install flag is set. As such, # you must always also specify the distribution and # at least the main component, although you can also # specify other components. url: “http://mirrors.kernel.org/debian” distribution: stretch components:

    • main
    • contrib
    • non-free
  • tag: “debian-9-backports” os:

    • “debian-9”

    arch: any url: “http://mirrors.kernel.org/debian” distribution: stretch-updates components:

    • main
    • contrib
    • non-free
  • tag: “debian-9-security” os:

    • “debian-9”

    arch: any url: “http://security.debian.org/debian-security/” securitySource: true distribution: stretch/updates components:

    • contrib
    • main
    • non-free

26.11.3.3. part-scheme

This string contains the name of a template that holds the Debian installer partitioning commands for use during installation.

The string will be expanded into this template name:

part-seed-<string>.tmpl

e.g. softraid

26.11.3.4. access-ssh-root-mode

This string defines the login policy for the root user.

Possible values are:
without-password - default yes no forced-commands-only

26.11.3.5. catalog_url

The URL that the UX should use to get the catalog data.

This can only be set on the global profile.

This defaults to https://d1i21q4vxgce8j.cloudfront.net/rackn-catalog.json.

Another option is https://s3-us-west-2.amazonaws.com/rebar-catalog/rackn-catalog.json.

26.11.3.6. cloud/placement/availability-zone

The location of resource assigned by the cloud provider

26.11.3.7. kernel-options

This string defines any extra options that the operator may need to pass to the Kernel during the PXE boot process.

e.g. “acpi=off”

These options will be passed before the argument processing is disabled (eg prior to “–”).

The “kernel-console” option can be used to specify the Console to log to (for example serial port), which is placed after the argument processing (eg after the “–”).

26.11.3.8. local-repo

DEPRECATED: Do not use.

Boolean value that tells the install steps to only use the local exploded iso on the DRP server as the only installation repo.

26.11.3.9. provisioner-default-user

Used in the Debian/Ubuntu installers to specify the username of the default user.

26.11.3.10. proxy-servers

This is an array of URLs where each string is an HTTP proxy server to references.

The URLs can be names or IPs with ports and schemas.

26.11.3.11. rs-debug-enable

Boolean value that enables Bash Script debugging - essentially by turning on ‘set -x’ globally. Scripts can (and probably do) enable/disable this flags in various sections. In those cases we are not overriding those values.

Additionally, the shell variable ‘RS_DEBUG_ENABLE’ is set to 1 (on) for Script authors to use. This allows a construct like

(( $RS_DEBUG_ENABLE )) && run_debug_function

26.11.3.12. cloud/public-hostname

Hostname assigned by the Cloud Provider

26.11.3.13. machine-plugin

The plugin that should manage this machine.

26.11.3.14. sledgehammer/enforce

Boolean parameter indicating if the enforce-sledgehammer task should ensure that the system is running in sledgehammer.

26.11.3.15. provisioner-default-uid

Used in the Debian/Ubuntu installers to specify the uid of the default user.

The value is a string for of the integer value.

26.11.3.16. access-keys

This map is used to put ssh public keys in place for the root user.

The key of the map is a arbritary name and the value is the ssh public key for that name.

26.11.3.17. cloud/instance-type

The type of resource assigned by the cloud provider

26.11.3.18. erase-hard-disk-set

This string defines the set of disks to erase. Space separated dev names.

e.g. “/dev/sda /dev/sdb”

26.11.3.19. extra-packages

This is an array of strings where each string is an additional package to install during the initial OS install.

26.11.3.20. cloud/instance-id

The ID reference from cloud provider

26.11.3.21. ntp-servers

This is an array of strings where each string an IP address or Name of an NTP server.

26.11.3.22. provisioner-default-fullname

Used in the Debian/Ubuntu installers to specify the full name of the default user.

26.11.3.23. provisioner-default-password-hash

This specifies the password hash to use for the install process. This is the root password on CentOS-based installs and the default user on the Debian-based installs.

To generate a hash, use the following command:

echo ‘import crypt,getpass; print crypt.crypt(getpass.getpass(), “$6$16_CHARACTER_SALT_HERE”)’ | python -

Set your 16 character salt in the correct place. This generate sha512 hash which should work on both operating system types.

26.11.3.24. sledgehammer/reboot-if-not-in-sledgehammer

Boolean parameter indicating if the enforce-sledgehammer task should reboot the system if not in sledgehammer.

26.11.3.25. custom-ipxe

You can use this whenever you need a custom iPXE boot action, such as booting from a remote URL, booting to an iPXE prompt for troubleshooting, or simply playing around with different ipxe tools. This param defaults to launching an iPXE shell.

26.11.3.26. select-kickseed

The name of a custom kickstart or preseed template to use. If not defined, the default for each platform will be used, as follows

‘net-seed.tmpl’ for Debian/Ubuntu platforms ‘centos-7.ks.tmpl’ for CentOS 7 platforms

26.11.3.27. start-over

Allows the operator to control if booting into sledgehammer should reset the task list on boot up. This allows things like bios update scripts to set the start-over flag to false and issue a reboot command and start over either at the current task or the next one.

26.11.3.28. ubuntu-hwe-kernel

Enables the HWE (Hardware Enablement) kernel for an Ubuntu system. The default kernel is the LTS GA (General Availability) kernel.

WARNING - The “net-seed.tmpl” uses the BootEnv “.Env.OS.Version” value in the preseed configuration, like

d-i base-installer/kernel/altmeta string hwe-18.04

You must verify that your Ubuntu version supports this syntax. For example, if you are booting “18.10”, insure that the following is valid (see the ISO “preseeds” directory for valid examples)

d-i base-installer/kernel/altmeta string hwe-18.10

26.11.3.29. cloud/provider

The cloud provider detected by join-up script in discovery

Known types: aws

26.11.3.30. gohai-inventory

Gohai is the DRPCLI embedded JSON machine inventory format. This param storage the result of that command when during discovery. It is used by a number of downstream stages and workflows.

This provides an untyped dictionary of values from Gohai.

NOTE: This is raw data. Other parameters are distilled from this.

26.11.3.31. gohai/skip

Allows machines to stop using the discover-nogohai stage. When true, the gohai part of the discovery stage will be skipped

26.11.3.32. hostname

Allow setting a hostname. In some use cases, the DHCP provided provisioning name (the templatized .Machine.Name) may not be correct for final production personality of the Machine.

This value could be set as a Param/Profile on the machine either by a human operator, or subsequent integration with IPAM, SoR, or other services.

This is used in the VMware ESXi provisioning kickstarts.

26.11.3.33. kexec-ok

Allows the machine agent to call kexec to switch boot environments as long as the machine is currently running Linux, and the new environment has a template named ‘kexec’ that contains the kernel, initrds, and command line to use.

26.11.3.34. zero-hard-disks-for-os-install

By default, the erase disks for os install task tries to only erase any metadata on the disks that may confuse a next OS install, along with (optionally) attempting to discard all sectors on devices that support discard. If this is set to true, the task will also zero all sectors on any non-SSD drives.

26.11.3.35. cloud/public-ipv4

Address assigned by the Cloud Provider

26.11.3.36. dns-domain

This is used currently in the Ubuntu/Debian preseed file to specify the DNS Domain Name of the host.

This may be in flux.

26.11.3.37. dns-search-domains

This is an array of strings where each string a domain to apply to the DNS search order list.

26.11.3.38. dns-servers

This is an array of strings where each string an IP address of a DNS server.

26.11.3.39. last-boot-macaddr

Keeps track of the MAC address (in PXELINUX format) that the system most recently PXE booted from.

26.11.3.40. kernel-console

This string defines the console tty string for the kernel boot string.

e.g. console=ttyS1,115200

26.11.3.41. local-security-repo

The string value is either a URL for Ubuntu systems or a host/path string for Debian systems. This will override the default security repos if specified.

26.11.3.42. ux-air-gap

Boolean value that tells the UX to not contact the SaaS because it is not reachable. This should only be set in the global profile.

This defaults to false.

26.11.4. stages

The content package provides the following stages.

26.11.4.1. ubuntu-18.04-install

Installs the GA (General Availability) kernel by default. To install the HWE kernel, please set the “ubuntu-hwe-kernel” Param on your machine and set it to “true” (use Param, Profile, or “global” Profile).

Note for HWE kernel, the BootEnv “.Env.OS.Version” value is used to set the HWE preseed option correctly. Please verify that the preseed syntax is valid for your version of Ubuntu (this was tested working with 18.04).

26.11.4.2. finish-install

Originally, this stage was used with the STOP runner action in the change-stage/map.

Going forward, the STOP action is not required. The changing of bootenv from something-install to local will cause the runner to exit. This stage will cause an install bootenv to reboot because the bootenv is changed to local.

26.11.4.3. discover-no-gohai

DEPRECATED! Use the discover Stage with gohai/skip Param instead.

Pre gohai/skip Parameter, used to run discovery without gohai action.

26.11.4.4. complete-nowait

This is deprectated and leaves the runner running, but will exit install bootenvs correctly. The use of this was to exit install workflows. This will continue to work for that, but should be replaced by finish-install.

26.11.4.5. gce-discover

Collect information about Google cloud

26.11.4.6. aws-discover

Collect information about AWS cloud

26.11.5. tasks

The content package provides the following tasks.

26.11.5.1. gce-discover

Collect information about Google cloud

26.11.5.2. always-pxe-in-uefi-first

Certian Linux distributions reorder the UEFI boot options to always locally boot from their install first, which is not generally what dr-provision wants, as it makes regaining control of the machine by PXE booting it to Sledgehammer harder. This task rewrites the UEFI boot order to have whatever device we booted from be the first.

26.11.5.3. gohai

Sets Param: gohai-inventory

Collect inventory from machines using drpcli gohai command and store the result in the gohai-inventory Param on the machine.

If you want to disable this behavior, set the gohai/skip Param to true.

Hint: this can be A LOT of data added to the machine param! You may want to use ?slim in the API to skip returning it on list requests.

26.11.5.4. aws-discover

Collect information about AWS cloud

26.11.5.5. enforce-sledgehammer

Sets Param: gohai-inventory

Collect inventory from machines using drpcli gohai command and store the result in the gohai-inventory Param on the machine.

If you want to disable this behavior, set the gohai/skip Param to true.

Hint: this can be A LOT of data added to the machine param! You may want to use ?slim in the API to skip returning it on list requests.

26.11.5.6. lock-machine

Sets Field: Lock

Lock the machine so users can not alter the machine. Current tasks and machine actions will continue to run.