Deploying 3scale to CRC
Introduction
This document will walk you through the process of installing Red Hat 3scale API Management, an API management product, on CodeReady Containers, an OpenShift environment running on desktops and laptops.
Prerequisites
System requirements
CRC requires the following system resources:
- 4 virtual CPUs (vCPUs)
- 8 GB of memory
- The procedure on this page recommends that you allocate at least 10GB of memory to the CRC virtual machine, preferably 16GB.
- 35 GB of storage space
Accounts
A Red Hat Developer account is required. For details on how to register, please refer to Red Hat Developer page.
After registering, create a service account with the Token Generator, then note the username and token.
My tested environment
- Fedora 31
- CRC 1.9.0
- OpenShift 4.3.10
- 3scale 2.8
CRC is available for Windows, macOS, and Linux, so you can try it in other environments as well.
Installation procedure
- Download CRC and Pull Secret from this download page.
- Extract the CRC archive file, then move to the extracted directory.
$ ./crc setup
$ ./crc start -p /path/to/pull-secret
It will take quite a while, so please be patient. When the following message is output, the CRC has been started.INFO To access the cluster, first set up your environment by following 'crc oc-env' instructions INFO Then you can access it by running 'oc login -u developer -p developer https://api.crc.testing:6443' INFO To login as an admin, run 'oc login -u kubeadmin -p HeJWN-ckbCA-Q96Ds-Sj763 https://api.crc.testing:6443' INFO INFO You can now run 'crc console' and use these credentials to access the OpenShift web console Started the OpenShift cluster WARN The cluster might report a degraded or error state. This is expected since several operators have been disabled to lower the resource usage. For more information, please consult the documentation
The login user, password, connection destination, etc. are printed in the startup message, so please note them.
After the CRC indicates that the startup is complete, you can access the OpenShift web console. However, in some cases, the startup process is still going on.Enable
oc
command.$ eval $(./crc oc-env)
Login to the OpenShift with this command.
$ oc login -u kubeadmin -p <password> https://api.crc.testing:6443
Replace
<password>
with the generated password.Create a project (e.g. 3scale28)
$ oc new-project 3scale28
Create
threescale-registry-auth
secret in the project$ oc create secret docker-registry threescale-registry-auth \ --docker-server=registry.redhat.io \ --docker-username="your-registry-service-account-username" \ --docker-password="your-registry-service-account-password"
Run
$ crc console
to open the OpenShift web console.- Select Administrator view.
- Open OperatorHub.
- Search "3scale".
- Click
Red Hat Integration - 3scale
- Click
Install
button. Select a project to install the operator, a 3scale version, enable/disable auto update. Click
Subscribe
button.- Click the operator, then click
Create Instance
in API Manager box. Edit API Manager definition as following, then click
Create
.apiVersion: apps.3scale.net/v1alpha1 kind: APIManager metadata: name: example-apimanager namespace: 3scale28 spec: wildcardDomain: apps-crc.testing resourceRequirementsEnabled: false
Flip to Developer view.
- Once all the pods have been rolled out, access the 3scale admin portal.
- 3scale admin portal: https://3scale-admin.apps-crc.testing/
- Check
ADMIN_USER
andADMIN_PASSWORD
in thesystem-seed
secret for your ID and password. - Other Routes
Troubleshooting
OperatorHub page shows "No OperatorHub Items Found"
Wait for a while. The feature might not be ready yet.
This document may help.
No packages show up in the UI (No OperatorHub Items Found)
3scale Operator is running, but no pods are rolled out.
- Confirm whether
threescale-registry-auth
secret is created with the correct values.
Cannot start CRC
Try these operations:
$ ./crc stop
$ ./crc delete
- Remove the crc VM
After that, back to crc setup
.
How to setup previous OCP versions
If you need to run previous OCP versions, you can download the corresponding CRC from here:
https://mirror.openshift.com/pub/openshift-v4/clients/crc/
CRC version | OCP version |
---|---|
1.0.0 | 4.2.0 |
1.1.0 | 4.2.2 |
1.2.0 | 4.2.8 |
1.3.0 | 4.2.10 |
1.5.0 | 4.2.14 |
1.6.0 | 4.3.0 |
1.7.0 | 4.3.1 |
1.8.0 | 4.3.8 |
1.9.0 | 4.3.10 |
1.10.0 | 4.4.3 |