The guide shows how to get up to speed using Red Hat OpenShift.io. The main focus is on documenting the demo user stories that are used to onboard new users to the platform.

Learn about OpenShift.io

1. Introduction

Thank you for your interest in OpenShift.io! Red Hat OpenShift.io is a highly collaborative open-source, web-based application life cycle management (ALM) solution. It provides an integrated approach to DevOps enables you to plan, create, and deploy hybrid cloud services.

The purpose of this document is to guide you through your first experiences with OpenShift.io. Following the instructions in this document, you can set up an application running in the cloud within minutes. Shortly thereafter you will have customized and then deployed a new version of that application.

OpenShift.io is constantly being updated and therefore improving as you use it, and we would love to hear from users to make it a better experience for you. See Send us feedback about the product to send us information about bugs, feature requests, and your thoughts about what does or doesn’t work well for you. Updates and changes to the system are delivered continuously, often multiple times in a day. As part of our continuous delivery model, everyone who pushes a change out to the live system assumes responsibility for the impact of that change, so severe bugs are addressed quickly.

If your OpenShift.io environment gets into a state where you are finding it difficult or impossible to move forward, refer to the Cleaning your OpenShift Online account section of this document for information on how to factory reset your OpenShift.io (and OpenShift Online) environment. Welcome to the world of OpenShift.io! We hope you enjoy your experience and look forward to hearing your feedback!

1.1. About this document

The purpose of this getting started guide is to walk you through your initial set up of OpenShift.io and quickly expose you to some key functionalities in OpenShift.io. If this document is successful, following the instructions results in the majority of first time OpenShift.io users having a simple, customized application running on the internet in under one hour.

2. Getting support

The OpenShift.io team love to get feedback from our users. Tell us what you like, what you hate, what you wish you could do, what you wish the service would stop doing, and anything else that you think we should know as we work on improving OpenShift.io.

2.1. Asking questions about the product

The OpenShift.io support chat channel is the best way to ask questions or get immediate support for OpenShift.io at any time. We encourage users to ask us questions and get immediate answers and assistance rather than spend their time debugging or troubleshooting problems themselves.

If you don’t already have a MatterMost account:

  1. Navigate to https://chat.openshift.io and click Create one now.

    Create an account
  2. Add your details and click Create Account to register.

  3. In your email inbox, click the Verify Email link.

    Verify email
  4. Sign in when prompted. When asked, select Developers.

    Select team
  5. MatterMost offers an optional tutorial for new users, which you can skip. Click Skip tutorial to continue.

    Skip tutorial
  6. You are redirected to the #openshiftio channel.

    Main view
  7. Ask a specific person your question or start with @here to tag everyone present in the channel.

In the future, navigate to https://chat.openshift.io to view the OpenShift.io MatterMost channel.

If you prefer to use IRC, the OpenShift.io team is also available in the #openshiftio channel on Freenode.

2.2. Send us feedback about the product

To give the OpenShift.io team feedback, navigate to create an issue and send us a description of the problem with the necessary details, including screenshots if necessary. You can also search for related issues at this link. When logged, the OpenShift.io team triages and adds tags and other information to your issue.

If you prefer to send us feedback via email, send us the details at openshiftio@redhat.com.

2.3. Send us feedback about the documentation

The documentation team welcomes all feedback or requests for information that is helpful to you but isn’t covered.

  • Is there anything we can do to improve the documentation?

  • Was a part of the documentation not useful for you?

  • Is there anything we did not document that you want to do with OpenShift.io?

Create an issue to send us your feedback.

3. Before you start

3.1. Before you begin using OpenShift.io

Before you start using OpenShift.io, keep the following information in mind:

  • We recommend using OpenShift.io with an OpenShift Online Starter account, not an OpenShift Online Pro account.

  • When you sign up to use OpenShift.io, you are given an OpenShift Online account with enough resources to run a basic stage and run environment, pipelines, and an Eclipse Che development workspace.

  • Your OpenShift Online Starter account includes two pods and therefore can accomodate two workspaces in OpenShift.io. To create additional projects, you must reset your OpenShift.io environment using the instructions in Cleaning your OpenShift Online account.

3.2. Prerequisites

Browser Requirements:

Currently, only Google Chrome can be used with OpenShift.io. Additional browsers will be listed here when they are tested and can be used with OpenShift.io.

General Requirements:

  1. Ensure that you have a GitHub account.

  2. Register to join the OpenShift.io developer preview at https://openshift.io/.

3.3. Connecting OpenShift.io to OpenShift Online

When you sign up for OpenShift.io, you are sent a welcome email. When you receive this email, use the following steps to set up OpenShift.io:

  1. In your browser, navigate to https://openshift.io/

  2. Click Log In at the top of the page.

  3. Enter your Red Hat Developer (or other listed services) credentials. Your OpenShift.io account is automatically connected to your OpenShift Online account.

You are now ready to use your OpenShift.io account.

Start using OpenShift.io

4. Introduction to the home screen

If this is your first time using OpenShift.io, it can be confusing figuring out what the different elements on your home screen are and what you should do with them. This is what your OpenShift.io home screen looks like when you first log in:

OpenShift.io home screen
(1) What’s New

This part of your home screen displays the latest updates to OpenShift.io that you need to know about. Scroll across various updates and click Learn more to view the details for any of the listed changes.

(2) Recent Spaces

The Recent Spaces area of the home screen displays all previously created spaces. When you first use OpenShift.io or reset the environment, this space is empty and you can click the + icon to quickly create a new space. Generally, a space is the first thing you will create when using OpenShift.io. See about spaces to learn about spaces.

(3) Recent Workspaces

The Recent Workspaces area displays all created workspaces. See About workspaces to learn more about workspaces and what you can do with them.

(4) My Work Items

The My Work Items section displays work items used to track your planned and current tasks for each space. See about work items to learn more about work items and how to use them.

(5) Profile and Settings

The top right corner of OpenShift.io displays your name. Click here to view Settings and Profile options. See changing user preferences to learn more about these options.

5. Hello World for Developers

5.1. Creating a new space

In OpenShift.io, the first step for any new project is to create a new space.

You can then add collaborators, track your work using work items and iterations, and create or import codebases within the space. Each space must have a unique name.

Procedure

