Installing the Operator Lifecycle Manager

Hands-On Lab

 

Length

01:30:00

Difficulty

Intermediate

You have been tasked with installing the Operator Lifecycle Manager on an existing OpenShift cluster running OKD v3.11. Use the provided resources to FULLY install OLM using the commandline interface.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Installing the Operator Lifecycle Manager on OKD v3.11

Using OpenShift-Ansible

Note: installation of the Operator Lifecycle Manager using openshift-ansible is currently under development & therefore can be "hit or miss." If all components do not deploy properly, proceed to the "From Source" section of the guide to complete installation.

  • Edit the Ansible inventory file located at /etc/ansible/hosts to enable the Operator Lifecycle Manager
[OSEv3:children]
masters
nodes
etcd

[OSEv3:vars]
ansible_ssh_user=root
#ansible_become=true
openshift_deployment_type=origin
openshift_pkg_version=-3.11.0
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}]
openshift_disable_check=memory_availability,disk_availability
os_firewall_use_firewalld=True
openshift_hostname=okd.10.0.2.203.xip.io
openshift_master_default_subdomain=apps.10.0.2.203.xip.io
openshift_metrics_install_metrics=true
openshift_metrics_hawkular_hostname=hawkular-metrics.10.0.2.203.xip.io
openshift_logging_install_logging=true
openshift_logging_es_ops_nodeselector={"node-role.kubernetes.io/infra":"true"}
openshift_logging_es_nodeselector={"node-role.kubernetes.io/infra":"true"}
openshift_docker_insecure_registries=[ '172.30.0.0/16' ]
debug_level=4
# Enable the Operator Lifecycle Manager
openshift_enable_olm=true

[masters]
ip-10-0-2-203.ec2.internal openshift_public_ip=35.169.116.146.xip.io

[etcd]
ip-10-0-2-203.ec2.internal

[nodes]
ip-10-0-2-203.ec2.internal openshift_node_group_name='node-config-all-in-one'
  • Using Ansible, install the main components for the Operator Lifecycle Manager
$ cd /usr/share/ansible/openshift-ansible/
$ ansible-playbook playbooks/olm/config.yml
  • Verify that Operator Lifecycle Manager CustomResourceDefinitions are available
$ oc get crds
  • Verify that the operators are currently running under the openshift-operator-lifecycle-manager namespace:
$ oc -n openshift-operator-lifecycle-manager get deploy
  • Verify that the CatalogSource & CatalogSource ConfigMap exist:
$ oc -n openshift-operator-lifecycle-manager get catalogsource
$ oc -n openshift-operator-lifecycle-manager get configmap

From Source

  • Clone the official OLM repository:
$ git clone https://github.com/operator-framework/operator-lifecycle-manager
  • install required objects:
$ oc create -f operator-lifecycle-manager/deploy/okd/manifests/0.7.2/
  • Verify that Operator Lifecycle Manager CustomResourceDefinitions are available
$ oc get crds
  • Verify that the operators are currently running under the openshift-operator-lifecycle-manager namespace:
$ oc -n openshift-operator-lifecycle-manager get deploy
  • Verify that the CatalogSource & CatalogSource ConfigMap exist:
$ oc -n openshift-operator-lifecycle-manager get catalogsource
$ oc -n openshift-operator-lifecycle-manager get configmap