Setting up a Sandbox Environment on an S.0 BMC Instance

Introduction

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 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.

Setting up a Sandbox Environment on an S.0 BMC Instance

Prerequisites

  • A phoenixNAP BMC account.

Note: If you are a new client, create a BMC account. For instructions on setting up a BMC Portal account, see Bare Metal Cloud Portal Quick Start Guide or watch the video instructions for BMC account creation.

Deploy Rancher on an S.0 BMC Instance

1. Log in to the 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.

The Create Kubernetes Cluster button on the Solutions page of the BMC Portal.

Alternatively, select the Create Cluster button on the Bare Metal Cloud Home page.

The Create Cluster button on the Home page of the BMC Portal.

Note: This tutorial shows how to import a workload cluster via Rancher UI after the management cluster has been deployed. However, the BMC portal also allows you to deploy a new workload cluster during the management cluster deployment. To learn more, read Deploy and Manage Rancher Management Cluster with Workload Cluster in BMC.

4. Select the Rancher Management Cluster option and click Next.

Selecting the option to deploy a Rancher management cluster only.

5. Choose a location for your server and give it a name and description on the Create a Rancher Management Cluster page.

Choosing a server instance location.

6. Select the number of nodes for the cluster. You can choose between one and three nodes.

Choosing the number of nodes.

7. Select an available s0 server instance in the Server field.

Selecting an s0.d1.small BMC server instance.

8. Click Next to proceed to Configure Your Rancher Management Cluster page.

Proceeding to Rancher management cluster configuration.

9. Type the cluster name and description in the Cluster Details section.

Naming and providing a description of the cluster.

10. Provide your SSH keys in the Access section.

Providing SSH keys for cluster access.

11. The Public IP Settings section lets you assign a public IP allocation to the instance.

Viewing public IP settings.

12. If you wish to configure advanced Rancher settings, check the box in Advanced Configuration Settings.

Checking the box to configure advanced Rancher settings.

13. Click Create Kubernetes Cluster to complete the deployment.

Creating the configured cluster.

The Welcome to Rancher dialogue appears.

14. Copy and store the temporary password for the Rancher admin account.

15. Copy and store the IP address of your Rancher server.

16. Close the dialogue box and wait for the server to initialize. Then access Rancher using the IP address from Step 14 in an internet browser.

17. Log in to Rancher. Use admin as the username and the password obtained in Step 14.

Rancher login screen.

Note: For a comprehensive tutorial on setting up a Rancher cluster on Bare Metal Cloud, read Using Rancher to Deploy Kubernetes Clusters in BMC.

Deploy Your App in Rancher

Create a cluster to start deploying apps in Rancher.

1. Click Import Existing on Rancher’s main screen.

The list of available clusters in Rancher, with only the local cluster available.

2. Click Generic on the Cluster: Import page.

Selecting the Generic option in the Cluster Import menu.

The Cluster: Import Generic page appears.

3. Name your cluster and configure it according to your needs. Then click Create.

Naming and configuring the cluster in Rancher.

4. Copy the automatically generated command and run it on the machines you want to include in the cluster.

Copying the kubectl command to register a cluster with Rancher.

Note: Repeat Step 4 for all the nodes that need to join the cluster.

5. The cluster appears on the main list of clusters.

The list of clusters in Rancher with the newly created cluster on the list.

If you have executed the command from Step 4 on all the nodes, wait for the cluster to become Active.

6. Select the cluster you created in the main Rancher menu. Select the Workload item.

Selecting the Workload menu item.

7. Click Create in the upper right corner of the screen to open the Deployment: Create page.

Creating a new workload.

8. Click the Deployment tile.

Choosing to create a deployment on the deployment create screen.

9. Name your deployment and provide the Docker image. Add ports for accessing the app.

Naming deployment and providing image.

Note: Read How to Create Docker Image with Dockerfile to learn how to package your application for Docker.

10. When you finish configuring the workload, click Create at the bottom of the page.

11. The workload appears in the Workloads list.

The main list of workloads in Rancher, with the newly created workload marked as active.

12. Access the app using the IP of your workload cluster.

Note: For a comprehensive tutorial on deploying app workloads with Rancher, read How to Set Up a Kubernetes Cluster with Rancher.

Conclusion

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 to sandbox your applications.

Was this article helpful?
YesNo
Marko Aleksic
Marko Aleksić is a Technical Writer at phoenixNAP. His innate curiosity regarding all things IT, combined with over a decade long background in writing, teaching and working in IT-related fields, led him to technical writing, where he has an opportunity to employ his skills and make technology less daunting to everyone.
Next you should read
Building Optimized Containers for Kubernetes
December 18, 2019

An important aspect in software deployment is building effective container images that enhance and complement Kubernetes’ features. This article explores the best ways to create and optimize containers for K8s.
Read more
19 Kubernetes Best Practices for Building Efficient Clusters
August 29, 2024

Use the outlined Kubernetes best practices to build optimized containers, streamline deployments, administer reliable services, and manage a full-blown cluster.
Read more
How to Install Kubernetes on a Bare Metal Server
November 27, 2019

Container deployment and K8s orchestration are immensely powerful when deployed in virtual environments. The flexibility and scaling capabilities offer endless opportunities. Follow the outlined steps...
Read more
How to Install Rancher on Ubuntu
September 2, 2020

Rancher makes it simple to deploy and run Kubernetes everywhere. The software is especially useful as most cloud/virtualization vendors include Kubernetes as standard infrastructure. In this tutorial, you will learn...
Read more