Get started with your Developer Sandbox

This activity, created by Don Schenck, will show you how to set up and use the Developer Sandbox. With the Developer Sandbox, you experience hands-on learning resources without setup or configuration, and learn to develop quicker than ever before.

The very first step, if you haven't already done it, is to get over to the Developer Sandbox page and get a free OpenShift cluster. You'll also be joining the Red Hat Developer Program if you aren't already a member, which provides some incredible benefits.

In order to get full benefit from taking this lesson, you need to:

In this lesson, you will:

  • Set up your Developer Sandbox.
  • Set up a cluster.
  • Build the application from source code.

Get that cluster

Once you've secured your own cluster, select Start using your sandbox to begin your future (Figure 1).

Select Start using your sandbox.
Figure 1: Select Start using your sandbox.

 Build the application from source code

Begin by navigating to the Topology page. Right-click on the page and select the Import from Git option from the Add to Project menu (Figure 2)

The OpenShift console is shown in Topology view. The Add to Project menu is displayed with the Import from Git option highlighted.
Figure 2: Select the Import from Git option from the Add to Project menu.

You will be prompted to enter a URL that points to a Git repo. This is where things get interesting. Red Hat OpenShift will copy the repo to an internal storage location, inspect it, and attempt to discern the import strategy to build it. OpenShift will choose one of the following methods to build the application:

  • Option 1: Using the Builder image for the programming language used (i.e., the s2i option).
  • Option 2: Using the Dockerfile that is found in the Git repo.
  • Option 3: Using the DevFile that is found in the Git Repo.

Again, we’re focusing on Option 1 right now: Using the Builder image and the s2i technology. The Builder image is determined by inspecting the source code and may be .NET, JBoss, Perl, or one of several other options. Here are some URLs of sample code that you can use for their related languages:

Test your application

Supply the URL and move to the bottom of the page to select the Deployment Resource type. Then click Create to start the deployment (Figure 3).

The Deployment resource type is selected.
Figure 3: Create a Deployment with one click.

After a few minutes, the ring on your application's icon will switch from light blue to dark blue, which means it's ready to go. Select the external link image to see your application in a browser (Figure 4).

Click to launch your app in a browser.
Figure 7: Click to launch your app in a browser.
Figure 4: Click to launch your app in a browser.

Congratulations. You've built an application from source code. Now it's time to build your application from a container image.

Previous resource
Overview: Get started with your Developer Sandbox
Next resource
Build your application from a container image