Chapter 5. Containers Providers

A containers provider is a service that manages container resources, and can be added to the Red Hat CloudForms appliance.

The ComputeContainers area has options to add and manage containers providers. This includes the Providers page, which displays all discovered or added containers providers.

Red Hat CloudForms supports adding OpenShift Enterprise as a containers provider.

5.1. Obtaining an OpenShift Enterprise Management Token

When deploying OpenShift Enterprise using openshift-ansible-3.0.20 (or later versions), the service account and roles required by Red Hat CloudForms are installed by default.

To obtain the token to use for the provider definition, follow the instructions below for your OpenShift Enterprise version.

5.1.1. Obtaining a Management Token in OpenShift Enterprise 3.2

Open a terminal and run the following command:

# oc sa get-token -n management-infra management-admin
eyJhbGciOiJSUzI1NiI...

This command provides the token needed to add an OpenShift Enterprise provider.

5.1.2. Obtaining a Management Token in OpenShift Enterprise 3.1

Open a terminal and perform the following:

  1. To obtain the management service account token name, run the following command::

    # oc describe sa -n management-infra management-admin
    ...
    Tokens:  management-admin-token-0f3fh
             management-admin-token-q7a87
  2. Select one of the tokens and run the following command to retrieve the full token output:

    # oc describe secret -n management-infra management-admin-token-0f3fh
    ...
    Data
    ====
    token:  eyJhbGciOiJSUzI1NiI...

    Replace management-admin-token-0f3fh with the name of your token.

This command provides the token needed to add an OpenShift Enterprise provider.

5.2. Configuring OpenShift Metrics

To collect the node, pod, and container metrics, you must run the OpenShift Metrics services inside your cluster. For more information, see Enabling Cluster Metrics in OpenShift Enterprise Installation and Configuration.

Note

For metrics collection to work properly, you also need to configure Red Hat CloudForms to allow for all three Capacity & Utilization server roles, which are available under ConfigureConfigurationServerServer Control. For more information on capacity and utilization collection, see Assigning the Capacity and Utilization Server Roles in the Deployment Planning Guide.

5.3. Adding an OpenShift Enterprise Provider

After initial installation and creation of a Red Hat CloudForms environment, add an OpenShift Enterprise provider using the token obtained in Section 5.1, “Obtaining an OpenShift Enterprise Management Token” and following the procedure below.

  1. Navigate to ComputeContainersProviders.
  2. Click Configuration (Configuration), then click Add a New Containers Provider (Add a New Containers Provider).
  3. Enter a Name for the provider.
  4. From the Type list, select OpenShift Enterprise.
  5. Enter the appropriate Zone for the provider. By default, the zone is set to default.
  6. Enter the Hostname or IP address of the provider.

    Important

    The Hostname must use a unique fully qualified domain name.

  7. Enter the Port of the provider. The default port is 8443.
  8. Under Credentials, enter the token in the Token field. This is the token obtained earlier in Section 5.1, “Obtaining an OpenShift Enterprise Management Token”.

    • Click Validate to confirm that the Red Hat CloudForms can connect to the OpenShift Enterprise provider using the provided token.
  9. Click Add.

5.4. Tagging Containers Providers

Apply tags to all containers providers to categorize them together at the same time.

  1. Navigate to ComputeContainersProviders.
  2. Select the checkboxes for the containers providers to tag.
  3. Click Policy (Policy), and then Edit Tags (Edit Tags).
  4. Select a tag to assign from the drop-down menu.

    2219

  5. Select a value to assign.
  6. Click Save.

5.5. Removing Containers Providers

You may want to remove a containers provider from the VMDB if the provider is no longer in use.

  1. Navigate to ComputeContainersProviders.
  2. Select the checkboxes for the containers providers to remove.
  3. Click Configuration (Configuration), and then Remove Containers Providers from the VMDB (Remove Containers Providers from the VMDB).
  4. Click OK.

5.6. Editing a Containers Provider

Edit information about a provider such as the name, hostname, IP address or port, and credentials.

  1. Navigate to ComputeContainersProviders.
  2. Click the containers provider to edit.
  3. Click Configuration (Configuration), and then Edit Selected Containers Provider (Edit Selected Containers Provider).
  4. Edit the Basic Information. This varies depending on the Type of provider.

    Note

    The Type value is unchangeable.

    To use a different containers provider, create a new one.

  5. Edit the Credentials by typing in a new Token.
  6. Click Validate and wait for notification of successful validation.
  7. Click Save.

5.7. Viewing a Containers Provider’s Timeline

