Skip to main content
Skip table of contents

2557 - Replacing offline BloxOne Hosts: Semi-Automated


Scenario

An Infoblox Education BloxOne lab environment has expired, but the Cloud Service Portal (CSP) tenant to which its hosts were joined is still available. To continue learning with a new BloxOne lab, you need to start hosts on a new lab and join them to the CSP tenant to replace the old hosts.

You're tasked with replacing two offline Docker BloxOne hosts from the previous lab. You have remote access to the replacement virtual machines, which are pre-installed with Docker, allowing you to install the BloxOne Host image and connect it to the CSP.

Estimate Completion Time

  • 60 to 70 Minutes

Prerequisites

  • Administrative access to the CSP

  • Prior Completion of Lab 2801

Course References

  • 2161: Managing BloxOne Hosts and Services

Tasks

  1. Create a join token and a user API key.

  2. Deploy Docker Instance on oph1 and oph2.

  3. Validate the new BloxOne Hosts are connected to the CSP.

  4. Replace Offline BloxOne instances with the newly joined Hosts on CSP.


Task 1: Create a new join token and user API key

  • Generate a join token and a user API key from the CSP, then save each as separate text files for future use using the text editor Geany.

Task 2: Deploy Docker Instance on oph1 and oph2

  • On the Jump-Desktop, open the terminal application on your application taskbar.

    • Deploy the hosts using the command /mnt/shared/deploy-oph1-2.py and provide the join token when prompted.

Task 3: Validate the new BloxOne Instances are connected to the CSP

  • Verify both new Instances are visible on CSP, and wait for them to be online in the UI.

It may take up to 30 mins for the two instances to be online.

Task 4: Swap offline BloxOne instances with new hosts on CSP

  • On the Jump-Desktop, open the terminal application on your application taskbar.

    • Swap the offline hosts using the command /mnt/shared/replace-oph.py and provide the API Key obtained in Task 1 when prompted

It may take up to 30 mins for the two instances to be online post the command execution.

Solutions

Task 1 Solution: Create a Join token and a user API key

  1. On the Jump-Desktop, click on the start menu and run the application Geany. We will use this application to save our join tokens for use in a later step.
    a. Switch to your CSP browser window, navigate to Manage → Infrastructure, select the Join Tokens tab, and click on Create.
    b. Give the join token a name, give the token a description, and click Save & Close.
    c. The join token will appear in a pop-up window. Click Copy to copy the join token to the clipboard and paste it into Geany.
    d. Save this document to the Desktop as join-token.txt. This will be required for the next Task.

  2. From the CSP browser window, Click your Admin user name at the lower left-hand corner of the portal and select User Profile -> User API Keys tab.

    apikey.png
    1. On the User API Keys tab, click Create.

    2. In the Create User API Keys dialog, complete the following:

      1. Name: Enter the name of the user API key. Use a name that identifies the purpose of the key, so you can easily locate it in the future.

      2. Expires at: Click the calendar icon to select a date and time when the user API key should expire.

      3. Click Save & Close to save the configuration.

    3. Click Copy in the confirmation dialog to copy the user API key and paste it into Geany.

    4. Save this document to the Desktop as api-key.txt. This API key will be required in Task 4.

Ensure you save the join token and API key text, as they will not be displayed again. Failure to do so means we'll have to revoke them and generate new ones.

Task 2 Solution: Deploy Docker Instance on oph1 and oph2

  1. On the Jump-Desktop, open the terminal application on your application taskbar.

  2. Deploy the hosts using the command /mnt/shared/deploy-oph1-2.py and enter the join token when prompted. Finally, answer y after verifying the token is correct.

image-20240326-154921.png
  1. Wait for the command execution to complete.


Task 3 Solution: Validate the new BloxOne Hosts are connected to the CSP

It may take up to 30 mins for the two new BloxOne Host containers to be online.
  1. Switch to your CSP browser window, and navigate to Manage → Infrastructure → Hosts

  2. Your new BloxOne Host containers should appear in the list of hosts. If they are not visible, wait 10 seconds and refresh the browser.

  3. Your new BloxOne Host container status may at first indicate Offline or Degraded. This is normal as it comes up. You should also see the Platform Management in an Upgrading state. All BloxOne Hosts are automatically upgraded to the latest version to work with the CSP. Refreshing the page periodically may show a change.

  4. Then your BloxOne Host container will change from Pending, to Review Details, to Online. Once both of your Host's statuses are Online, they are ready for configuration. Refreshing the page may show a change.

Task 4 Solution: Swap offline BloxOne instances with new hosts on CSP

Ensure the newly joined hosts are in online status in CSP UI prior to proceeding with this task.
  1. On the Jump-Desktop, open the terminal application on your application taskbar, if it is not already open.

  2. Replace the offline hosts with the corresponding online hosts using the command /mnt/shared/replace-oph.py and enter the API Key obtained from Task 1 when prompted. Finally, answer y after verifying the API Key is correct.

image-20240326-160020.png
  1. Please wait for the complete execution of the command. This command swaps offline hosts with their corresponding online counterparts, attaching the services to these online hosts. It then proceeds to remove the offline hosts from the CSP.

  2. Once the command execution is completed, the new hosts should appear in the CSP UI with the names oph1.techblue.net and oph2.techblue.net. Please allow up to 30 minutes for the new hosts to transition to 'Online' status.

It may take up to 30 mins for the two new BloxOne Host containers to be online after the last step.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.