Bookmark this page

Guided Exercise: Navigating the Red Hat OpenShift Web Console

Navigate and explore the features of the Red Hat OpenShift web console.

Outcomes

  • Explore a sample application by using the Developer perspective in the web console.

  • View the deployment, pods, build configuration, and build logs for the application.

  • Run commands in a container shell.

  • Switch to the Administrator perspective and examine the resources that are created for the sample application.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command validates that the cluster is available and deploys an example application in a new project.

[student@workstation ~]$ lab start deploy-introduction

Instructions

  1. Open the web console and explore the Developer perspective.

    1. Open a web browser and navigate to https://console-openshift-console.apps.ocp4.example.com. Click htpasswd_provider and log in as the developer user with the developer password.

      Note

      Click Skip Tour to dismiss the option to view a short tour on the first visit.

    2. Ensure that the deploy-introduction project is selected by using the project selection menu at the top of the page.

    3. Click Topology to view the project.

      Note

      Depending on the display resolution, you might need to first click the navigation toggle button at the top left. The button displays as three horizontal bars.

    4. Click the icon on the Topology panel to view details of the node-server deployment.

    5. Select the Actions list to view the available controls for the node-server deployment.

    6. Click the node-server deployment to view the details page for the deployment.

    7. Increase the number of replicas to three by using the pod indicator component on the Deployment details page.

  2. View the pod details for the node-server application.

    1. Click the Pods tab to view the pods created for the deployment. Observe that three replicas are listed. Click the name of one of the pods to view the details for that pod.

    2. Click the Logs tab to view the logs for the running pod. Your pod's name will differ from the one shown here.

    3. Click the Terminal tab to open a terminal session in the running pod container. Execute pwd and ls commands to show the filesystem within the container.

      sh-4.2$ pwd
      /opt/app-root/src
      sh-4.2$ ls
      server.js
  3. View the build details for the node-server application.

    1. In the navigation panel, navigate to Builds to view the list of build configurations in the project.

    2. Click the name of the node-server build configuration to view its details.

    3. Observe that the build configuration uses an included Dockerfile by using the nodejs-16 image from the classroom registry. Each instance of the build results in a new image called node-server. This is indicated by the Output to field near the bottom of the page.

    4. Click the Builds tab to view the list of builds for this build configuration.

    5. Click the name of one of the builds to view details for that instance.

    6. Click the Logs tab to view the output of the build.

  4. Switch into the Administrator perspective and inspect the deployment.

    1. In the navigation panel, click Developer and then click Administrator to change to the Administrator perspective. The web console changes to the new perspective and exposes additional information through the sidebar.

    2. Navigate to HomeProjects to view the deploy-introduction project in the project list.

    3. Click the deploy-introduction project to open the Project Details page. This page includes a general overview of the project, such as the project status and resource utilization details.

  5. View the node-server resources.

    1. In the navigation panel, navigate to WorkloadsPods to view the node-server pods. Notice that the image build was done in a pod now marked as completed.

    2. Navigate to WorkloadsDeployments to view the list of deployments in the project. Click node-server to view the deployment details.

    3. Navigate to NetworkingServices and click node-server to view the details of the node-server service. Observe that 4000 is the TCP port for the service resource.

    4. Navigate to NetworkingRoutes and click node-server to view the details of the node-server route. Observe that the route points to the service's port 4000 as listed by the Target port field. The route exposes the application on TCP port 80, which is the default HTTP port.

    5. Navigate to the application by clicking the link in the Location field. A new tab opens containing the Hello World response from the Node.js server.

Finish

On the workstation machine, use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish deploy-introduction

Revision: do288-4.12-0d49506