Gravitee is an open source API platform developed by gravitee.io.
A buildpack is a set of scripts which aims at:
- Detecting the language of an application (detect)
- Installing the dependencies of a project (compile)
- Defining how the application should be started (release)
A buildpack has three mandatory entrypoints:
- bin/detect: exit with success (return code is 0) if the buildpack applies to the current application.
- bin/compile: installs the technology.
- bin/release: handles some metadata.
All these entrypoints are Bash script.
Script detect: The purpose of the script located in bin/detect is to detect if the buildpack applies to the application.
It takes the build directory in argument. If the buildpack is applicable, the script must print on the standard output the name of the technology and return with the code 0.
Script compile: The purpose of the script located in bin/compile is to actually compile the application. It is called with three arguments:
The build directory: contains the code of the application. The cache directory: used to store information one want to keep between two builds. The environment directory: contains a file per environment variable defined.
Script release: The purpose of the script located in bin/release is to generate some metadata about the application.
It takes the build directory in argument.
Current deployed version of Gravity: 3.8.3
4 different apps should be configured using this very same buildpack. Each app
must have the right value of the environment variabel GRAVITEE_MODULE
Configuration REST API allowing to manipulate all the resources of Gravitee.
This module is a java application, the JDK will be automatically installed just like another java application.
Entrypoint of all applications and APIs configured in Gravitee.
This module is a java application, the JDK will be automatically installed just like another java application.
Developer Dashboard allowing developers to configure their access to the APIs/Applications deployed through Gravitee.
This module is a static app, the buildpack download nginx to serve the assets
Static Frontend to administrate Gravitee.
This module is a static app, the buildpack download nginx to serve the assets
Some environment variables must or can be configured.
Common to all modules:
GRAVITEE_MODULE
: "graviteeio-portal-ui", "graviteeio-management-ui","graviteeio-gateway" or "graviteeio-rest-api"GRAVITEE_VERSION
: (optional) by default3.8.3
Required:
MONGO_URL
: URL to the mongodb replicaset, automatically provided by a Scalingo AddonELASTICSEARCH_URL
: URL to the elasticsearch cluster, automatically provided by a Scalingo Elasticsearch AddonGRAVITEE_JWT_SECRET
: Secret which will be used to sign/encrypt JWT tokens, must be a long random stringGRAVITEE_PORTAL_URL
: URL to the deployment of the Portal UI, example:https://my-gravitee-portal.osc-fr1.scalingo.io
GRAVITEE_ADMIN_USERNAME
: Default admin user to bootstrap the installation of Gravitee and being able to create more users, example:gravitee-admin
GRAVITEE_ADMIN_PASSWORD
: Default admin password
Optional:
JVM_COMMON_BUILDPACK
: by defaulthttps://buildpacks-repository.s3.eu-central-1.amazonaws.com/jvm-common.tar.xz
MAIL_URL
: no default, configure which SMTP server should send emails, example:smtp://username:password@smtpserver.example.com:587
MAIL_SUBJECT_FORMAT
: no default, configure the format of the subjects of emails being sent, use%s
for the rest of the subject, example:[Gravitee.io] %s
MAIL_SENDER_FROM
: no default, configure which email address with be used to send the emails from, example:from@example.com
Required:
MONGO_URL
: URL to the mongodb replicaset, must be the same than the REST API, copy/paste the value for the gateway appELASTICSEARCH_URL
: URL to the elasticsearch cluster, must be the same than the REST API, copy/paste the value for the gateway app
Optional:
JVM_COMMON_BUILDPACK
: (optional) by defaulthttps://buildpacks-repository.s3.eu-central-1.amazonaws.com/jvm-common.tar.xz
Required:
MANAGEMENT_API_URL
: URL to the REST API application, example:https://my-gravitee-rest-api.osc-fr1.scalingo.io
Optional:
NGINX_BUILDPACK_URL
: (optional) by defaulthttps://github.com/Scalingo/nginx-buildpack
Required:
MANAGEMENT_API_URL
: URL to the REST API application, example:https://my-gravitee-rest-api.osc-fr1.scalingo.io
Optional:
NGINX_BUILDPACK_URL
: (optional) by defaulthttps://github.com/Scalingo/nginx-buildpack
Once deployed:
- Settings → Organization Settings → Management URL Update