Provisioning and deploying dedicated bare metal servers for sandboxing purposes can be a costly undertaking. Initial investments in the equipment are followed by running and maintenance costs.
Application developers with low hardware requirements do not need high-performance servers. Instead, they can opt for cost-effective solutions providing high availability. Bare metal cloud technology allows you to delegate the critical testing work to affordable dedicated server instances.
This article will show you how to set up a sandbox environment on a small server instance using Rancher and Kubernetes.
- A phoenixNAP BMC account
Deploy Rancher on an S.0 BMC Instance
1. Log in to BMC Portal.
2. Select Solutions from the navigation pane on the left.
3. Click the Create Kubernetes Cluster button in the Rancher on Bare Metal Cloud tile.
4. Choose a location for your server and give it a name and description on the Create a Cluster page. Then click Next.
5. Select an available S.0 instance on the Add a Node page. Click Next.
6. On the Node Settings page, add your SSH keys and configure advanced options.
7. Click Create Kubernetes Cluster to complete the deployment.
The Welcome to Rancher dialogue appears.
8. Copy and store the temporary password for the Rancher admin account.
9. Copy and store the IP address of your Rancher server.
10. Close the dialogue box and wait for the server to initialize. Then access Rancher using the IP address from Step 9 in an internet browser.
11. Log in to Rancher. Use admin as the username and the password obtained in Step 8.
Note: For a comprehensive tutorial on setting up a Rancher cluster on Bare Metal Cloud, read Using Rancher to Deploy Kubernetes Clusters on BMC.
Deploy Your App in Rancher
Create a cluster to start deploying apps in Rancher.
1. Click Add Cluster on Rancher’s main screen.
2. Click Existing nodes on the Add Cluster – Select Cluster Type page.
The Add Cluster - Custom page appears.
3. Name your cluster and configure it according to your needs. Then click Next.
4. Choose the role of the node you wish to configure. Copy the automatically generated command and run it on the machines you want to include in the cluster.
Note: Repeat Step 4 for all the nodes that need to join the cluster.
5. The cluster appears on the main list of clusters.
If you have executed the command from Step 4 on all the nodes, wait for the cluster to become Active.
6. Hover over the Global section in the upper-left corner of the screen. Hover over the cluster you created in the menu that appears, then click Default in the new menu.
The Workloads list appears.
7. Click Deploy in the upper right corner of the screen to open the Deploy Workload page.
8. Name your deployment and provide the Docker image.
Note: Read How to Create Docker Image with Dockerfile to learn how to package your application for Docker.
9. Scroll down the page to find more configuration options. When you finish configuring the workload, click Launch.
10. The workload appears in the Workloads list.
11. Access the app using the ports you assigned.
Note: For a comprehensive tutorial on deploying app workloads with Rancher, read How to Set Up a Kubernetes Cluster with Rancher.
S.0 server instances provide a cost-effective dedicated server solution for development projects. This tutorial showed you how to utilize an S.0 instance for sandboxing your applications.