Demo script for provisioning Bare Metal Cloud servers via API. This script creates a Spark cluster consisting of 3 Ubuntu servers (1 master node and 2 workers nodes).
Bare Metal Cloud • API • Developers Portal • Knowledge Base • Support
- Bare Metal Cloud account
- Python 3
- Go to the Bare Metal Cloud signup page.
- Follow the prompts to set up your account.
- Use your credentials to log in to Bare Metal Cloud portal.
You need valid Bare Metal Cloud API credentials to use this script. Follow these steps to obtain your API credentials:
- Log in to the Bare Metal Cloud portal.
- On the left side menu, click on API Credentials.
- Click the Create Credentials button.
- Fill in the Name and Description fields, select the permissions scope and click Create.
- In the table, click on Actions and select View Credentials from the dropdown to view the Client ID and Client Secret.
Bare Metal Cloud Quick Start Guide: https://developers.phoenixnap.com/quick-start
-
Set your credentials in
credentials.conf
. -
Set a public key in
server-settings.conf
, you can see your default public key with this command:cat ~/.ssh/id_rsa.pub
. -
To execute the script, run this command:
python3 bmc-spark.py
Once the infrastructure and software are ready, the script will check if the cluster is set up properly. After that, you will get a URL to access the master node via web UI.
To release the servers, use the command: python3 bmc-spark.py -d0
.
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.
- Follow @phoenixNAP on Twitter
- Join the official Slack channel
- Sign up for our Developers Monthly newsletter
Get in touch with us if you have questions or need help with Bare Metal Cloud.