How to install the CouchbaseDB Operator for Red Hat OpenShift on your laptop using Red Hat CodeReady Containers and Red Hat Marketplace
fetched at September 9, 2020
Red Hat Marketplace is an online store of sorts, where you can choose the software that you want to install and run on your Red Hat OpenShift cluster. The analogy is a phone app store, where you select an app, and it’s automagically installed on your phone. With Marketplace, you simply register your cluster(s), select the software that you want, and it is installed for you. It could not be easier.
In this article, I show you how to install Couchbase Server Enterprise Edition on an OpenShift cluster. In my case, the cluster is running on Fedora 32 using Red Hat CodeReady Containers (CRC). Couchbase Server Enterprise Edition is currently available as a free trial, and CRC is also available at zero cost. This setup offers a no-risk way to try containers, Kubernetes, OpenShift, and, in this case, Couchbase. This is definitely “developers playing around with the software”-level stuff.
We’ll start by assuming that you have CodeReady Containers installed on your machine. There’s no charge for CRC, and it brings the latest version of OpenShift to a PC near you, so go ahead and grab it. You can find installation instructions for Windows 10 Enterprise here and macOS here.
Note: You can get your free copy of CodeReady Containers at try.openshift.com, where you can also tap into other free OpenShift learning materials.
Once your cluster is up and running, journey over to the Red Hat Marketplace website, where you will be asked to log in or create an account. If you don’t have an account, you’ll need to create one.
For full disclosure, you will need to register a credit card to install any software from Red Hat Marketplace, including the Couchbase free trial. However, the free trial will not—repeat, will not—automatically roll over into a paid subscription. You are never at risk of your credit card being automatically charged. Don’t let the registration hold you back; there’s too much goodness here in your favor.
Step 1: Register with Red Hat Marketplace
Assuming that you have an account, the first step is to go to the Red Hat Marketplace homepage, shown in Figure 1, and sign in.
After you’ve logged in, click your username in the upper-right corner and select the My account option from the drop-down list shown in Figure 2.
Step 2: Register your cluster
Once you’ve logged in to your account, you can access your workspace and register your OpenShift cluster. You only need to register a cluster once, and it’s very easy. Figure 3 shows my profile page and account information; yours should look similar.
When you click Workspace at the top of your profile page, you’ll see a list of the software that you have already installed. Before you can install any software in a new cluster, you need to register it. Registering a cluster installs the Red Hat Marketplace Operator, which talks to the Red Hat Marketplace website and installs the software that you need.
To start, click Add cluster, as shown in Figure 4.
The Add cluster page guides you through the next steps.
Generate your secret
First, you will generate a pull secret, as shown in Figure 5.
Install the Red Hat Marketplace Operator
When you click Generate Secret, the command to Install the Red Hat Marketplace Operator (Step 2 in Figure 5) is updated to include your secret. Click the Copy icon shown in Figure 6 to copy the command to your system’s clipboard.
Register your cluster
Now, paste the command into your command line and run it. After a few minutes, you will be able to return to the web interface to see your newly-registered cluster, as shown in Figure 7.
You’ll also receive an email when your cluster is registered—because no one ever gets enough email.
Additional registration for CodeReady Containers
If you are using CRC (and only if you’re using CRC), you’ll need to complete a few additional steps to ensure that your cluster has the credentials required to install software from Red Hat Marketplace. You will need to do this just once for your CRC cluster, and it takes about two minutes.
Head over to the marketplace documentation page and follow the instructions in Register OpenShift cluster on Red Hat CodeReady Containers. It’s nine easy steps and completely necessary for success with CRC. If you’re not using CRC, you can skip this part.
Step 3: Select your software
Your cluster is up and running on your PC, and it’s registered with Red Hat Marketplace. Now the fun part begins: Finding and installing a free software trial with a simple mouse click. As previously mentioned, I’ve chosen Couchbase Server Enterprise Edition for this example.
Search the Marketplace
You can search or filter to see what software is available from Red Hat Marketplace. Figure 8 shows the search page with various product categories to select from.
Filter by category
We select the Database category, which returns the options shown in Figure 9 (currently, there are 13 database options in total).
Select your free trial
Clicking on the Couchbase Server Enterprise Edition panel takes you to the Couchbase installation page shown in Figure 10.
Click on the Free trial button to continue, and you will see the screen in Figure 11.
Step 4: Set up and run the installation
Now, you will select your cluster, choose the namespace (OpenShift project) where you wish to install Couchbase, and launch the installation. After you’ve filled in this information, as shown in Figure 12, you may install the free trial in your cluster with one click.
Figure 13 shows the installation in progress.
And now, here’s the really cool thing: You can switch over to your OpenShift dashboard, select Installed Operators, and watch the installation as it happens.
On my PC, it took about two minutes for the status to switch from Installing (Figure 14) to Succeeded (Figure 15).
That’s it: With a simple registration and just a few clicks, you have installed the CouchbaseDB Operator in your cluster. If you want to play around and experiment with Couchbase, visit the excellent Getting Started web page for this technology. Also, in case you are wondering, you can use the Red Hat Marketplace to uninstall the CouchbaseDB Operator at any time.
Want another example? You can find a more general one in Install Red Hat OpenShift Operators on your laptop using Red Hat CodeReady Containers and Red Hat Marketplace.Visit Link