Creating AMQ Interconnect sites using the operator

Red Hat AMQ 2021.Q2

For Use with AMQ Interconnect 2.0 TECHNOLOGY PREVIEW

Abstract

This guide describes how to use the Skupper operator.

Preface

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.

Important

AMQ Interconnect 2.0 Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production.

These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see https://access.redhat.com/support/offerings/techpreview.

Chapter 1. Using the Skupper Operator on OpenShift

The Skupper Operator creates and manages AMQ Interconnect sites in OpenShift.

There are two options when deploying the Skupper Operator:

All namespaces
All Skupper sites created in the cluster share a common site controller pod for co-ordination.
A specific namespace
A site controller pod is created in each namespace that you apply the site ConfigMap. This is equivalent to the skupper init as described in Configuring AMQ Interconnect sites using the CLI.

You can deploy the Skupper Operator using any of the following methods:

Note

Installing an Operator requires administrator-level privileges for your OpenShift cluster.

After installing the Operator, you can create a site by deploying a ConfigMap as described in Section 1.3, “Creating a site using the Skupper Operator”

Note

Because OpenShift Container Platform is a certified Kubernetes distribution, you can use the supported kubectl binaries that ship with OpenShift as described in this documentation, or you can use the oc binary.

See the OpenShift documentation for more information about oc and kubectl.

1.1. Installing the Operator using the CLI

The steps in this section show how to use the kubectl command-line interface (CLI) to install and deploy the latest version of the Skupper Operator in a given OpenShift cluster.

Procedure

  1. Log in to OpenShift as a cluster administrator. For example:

    $ kubectl login -u system:admin
  2. Complete the steps described in Red Hat Container Registry Authentication.
  3. To create a operator subscription for all namespaces:

    1. Create a file named subscription.yaml with the following:

      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        name: skupper-operator
        namespace: openshift-operators
      spec:
        channel: alpha
        installPlanApproval: Automatic
        name: skupper-operator
        source: redhat-operators
        sourceNamespace: openshift-marketplace
        startingCSV: skupper-operator.v0.6.0
    2. Apply the subscription YAML:

      $ kubectl apply -f subscription.yaml
  4. To create a operator subscription for a specific namespace, you must create an Operator group in that namespace and then create the subscription:

    1. Create a file named operator-group.yaml with the following:

      kind: OperatorGroup
      apiVersion: operators.coreos.com/v1
      metadata:
        name: skupper-operator
        namespace: my-namespace
      spec:
        targetNamespaces:
        - my-namespace

      where my-namespace is the name of the namespace you want to create the site.

    2. Apply the Operator group YAML:

      $ kubectl apply -f operator-group.yaml
    3. Create a file named subscription.yaml with the following:

      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        name: skupper-operator
        namespace: my-namespace
      spec:
        channel: alpha
        installPlanApproval: Automatic
        name: skupper-operator
        source: redhat-operators
        sourceNamespace: openshift-marketplace
        startingCSV: skupper-operator.v0.6.0

      where my-namespace is the name of the namespace you want to create the site.

    4. Apply the subscription YAML:

      $ kubectl apply -f subscription.yaml

1.2. Installing the Skupper Operator using the OpenShift console

The procedures in this section show how to use the OperatorHub to install and deploy the latest version of the Skupper Operator in a given OpenShift namespace.

In OpenShift 4.1 and later, the Operator Lifecycle Manager (OLM) helps users install, update, and generally manage the lifecycle of all Operators and their associated services running across their clusters. It is part of the Operator Framework, an open source toolkit designed to manage Kubernetes native applications (Operators) in an effective, automated, and scalable way.

Prerequisites

  • Access to an OpenShift 4.1 cluster using a cluster-admin account.

Procedure

  1. In the OpenShift web console, navigate to OperatorsOperatorHub.
  2. Choose Skupper Operator from the list of available Operators, and then click Install.
  3. On the Operator Installation page, two Installation mode options are available:

    • All namespaces on the cluster
    • A specific namespace on the cluster

      For this example, choose A specific namespace on the cluster.

  4. Select the namespace into which you want to install the Operator, and then click Install.

    The Installed Operators page appears displaying the status of the Operator installation.

  5. Verify that the AMQ Interconnect Operator is displayed and wait until the Status changes to Succeeded.
  6. If the installation is not successful, troubleshoot the error:

    1. Click Skupper Operator on the Installed Operators page.
    2. Select the Subscription tab and view any failures or errors.

For more information about installing Operators, see the OpenShift Documentation

1.3. Creating a site using the Skupper Operator

  1. Create a YAML file defining the ConfigMap of the site you want to create.

    For example, create skupper-site.yaml:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: skupper-site
      namespace: my-namespace

    You can later retrieve the console credentials as described in Monitoring AMQ Interconnect sites using the console or specify them now by adding the username and optionally the password to skupper-site.yaml as follows:

    data:
      console-user: "admin"
      console-password: "changeme"
  2. Apply the YAML to create a ConfigMap named skupper-site in the namespace you want to use:

    $ kubectl apply -f skupper-site.yaml
  3. Verify that the site is created by checking that the Skupper router and service controller pods are running:

    $ kubectl get pods
    
    NAME                                          READY   STATUS    RESTARTS   AGE
    skupper-router-8c6cc6d76-27562                1/1     Running   0          40s
    skupper-service-controller-57cdbb56c5-vc7s2   1/1     Running   0          34s
    Note

    If you deployed the Operator to a single namespace, an additional site controller pod is also running.

Revised on 2021-08-16 14:31:06 UTC

Legal Notice

Copyright © 2021 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.