Create a new space as follows:

  1. In the OpenShift.io home page, click Create a space.

    Create your first space

    If your account has an existing space, click + to create an additional space instead:

    Second space
  2. If this is the first space you are creating with your OpenShift.io account, a message about connecting to GitHub appears. To connect your GitHub account to OpenShift.io:

    1. Click Connect to GitHub.

      GitHub Disconnected
    2. If your browser session is already logged in to a GitHub account, OpenShift.io uses it for the GitHub connection step. If not, you are prompted to add your GitHub credentials to connect the account to OpenShift.io.

      Connect to GitHub
  3. When the accounts are connected, the OpenShift.io home page view displays. Click Create a space again.

  4. Use the Development Process drop-down list to select a template for your new space. For this example, keep the default option for this field.

  5. In the dialog box, type myspace as the unique name for your space and click Ok.

    Create new space

You have now created your first space.

5.2. Planning your development work

After creating a space, use the OpenShift.io planner to plan your development work and to ensure efficient execution of your project.

The development process you select while creating the space determines the planner’s guided work item type hierarchy.

This example walks you through the Scenario Driven Development planning process to plan an end to end development flow of launching and deploying a sample application.

5.2.1. Opt-in to beta features

OpenShift.io planner is a beta feature so ensure that you first opt-in to beta features.

  1. In the dashboard of your space, select the Plan tab at the top of the page to view the planner.

  2. If you have not activated experimental features in OpenShift.io, when you click the Plan tab the Beta Features Opt-in warning appears. Click Opt-in to Beta Features to proceed.

    Beta feature warning
  3. In the Settings page, select the Beta Features option. The change is applied to your profile.

    Beta feature option
  4. Navigate back to your space by clicking your username in the upper left corner of the screen. In the displayed options, click the name of your space.

    Navigate to your space

5.2.2. Plan your development project

  1. In the dashboard of your space, select the Plan tab at the top of the page to view the planner. The planner now displays the default Backlog view with the Scenarios work item type group for your space.

  2. Select the Show Tree check box to see the work items in a tree view. The tree view allows you to quickly add work items according to the guided hierarchy using the quick-add and in-line add options.

  3. Use the quick-add option to create a Scenario as follows:

    1. In the Add Work Item pane, select Scenario from the drop-down list.

      Quick Add work item type
    2. In the Work Item Title field, add Enable an end to end, quick, developer work-flow, within a continuous integration and deployment model as the title.

    3. Press Enter to create the scenario.

      Example Scenario
  4. Similarly, select Fundamental in the Add Work Item pane, to create a fundamental work item with the title The application should be secure with appropriate licenses.

    Example Fundamental
  5. Create child Experience and Value Proposition for the Scenario using the in-line add option as follows:

    1. In the work item list, click the (+) icon adjacent to the scenario to see the in-line Add Child Work Item pane below it.

      Inline Add
    2. Select Experience from the drop-down list, add the title User should be able to launch any application through a simple work-flow, and Press Enter.

    3. Similarly, select Value Proposition and add the title Easy end to end developer experience.

      Example Experiences and Value Propositions
      A scenario can have multiple realizing experiences and supporting value propositions.
  6. Create an execution oriented child Feature for the Experience using the in-line add option with the title User should be able to easily launch a sample Vert.x application using a smooth developer work-flow.

    Example Feature
  7. Create the following child Task work items to implement the Feature using the in-line add option:

  8. Similarly, for the Fundamental - The application should be secure with appropriate licenses, create a child experience*, feature, and task . The task could be titled Use analytics to identify and resolve security and license issues in the application.

    Example Fundamental Task

    For each of these tasks, click on the work item to preview it and assign the tasks to the collaborators in your team. For this example, add your name as the assignee. Assigning a work item sends that person an email notification. Depending on your mail server and account, this notification email may arrive after a delay of several minutes.

    Add Asignee

    Also, ensure that you change the state of the work items from New to In Progress when you start working on them and mark it Closed once work is completed.

    Change State

    See working with work items to further modify your workitems.

  9. Click the (+) icon adjacent to Iterations to create an iteration called Test Iteration and make it active.

    Create Iteration
    1. Associate the features and child tasks to the Test Iteration to track them and close them within this iteration.

      Associating Work Item with an Iteration
    2. Click Test Iteration to see the associated work items.

      Work Items associated to an Iteration

You have now learned how to use the Scenario Driven Development planning methodology to plan your work by creating work items and to track and execute them by associating them to iterative development cycles.

5.3. About codebases

After creating a space, OpenShift.io enables you to create a new application codebase or import an existing codebase from GitHub and set up pipelines to build the code.

When you create a new project using the quickstart wizard, OpenShift.io creates a new code repository for your project and stores it in GitHub. OpenShift.io also maintains additional metadata for version control of your project code. OpenShift.io codebases are a generic representation of a project’s code.

Currently, codebases in OpenShift.io are GitHub code repositories. In the future, OpenShift.io may support additional git hosts and even non-git options for version control.

5.4. Creating a new project

When you create a new space, the Create an Application wizard to create applications displays. If you closed the wizard earlier, click Create an Application in your space dashboard to see the wizard again. Use this wizard to create a new quickstart project as follows:

Start creating apps
Each quickstart has different requirements to run. We recommend reading the project’s README file for details about requirements.
  1. In the Name your application field, type helloworldvertx.

  2. Select the Create a new codebase radio button and click Continue.

  3. Select the mission and runtime for your new project:

    1. In the Choose a mission section, select the Externalized Configuration option.

    2. In the Choose a runtime section, select Eclipse Vert.x.

    3. Click the blue downward arrow button to continue.

      Choose mission and runtime
  4. In the Select Pipeline section, select the first option, then click the blue arrow to continue to the next step.

    Select a pipeline
  5. In the Authorize Git Provider section, you must provide credentials for your Git provider. If you have already connected your GitHub account to OpenShift.io, you can click the blue arrow to continue.

    Authorize GitHub
  6. The next screen displays a summary of your application options. Scroll down in your browser to view the Application Information section. For this example, do not edit these options. If desired, you can change the project name, version, Group ID, which space it is in, and the target environment for your new application at this step.

    Application information
  7. Click Set Up Application to finalize your choices and create the new application.

  8. The progress screen displays a confirmation message when your application is ready.

    1. Optionally, click the blue link to view your new codebase in your Git provider.

    2. When ready, click View New Application.

      Application ready

      Your new Vert.X project is now created in your space and your space dashboard now displays your new application:

      Space dashboard view after creating Hello World
  9. You have now completed the task, Launch a sample quickstart application, in the Test Iteration. Ensure that you change the state of the work item to Closed using the Plan tab

OpenShift.io has now hosted the project source code in the linked account and specified organization on GitHub. It has also hosted the pipeline for the project in OpenShift Online.

5.5. About the stage and run environments

Next, you will learn about pipelines and staging environments in OpenShift.io. After you create or add an application to your space, a pipeline is created to publish your application.

