Skip to content

bootstrap-network-subnets

Cluster UUID that created the alert

This Param can be set to an array of Subnet type objects. If it is added to the bootstrap-network profile, then during the bootstrap Stage, the defined subnets will be added to the system.

The easiest way to generate a valid subnet object is to create the subnet on an existing DRP Endpoint, then show the JSON structure. An example CLI command for the subnet named kvm-test is shown below:

drpcli subnets show kvm-test

Multiple Subnets may be specified (eg drpcli subnets list; to dump all subnets on a given DRP Endpoint). Each Subnet will be added to the system if they do not exist already.

Example structures of two subnets is defined below.

Note

In real world use, more options or values may need to be set to make the subnet operationally correct for a given environment.

YAML:

- Subnet: 10.10.10.1/24
  Name: subnet-10
  ActiveEnd: 10.10.10.254
  ActiveStart: 10.10.10.10
  OnlyReservations: false
  Options:
  - Code: 1
    Description: Netmask
    Value: 255.255.255.0
  - Code: 3
    Description: DefaultGW
    Value: 10.10.10.1
  - Code: 6
    Description: DNS Server
    Value: 1.1.1.1
  - Code: 15
    Description: Domain
    Value: example.com
- Subnet: 10.10.20.1/24
  Name: subnet-20
  ActiveEnd: 10.10.20.254
  ActiveStart: 10.10.20.10
  OnlyReservations: false
  Options:
  - Code: 1
    Description: Netmask
    Value: 255.255.255.0
  - Code: 3
    Description: DefaultGW
    Value: 10.10.20.1
  - Code: 6
    Description: DNS Server
    Value: 1.1.1.1
  - Code: 15
    Description: Domain
    Value: example.com

JSON:

[
  {
    "Subnet": "10.10.10.1/24",
    "Name": "subnet-10",
    "ActiveEnd": "10.10.10.254",
    "ActiveStart": "10.10.10.10",
    "OnlyReservations": false,
    "Options": [
      { "Code": 1, "Value": "255.255.255.0", "Description": "Netmask" },
      { "Code": 3, "Value": "10.10.10.1", "Description": "DefaultGW"  },
      { "Code": 6, "Value": "1.1.1.1", "Description": "DNS Server" },
      { "Code": 15, "Value": "example.com", "Description": "Domain" }
    ]
  },
  {
    "Subnet": "10.10.20.1/24",
    "Name": "subnet-20",
    "ActiveEnd": "10.10.20.254",
    "ActiveStart": "10.10.20.10",
    "OnlyReservations": false,
    "Options": [
      { "Code": 1, "Value": "255.255.255.0", "Description": "Netmask" },
      { "Code": 3, "Value": "10.10.20.1", "Description": "DefaultGW"  },
      { "Code": 6, "Value": "1.1.1.1", "Description": "DNS Server" },
      { "Code": 15, "Value": "example.com", "Description": "Domain" }
    ]
  }
]

Generally speaking this process is used for initial DRP Endpoint installation with the install.sh installation script. Preparing the Subnets and Reservations in either a Content Pack or a Profile that is applied to the system at installation time will enable the creation of the Objects.

Example installation script invocation that would use this bootstrap process, assumes that network.json is provided by the operator with the network Subnet and/or Reservations definitions:

# you must create "network.json" which should be a valid Profile object, containing
# the appropriate Params and object information in each param as outlined in the
# examples in the bootstrap--network-subnets and boostrap-network-reservations
# Params "Documentation" field
curl -fsSL get.rebar.digital/stable | bash -s -- install --universal --initial-profiles="./network.json"