-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat CloudForms
Chapter 6. Adding OpenShift Container Platform as a Container Provider
At this point, you should now be ready to add your OpenShift cluster to Red Hat CloudForms as a container provider. To do so, prepare the token you retrieved in Chapter 4, Retrieving the OpenShift Container Platform Management Token and follow the procedure below:
- Navigate to Compute → Containers → Providers.
-
Click
(Configuration), then click
(Add a New Containers Provider).
- Enter a Name for the provider.
- From the Type list, select OpenShift Container Platform.
-
Enter the appropriate Zone for the provider. If you do not specify a zone, it is set to
default
. - From the Alerts list, select Prometheus to enable external alerts. Selecting Prometheus adds an Alerts tab to the lower pane to configure the Prometheus service. Alerts are disabled by default.
- From the Metrics list, select Hawkular or Prometheus to collect capacity and utilization data, or leave as Disabled. Selecting Prometheus or Hawkular adds a Metrics tab to the lower pane for further configuration. Metrics are disabled by default.
In the Default tab, configure the following for the OpenShift provider:
Select a Security Protocol method to specify how to authenticate the provider:
- SSL: Authenticate the provider securely using a trusted Certificate Authority. Select this option if the provider has a valid SSL certificate and it is signed by a trusted Certificate Authority. No further configuration is required for this option.
SSL trusting custom CA: Authenticate the provider with a self-signed certificate. For this option, copy your provider’s CA certificate to the Trusted CA Certificates box in PEM format.
NoteYou can obtain your OpenShift Container Platform provider’s CA certificate for all endpoints (default, metrics, alerts) from
/etc/origin/master/ca.crt
. Paste the output (a block of text starting with-----BEGIN CERTIFICATE-----
) into the Trusted CA Certificates field.- SSL without validation: Authenticate the provider insecurely (not recommended).
Enter the Hostname (or IPv4 or IPv6 address) of the provider.
ImportantThe Hostname must use a unique fully qualified domain name.
-
Enter the API Port of the provider. The default port is
8443
. Enter a token for your provider in the Token box.
NoteTo obtain a token for your provider, run the
oc get secret
command on your provider; see Obtaining an OpenShift Container Platform Management Token.For example:
# oc get secret --namespace management-infra management-admin-token-8ixxs --template='{{index .data "ca.crt"}}' | base64 --decode
- Click Validate to confirm that Red Hat CloudForms can connect to the OpenShift Container Platform provider.
If you selected a metrics service, configure the service details in the Metrics tab:
Select a Security Protocol method to specify how to authenticate the service:
- SSL: Authenticate the provider securely using a trusted Certificate Authority. Select this option if the provider has a valid SSL certificate and it is signed by a trusted Certificate Authority. No further configuration is required for this option.
SSL trusting custom CA: Authenticate the provider with a self-signed certificate. For this option, copy your provider’s CA certificate to the Trusted CA Certificates box in PEM format.
NoteIn OpenShift, the default deployment of the router generates certificates during installation, which can be used with the SSL trusting custom CA option. Connecting a Hawkular endpoint with this option requires the CA certificate that the cluster uses for service certificates, which is stored in
/etc/origin/master/service-signer.crt
on the first master in a cluster.- SSL without validation: Authenticate the provider insecurely using SSL. (Not recommended)
- Enter the Hostname (or IPv4 or IPv6 address) of the provider, or use the Detect button to find the hostname.
-
Enter the API Port if your Hawkular provider uses a non-standard port for access. The default port is
443
. - Click Validate to confirm that Red Hat CloudForms can connect to the metrics endpoint.
For the Prometheus alerts service, add the Prometheus alerts endpoint in the Alerts tab:
Select a Security Protocol method to specify how to authenticate the service:
- SSL: Authenticate the provider securely using a trusted Certificate Authority. Select this option if the provider has a valid SSL certificate and it is signed by a trusted Certificate Authority. No further configuration is required for this option.
- SSL trusting custom CA: Authenticate the provider with a self-signed certificate. For this option, copy your provider’s CA certificate to the Trusted CA Certificates box in PEM format.
- SSL without validation: Authenticate the provider insecurely using SSL. (Not recommended)
- Enter the Hostname (or IPv4 or IPv6 address) or alert Route.
-
Enter the API Port if your Prometheus provider uses a non-standard port for access. The default port is
443
. - Click Validate to confirm that CloudForms can connect to the alerts service.
Click the Advanced tab to add image inspector settings for scanning container images on your provider using OpenSCAP.
Note- These settings control downloading the image inspector container image from the registry and obtaining the Common Vulnerabilities and Exposures (CVE) information (for effective scanning) via a proxy.
- CVE URL that CloudForms requires to be open for OpenSCAP scanning: https://www.redhat.com/security/data/metrics/ds/. This information is based on the source code of OpenSCAP.
- Enter the proxy information for the provider in either HTTP, HTTPS, or NO Proxy depending on your environment.
-
Enter the Image-Inspector Repository information. For example,
openshift3/image-inspector
. -
Enter the Image-Inspector Registry information. For example,
registry.access.redhat.com
. - Enter the Image-Inspector Tag value. A tag is a mark used to differentiate images in a repository, typically by the application version stored in the image.
-
Enter
https://www.redhat.com/security/data/metrics/ds/
in CVE location.
- Click Add.
You can also set global default image-inspector settings for all OpenShift providers in the advanced settings menu by editing the values under ems_kubernetes
, instead of setting this for each provider.
For example:
:image_inspector_registry: registry.access.redhat.com :image_inspector_repository: openshift3/image-inspector