Install and Configure the Fabric8 Launcher Tool
For Use with Red Hat OpenShift Application Runtimes
This guide walks you through the process of installing the Fabric8 Launcher tool to run on a local cloud as provisioned by a Single-node OpenShift Cluster. This includes Minishift, an all-in-one VM that includes a community version of OpenShift Origin, or Red Hat Container Development Kit, a VM that includes OpenShift Container Platform.
Chapter 1. Introduction to the Fabric8 Launcher Tool
The Fabric8 Launcher tool runs on OpenShift and provides a hassle-free way of creating functional example applications called missions. The Fabric8 Launcher tool walks you through:
- choosing the mission you want to generate,
- choosing the runtime you want to use, and
- choosing how you want to build and execute the mission.
The Fabric8 Launcher tool uses your choices to generate a custom project, called a booster, and either launches it directly to the same OpenShift instance, or provides a downloadable ZIP version of the project.
Chapter 2. Installing a Single-node OpenShift Cluster
To use the Fabric8 Launcher tool on a local cloud, you must have a Single-node OpenShift Cluster installed and configured. You can use either Minishift
1.8.0 or Red Hat Container Development Kit
Follow the instructions for installing the Single-node OpenShift Cluster:
- The installation steps for Minishift are available in the OpenShift documentation.
- The installation steps for Red Hat Container Development Kit are available in the Red Hat Container Development Kit Installation Guide.
The steps for installing Single-node OpenShift Cluster vary by platform.
Verify you have the Single-node OpenShift Cluster installed and configured:
$ minishift version
Start and stop the Single-node OpenShift Cluster:
$ minishift start ... $ minishift stop Stopping local OpenShift cluster... Cluster stopped.
Determine the command to add the correct version of the
ocbinary to your path and run the command:
Example Result of
oc-envon Red Hat Container Development Kit
$ minishift oc-env export PATH="/Users/john/.minishift/cache/oc/v188.8.131.52:$PATH" # Run this command to configure your shell: # eval $(minishift oc-env) $ eval $(minishift oc-env)Warning
You must have the
ocbinary installed and it must match the version of the Single-node OpenShift Cluster you are using.
Chapter 3. Starting and Configuring the Single-node OpenShift Cluster for the Fabric8 Launcher Tool
This chapter contains instructions for starting the Single-node OpenShift Cluster and configuring it to execute the Fabric8 Launcher tool.
Starting your Single-node OpenShift Cluster can trigger a download of large virtual machines or Linux container images. This can take a long time. Subsequent startups are expected to be shorter as long as the virtual machines and Linux container images remain cached.
Because a Single-node OpenShift Cluster is intended for development purposes, it uses HTTPS for the web console and only provides a self-signed certificate. If your browser prevents you from accessing the page due to an SSL error, you must allow your browser to bypass SSL security policies for the Single-node OpenShift Cluster URL to use it. The screenshot below shows the warning message in the Google Chrome browser.
At this time, Safari on macOS does not work with a Single-node OpenShift Cluster; this is a known issue. Other browsers, such as Google Chrome, work with a Single-node OpenShift Cluster on macOS normally.
Start the Single-node OpenShift Cluster with the default virtual machine driver:Note
Depending on your operating system, virtual machine driver, and the number of boosters you run, the memory allocated Single-node OpenShift Cluster can be insufficient. In this case, increase the memory allocation.
$ minishift start --memory=4096 ... OpenShift server started. The server is accessible via web console at: https://192.168.42.152:8443
Alternatively, specify a virtual machine driver other than the default using the
$ minishift start --memory=4096 --vm-driver=virtualbox
Depending on your system configuration, it is possible that you must manually specify an alternative virtual machine driver. You must have virtual machine software, such as VirtualBox, installed before you specify it.Note
On macOS, the default virtual machine driver,
xhyve, can be unreliable. If you experience issues, specifying
VirtualBoxis a reliable alternative.
Open the Single-node OpenShift Cluster Web console.
$ minishift console
Alternatively, use the URL provided in the log information.
Log in using the
developerusername and an arbitrary password.
Optionally, delete the preconfigured project:
- Next to the project name, click the three-dot menu icon.
Select Delete Project.
Chapter 4. Creating a GitHub Personal Access Token
To install the Fabric8 Launcher tool on a Single-node OpenShift Cluster, you must provide the Fabric8 Launcher tool with a GitHub personal access token. This enables the Fabric8 Launcher tool to create booster applications and save them as Git repositories in your GitHub namespace.
Using a web browser, navigate to
- Select Generate new token.
Add a token description, for example
Fabric8 Launcher tool on a Single-node OpenShift Cluster.
Select the check boxes of the following parent scopes and all their children:
- Click Generate token.
Save the hex code of the personal access token. You need this to complete the installation of the Fabric8 Launcher tool on your Single-node OpenShift Cluster.Important
This hex code only appears once and cannot be retrieved after you leave the page. If you lose the code, you will need to create a new personal access token to install the Fabric8 Launcher tool on a Single-node OpenShift Cluster again.
Chapter 5. Installing the Fabric8 Launcher Tool
This chapter describes installing the Fabric8 Launcher tool.
5.1. Installing Fabric8 Launcher Tool Manually
Install a local customized instance of the Fabric8 Launcher tool, which allows you to test the functionality or make modifications to the service using a web interface.
- Open the Single-node OpenShift Cluster Web console and log in.
Click New Project to create a new OpenShift project to house the Fabric8 Launcher tool.
Name the project and optionally provide a description. This example uses
my-launcherfor the project’s name.
- Click Create to complete the project creation.
Click Import YAML/JSON to add services to your new project from a template.
Copy the contents of the current Fabric8 Launcher template from the GitHub repository and paste it into the text box provided.Note
We are working on removing this step entirely, but for now it is required. The full details and a current status are available on GitHub.
Click Create, ensure that only the Process the template option is selected, and click Continue.
Fill out the following fields.
- Your GitHub username.
- Your GitHub Mission Control access token is your personal access token for GitHub.
The Target OpenShift Console URL is the OpenShift Console URL from your Single-node OpenShift Cluster. This should be the same base URL you are currently using to complete the form, for example
OpenShift username and password from your Single-node OpenShift Cluster, for example
developerfor the username and password.
KeyCloak URL and KeyCloak Realm MUST be cleared out.Warning
You must clear these fields out for the Fabric8 Launcher tool on your Single-node OpenShift Cluster to be configured correctly.
- Do not modify Catalog Git Repository and Catalog Git Reference unless you are developing against a specific catalog repository.
- Before proceeding to the next steps, confirm all the fields are correct. Also confirm that KeyCloak URL and KeyCloak Realm have been cleared out.
Createto complete the setup. You will see a screen confirming that the service has been created. Click Continue to overview.
On the overview page, wait and confirm that the four pods for the Fabric8 Launcher tool have completed starting up.
When all pods are running, click the link at the top of all pods, which typically ends in
nip.io. A new browser tab opens with the Fabric8 Launcher tool. This is the same service as
https://developers.redhat.com/launchbut running in a Single-node OpenShift Cluster.
- Start using your Fabric8 Launcher tool to launch booster applications.
- See the Getting Started with Red Hat OpenShift Application Runtimes for a walk-through of running a booster application.
Read the runtime guides for an overview of the runtimes and their boosters:
Chapter 6. Using a Nexus Repository Server on a Single-node OpenShift Cluster
While developing your cloud-native applications with Java and Maven you may be required to build them repeatedly. You can deploy a Nexus Repository server alongside the Fabric8 Launcher tool on your Single-node OpenShift Cluster and use it to fetch artifacts from the Maven Central Repository and cache them locally. This helps you speed up your builds and rolling updates and alleviates network load during build time.
6.1. Prerequisites for Deploying Nexus on Single-node OpenShift Cluster.
- Set up your Single-node OpenShift Cluster. For detailed steps on how to do this, follow the instructions in Install and Configure the Fabric8 Launcher Tool.
Configure your Single-node OpenShift Cluster to use at least 4096 MiB of RAM and use the required
ocCLI tool version.
minishift delete # Delete the previous instance of Single-node OpenShift Cluster minishift config set memory 4096 minishift config set openshift-version v3.6.0 minishift startWarning
The procedure described below works with Minishift version
1.8.0. It has not been tested for use with CDK. You must use
- Deploy the Fabric8 Launcher tool to your Single-node OpenShift Cluster.
- Deploy a Booster application to your Single-node OpenShift Cluster.
6.2. Configuring your Single-node OpenShift Cluster to Use Nexus.
Log in to your Single-node OpenShift Cluster instance.
oc login https://LOCAL_OPENSHIFT_URL:PORT -u developer -p developer
You can reuse the Docker daemon instance used by Single-node OpenShift Cluster to download the latest versions of the Nexus Docker container image.
eval $(minishift docker-env) docker pull openshift/jenkins-2-centos7 docker pull openshiftio/launchpad-jenkins-slave docker pull sonatype/nexus
6.3. Setting up the Nexus Application
Create a new project to contain the Nexus server. You can also use the New Project button on the Web console to do this.
oc new-project NEXUS_PROJECT_NAME
Deploy the Nexus container image.
oc new-app sonatype/nexus
Expose the service route URL of the Nexus server.
oc expose svc/nexus
Attach a persistent volume claim with a minimum size of 10 GiB to the pod running your Nexus application.
oc volumes dc/nexus --add --name 'nexus-volume-1' --type 'pvc' --mount-path '/sonatype-work/' --claim-name 'nexus-pv' --claim-size '10Gi' --overwrite
Navigate to the project containing your Booster application.
oc project MY_PROJECT_NAME
Define and start a new build. Pass in a parameter to set the value of the
MAVEN_MIRROR_URLto match the service URL of your Nexus application:Note
Ensure that the YAML template of the builder image you are using for your application has the
MAVEN_MIRROR_URLenvironmental variable defined. If it does not, see the Nexus documentation for instructions on configuring your build manually before proceeding.
$ oc new-build MY_APP_NAME:latest~SCM_REPOSITORY_URL \ -e MAVEN_MIRROR_URL='http://nexus.NEXUS_PROJECT_NAME:8081/nexus/content/groups/public'Note
Nexus comes pre-configured for the Maven Central Repository, but you may need other repositories for your application. To access images provided by Red Hat, add the Red Hat JBoss Middleware Early Access Maven Repository to your Nexus instance.
To ensure that your new build is using Nexus to retrieve artifacts, you can:
http://nexus-NEXUS_PROJECT_NAME.LOCAL_OPENSHIFT_HOSTNAME/nexus/content/groups/publicto view the list of artifacts stored in your local repository.
Check the log output of the build:
$ oc logs build/MY_APP_NAME-1 --follow
If your build uses Nexus to retrieve artifacts, the build log output should reference the path
- Navigate to
Appendix A. Glossary
A.1. Product and Project Names
- developers.redhat.com/launch is a standalone getting started experience offered by Red Hat for jumpstarting cloud-native application development on OpenShift. It provides a hassle-free way of creating functional example applications, called missions, as well as an easy way to build and deploy those missions to OpenShift.
- Fabric8 Launcher
- The Fabric8 Launcher is the upstream project on which developers.redhat.com/launch is based.
- Single-node OpenShift Cluster
- An OpenShift cluster running on your machine using Minishift.
A.2. Terms Specific to Fabric8 Launcher
- Booster Catalog
- A Git repository that contains information about boosters.
An application specification, for example a web service with a REST API.
Missions generally do not specify which language or platform they should run on; the description only contains the intended functionality.
- A platform that executes boosters. For example, WildFly Swarm or Eclipse Vert.x.