When you get an OpenShift.io subscription, you also get an OpenShift Online Starter subscription, which includes two environments named Stage and Run to deploy your applications. Initially, applications deploy to Stage, which is accessible to stakeholders for review using a public URL. If approved and promoted, the application deploys to Run, which is similar to a production environment but is another staging area.

The reason Run is not named Production is that the OpenShift Online Starter subscription does not support running production applications. Currently, we recommend using OpenShift Online with OpenShift.io and not OpenShift Online Pro.

OpenShift.io includes a Stage and Run environment to allow developers to experience the modern workflow of pushing an application to a staging environment before production. As a result, Run is a pseudo-production environment for educational purposes.

5.6. Working with pipelines

When you create a new quickstart project, a new build executes. In a build pipeline, Stage and Run are individual OpenShift projects. Stage is a production staging area to review and test changes before they are finalized and then staged on Run.

  1. At the top of the page, click Create.

  2. In the sub-menu options, click Pipelines. The build pipelines for your new application display on this page. Initially, the build status is No stages have started.

    VertX Build 1 No Stage

    When the pipeline build is ready, it displays at the Approve stage:

    Pipeline First Run

For your new quickstart project, the new build pipeline pushes version 1.0.1 into Stage and then, after user approval, it pushes the changes to Run.

If your pipeline build does not start for more than ten minutes, you can manually start a pipeline build using the instructions at Pipeline build failure.

5.7. Viewing the build pipeline logs

Optionally, while you wait for the pipeline build, you can view the build details in the Jenkins log. For experienced users, these logs are useful when troubleshooting problems with builds if required.

  1. In the Pipeline page, click View Log for the build pipeline in progress.

    View log link
  2. When prompted, log into Jenkins with your OpenShift Online account. If an error appears instead of the log in page, wait several minutes for the Jenkins instance to initialize and then try again.

    Logging into Jenkins
  3. When logged in, the page displays the logs for your pipeline build.

    Pipeline Build Logs in Jenkins
    Do not click the Proceed or Abort options at the end of the logs.
  4. After examining the logs to familiarize yourself with the log output, you can close the browser tab and return to the OpenShift.io browser tab.

5.8. Approving the build pipeline

Several minutes after starting, your build pipeline is ready to be promoted to Stage.

The build pipeline includes steps for a Stage build and a Run build. Stage is a production staging area to review and test your application before finalizing it and deploying the build on Run.

To stage your application and review it on Stage:

  1. If you are not on the Pipelines view, click Create from the options at the top of the screen and then click Pipelines.

  2. Click the icon (rollout icon) next to Rollout to Stage in the displayed pipeline. OpenShift Online provides this public URL to access the staged quickstart application.

    Rollout to stage
  3. In a new browser tab, the HTTP Booster application runs on Stage. The Vert.x HTTP booster quickstart produces a simple API behind a REST endpoint over HTTP with a minimalist user interface.

    Test the Application
    If the application does not load, see Application not available error for troubleshooting information.
  4. In the application, enter a name in the Name field and click Invoke to test the application. The Result field displays the JSON result returning from the API.

    Test the Application

If the quickstart application on the Stage build runs as expected, return to the OpenShift.io browser tab and promote your application and build on Run:

  1. Return to the OpenShift.io tab which displays the Pipeline view.

  2. Click Input Required at the Approve stage of the pipeline.

    Input Required
  3. Click Promote to promote the build from the Stage environment to the Run environment. The rollout process from Stage to Run requires several minutes.

    Promote build
  4. Optionally, click Build #1 to view the detailed progress in the OpenShift Online console view as your build is promoted to Run.

    Build #1 link
  5. When the Pipeline view indicates that the project is available in the Run environment, click the icon (rollout icon) next to Rollout to Run to view the project in a new tab and test the application.

    Rollout to Run
  6. You have now completed the task, Test the application in Stage and approve to the Run environment, in the Test Iteration. Ensure that you change the state of the work item to Closed using the Plan tab.

5.9. (Optional) Detailed views

Optionally, you can see an experimental detailed Deployments view for the Test, Stage, and Run environments. This view displays the environment deployments, pods, events, and other information.

View the details for the Deployments as follows:

  1. Navigate to the Deployments view:

    1. At the top of the page, click Create.

    2. From the options displayed, click Deployments.

      Create > Deployments
    3. If you have not activated experimental features in OpenShift.io, the Experimental Features Opt-in warning appears. Click Opt-in to Experimental Features to proceed.

      Deployments page warning
  2. In the Features Opt-in tab, select the Experimental Features option.

    Features options

    The change is automatically applied to your profile. The following message displays to confirm that you have opted in to the selected features:

    Profile updated
  3. Click your username in the upper left corner of the screen. In the displayed options, click the name of your space.

    Spaces box
  4. At the top of the page, click Create and then click Deployments. The Deployments page now loads and displays details about the Applications and Environments.

    Deployments page

5.10. View pipeline progress

Optionally, you can view the pipeline progress in the OpenShift Online console as follows:

  1. For either the Stage or Run environments, click the options (kabob) icon and then click View OpenShift Console.

    Environment options
  2. If prompted, click LOGIN WITH RED HAT to log in to your OpenShift Online account.

    Log into OpenShift Online
  3. A detailed view of the build in OpenShift Online displays. Click Applications > Applications in the sidebar to view details about the application.

    OpenShift Online Console

Within this view, you can view the details of your build in the appropriate environment.

5.11. Viewing your project in GitHub

After reviewing your pipeline build running in OpenShift.io and OpenShift Online, view your project codebase in GitHub as follows:

  1. Return to your space dashboard.

  2. In the Codebases panel, click the GitHub link to the project code.

    GitHub Code Link

    A new browser tab displays your project code in GitHub.

    Project Code in GitHub
  3. Click Jenkinsfile to view the details for the staging and rollout of the pipelines.

Use this link to review code commits and details in your GitHub repository.

5.12. Viewing projects in OpenShift Online

To view the OpenShift Online projects that support the pipeline for your project, navigate to your OpenShift Online Console.

OpenShift Online Projects

This page displays the following projects and namespaces that are created in OpenShift Online:

  • The username project is where your pipelines run. Your OpenShift Online user name is the name of your project.

  • The username-che project represents your Che Host and workspaces.

  • The username-jenkins project represents your Jenkins Master or your Jenkins Slaves. Click Monitoring after clicking this project to access your Jenkins console.

  • The username-run project is identical to the username-stage project and is an environment for experimenting with your OpenShift pods and monitoring the memory usage for your application.

  • The username-stage project is for your personal use. Use this project to see the pods that are created when pipelines are triggered in OpenShift.io. For maintenance, select this project and power down individual pods as required.

5.13. About workspaces

