# Red Hat 3scale API Management on OpenShift Demo

Red Hat 3scale API Management on OpenShift Container Platform demonstration preparation and guide.

## Table of Contents

* [Installation Guide](https://audomsak.gitbook.io/3scale/documents/installation)
* [3scale Architecture](#3scale-architecture)
  * [3scale high level overview](#3scale-high-level-overview)
  * [3scale basic architecture](#3scale-basic-architecture)
  * [3scale basic resources](#3scale-basic-resources)
* [Demo Cluster Overview](#demo-cluster-overview)
* [Demo Applications](#demo-applications)
* [Testing Demo Applications](#testing-demo-applications)
* [Working With 3Scale API Management (Demo)](#working-with-3scale-api-management-demo)
* [References](#references)

## 3scale Architecture

### 3scale high level overview

![3scale overview](https://3707709575-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlMgVlX77EAThg6NrNt4u%2Fuploads%2Fgit-blob-cd72de3184b58a7b0337ea5adb286610c3f7da61%2F3scale-overview.png?alt=media)

### 3scale basic architecture

![3scale architecture](https://3707709575-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlMgVlX77EAThg6NrNt4u%2Fuploads%2Fgit-blob-dbd633b613fee78ce50082f44d856191b7bc8f04%2F3scale-architecture.png?alt=media)

### 3scale basic resources

* **Backend** - represents a deployed backend application or service by pointing to its root URL.
* **Product** - previously called services, represent a collection of 3scale objects that pertain to a specific client or group of users. Products contain the following 3scale configuration objects:

  * **Application plans** - sets of access rights that allow users to define different rules for consumers of managed APIs. You can use application plans to set rate limits, enable features, resources, and methods for API users.
  * **Applications** - represent a client application who is consuming API(s) via API gateway.
  * A map of backends to applications

  Note that backends do not belong to a product. This is because the same backend can be associated with several different products. Different products do not need separate backends for the same underlying API.

![3scale resources](https://3707709575-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlMgVlX77EAThg6NrNt4u%2Fuploads%2Fgit-blob-9a9a545e1c0ffaaa02c36be7d2f8f2a7188555f9%2F3scale-resources.png?alt=media)

## Demo Cluster Overview

Once you've done all [installation steps](https://audomsak.gitbook.io/3scale/documents/installation), the overview of OpenShift cluster will be like this.

![demo cluster](https://3707709575-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlMgVlX77EAThg6NrNt4u%2Fuploads%2Fgit-blob-cb8789bd3374bb7a2bd6408f8d6a775ab8bcddce%2Fdemo-cluster.png?alt=media)

## Demo Applications

The applictions used for demo are forked from projects created by the clever people out there. All credits are given to the project owners.

* [Sample Quarkus Microservices](https://github.com/audomsak/sample-quarkus-microservices)
* [Sample SOAP Spring Boot microservice](https://github.com/audomsak/ws-employee-soapcxf)

## Testing Demo Applications

Follow this [guide](https://audomsak.gitbook.io/3scale/documents/testing-application) for how to test the demo applications.

## Working With 3Scale API Management (Demo)

1. [Onboarding new API consumer](https://audomsak.gitbook.io/3scale/documents/onboarding-new-api-consumer)
2. [Expose legacy (SOAP) API to outside world](https://audomsak.gitbook.io/3scale/documents/expose-soap-api)
3. [More secure and flexible with API Key-pair](https://audomsak.gitbook.io/3scale/documents/secure-with-api-key-pair)
4. [Limit API calls using Rate Limit](https://audomsak.gitbook.io/3scale/documents/rate-limit)
5. [Secure your API with OpenID Connect OAuth 2.0 standard](https://audomsak.gitbook.io/3scale/documents/oauth-secure)
6. [Running Self-Managed API Gateway on OpenShift](https://audomsak.gitbook.io/3scale/documents/self-managed-gateway)
7. [Running Self-Manage API Gateway on VM](https://audomsak.gitbook.io/3scale/documents/self-managed-gateway-vm)
8. [Access Control based on IP Address](https://audomsak.gitbook.io/3scale/documents/access-control-ip)

## TODO

* Multi-Environments management guideline
* API as Code, CI/CD pipeline (Tekton + ArgoCD)
* 3scale setup using NFS server running in the same cluster

## References

* DO240 - Cloud-native API Administration with Red Hat 3scale API Management course. ([Public](https://www.redhat.com/en/services/training/do240-cloud-native-api-admin-red-hat-3scale-api-management), [RedHatter](https://role.rhu.redhat.com/rol-rhu/app/catalog?q=3scale))
