Use this guide to get started with XRay and Red Hat OpenShift.
Jump ahead: |
Step 1: Prerequisites
In order to run XRay, you must be running AMQ Streams which provides the Kafka service. The AMQ Streams operator must first be installed on the same namespace where XRay will be installed.
Installation
Make the following changes when installing the AMQ Streams operator:
- Select Update channel: amq-streams-1.6.x
- Select Installation Mode: A specific namespace on the cluster
- For Installed Namespace select your preferred namespace
- Leave Approval Strategy as Automatic
- Click Install
Create the Kafka cluster
After the operator is installed, create an instance of Kafka API:
- Under the Installed operators section select Red Hat Integration - AMQ Streams
- Click Create instance for Kafka API under Provided APIs
- Configure Kafka cluster staying in the Form View (already selected)
- Enter a name for your cluster, e.g. xray-cluster (default is my-cluster)
- Expand the Kafka section, then expand the Storage section:
- Change Kafka storage to persistent-claim
- Set Size to 2Gi
- Set class to ibmc-block-gold (or any other applicable class for your OpenShift cluster)
- Expand the Zookeeper section, then expand the Storage section:
- Change Zookeeper storage to persistent-claim
- Set class to ibmc-block-gold (or any other applicable class for your OpenShift cluster)
- Set Size to 2Gi
- For additional configuration details, see Using AMQ Streams On OpenShift
- Click Create at the bottom of the form
- Go to Workloads > Pods and wait until 3x zookeeper, 3x kafka and entity-operator pods get Running status.
Now you can install the XRay operator.
Step 2: Operator installation from Red Hat Marketplace
- For information on registering your cluster and creating a namespace, see Red Hat Marketplace Docs. This must be done prior to installing the operator.
- Purchase XRay or start a free trial.
- On the main menu, click Workspace > My Software > product > Install Operator.
- On the Update Channel section, select an alpha.
- On the Approval Strategy section, select either Automatic or Manual. The approval strategy corresponds to how you want to process operator upgrades.
- On the Target Cluster section:
- Click the checkbox next to the clusters where you want to install the operator.
- For each cluster you selected, under Namespace Scope, on the Select Scope list, select an option.
- Click Install. It may take several minutes for installation to complete.
- Once installation is complete, the status will change from installing to Up to date.
- For further information, see the Red Hat Marketplace Operator documentation.
Step 3: Verification of operator installation
- Once status changes to Up to date, click the vertical ellipses and select Cluster Console.
- Open the cluster where you installed the product.
- Go to Operators > Installed Operators
- Select the namespace or project you installed on.
- Verify status for product is Succeeded.
- Click the product name to open details.
Step 4: Application installation
To install XRay, click Create Instance under Nastel XRay components. The operator does not provide complete Form view at this time, so you must switch to YAML view to configure the XRay setup.
The following parameters need to be updated in the yaml:
- Under the global section change:
- subDomain to your cluster subdomain
- kafkaHost to match the AMQ Streams Kafka service name ending in -kafka-bootstrap. If you set the cluster name as xray-cluster, then no need to update.
- If your cluster does not provide preferred storage classes ibmc-block-gold and ibmc-file-silver-gid, change all occurrences of it to a class your cluster provides.
- All remaining attributes can be left as they are.
Click the Create button.
Navigate to Workloads > Pods. 12+ pods will initialize and start.
When starting XRay for the first time, it may take around 2 hours to initialize and start the xray-cep pod. During this time, the Kafka topics and Solr database get set up and initialized.
xray pod should start up last. After it gets started, you can proceed to using XRay.
Optional: Install XRay realtime processing components
After XRay core components are up and running, you can install the optional XRay realtime processing components which are used to process subscriptions and triggers of XRay at runtime. For this reason, it heavily utilizes CPU usage, which may be a reason to increase your cloud subscription cost. If you intend to use XRay only as index storage, then you can skip installing the realtime processing components and continue to the next section, using XRay.
To install the XRay realtime processor, click Create Instance under Nastel XRay realtime processing components. The operator does not provide complete Form view at this time, so you must switch to YAML view to configure XRay setup.
The following parameters under the Global section need to be updated in the yaml:
- subDomain to your cluster subdomain.
- kafkaCluster to match AMQ Streams Kafka cluster name. If you set the cluster name to something other than xray-cluster when installing AQM Streams, then you need to change this property value (they should match).
- kafkaHost to match the AMQ Streams Kafka service name ending in -kafka-bootstrap. If you set the cluster name to something other than xray-cluster when installing AQM Streams, then you need to change this property value (they should match).
- If you cluster does not provide the preferred storage classes ibmc-block-gold and ibmc-file-silver-gid, change all occurrences of it to a class your cluster provides.
- All remaining attributes can be left as they are.
Click the Create button.
Navigate to Workloads > Pods. 7 additional pods should be added to the XRay Core components pods set. Wait until all of them initialize and start.
xray-storm-topologies pod should start up last. After it starts, XRay runtime processors will be running.
Step 5: Using XRay
Using routes:
-
- Navigate to Networking > Routes, find route link ending with /xray (name starts xray-ingres-). Click on this link.
- Navigate to Networking > Routes, find route link ending with /xray (name starts xray-ingres-). Click on this link.
Using service properties:
-
- Navigate to Networking > Services > xray
- Compose this url: <External load balancer IP>:<Node Port>/xray. According to the provided screenshot it would be: 46.99.155:32017/xray. Paste it to your browser URL navigation field.
- Navigate to Networking > Services > xray
The XRay login screen displays in a new browser tab. Enter Admin/admin2 and click Login.
You can now use XRay.
See the XRay User’s Guide for more information on how to use XRay.