View the timeline of events for instances registered to a containers provider.

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the timeline.
  3. Click Monitoring (Monitoring), and then Timelines (Timelines).
  4. From Options, customize the period of time to display and the types of events to see.

    • Use Show to select regular Management Events or Policy Events.
    • Use the Interval dropdown to select hourly or daily data points.
    • Use Date to type the date for the timeline to display.
    • If you select to view a daily timeline, use Show to set how many days back to go. The maximum history is 31 days.
    • From the Level dropdown, select a Summary event, or a Detail list of events.
    • The three Event Groups dropdowns allow you to select different groups of events to display. Each has its own color.

To see more detail on an item in the timeline, click on it. A balloon appears with a link to the resource.

5.8. Insight and Control

Red Hat CloudForms can connect to OpenShift Enterprise containers providers and manage them similarly to the way that infrastructure and cloud providers are managed. This allows you to gain control over different aspects of your environment and answer questions, such as:

  • How many containers exist in my environment?
  • Does a specific node have enough resources?
  • How many distinct images are used?
  • Which image registries are used?

When Red Hat CloudForms connects to a containers environment, it collects information on different areas of the environment:

  • Entities such as pods, nodes, or services.
  • Basic relationships between the entities, for example: Which services are serving which pods?
  • Advanced insight into relationships, for example: Which two different containers are using the same image?
  • Additional information, such as events, projects, routes, and metrics.

You can manage policies for containers entities by adding tags. All containers entities except volumes can be tagged.

5.8.1. Cross-Providers Insight

Cross-providers insight is a feature that connects all layers of infrastructure, cloud, and containers known to Red Hat CloudForms and collects data for analysis.

It supports cross-linking all of the layers available in the following environments:

  • OpenStack
  • Red Hat Enterprise Virtualization
  • VMware vCenter
  • Amazon EC2
  • Google Cloud Engine

The collected information includes all the data available in other (infrastructure or cloud) providers.

Note

For Amazon EC2 (AWS) and Google Cloud Engine (GCE) support, OpenShift must be installed using the relevant cloud provider. For more information, see the OpenShift Enterprise Installation and Configuration guide.

5.8.2. Working with the Containers Overview Page

The information on all containers providers and entities known to Red Hat CloudForms is summarized on the Containers Overview page. The Overview page provides links to other summary pages which contain further information on the containers providers and entities.

Containers Overview

Working with the Containers Overview Page

  1. Navigate to ComputeContainersOverview.
  2. Click the desired containers entity, or provider, if applicable, for viewing the summary with further information.

5.8.3. Viewing a Containers Provider Summary

A Containers Provider summary page allows you to view information on different aspects of a containers provider, for example:

  • Status of the provider and its components.
  • Relationships between different entities of the containers provider. These relationships are summarized in the Relationships box on the right-hand side of the summary page.

    Entity Relationships

  • Additional information on aggregated capacity of all CPU cores of all nodes, and aggregated capacity of all memory of all nodes.

Viewing a Containers Provider Summary

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the provider summary.

5.8.4. Viewing a Container Nodes Summary

A Container Node summary page allows you to view information on different aspects of a container node, for example:

  • How many entities are on a node?
  • What is the capacity and utilization?
  • What are the versions of the underlying operating system and software?

Viewing a Container Nodes Summary

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the provider summary.
  3. In the Relationships box on the right-hand side of the summary page, click Nodes.
  4. Click the desired container node for viewing.
  5. Alternatively, you can access the desired container node from ComputeContainersContainer Nodes.

5.8.4.1. Viewing a Container Nodes Timeline

You can view the timeline of events for a node. To access the timeline from a container nodes summary page, click Monitoring (Monitoring), and then Timelines (Timelines).

5.8.5. Viewing a Containers Summary

A Containers summary page allows you to view information on different aspects of a container, for example:

  • What are the relationships of the container to a related node, pod, or image?
  • Which node is the container running on?
  • Which part of a pod is the container?
  • What is the container ID?
  • What is the name of the container image? What are other properties of the container image (for example, tag)?

Viewing a Containers Summary

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the provider summary.
  3. In the Relationships box on the right-hand side of the summary page, click Containers.
  4. Click the desired container for viewing.
  5. Alternatively, you can access the desired container from ComputeContainersContainers.

5.8.6. Viewing a Container Images Summary

A Container Images summary page allows you to view information on different aspects of a container image, for example:

  • Which containers are using the image?
  • Which image registry is the image coming from?

Viewing a Container Images Summary

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the provider summary.
  3. In the Relationships box on the right-hand side of the summary page, click Images.
  4. Click the desired image for viewing.
  5. Alternatively, you can access the desired image from ComputeContainersContainer Images.

5.8.7. Viewing an Image Registries Summary