After creating and testing your new Vert.x quickstart application, you can make changes to the project code. OpenShift.io provides hosted instances of Eclipse Che within your browser to edit, test, and debug your project code.

One of the key features of Eclipse Che is Che workspaces, which provide a fully configured runtime environment for running your code. As a result, OpenShift.io provides a lightweight, next generation IDE as well as a containerized development and testing environment.

When you use the quickstart application wizard in OpenShift.io, the development and testing environment is automatically configured with the necessary runtime components and is ready to use. Thereby OpenShift.io uses Che workspaces to provide you with a personal development machine each time you start working on a new project.

5.14. Creating a Che workspace

Create a new Che workspace for your project:

  1. Click Create from the top of the OpenShift.io page. The default view for this tab is Codebases

  1. In the WORKSPACES column, click Create workspace for your project.

    Create Workspace

    If you see a message about the workspaces loading (see screen capture), it indicates that your Che instance is idle. Allow several minutes for the loading process to finish.

    Loading Workspaces
  2. When your workspace is ready, it automatically loads in a new tab. Alternatively, click Open to view your new Che workspace in a new browser tab. This workspace loads the codebase for the listed project.

    New Workspace
    If a new tab does not appear, see Enable popups for troubleshooting information.
  3. As the workspace loads, the Workspace Status window at the bottom of the Che workspace tab displays the progress:

    Workspace loading

    When loaded and ready to use, the new Che workspace tab displays the following confirmation message:

Workspace Running success message

5.15. Running your project in the Che workspace

After your Che workspace loads, you can see your project code listed in the file explorer panel, in the upper-left side of the screen. You must now ensure the following prerequisites are met before you start using the workspace to edit the codebase:

  1. Click the run option from the Run button (tri run). Maven then downloads the required dependencies, compiles the application, and starts the verticle (Vert.x uses this name for deployed code). For Vert.x projects, this also sets up the server and hot deploy options. The hot deploy option automatically updates the application when you make a change.

    If the Run command macro is not defined, it displays the Create run command option instead of Run:

    Create run command

    See Create run command macro for instructions on setting up a run command.

  2. A run terminal appears at the bottom pane of the Che workspace. When the mvn build command finishes executing, the run view displays the Succeeded in Deploying verticle message:

    Successfully deployed verticle
  3. Click the blue preview URL at the top of the run view to see your application running in Che.

    Run project link
  4. Enter a name in the Name field and click Invoke to test the application.

    Testing the application

This is the same version of the application that the pipeline deployed to Stage and you subsequently promoted to Run. The URL for this build of the application is different from the URLs used by OpenShift Online for Stage and Run. This is your private sandbox hosted within Che. You can still share this URL with others and interactively debug the application while they run it in their browser.

5.16. Changing the quickstart code

To change your project code and preview the results:

  1. In your Che workstation view, navigate to the following file: src > main > conf > application.yml.

    Project Directory
  2. Change the following line in the file, which is the template for API’s returned message in the application:

    message: "Hello %s from the local configuration!"
  3. Change the greeting message and then save your changes.

    message: "Hello from Che, %s !"
  4. Click the stop button at the top of the workspace to stop the application running.

    EXEC Bar
  5. Click the circular arrow (run stopped) to run the application again with your changes.

  6. To test your changes, click the blue preview URL at the top of the run view to see your application.

    Preview Link
    If you already ran the application earlier as instructed in Running your project in the Che workspace, your changes are instantly implemented. Maven uses the Vert.X hot deploy feature to automatically update the application when you make a change. Return to the browser tab running the application and skip the rest of this step.
  7. Add a name in the Name field and click Invoke to test the application. The displayed message shows the amended text template.

    Testing the Application

You have now learned how the workspace automatically saves and applies your changes.

5.17. Committing and pushing changes to GitHub

After making the required changes to your code, commit and push the modifications to your project GitHub repository.

Before committing your changes, ensure that your project pipeline build has completed (that is, the build has been promoted and is at the Rollout to Run stage).

Procedure

  1. In the workspace browser tab, click Git from the menu options and select Commit from the displayed options.

    Git Commit Menu
  2. In the Commit to repository dialog box:

    1. Select all the changed and new files to commit.

    2. Add a commit message describing your changes.

    3. Select the Push committed changes to: check box.

    4. Click Commit.

      Commit changes

      When the commit succeeds, the following message displays:

      Pushed to origin

      You have now committed your code changes to GitHub.

  3. You have now completed the task, Modify the quickstart codebase, in the Test Iteration. Ensure that you change the state of the work item to Closed using the Plan tab.

5.18. Reviewing and publishing your changes

Now that we have committed and pushed our changes to GitHub, a pipeline build is automatically triggered in OpenShift.io.

Procedure

To view the build:

  1. Return to the OpenShift.io browser tab.

  2. Click Create and then Pipelines to view the build pipelines. After several moments, the build pipeline stops at the Approve stage. Do not approve the build yet.

    Build #2 Runs
  3. In the Create tab, click Deployments to see the following information:

    Versions of the Application
    • Different versions of your application are now deployed to Stage and Run. Version 1.0.2 of the application, which includes your committed change to the code, is deployed to Stage because you have not yet promoted it to Run. The older version, 1.0.1, is deployed to Run because you approved it the last time the pipeline build executed.

    • The green check marks indicate that both builds are operational.

    • The 1 pod indicates that each of the application builds is scaled to one pod in OpenShift Online. The number of pods indicates the number of running instances of the application.

    • The version numbers link to individual running applications. You can use these separate staging areas to share different versions of your application before Promoting a change. Click the version numbers to view the details for that deployment.

      Expand the application version
  4. Click Pipelines to return to the pipelines view.

  5. At the Approve stage, click Input Required.

  6. Click Promote to promote version 1.0.2 of the application to Run.

    Your changes are now available on both Stage and Run. If you return to the Deployments tab, you can see the version for both Stage and Run are now 1.0.2.

    Updated applications
  7. You have now completed the task, Review and publish changes to your codebase, in the Test Iteration. Ensure that you change the state of the work item to Closed using the Plan tab.

  8. Also, close the feature User should be able to easily launch a sample Vert.x application using a smooth developer work-flow now that all its child tasks have been completed.

Well done! You have now created your first quickstart project in OpenShift.io, used the planner to track and execute your work, made changes to your project code, committed the changes to GitHub, and published the new version of your project.

6. Optimizing your memory usage

After creating your first quickstart project, you will now learn to optimize your memory usage in OpenShift.io using the following steps:

  1. Review the resource usage details for your project.

  2. Reduce your quickstart project’s memory usage and commit the changes.

  3. Compare the change in your OpenShift Online memory quota usage.

