Create your first CentOS 7 Machine on RackN Portal with Digital Rebar Provision

This is the third blog in a series demonstrating the steps required to complete a series of tasks in the RackN Portal using Digital Rebar Provision.

Prerequisite

You will need an account on the RackN Portal with an active Digital Rebar Provision endpoint running. In this How To, I am using Packet.net for my infrastructure as I have no local hardware available to build a local system.

For information on creating a Digital Rebar Provision endpoint and connecting it to a RackN Portal please see these two prior How To blogs:

Step 1 : Create a new Machine on Packet.net

The RackN Portal needs a physical machine for Digital Rebar Provision (DRP) to discover and track in the Machine section of the UX. I am providing steps to create that machine on my Packet.net account:

  • Login into your Packet.net account

In the image above, I show my DRP endpoint (spectordemo-drp-ewr1-00) and a machine (spectordemo-machines-ewr1-01) I created during the Deploy and Test DRP in less than 10 Minutes How To guide. Note – my machines are Type 0 which is about $0.07 an hour to run and the location is at the EWR1 Packet.net data center.

  • Select +Add New to create a new physical machine on Packet.net

Enter the following information for the entry fields on the “Deploy on Demand” page:

  • Hostname: Enter anything you want with a .com (e.g. spectortest.com)
  • Location: Choose the same location of your endpoint – see screen above (e.g. EWR1)
  • Type: Type 0 (cheapest machine ~ $.07 per hour)
  • OS: Custom iPXE ; a new window will appear below that selection area after choosing Custom iPXE
    • Enter the http address of your Endpoint along with “:default.ipxe” at then end so you get “http://#.#.#.#:8091:default.ipxe” (NOTE – the RackN portal address will have :8092, be sure to switch here to :8091)
  • Select the “User Data” button and a new pop-up screen will appear; select SAVE

Packet will then show the new machine as it is setup with the color going from yellow to green during setup. If you click “View Progress” you can monitor the machine start.

Within a few minutes, the machine will switch from yellow to green at which point you will have created a new physical machine to provision with DRP.

Step 2 : Provision a new CentOS 7 Machine from with the RackN Portal 

  • Prepare the Global Workflow

The default Workflow available needs to be removed if you are working with Packet.net machines. If your screen does not look like the final Workflow image shown below, take the following steps:

  1. Delete the Workflow by clicking “Remove” on each step until it is removed
  2. Click the Workflow Wizard to create the 3 Stages shown below

The final Workflow page should look like the image below with three separate Stages and follow-on steps for processing.

  • Confirm new Machine is Visible to RackN Portal

The newly created machine on Packet.net should now be visible in your Bulk Actions page as shown below. The Stage will be set to “sledgehammer-wait and BootEnv to “sledgehammer.”

If the Stage for the new machine is not correct, reboot the machine using the Plugin Action -> powercycle option. The machine should then set to the proper Stage and BootEnv as shown above.

  • Change the Stage and BootEnv to CentOS 7 Settings

Before this final step, be sure to check the machine in the Packet.net settings that it is set for PXE Boot to YES/ON.

In the Bulk Action page, you can change the Stage and BootEnv settings. Select the newly created machine and set the Stages to “centos-7-install” as shown below and then click the 4-arrow button.

Once complete you will see the following setup on the Bulk Action page.

  • Reboot the new Machine in Packet.net

The final step to provision this new machine from DRP is to change the Plugin Action option to “powercycle” and press the hand with figure down. Of course, make sure your machine is selected as show in the image above.

Step 3 : Monitor the Installation of CentOS 7 on the new Machine

To monitor the activity on your new machine you will need to ssh into that machine from a terminal window. To get the ssh key, I selected the new machine in the RackN Portal and grabbed the content from the >_packet/sos: line below. In this case I used 9a17d7d1-fa74-4757-8683-82b57e8e3ed2@sos.sjc1.packet.net.

