diff --git a/support/README.md b/support/README.md new file mode 100644 index 0000000..9ea5125 --- /dev/null +++ b/support/README.md @@ -0,0 +1,9 @@ +# Support for popular technologies + +You can use this Ansible role from other popular technologies: + +- [Jenkins](jenkins/): if you want to deploy your APIs on 3scale from a Jenkins pipeline, using a custom slave. +- [Ansible Tower / AWX](awx/): if you want to enforce RBAC, have audit, etc. +- [Docker](docker/): deploy an API to 3scale from the command line with minimal dependencies +- [Kubernetes](kubernetes/): deploy an API to 3scale from a Kubernetes Job +- [OpenShift](openshift/): deploying an API to 3scale is as easy as starting a Build from a BuildConfig diff --git a/support/openshift/README.md b/support/openshift/README.md new file mode 100644 index 0000000..21abf37 --- /dev/null +++ b/support/openshift/README.md @@ -0,0 +1,37 @@ +# Using this Ansible role from Kubernetes + +You can use the provided OpenShift template to create all the mandatory objects: + +- An ImageStream to keep track of the [provided docker image](https://hub.docker.com/r/nmasse/threescale-cicd). +- A custom BuildConfig that checkout the GIT repository containing the OpenAPI Specification and runs the Ansible role on it +- A Secret holding the credentials to access the 3scale Admin Portal + +```sh +oc create -f openshift-template.yaml +oc new-app --template=deploy-3scale-api -p THREESCALE_CICD_VERSION=stable -p THREESCALE_ADMIN_PORTAL_ACCESS_TOKEN=1234..5678 -p THREESCALE_ADMIN_PORTAL_HOSTNAME=TENANT-admin.3scale.net -p API_NAME=echo-api -p THREESCALE_CICD_PRIVATE_BASE_URL=https://echo-api.3scale.net -p API_GIT_URI=https://github.com/nmasse-itix/rhte-api.git +``` + +You will have to change at least the value of: + +- the `THREESCALE_ADMIN_PORTAL_ACCESS_TOKEN` parameter to match the Access Token of your 3scale Admin Portal +- the `THREESCALE_ADMIN_PORTAL_HOSTNAME` parameter to match the hostname of your 3scale Admin Portal + +This template will create a BuildConfig with the name of your API: + +```raw +$ oc get bc +NAME TYPE FROM LATEST +deploy-3scale-api-echo-api Custom threescale-cicd:stable 7 +``` + +Start the build to deploy the API to 3scale: + +```sh +oc start-build deploy-3scale-api-echo-api +``` + +Wait for the build to complete: + +```sh +oc logs -f bc/deploy-3scale-api-echo-api +``` diff --git a/support/docker/openshift-template.yaml b/support/openshift/openshift-template.yaml similarity index 100% rename from support/docker/openshift-template.yaml rename to support/openshift/openshift-template.yaml