- Duration: 25 mins
- Audience: Developers, Architects, Devops
This section covers how to connect to the 3Scale on premise running instance
URLs:
Check with your instruction the GUID number of your current workshop environment. Replace the actual number on all the URLs where you find GUID.
Example in case of GUID = cluster-lhm8v.lhm8v.sandbox430:
https://console-openshift-console.apps.GUID.opentlc.com
becomes =>
https://console-openshift-console.apps.cluster-lhm8v.lhm8v.sandbox430.opentlc.com
Credentials:
Your username is your asigned user number. For example, if you are assigned user number 1, your username is:
user1
The password to login is always the same:
openshift
-
Open a browser window and navigate to:
https://userX-admin.apps.GUID.opentlc.com/
-
Accept the self-signed certificate if you haven't:
- If using Google Chrome click the ADVANCED link.
- Then click the Proceed to.. link to accept the certificate and add the exception.
-
Log in using your designated user and password.
-
Click on the wheel icon in the top right corner.
-
Click on Personal Settings and then Tokens.
-
In Access Tokens Section, click on Add Access Token
-
Create a brand new Access Token with the following information:
- Name: toolbox_token
- Scopes: Account Management API
- Permission: Read & Write
-
Click on Create Access Token.
-
Finally, Ensure that you have copied the token generated with green color. We are going to use it later.
-
Click on I have copied the token.
We have already setup the token for our user, now it's time to connect it with our 3scale-toolbox client, previosly installed.
Let's start adding our 3Scale on-prem instance.
-
Go to you terminal and type the following command:
3scale remote add 3scale-onprem "https://[email protected]/" -k
- -k option: Allows to make the request with self signed certificates
- TOKEN: Add the Token generated previously.
- USERX: Add you username, For example: user1
- GUID: Add your instance name
-
Locate you configation file, type the command to locate the
.3scalerc.yml
:3scale --help
If we want to use 3scale-toolbox in our Jenkins pipelines, we need to create the recently created .3scalerc.yaml
file in our project. The toolbox will use the credentials provided in the yaml
to access our 3scale On Premise instance.
-
Run the following command using the OC client:
oc create secret generic 3scale-toolbox -n userX --from-file="$HOME/.3scalerc.yaml"
For example:
oc create secret generic 3scale-toolbox -n user1 --from-file=/Users/mikelsanchezherrero/.3scalerc.yaml
So, you want more? Have you tried to familiarize with 3scale-toolbox, try different commands.
In this lab you have learned how to generate access tokens and how to get the .3scalerc.yaml
.
You can now proceed to Lab 3
- 3Scale API Gateway