In the same directory you ran the “pkt-demo” How To in the first blog, you will see a file like “spectordemo-machines-ssh-key” depending on the names you used in the first blog.  Run this command:

ssh -i spectordemo-machines-ssh-key 9a17d7d1-fa74-4757-8683-82b57e8e3ed2@sos.sjc1.packet.net

This will connect to the new machine so you can see activity. For the machine waiting at sledgehammer-wait you will see the following image:

Once the reboot is executed in STEP 3 / (Reboot the New Machine in Packet.net) you will see the machine shut down and disconnect you. Run the same ssh command and you will see this screen while the machine reboots:

The machine will then move into the CentOS 7 install and you will see a sequence of Linux install information such as the following:

This completes the provisioning of a new machine on Packet.net using the RackN Portal Workflow process.

RackN Portal Management Connection to the 10 Minute Demo

In my previous blog, I provided step by step directions to install Digital Rebar Provision on a new endpoint and create a new node using Packet.net for users without a local hardware setup. (Demo Tool on GitHub) In this blog, I will introduce the RackN Portal and connect it to the active setup running on Packet.net at the end of the demo process.

NOTE – You will need to run the demo process again to have both the DRP installation and endpoint active on Packet.net.

Current Status

There will be two machines running in Packet:

  • Digital Rebar Provision running on an Endpoint
  • A new physical node provided by DRP

In order to have run the process in the previous blog, you will have created a RackN Portal account to get the RackN code to add into the Secrets file.

Steps to Connect RackN Portal

When you first go to the RackN Portal you will see the following screen:

The first step is to enter the Endpoint Address which will come from the Packet.net Endpoint server setup in the previous blog. To get the address go to the “Configure DRP” step and you will see the following which contains the Endpoint http address:

running ACTION:  drp-setup-demo
+ set +x
+ drpcli –endpoint=https://147.##.##.63:8092 bootenvs uploadiso centos-7-install
{
 “Path”: “CentOS-7-x86_64-Minimal-1708.iso”,

“Size”: 830472192
}
+ set +x
{
 “centos-7-install”: “packet-ssh-keys:Success”,

“discover”: “packet-discover:Success”,
“packet-discover”: “centos-7-install:Reboot”,
“packet-ssh-keys”: “complete-nowait:Success”
}

Enter the following https address https://147.##.##.63:8092 into the Endpoint Address and press the blue arrow. You will then be taken to the login screen where you enter the standard login info:

Select “Defaults” to have the system fill in the Login information. If you need more information on this screen, please review the Install Guide.

RackN Portal Tour

After completing the login your RackN Portal screen will look like this:

At this point, we want to see the new node that was created in the final step of our demo process. Select “Machines” on the left-hand navigation below SYSTEM and you will see the new machine that was created. NOTE – The Red X next to Subnets is appropriate for Packet.net infrastructure.

You can confirm this machine name with the name of the machine in the last stage of the process. Both the RackN Portal and the data below indicate that I have created a new node called “spectordemo-machines-ewr1-01“.

Selecting the newly created machine you will see the following information:

In the next blog, we will use the RackN Portal to create a second node and look at the Workflow process to install an operating system on both nodes.

If you have any questions or would like to get started learning more about Digital Rebar Provision and RackN please join the Slack community.

Deploy and Test Digital Rebar Provision in less than 10 Minutes : How To Guide

Part 1 of 3 in Digital Rebar Provision How To Blog Series

For operators looking to better understand Digital Rebar Provision (DRP) RackN has developed an easy to follow process leveraging Packet.net for physical device creation. This process allows new users to create a physical DRP endpoint and then provision a new physical node on Packet. Information and code to run this guide is available at https://github.com/digitalrebar/provision/tree/master/examples/pkt-demo.

In this blog, I will take the reader through the process with images based on running via my Mac.