6.1. Reviewing detailed resource information in OpenShift Online

The memory allowances for each OpenShift pod is 512 MiB. As a result, each application consumes nearly 1 GiB of memory for the Stage and Run environments.

To check your resource information details in OpenShift:

  1. In a new browser tab, navigate to the OpenShift Online console at console.starter-us-east-2.openshift.com.

  1. From the list of projects at the right side of the page, click username-run to see the resources used for the Run environment or username-stage to see the resources for the Stage environment.

    Select the Run Project

    See Viewing projects in OpenShift Online for details about the listed projects

  1. Click Applications and then select Pods in the displayed submenu.

    Application Pods
  2. The Pods page lists your Hello World project pod. Click the project name to see the resource information for the project.

    Hello World Project Pod
  3. The Details page lists the Status of the pod and the container resource information:

    Resources

    Use this page to review the memory usage for your OpenShift.io project.

Save the details to compare after following the steps in Reducing project memory usage.

6.2. Reducing project memory usage

Optimizing memory usage is important when using the Free Tier of OpenShift Online because this tier provides limited memory. Also, each additional project in OpenShift.io requires an additional share of your OpenShift Online resources.

You can optimize your new quickstart to use less memory as follows:

  1. Return to your Workspace browser tab. If your closed the tab, click Create and then the Open to run your workspace.

  2. In the file explorer panel, double-click your project and navigate to src > main > fabric8.

    Fabric8 folder
  3. Right-click the fabric8 folder and select New  File.

    New File Menu
  4. Name the new file deployment.yml and click OK. The new file displays in the editor.

    Deployment.Yaml Vertx
  5. Copy the contents of the following file to your new YAML file: deployment.yaml.

    Spaces are meaningful in YAML files. Ensure that the correct spacing is copied into your YAML file from the link.
  6. Use Ctrl+s (or Cmd+s for macOS) to save your changes.

6.3. Committing and pushing changes to GitHub

After making the required changes to your code, commit and push the modifications to your project GitHub repository.

Before committing your changes, ensure that your project pipeline build has completed (that is, the build has been promoted and is at the Rollout to Run stage).

Procedure

  1. In the workspace browser tab, click Git from the menu options and select Commit from the displayed options.

    Git Commit Menu
  2. In the Commit to repository dialog box:

    1. Select all the changed and new files to commit.

    2. Add a commit message describing your changes.

    3. Select the Push committed changes to: check box.

    4. Click Commit.

      Commit changes

      When the commit succeeds, the following message displays:

      Pushed to origin

      You have now committed your code changes to GitHub.

6.4. View your detailed OpenShift Online quota usage

After committing your changes, view the resource details for your project again in OpenShift Online. Use the following instructions to see these details:

  1. Click Create and then Pipelines to view the new pipeline build. Committing and pushing your new YAML file triggers a new pipeline build for your OpenShift.io project. Allow several minutes for the pipeline build to roll out to Stage:

    Rollout To Stage
  2. In the OpenShift Online console browser tab, review the optimized memory usage for your Hello World project:

    Optimizing HW Memory Usage
  3. Promote the application to the Run environment.

    You can now compare these details to the details in Reviewing detailed resource information in OpenShift Online to see the resource usage improvements.

If you have completed these instructions for optimizing your resources but still do not have enough OpenShift Online resources, see Cleaning your OpenShift Online account to reset your OpenShift Online and OpenShift.io accounts.

7. Analyzing the application

7.1. Analyzing stack dependencies within Che

The Che workspace automatically analyzes dependencies for the code while you modify it. To see how this analyzer works:

  1. Return to the Che workspace browser tab.

  2. In the file explorer panel, double-click the pom.xml file.

    Pom.xml File
  3. In the file, go to line 43 and add a line break.

  4. Modify the file by adding the following XML code to the file after the line break:

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>1.1.0</version>
    </dependency>
  5. An error icon appears next to the lines of code you modified. Move the mouse pointer over the icon to view the error message.

    Error Icon

    The error indicates that the dependency analyzer has identified a high Common Vulnerabilities and Exposures (CVE) score associated with the current version, 1.1.0. It also recommends using an alternate, secure version, 1.2.1, instead to fix the issue.

  6. Update the version to 1.2.1. The error icon disappears when the version number is updated.

  7. Commit these changes to add this dependency to your stack.

    Commit changes to POM.xml

You have now learned how OpenShift.io analytics automatically analyzes dependencies in your code, identifies security vulnerabilities, and recommends fixes.

7.2. Analytics stack report

The OpenShift.io analytics stack report provides comprehensive information regarding your application stack and its component libraries that helps you make informed choices. It analyzes your stack and recommends alternate and additional components to improve your application.

The stack report is triggered during the Build Release stage of the build pipeline. To view the stack report for your quickstart application:

  1. Return to your space dashboard in the OpenShift.io browser tab. The Stack Report Recommendations panel in the dashboard shows a summary of the stack report.

    Stack Reports
  2. Click View complete stack report to view the detailed stack report. The detailed stack report provides information about Security Issues, Licenses, Insights, and Dependency Details for your stack.

    Detailed Stack Report
  3. Click each of the cards to view the following detailed information:

    • Security Issues lists dependencies with known security vulnerabilities and the relevant Common Vulnerabilities and Exposures (CVE) information.

    • Licenses lists dependencies with license conflicts and unknown licenses and suggests alternate dependencies to resolve the conflicts.

    • Insights identifies dependencies that do not work well with the stack and recommends alternate dependencies for them. In addition, it recommends companion dependencies to enhance your stack. For this example, the stack report recommends companion dependencies that augment your development stack.

    • Dependency Details lists all the dependencies in your stack, flags security, usage, and license issues for them, and suggests replacements for dependencies with issues.

      For further information about the stack report, see interpreting your stack report.

  4. In the Companion Dependency Details section, click Create work item to add an auto-populated work item to the planner.

    You have now learned how the stack report provides detailed information about your stack and its dependencies, and how it suggests alternate and additional dependencies you can add to your stack to improve your application and make it more secure.

  5. You have now completed the task, Use analytics to identify and resolve security and license issues in the application, in the Test Iteration. Navigate to the Plan tab and ensure that you change the state of the work item and its parent feature to Closed.

  6. Also, close the Test Iteration using the options (kabob) icon next to the iteration as you have now completed all the work items associated with your active iteration.

8. Using advanced Che features

