This lab will walk through how 3Scale can be integrated with ServiceMesh to provide metering for consumers of API services.
- 3Scale Installation
- 3Scale Istio Adapter Installation
- Setting up a tenant
- Setting up an API for ServiceMesh Integration
- Creating an application to consume the api
- Demonstrate limits based on plans
- Namespace of 3scale-demo
- Namespace of 3scale-sm
- Namespace of 3scale-apps
This will setup your environment variables for steps completed throughout the lab
You will need to know what wildcard domain to deploy to (ex. if when you create a route in OCP it gets created as route-name.apps.example.com your wildcard domain should be apps.example.com)
- Set environment variable
export WILDCARD_DOMAIN=apps.example.com export STORAGE_CLASS_NAME=replace-with-storage-class-name
These steps can be skipped if the 3Scale operator is already installed.
- Navigate to the console with a user that has privs to install an operator
- Go to the 3scale-demo project
- Click Operators on the left and click OperatorHub
- Search for 3scale and click Red Hat Integration - 3scale
- Click the Install button
- Select the 3scale-demo namespace
- Click the Subscribe button
These steps are to create the necessary resources to integrate with the ServiceMesh.
- Run helm to deploy the API management
oc project 3scale-demo helm install 3scale 3scale-demo --set wildcardDomain=$WILDCARD_DOMAIN,storageClassName=$STORAGE_CLASS_NAME
- It will take a few minutes for everything to become online
These steps will provision a ServiceMesh control plane and a sample app to use with 3scale
- Get the default access token for 3scale integration
export THREESCALE_ACCESS_TOKEN="$(oc get secret system-seed -n 3scale-demo -o=jsonpath={'.data.ADMIN_ACCESS_TOKEN'} | base64 -D)"
- Deploy the Mesh and Demo App
helm install 3scale-apps 3scale-apps --set accessToken=$THREESCALE_ACCESS_TOKEN