help-test-drpisolated

Based on drp-quickstart to set up drp in the drpisolated sub-directory for testing.

  1. Preparation
    1. Verify only ONE DHCP Server on a local subnet
    2. Set DRP endpoint via –static-ip=<yourIP> option in drp-cli
    3. Prepare test machines to PXE boot on the above network
    4. Load jq tool “brew install jq” “pip install jq”
  2. Preparation - My Experience:

    catmini:drpisolated msops$ brew install libarchive --force
    catmini:drpisolated msops$ brew link libarchive --force
    catmini:drpisolated msops$ brew install p7zip
    
  3. Install

    Note

    curl -fsSL get.rebar.digital/tip | bash -s – –isolated –drp-version=tip install

  4. Install - My Experience:

    catmini:drpisolated msops$ curl -fsSL get.rebar.digital/tip | bash -s -- --isolated --drp-version=tip install
    Overriding DRP_VERSION with tip
    'dr-provision' service is not running, beginning install process ...
    Ensuring required tools are installed
    Installing Version tip of Digital Rebar Provision
    dr-provision.zip: OK
    ./bin/linux/amd64/drpcli: OK
    ./bin/linux/amd64/dr-provision: OK
    ./bin/linux/amd64/incrementer: OK
    ./bin/linux/arm64/drpcli: OK
    ./bin/linux/arm64/dr-provision: OK
    ./bin/linux/arm64/incrementer: OK
    ./bin/linux/arm_v7/drpcli: OK
    ./bin/linux/arm_v7/dr-provision: OK
    ./bin/linux/arm_v7/incrementer: OK
    ./bin/darwin/amd64/drpcli: OK
    ./bin/darwin/amd64/dr-provision: OK
    ./bin/darwin/amd64/incrementer: OK
    ./bin/windows/amd64/drpcli: OK
    ./bin/windows/amd64/dr-provision: OK
    ./bin/windows/amd64/incrementer: OK
    ./assets/startup/dr-provision.service: OK
    ./assets/startup/dr-provision.sysv: OK
    ./assets/startup/dr-provision.unit: OK
    ./tools/install.sh: OK
    Installing Version tip of Digital Rebar Provision Community Content
    drp-community-content.yaml: OK
    # Run the following commands to start up dr-provision in a local isolated way.
    # The server will store information and serve files from the drp-data directory.
    
    # No broadcast route set - this is required for Darwin < 10.9.
    sudo route add 255.255.255.255 192.168.1.200
    # No broadcast route set - this is required for Darwin > 10.9.
    sudo route -n add -net 255.255.255.255 192.168.1.200
    sudo ./dr-provision --static-ip=192.168.1.200 --base-root=/Users/msops/Code/drpfeature/drpisolated/drp-data --local-content="" --default-content="" &
    
    # Once dr-provision is started, these commands will install the isos for the community defaults
    ./drpcli bootenvs uploadiso ubuntu-16.04-install
    ./drpcli bootenvs uploadiso centos-7-install
    ./drpcli bootenvs uploadiso sledgehammer
    
  5. Start dr-provision

    Note

    sudo ./dr-provision –static-ip=<IP_of_provisioning_interface> –base-root=`pwd`/drp-data –local-content=”” –default-content=”” > drp.log 2>&1 &

  6. Start dr-provision - My Experience (suggest to do without & and keep it in forground):

    catmini:drpisolated msops$ sudo route -n add -net 255.255.255.255 192.168.1.200
    Password:
    add net 255.255.255.255: gateway 192.168.1.200
    catmini:drpisolated msops$ sudo ./dr-provision --static-ip=192.168.1.200 --base-root=/Users/msops/Code/drpfeature/drpisolated/drp-data --local-content="" --default-content=""
    [1] 18675
    catmini:drpisolated msops$ dr-provision2018/01/10 19:54:22.741401 Version: v3.5.0-tip-49-6aea7e647d6cb992e22a141ce1411a3b3af73095
    dr-provision2018/01/10 19:54:22.742107 Extracting Default Assets
    dr-provision2018/01/10 19:54:23.497339 Starting TFTP server
    dr-provision2018/01/10 19:54:23.497646 Starting static file server
    dr-provision2018/01/10 19:54:23.497766 Starting DHCP server
    dr-provision2018/01/10 19:54:23.499030 Starting PXE/BINL server
    dr-provision2018/01/10 19:54:23.499175 Starting API server
    
  7. Browse to API at https://192.168.1.200:8092 which redirects through https://rackn.github.io/provision-ux/#/e/192.168.1.200:8092

  8. Browse to https://rackn.github.io/provision-ux/#/e/192.168.1.200:8092/isos you should see NO iso Images

  9. Load iso images via command line:

    ./drpcli bootenvs uploadiso ubuntu-16.04-install
    ./drpcli bootenvs uploadiso centos-7-install
    ./drpcli bootenvs uploadiso sledgehammer
    
    #. The images will download and show up in the UI at https://rackn.github.io/provision-ux/#/e/192.168.1.200:8092/isos
    #. The images are downloaded to <projecthome>/drpisolated/drp-data/tftpboot/isos
    
  10. Create subnet json - My Experience
    1. Created a local file in drpisolated directory drpisolated/local_subnet.json as follows:

      {
      "Name": "local_subnet",
      "Subnet": "192.168.1.1/24",
      "ActiveStart": "192.168.1.26",
      "ActiveEnd": "192.168.1.32",
      "NextServer": "192.168.1.1",
      "ActiveLeaseTime": 60,
      "Available": true,
      "Enabled": true,
      "Proxy": false,
      "ReadOnly": false,
      "ReservedLeaseTime": 7200,
      "Strategy": "MAC",
      "Validated": true,
      "OnlyReservations": false,
      "Pickers": [ "hint", "nextFree", "mostExpired" ],
      "Options": [
          { "Code": 1, "Value": "255.255.255.0", "Description": "Netmask" },
          { "Code": 3, "Value": "192.168.1.1", "Description": "Default Gateway" },
          { "Code": 6, "Value": "8.8.8.8", "Description": "DNS Servers" },
          { "Code": 15, "Value": "cf.cat9.com", "Description": "Domain Name" },
          { "Code": 28, "Value": "192.168.1.255", "Description": "Broadcast Address" },
          { "Code": 67, "Value": "lpxelinux.0", "Description": "Boot file name" }
      ]
      }
      
    2. Create subnet via drpcli via the following:

      catmini:drpisolated msops$ ./drpcli subnets create - < local_subnet.json
      
    3. Browse drp-ux to confirm https://rackn.github.io/provision-ux/#/e/192.168.1.200:8092/subnets

    4. Confirm via the commandline http://provision.readthedocs.io/en/tip/doc/cli/drpcli_subnets_list.html

      catmini:drpisolated msops$ ./drpcli subnets list
      [
      {
          "ActiveEnd": "192.168.1.32",
          "ActiveLeaseTime": 60,
          "ActiveStart": "192.168.1.26",
          "Available": true,
          "Enabled": true,
          "Errors": [],
          "Meta": {},
          "Name": "local_subnet",
          "NextServer": "192.168.1.1",
          "OnlyReservations": false,
          "Options": [
          {
              "Code": 1,
              "Value": "255.255.255.0"
          },
          {
              "Code": 3,
              "Value": "192.168.1.1"
          },
          {
              "Code": 6,
              "Value": "8.8.8.8"
          },
          {
              "Code": 15,
              "Value": "cf.cat9.com"
          },
          {
              "Code": 28,
              "Value": "192.168.1.255"
          },
          {
              "Code": 67,
              "Value": "lpxelinux.0"
          }
          ],
          "Pickers": [
          "hint",
          "nextFree",
          "mostExpired"
          ],
          "Proxy": false,
          "ReadOnly": false,
          "ReservedLeaseTime": 7200,
          "Strategy": "MAC",
          "Subnet": "192.168.1.1/24",
          "Validated": true
      }
      ]
      catmini:drpisolated msops$
      
  11. Install a machine
    1. Set bootenvs
    2. PXE Boot a machine
    3. Set your bootenvs to install an opperating system
    4. Reboot the machine