8.1. Using the code assistant

  1. Return to the Che workspace browser tab. If you closed your earlier workspace tab, use the following instructions:

    1. In OpenShift.io, click the Create tab. The default Codebases view lists your project workspace:

      Existing Workspace
    2. Click Open to view the existing workspace in a new tab. If the new tab does not load, ensure your browser is not blocking pop-up windows.

  2. When the workspace loads, navigate to the following file: src > main > Java > io.openshift.booster > HttpApplication.java.

    Project Directory
  3. In the HttpApplication.java file, add a line break at line 9 after the import section.

  4. Type the following in the new line:

    import io.
  5. Press Ctrl+Space to view the options for this line and select any one of the options.

    Code Autocomplete Options
  6. Move the mouse pointer over the error icon next to the line number to view the error, which warns you that import is not used.

    Code Error
  7. Delete the added line to clear the error.

You have now learned how the Che workspace uses Code Assistant to make recommendations and identify errors.

Click Assistant at the top of the page to view additional IDE features.

Assistant Menu

8.2. Using the terminal tab

Your Che workspace displays a terminal tab at the bottom of the screen. This terminal is for your private Linux container (i.e. your workspace). You can use Unix commands in the terminal tab as follows:

  1. In your Che workspace, if your application is not running, Click the run option (tri run). The Successfully deployed verticle message appears in the terminal tab when the run process completes:

    Deployed verticle
  2. At the bottom of your workspace, click Terminal to see the terminal tab:

    Terminal Tab
  3. Enter the following commands in the terminal tab:

    cat /etc/os-release
    top

    The terminal tab displays the following information about your Linux container:

    Terminal Top Command
  4. Experiment further with the following commands in your terminal tab:

    1. Press Ctrl+c to stop the top command.

    2. Enter the following:

      curl localhost:8080
    3. Enter the following:

      curl localhost:8080/api/greeting
  5. After experimenting with the terminal commands, use the stop icon at the top of the page to stop the application.

    Stop Bar

8.3. Debugging using your Che workspace

After creating your OpenShift.io project, you can debug your application code in the Che workspace. This exercise is optional but recommended as an introduction to debugging code in OpenShift.io.

Procedure

  1. Return to your project Che workspace browser tab.

  2. If the HttpApplication.java file is not already loaded, double-click it in your file explorer view (src > main > Java > io.openshift.booster) to view the contents.

    Project Directory
  3. In your HttpApplication.java file, add a line break between lines 21 and 22, then type router. and press Ctrl+Space to see the context-aware assistance.

  4. Scroll down in the displayed list and select the get():Route method. This is the Vert.x Router get method and maps to the HTTP verb GET.

    Project Directory
  5. Edit the new line to include the goodbye endpoint. The following is an example of the completed new line:

    router.get("/api/goodbye").handler(this::goodbye);
  6. Add a new line after line 53 and then add the following method for the goodbye endpoint:

    private void goodbye(RoutingContext rc) {
      String name = rc.request().getParam("name");
      if (name == null) {
        name = "World";
      }
      JsonObject response = new JsonObject()
        .put("content", "Goodbye " + name);
    
        rc.response()
          .putHeader(CONTENT_TYPE, "application/json; charset=utf-8")
            .end(response.encodePrettily());
    }
  7. Use Ctrl+s (or Cmd+s for macOS) to save your changes.

  8. If your application is already deployed, skip this step. To deploy the application, click the run option (tri run). The following message displays when the run process completes:

    INFO: Succeeded in deploying verticle
  9. In the Terminal tab at the bottom of the page, test the new endpoint by typing the following command:

    curl localhost:8080/api/goodbye

    The following result appears if the changes were successful:

    Terminal Test Result
  10. In the EXEC bar on the top of the workspace page, click the stop button (a blue square icon) to stop the current run process.

    EXEC Bar

    When stopped, the square icon becomes a circular arrow (run stopped).

8.4. Setting up the debugger