SETUP

  • You will need an account on Packet at https://www.packet.net/. I created a personal account and entered a credit card to pay for the services used. The cost on Packet to run this is minimal.
    • From your Packet.net account you will need to create a NEW Project and an API Key. The API key will look like 7DE1Be6NLjGP6KUH4mbUAbysjwOx9kHo and the Project will look like b5d29881-8561-4f3b-8efb-2d61003fe2e7. NOTE – The values shown are changed and will not work in Packet.
  • You will need an account on the RackN Portal via https://portal.rackn.io. From this account you will need your Username which looks like t98743fk-3865-4315-8d11-11127p9e41bd. NOTE – The value shown is not a valid Username.
  • Mac Users – I needed to have Homebrew installed on my machine to run this demo script. Run the 2 steps below…

PROCESS

  • Git Clone the guide (DO NOT run w/ “sudo”)
  • Edit the Secrets file with Packet and RackN Portal info from Setup
    • vi private-content/secrets

# specify your API KEY that has access to PROJECT ID below
API=”insert_api_key_here”
# specify the PROJECT ID that API KEY has access to
PROJECT=”insert_project_id_here”
# RackN Username – necessary to download registered (but free) content packs
USERNAME=”insert username here”

  • Run the demo-run.sh Script
    • ./demo-run.sh : this will launch the guide and you will see the Digital Rebar bear along with a request to run the next step

  • <RETURN> “Install Terraform”

  • <RETURN> “Install Secrets”

  • <RETURN> “Generate Public/Private RSA Keys”

  • <RETURN> “Packet SSH Key”

  • <RETURN> “2nd Packet SSH Key”

  • <RETURN> Creating the DRP Endpoint on Packet

  • <RETURN> Create a Terraform Plan

  • <RETURN> Download DRP to Endpoint

  • <RETURN> SSH Keygen

  • <RETURN> SSH Keyscan

  • <RETURN> Install DRP onto Packet Host Endpoint

Additional Installation Content Not Shown

  • <RETURN> Configure DRP

Additional Configuration Content Not Shown

NOTE – Getting a FAILED at this stage is expected and you should continue

  • <RETURN> Setup DRP Endpoint

  • <RETURN> Create new Packet Physical Node form DRP Endpoint

At this point you will have 2 machines running in Packet:

  • Digital Rebar Provision running on an Endpoint
  • A new physical node provisioned by DRP
  • To clean-up this process and shut down the 2 Packet machines run the following command ./bin/control.sh cleanup
    • It will clean up Packet as well as reset all files back to the original state when cloned from github.

In my next blog, I will introduce the process to connect your Packet Endpoint machine to the RackN Portal so you can see the newly created node and begin working with it from the RackN Portal.

If you have any questions, please leverage the RackN Slack #Community channel where Digital Rebar community members and RackN engineers are available to assist.

Migration Best Practices from Cobbler to Digital Rebar Provision

In this video, Rob Hirschfeld and Greg Althaus provide operators real-world examples of how best to migrate your provisioning platform to Digital Rebar Provision. This blog highlights one of these migration ideas.

Scenario

  • 10 Servers running in multiple subnets
  • DHCP Server
  • Cobbler Provisioning Tool

Migration Process

  • Setup Digital Rebar Provision (DRP) in the Network
    • Create a new subnet with DHCP server installed
    • Operate the DHCP in reservation mode
  • Run DRP to discover the entire network across subnets without DHCP access
    • Create a mapping of infrastructure including MAC address to IP address
  • Migrate DRP control server by server
    • Turn off old DHCP server control for a specific MAC address and turn it on for new DHCP server
    • Reboot the specific MAC address node and DRP will manage the provisioning for that specific server
    • Confirm reset server and continue to manage the changeover server by server
  • Other Options
    • Continue to manage Cobbler for existing infrastructure and use DRP for all new nodes
    • Split provisioning services based on application being deployed

Watch the full video below to hear other scenarios presented for migration options.

Video Participants:

Rob Hirschfeld, Co-Founder/ CEO, RackN   Twitter: @zehicle
Greg Althaus, Co-Founder / CTO, RackN      Twitter: @galthaus

Get started with Digital Rebar today: