Skip to content

Deploy Custom OS (Rocky 9) using BMC Ansible collection and BMC API Ram OS feature

Notifications You must be signed in to change notification settings

phoenixnap/ansible-ramos-bmc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation


phoenixnap Bare Metal Cloud
Install Custom OS (Rocky Linux) On BMC

Ansible playbooks for provisioning a Custom OS server (RAM OS) and installing a customized OS on the BMC server. Choose whether to set up RAID 0 or 1, the root disk size, LVM, and the OS.

Bare Metal CloudAnsible GalaxyDevelopers PortalKnowledge BaseSupport

Requirements

  • Bare Metal Cloud account
  • Ansible 2.9+
  • Python 2 (version 2.7) or Python 3 (versions 3.5 and higher)
    • Python requests package

Creating a Bare Metal Cloud account

  1. Go to the Bare Metal Cloud signup page.
  2. Follow the prompts to set up your account.
  3. Use your credentials to log in to Bare Metal Cloud portal.

▶️ Video tutorial: How to Create a Bare Metal Cloud Account in Minutes

▶️ Video tutorial: How to Deploy a Bare Metal Server in a Minute

Installing Ansible

Follow these helpful tutorials to learn how to install Ansible on Ubuntu and Windows machines.

Installing the Bare Metal Cloud Ansible module

This Ansible collection contains the server module which requires the Python requests HTTP library to work properly. If you don't have it installed on your machine already, run this command to install it:

pip install requests

Now install the Ansible collection by running:

ansible-galaxy collection install phoenixnap.bmc

You can view the server module documentation with this command:

ansible-doc phoenixnap.bmc.server

Authentication

You need to create a configuration file called config.yaml and save it in the user home directory. This file is used to authenticate access to your Bare Metal Cloud resources.

In your home directory, create a folder .pnap and a config.yaml file inside it.

This file needs to contain only two lines of code:

clientId: <enter your client id>
clientSecret: <enter your client secret>

To get the values for the clientId and clientSecret, follow these steps:

  1. Log in to the Bare Metal Cloud portal.
  2. On the left side menu, click on API Credentials.
  3. Click the Create Credentials button.
  4. Fill in the Name and Description fields, select the permissions scope and click Create.
  5. In the table, click on Actions and select View Credentials from the dropdown.
  6. Copy the values from the Client ID and Client Secret fields into your config.yaml file.

Ansible Playbooks for provisioning and installing a Custom OS (Rocky Linux) using RAM OS

The Ansible Playbook allows you to provision and install a custom OS on a Bare Metal Cloud server.

  • inventory.yaml contains all the information about the BMC server. Custom values in this file allows custom OS setup.
  • provision.yaml deploys the BMC server using the RAM OS feature. The playbook uses the information from inventory.yaml to deploy and set up custom OS on the server.

This example shows you how to deploy and install:

  • An s2.c1.medium server in Phoenix at an hourly rate.
  • Rocky OS with a 50G root volume, LVM, and RAID level 0.

To run the example, use:

ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook provision.yaml -i inventory.yaml

For the full guide, check out this helpful tutorial: How to Install Custom OS (Rocky Linux) On BMC

Bare Metal Cloud community

Become part of the Bare Metal Cloud community to get updates on new features, help us improve the platform, and engage with developers and other users.

Resources

Documentation

Contact phoenixNAP

Get in touch with us if you have questions or need help with Bare Metal Cloud.

TwitterFacebookLinkedInInstagramYouTubeEmail


phoenixnap Bare Metal Cloud

About

Deploy Custom OS (Rocky 9) using BMC Ansible collection and BMC API Ram OS feature

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published