To debug your project code, set up the Che workspace Debugger feature:

  1. Click the debug option from the Debug drop-down.

    Debugger Button
  2. In the new debug tab in the Processes pane at the bottom of the screen, look for the following lines when the debugging starts:

    [INFO] The application will wait for a debugger to attach on debugPort 5005
    
    [INFO] Launching Vert.x Application
    
    [INFO] Listening for transport dt_socket at address: 5005
  3. When the debug process completes, click Run from the menu at the top of the page and select Edit Debug Configurations.

    Edit Debug Configuration
  4. In the Debug Configurations dialog box:

    1. In the left pane, click + for the JAVA item in the dialog box to add a Remote Java port.

    2. In the right pane, change the Port value to 5005.

      Debugger Configuration Dialog
    3. Click Save and then Close.

  5. To create a new breakpoint for your method:

    1. In the HttpApplication.java file, go to the following line of code at line 43:

          if (name == null) {
    2. Click the line number for this line of code:

      Create Breakpoint
  6. Click the debug icon at the bottom of the workspace to confirm the addition of the breakpoint:

    Debug Option

    The Breakpoints pane at the lower left of the Debug section displays the added breakpoint at the appropriate line:

    Breakpoint View

The Debugger is now set up for your project.

8.5. Running the debug command

Now that you have set up the Debugger for your project, you can use the debug command as follows:

  1. In your workspace tab, navigate to Run  Debug  Remote Java.

    Debug Remote Java
  2. A success message displays when the remote debugger connects.

    Successful Connection to Remote Debugger
    If your remote debugger connection fails, restart your browser and try again.
  3. Navigate to Run  Terminal to view the terminal tab.

    Run>Terminal
  4. Run the following command to start debugging:

    curl localhost:8080/api/goodbye
  5. Click the Debug option at the bottom of the workspace to review variables in the Variables pane.

You can also use the Resume, Step Into, Step Over, and Step Out options during the debugging process. When you have finished exploring the debugging features, close the workspace tab and return to the OpenShift.io tab.

9. Cleaning your OpenShift Online account

OpenShift.io generates artifacts within five projects (Kubernetes namespaces) in OpenShift Online. See viewing projects in OpenShift Online for details.

This section describes how to reset your OpenShift Online account, which can serve two purposes:

Freeing resources used by applications

After you create a quickstart application, the limited resources available in the OpenShift Online Free Tier are nearly exhausted. You can reset your OpenShift.io and Openshift Online account resources to start afresh.

General troubleshooting

If your OpenShift.io environment is in a state where you find it difficult or impossible to move forward, you can reset your environment to start afresh.

Procedure

  1. On your OpenShift.io home page, click your name in the top right corner of the screen.

    1. In the drop-down options, click Profile.

    2. On the profile page, click Edit Profile.

  2. In the edit profile page, click Reset Environment.

    Edit profile
  3. A warning page appears with a summary of your OpenShift.io account. Click Erase my OpenShift.io Environment.

    Erase My OpenShift.io environment
  4. In the dialog box, add your OpenShift.io user name and click I understand my actions - erase my environment.

    Confirm
  5. After the environment is successfully erased, the success page displays:

    Success

After completing these steps, your OpenShift.io and OpenShift Online account resources are reset and ready for use with a new project.

10. Importing an existing project from GitHub

This section contains instructions for adding an existing project to OpenShift.io instead of creating a new project using quickstarts.

10.1. Forking an example repository

In addition to creating projects based on quickstarts, you can also add projects by using the Import an existing codebase feature.

Prerequisites

Reset your OpenShift.io environment by following instructions in Cleaning your OpenShift Online account.

Procedure

As an example for this tutorial, use our sample repositories in GitHub. Fork one of the following (the examples in this tutorial are for the vertx-eventbus repository):

The OpenShift Online Free Tier provides two pods, and each project requires one pod.

While you can import all three projects into OpenShift.io simultaneously, it can result in a 12-15 minute delay. We recommend trying to import the projects one at a time.

10.2. Creating a new space

In OpenShift.io, the first step for any new project is to create a new space.

You can then add collaborators, track your work using work items and iterations, and create or import codebases within the space. Each space must have a unique name.

Procedure

Create a new space as follows:

  1. In the OpenShift.io home page, click Create a space.

    Create your first space

    If your account has an existing space, click + to create an additional space instead:

    Second space
  2. If this is the first space you are creating with your OpenShift.io account, a message about connecting to GitHub appears. To connect your GitHub account to OpenShift.io:

    1. Click Connect to GitHub.

      GitHub Disconnected
    2. If your browser session is already logged in to a GitHub account, OpenShift.io uses it for the GitHub connection step. If not, you are prompted to add your GitHub credentials to connect the account to OpenShift.io.

      Connect to GitHub
  3. When the accounts are connected, the OpenShift.io home page view displays. Click Create a space again.

You have now created your first space.

10.3. Importing your project

After creating a space, the Create an Application wizard to create applications displays. If you closed the wizard earlier, click Create an Application in your space dashboard to see the Create an Application wizard again.

  1. In the Name your application field, type a unique name for your new project. Ensure that the application name adheres to the listed Naming Requirements.

    Naming Requirements
  2. Select the Import an existing codebase radio button and then click Continue to import an existing project codebase into OpenShift.io.

    Importing Project
  3. In the Authorize Git Provider step:

    1. Click the Location drop-down to select the location of your codebase. The default (and recommended for this tutorial) option is your personal GitHub account name.

    2. In the Repository field, click Select Repository to select the repository from which you want to import the codebase. For this tutorial, select the forked vertx-eventbus repository option.

    3. Click the blue arrow at the bottom of the screen to continue.

      Personal organization
  4. In the Select pipeline step, select an option for your pipeline build, then click the blue arrow to continue to the next step. We recommend using the first option for most use cases because it provides an end to end pipeline that moves your application through all the stages of application development, that is, build your source code, test your changes, rollout to stage, review, approve, and promote it to run in production.

    Select a pipeline
  5. The Confirm Application Summary & Import step displays a summary for your imported code. Review the information and click Import Application to confirm.

  6. The progress screen displays when your code is imported. Click View New Application to continue when all the steps have a green check mark next to them.

    Final step adding codebase

You have now imported the code from your existing repository to OpenShift.io.

10.4. Creating a Che workspace

Create a new Che workspace for your project:

  1. Click Create from the top of the OpenShift.io page. The default view for this tab is Codebases

  2. In the WORKSPACES column, click Create workspace for your project.

    Create Workspace

    If you see a message about the workspaces loading (see screen capture), it indicates that your Che instance is idle. Allow several minutes for the loading process to finish.

    Loading Workspaces
  3. When your workspace is ready, it automatically loads in a new tab. Alternatively, click Open to view your new Che workspace in a new browser tab. This workspace loads the codebase for the listed project.

    New Workspace
    If a new tab does not appear, see Enable popups for troubleshooting information.
  4. As the workspace loads, the Workspace Status window at the bottom of the Che workspace tab displays the progress:

    Workspace loading

    When loaded and ready to use, the new Che workspace tab displays the following confirmation message:

Workspace Running success message

10.5. Running your project in the Che workspace

After your Che workspace loads, you can see your project code listed in the file explorer panel, in the upper-left side of the screen. You must now ensure the following prerequisites are met before you start using the workspace to edit the codebase:

  1. Click the run option from the Run button (tri run). Maven then downloads the required dependencies, compiles the application, and starts the verticle (Vert.x uses this name for deployed code). For Vert.x projects, this also sets up the server and hot deploy options. The hot deploy option automatically updates the application when you make a change.

    If the Run command macro is not defined, it displays the Create run command option instead of Run:

    Create run command

    See Create run command macro for instructions on setting up a run command.

  2. A run terminal appears at the bottom pane of the Che workspace. When the mvn build command finishes executing, the run view displays the Succeeded in Deploying verticle message:

    Successfully deployed verticle
  3. Click the blue preview URL at the top of the run view to see your application running in Che.

    Run project link
  1. Enter a name in the Name field and click Invoke to test the application.

    Testing the application

This is the same version of the application that the pipeline deployed to Stage and you subsequently promoted to Run. The URL for this build of the application is different from the URLs used by OpenShift Online for Stage and Run. This is your private sandbox hosted within Che. You can still share this URL with others and interactively debug the application while they run it in their browser.

10.6. Changing the project code

The example project code includes a new route for eventbus and its supporting method. The project sets up eventbus to only allow outbound communications for the my-feed channel. Messages arriving in the my-feed channel are pushed to the browser using the SockJS bridge. This project includes a vertx-eventbus.js file along with the index.html file and also includes tweaks to the index.html file.

Procedure

You can change the code of your project and preview the results as follows:

  1. In the file directory view, double-click the following directories to expand them: src > main > Java > io.openshift.booster.

    Folder View
  2. In the HttpApplication.java file of your project, find the following line:

      protected static final String template = "Aloha, %s!";
  3. Add exclamation marks to the string. The line should now be:

      protected static final String template = "Aloha !!!, %s!";
  4. Save the changes (Ctrl+s or Cmd+s for macOS).

  5. Click the run option from the Run button (tri run). This runs the application and also provides the hot deploy feature. The following message appears when the run process completes:

    [INFO] INFO: Succeeded in deploying verticle
  6. Click the blue preview URL at the top of the run view to view your project.

    Run project link
  7. Type a name in the text box and click Invoke to test the application.

    Test Application

You have now changed your application code and tested the change.

10.7. Committing and pushing changes to GitHub

After making the required changes to your code, commit and push the modifications to your project GitHub repository.

Before committing your changes, ensure that your project pipeline build has completed (that is, the build has been promoted and is at the Rollout to Run stage).

Procedure

  1. In the workspace browser tab, click Git from the menu options and select Commit from the displayed options.

    Git Commit Menu
  2. In the Commit to repository dialog box:

    1. Select all the changed and new files to commit.

    2. Add a commit message describing your changes.

    3. Select the Push committed changes to: check box.

    4. Click Commit.

      Commit changes

      When the commit succeeds, the following message displays:

      Pushed to origin

      You have now committed your code changes to GitHub.

10.8. Reviewing and publishing your changes

Now that we have committed and pushed our changes to GitHub, a pipeline build is automatically triggered in OpenShift.io.

Procedure

To view the build:

  1. Return to the OpenShift.io browser tab.

  2. Click Create and then Pipelines to view the build pipelines. After several moments, the build pipeline stops at the Approve stage. Do not approve the build yet.

    Build #2 Runs
  3. In the Create tab, click Deployments to see the following information:

    Versions of the Application
    • Different versions of your application are now deployed to Stage and Run. Version 1.0.2 of the application, which includes your committed change to the code, is deployed to Stage because you have not yet promoted it to Run. The older version, 1.0.1, is deployed to Run because you approved it the last time the pipeline build executed.

    • The green check marks indicate that both builds are operational.

    • The 1 pod indicates that each of the application builds is scaled to one pod in OpenShift Online. The number of pods indicates the number of running instances of the application.

    • The version numbers link to individual running applications. You can use these separate staging areas to share different versions of your application before Promoting a change. Click the version numbers to view the details for that deployment.

      Expand the application version
  4. Click Pipelines to return to the pipelines view.

  5. At the Approve stage, click Input Required.

  6. Click Promote to promote version 1.0.2 of the application to Run.

    Your changes are now available on both Stage and Run. If you return to the Deployments tab, you can see the version for both Stage and Run are now 1.0.2.

    Updated applications

Well done! You have now imported an existing project into OpenShift.io, used a work item to track your work, made changes to your project code, committed the changes to GitHub, and published the new version of your project.

11. Next steps

If you followed the instructions in this document, you have now learned about OpenShift.io and its features. You are now able to:

You can now try using what you have learned about OpenShift.io with your own projects. See the OpenShift.io User Guide for comprehensive information about OpenShift.io and its features. If you have any questions or suggestions for improvement with OpenShift.io or this document, let us know using one of the methods listed in Getting support.

12. Troubleshooting

12.1. Login issues

When logging in to OpenShift.io, an error about an account already existing with your email address can display.

Login error

If you encounter this issue, the workaround is to log in using your username instead of your email address.

12.2. Enable popups

If a new tab does not appear, your browser is blocking the pop-up window that displays the new workspace. To resolve this, allow pop-up windows from https://openshift.io. In Chromium-based browsers, do the following:

  1. Click the blocked pop-up window icon in the URL field of your browser.

  2. Select the Always allow pop-ups from https://openshift.io option, and click Done.

    Blocked Pop Up
  3. Now, click Open again to load the workspace.

12.3. Application not available error

When you click Rollout to Stage or Rollout to Run, a new browser tab displays your application.

If the new tab displays a Application is not available error message (see screen capture), the application is not yet ready.

Application Does Not Exist Error

To fix this issue, wait several minutes and then refresh the page. The application then loads as expected.

12.4. Pipeline build failure

Occasionally, a pipeline build can fail due to a network connectivity issue with Maven. This displays a red line and cross in the Pipeline Build information as seen in the following screen capture:

Pipeline build failure

If you click View Log for the failed build, the build log includes error information such as the following:

[INFO] --- fabric8-maven-plugin:3.5.38:resource (fmp) @ test4 ---
Mar 22, 2018 2:54:10 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo1.maven.org:443: Connection reset
Mar 22, 2018 2:54:10 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://repo1.maven.org:443
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50.518 s
[INFO] Finished at: 2018-03-22T14:54:12+00:00
[INFO] Final Memory: 22M/29M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:3.5.38:resource (fmp) on project test4: Execution fmp of goal io.fabric8:fabric8-maven-plugin:3.5.38:resource failed: Plugin io.fabric8:fabric8-maven-plugin:3.5.38 or one of its dependencies could not be resolved: Could not transfer artifact io.fabric8:kubernetes-model:jar:2.0.4 from/to central (https://repo1.maven.org/maven2): GET request of: io/fabric8/kubernetes-model/2.0.4/kubernetes-model-2.0.4.jar from central failed: Connection reset -> [Help 1]

To resolve this issue, restart the pipeline build as follows:

  1. Click the additional options icon (kabob white) at the right side of the build.

  2. From the displayed options, select Start Pipeline.

    Manually start pipeline

The pipeline restarts and successfully completes.

12.5. Create run command macro

If your Che workspace does not already include a run command macro, clicking the Run icon displays a Create run command option:

Create run command

To create the run command:

  1. Click Create run command.

  2. Add the following information for the new command:

    1. In the Name field, type run to name the new command shortcut.

    2. In the command box, type the following command:

      scl enable rh-maven33 'mvn compile vertx:run -f ${current.project.path}'
    3. Toggle the Applicable option to YES to enable this macro for your project.

      Add details create run
  3. Click RUN on the right side of the screen to run your new macro.

    Run macros
  4. In the Terminal view at the bottom of the workspace, the command runs. When successfully complete, the command displays the following message:

    [INFO] INFO: Succeeded in deploying verticle
  5. Click SAVE to save your new macro.

    Save macro
  6. In any order, click the filesystem icon and the X icon for the run tab to close the macros options:

    Filesystem icon

You have now set up your run macro. If you click the run option at the top of your screen, it displays the new macro (tri run).

12.6. OpenShift.io Frozen on Chrome

When using OpenShift.io with Chrome, if the browser window freezes at any point, press Shift+Ctrl+r for a hard refresh. This reloads OpenShift.io and resolves the problem.

12.7. Clearing Failed Builds

If you view all your spaces and delete them manually, often this does not clear the build information in the OpenShift.io dashboard view. The failed builds appear as follows:

Clearing failed builds

This is a known issue because when a space is deleted, these builds must also be cleared from the dashboard.

To clear the dashboard:

  1. Click your name at the top right of the dashboard and then select the Profile option from the drop down menu.

    Profile menu
  2. In the profile page, click Edit Profile.

    Edit profile button
  3. In the edit profile page, click Reset Environment.

    Reset environment

This resets your OpenShift.io environment and clears the dashboard.