The purpose of this repo is show a demo of provisioning servers through BMC API.
This script provide a kubernetes cluster of 3 Ubuntu servers (1 master node and 2 workers nodes) with a Wordpress application running.
To run the script you need a valid API credentials for https://api.phoenixnap.com/bmc/v0/
-
Python 3 (https://www.python.org/downloads/)
-
Valid API credentials
-
Download the repo
git clone [email protected]:phoenixnap/bare-metal-cloud/devops-days-scritps.git
-
Set your credentials in credentials.conf
-
Set default public key in server-settings.conf, you can get it with
cat ~/.ssh/id_rsa.pub
-
Execute the command
python3 k8s-demo.py
When the script will be ready the master node and has configured the local kubectl
, the script will be open a new terminal window with the K8S setup progress (be patient to see all components, the script is working on it). You can close this new terminal whenever you want without affect to the script execution.
After prepare the infrastructure, software and check that the cluster is correctly setup, the script will be provide two URLs and a token to access to the kubernetes admin dashboard and the Wordpress site
-
Kubernetes admin dashboard URL:
- Copy and paste the URL (including the port) provided after
KUBERNETES DASHBOARD INFO
message in Firefox browser - You will see a certificate warning, click in
Advance...
andAccept the risk and continue
buttons - Select the token option and paste the token provided by the script.
- Copy and paste the URL (including the port) provided after
-
Wordpress URL:
- Copy and paste the URL provided after
WORDPRESS DASHBOARD INFO
message in Firefox browser
- Copy and paste the URL provided after
Please release the servers with the command python3 k8s-demo.py -d0