An Image Registries summary page allows you to view information on different aspects of an image registry, for example:

  • How many images are coming from the registry? What are the images?
  • Which containers are using images from the registry?
  • What is the host and port of the registry?

Viewing an Image Registries Summary

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the provider summary.
  3. In the Relationships box on the right-hand side of the summary page, click Image Registries.
  4. Click the desired image registry for viewing.
  5. Alternatively, you can access the desired image registry from ComputeContainersImage Registries.

5.8.8. Viewing a Pods Summary

A Pods summary page allows you to view information on different aspects of a pod, for example:

  • Which containers are part of the pod?
  • Which services reference the pod?
  • Which node does the pod run on?
  • Is the pod controlled by a replicator?
  • What is the IP address of the pod?

Viewing a Pods Summary

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the provider summary.
  3. In the Relationships box on the right-hand side of the summary page, click Pods.
  4. Click the desired pod for viewing.
  5. Alternatively, you can access the desired pod from ComputeContainersPods.

5.8.9. Viewing a Replicators Summary

A Replicators summary page allows you to view information on different aspects of a replicator, for example:

  • What is the number of requested pods?
  • What is the number of current pods?
  • What are the labels and selector for the replicator?

Viewing a Replicators Summary

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the provider summary.
  3. In the Relationships box on the right-hand side of the summary page, click Replicators.
  4. Click the desired replicator for viewing.
  5. Alternatively, you can access the desired replicator from ComputeContainersReplicators.

5.8.10. Viewing a Container Services Summary

A Container Services summary page allows you to view information on different aspects of a container service, for example:

  • What are the pods that the container service provides traffic to?
  • What are the port configurations for the container service?
  • What are the labels and selector for the container service?

Viewing a Container Services Summary

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the provider summary.
  3. In the Relationships box on the right-hand side of the summary page, click Services.
  4. Click the desired service for viewing.
  5. Alternatively, you can access the desired service from ComputeContainersContainer Services.

5.8.10.1. Viewing a Volumes Summary

A Volumes summary page allows you to view information on the persistent volumes of a container provider, for example:

  • Which pods is the volume connected to?
  • What are the volume’s connection parameters?
  • What is the volume’s storage capacity?
  • What are the volume’s iSCSI target details (if applicable)?

Viewing a Volumes Summary

  1. Navigate to ComputeContainersVolumes.
  2. Click the desired containers provider for viewing the provider summary.
  3. In the Relationships box on the right-hand side of the summary page, click Volumes.
  4. Click the desired container for viewing.
  5. Alternatively, you can access the desired volume from ContainersVolumes.

5.8.10.2. Viewing a Container Builds Summary

A Container Builds summary page allows you to view different aspects of a container build, for example:

  • What build configuration is the container build based on?
  • What build instances have been created?
  • Which phase in the build process has the instance completed?
  • Which pod does a build instance reside in?

Viewing a Container Builds Summary

  1. Navigate to ComputeContainersContainer Builds.
  2. Click the desired containers provider for viewing the provider summary.
  3. In the Relationships box on the right-hand side of the summary page, click Container Builds.
  4. Click the desired container for viewing.
  5. Alternatively, you can access the desired container build from ContainersContainer Builds.

5.8.10.3. Using the Topology Widget

The Topology widget is an interactive topology graph, showing the status and relationships between the different entities of the containers providers that Red Hat CloudForms has access to.

  • The topology graph includes pods, containers, services, nodes, virtual machines, hosts, routes, and replicators within the overall containers provider environment.
  • Each entity in the graph displays a color indication of its status.
  • Hovering over any individual graph element will display a summary of details for the individual element.
  • Double-click the entities in the graph to navigate to their summary pages.
  • It is possible to drag elements to reposition the graph.
  • Click the legend at the top of the graph to show or hide entities.
  • Click Display Names on the right-hand side of the page to show or hide entity names.

Using the Topology Widget

  1. Navigate to ComputeContainersProviders.
  2. Click the desired containers provider for viewing the provider summary.
  3. On the provider summary page, click Topology in the Overview box on the right-hand side of the page.

5.8.11. Running a SmartState Analysis

Perform a SmartState Analysis of a container image to inspect the packages included in an image.

Running a SmartState Analysis

  1. Navigate to ComputeContainersContainer Images.
  2. Check the container image to analyze. You can check multiple images.
  3. Click Configuration (Configuration), and then Perform SmartState Analysis (Perform SmartState Analysis).

The container image is scanned. The process will copy over any required files for the image. After reloading the image page, all new or updated packages are listed.

To monitor the status of container image SmartState Analysis tasks, navigate to SettingsTasks. The status of each task is displayed including time started, time ended, what part of the task is currently running, and any errors encountered.