Skip to main content
Version: 3.1

install-autopilot-ocp

Summary and Key concepts

Summary:

This article outlines the steps to install and configure Autopilot in an OpenShift environment using the Thanos Querier for metrics. It provides instructions to fetch the Thanos Querier route, configure the Autopilot spec with the Querier host URL, and install Autopilot in an existing Portworx cluster. The article also covers how to install Autopilot with PX-Security, requiring the addition of a shared secret in the StorageCluster specification. Users can further customize the Autopilot installation by adjusting configuration parameters and upgrading Autopilot by updating the image using the oc set image command.

Kubernetes Concepts:

  • Route: In OpenShift, routes expose services, such as the Thanos Querier, externally to the cluster.
  • ConfigMap: Used to store non-confidential data, such as the Thanos Querier URL, in the cluster for use by other services.
  • Deployment: Manages the deployment of applications in Kubernetes, such as updating the Autopilot image using oc set image.

Portworx Concepts:

  • Autopilot: A rule-based engine in Portworx that automates storage management tasks, such as volume resizing or pool expansion.

  • PX-Security: Portworx's security framework that includes token-based authorization and encryption. Autopilot with PX-Security requires adding a shared secret to the StorageCluster.

Follow the steps in the following sections to install and configure Autopilots.

Fetch the Thanos Querier route host

Fetch the Thanos route host, which is part of the OpenShift monitoring stack:

oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host'
thanos-querier-openshift-monitoring.tp-nextpx-iks-catalog-pl-80e1e1cd66534115bf44691bf8f01a6b-0000.us-south.containers.appdomain.cloud

Save this value for later, you'll use it to configure Autopilot and Grafana using the route host to enable access to Prometheus's statistics.

Configure Autopilot

important

When configuring Autopilot, the use of self-signed certificates for the default Ingress is supported in on-premises environments.

Edit the Autopilot spec within the Portworx manifest. Include the Thanos Querier host URL you retrieved in the step above. Replace <THANOS-QUERIER-HOST> with the actual host URL:

spec:
autopilot:
enabled: true
image: <autopilot-image>
providers:
- name: default
params:
url: https://<THANOS-QUERIER-HOST>
type: prometheus

This configuration tells Autopilot to use the OpenShift Prometheus deployment (via Thanos Querier) for metrics and monitoring.

Installing Autopilot on an existing Portworx cluster

To install Autopilot, fetch the Autopilot manifest from the Portworx spec generator by clicking here and apply it in your cluster.

Autopilot with PX-Security

If you're installing Autopilot with PX-Security using the Operator, you must modify the StorageCluster yaml. Add the following PX_SHARED_SECRET env var to the autopilot section:

  autopilot:
...
env:
- name: PX_SHARED_SECRET
valueFrom:
secretKeyRef:
key: apps-secret
name: px-system-secrets

Customize Autopilot install

You can customize the Autopilot installation by adding configuration parameters to the Autopilot spec within your Portworx StorageCluster manifest. Here is an example on how to modify your Portworx StorageCluster spec to add these configurations for customizing your Autopilot install:

...
spec:
autopilot:
enabled: true
image: <autopilot-image>
providers:
- name: default
params:
url: https://<THANOS-QUERIER-HOST>
type: prometheus
args:
log-level: debug
...

Upgrading Autopilot

To upgrade Autopilot, change the image tag in the deployment with the oc set image command. The following example upgrades Autopilot to the 1.3.0 version:

oc set image deployment.v1.apps/autopilot -n portworx autopilot=portworx/autopilot:1.3.0
deployment.apps/autopilot image updated
note

The command above assumes Autopilot is installed in the portworx namespace. Change the namespace according to where it's installed in your cluster.