Your environment must be the following requirements:
- You must install at least Java17.
- You must install MongoDB and Elasticsearch.
- You must download the binaries of the Gravitee 4.x.x version that you plan to use. For more information about downloading the binaries, see Gravitee's download page.
{% hint style="info" %} If you previously downloaded the binaries, you do not need to download the binaries again. {% endhint %}
To use Gravitee’s API Management (APIM), you must install the following components:
{% tabs %}
{% tab title="APIM Gateway" %}
1. Extract the .zip
archive using the following commands:
$ unzip gravitee-standalone-distribution-4.x.0.zip
$ cp -r graviteeio-full-4.x.0/graviteeio-apim-gateway-4.x.0 [DESTINATION_FOLDER]/
- Replace [DESTINATION_FOLDER] with the folder where you want to store the archive.
- From the command line, run the APIM gateway using the following commands:
$ cd [DESTINATION_FOLDER]/graviteeio-apim-gateway-4.x.0
$ ./bin/gravitee
- Replace [DESTINATION_FOLDER] with the folder location from step 1.
If you installed the APIM gateway correctly, you see the logs.
- To ensure that the APIM Gateway is running correctly, send a GET request using the following command:
curl -X GET http://localhost:8082/
If you installed the APIM Gateway correctly, the request returns the following message: No context-path matches the request URI.
-
To run the APIM gateway as a daemon, complete the following sub-steps:
a. On the command line, specify `-d`, and then record the process ID in a file using the following command:
./bin/gravitee -d -p=/var/run/gio.pid
You can find log messages in the $GRAVITEE_HOME/logs/
directory.
b. To stop the APIM Gateway, kill the process that is recorded in the pid
file using the following command:
kill `cat /var/run/gio.pid`
The .zip
and .tar.gz
packages are entirely self-contained. By default, all files and directories are contained within $GRAVITEE_HOME
. You created this directory created when extracting the archive.
Location | Description |
---|---|
bin | Binary scripts including gravitee to start a node |
config | Configuration files including gravitee.yml |
lib | Libraries (Gravitee.io libraries and third party libraries) |
logs | Log files |
plugins | Plugin files |
{% endtab %} |
{% tab title="Management API" %}
- Extract the
.zip
archive using the following commands:
$ unzip gravitee-standalone-distribution-4.x.0.zip
$ cp -r graviteeio-full-4.x.0/graviteeio-apim-rest-api-4.x.0 [DESTINATION_FOLDER]/
- Replace [DESTINATION_FOLDER] with the folder where you want to store the archive.
- From the command line, run the APIM API using the following command:
$ cd [DESTINATION_FOLDER]/graviteeio-apim-rest-api-4.x.0
$ ./bin/gravitee
- Replace [DESTINATION_FOLDER] with the folder location from step 1.
{% hint style="info" %} By default, both Management API nodes run at the same time. To configure APIM to run one node, see General configuration. {% endhint %}
- To ensure that the Management API node is running correctly, send an API request using the following command:
curl -X GET http://localhost:8083/management/organizations/DEFAULT/environments/DEFAULT/apis
- To ensure that the Developer Portal API node is running correctly, send an API request using the following command:
curl -X GET http://localhost:8083/portal/environments/DEFAULT/apis
You will receive a response similar to the following example:
{
"data" : [ ],
"metadata" : {
"data" : {
"total" : 0
}
}
}
-
To run the APIM gateway as a daemon, complete the following sub-steps:
a. On the command line, specify
-d
, and then record the process ID in a file using the following command:
./bin/gravitee -d -p=/var/run/gio.pid
- To stop the Management API, kill the process that is recorded in the
pid
file using the following command:
kill `cat /var/run/gio.pid`
The .zip
and .tar.gz
packages are entirely self-contained. By default, all files and directories are contained within $GRAVITEE_HOME
. You created this directory created when extracting the archive.
Location | Description |
---|---|
bin | Binary scripts including gravitee to start a node |
config | Configuration files including gravitee.yml |
lib | Libraries (Gravitee.io libraries and third party libraries) |
logs | Log file location |
plugins | Plugin file location |
data | te |
templates | API templates |
{% endtab %} |
{% tab title="Management Console" %}
You must install the Management API. To install the Management API, switch to the Management API tab.
- Extract the
.zip
archive using the following commands:
$ unzip gravitee-standalone-distribution-4.x.0.zip
$ cp -r graviteeio-full-4.x.0/graviteeio-apim-console-ui-4.x.0 [DESTINATION_FOLDER]/
- Replace [DESTINATION_FOLDER] with the folder where you want to store the archive.
- You can deploy the Management Console or you can run the Management Console by completing the following sub steps:
a. To deploy the Management Console, use any HTTP server. For example, Apache or Nginx.
b. Run the Management Console with Python using the following command:
$ cd [DESTINATION_FOLDER]/graviteeio-apim-console-ui-4.x.0
$ python3 -m http.server
- Replace [DESTINATION_FOLDER] with the folder location from step 1.
c. Run the Management Console with Node.js with the following request:
$ npm install http-server -g
$ cd [DESTINATION_FOLDER]/graviteeio-apim-console-ui-4.x.0
$ http-server
- Replace [DESTINATION_FOLDER] with the folder location from step 1. {% endtab %}
{% tab title="Developer Portal" %}
You must install the Management API. To install the Management API, switch to the Management API tab.
- Extract the
.zip
archive using the following commands:
$ unzip gravitee-standalone-distribution-4.x.0.zip
$ cp -r graviteeio-full-4.1.0/graviteeio-apim-portal-ui-4.x.0 [DESTINATION_FOLDER]/
- Replace [DESTINATION_FOLDER] with the folder where you want to store the archive.
- You can deploy or run the Developer Portal using the following steps:
a. Deploy the Developer Portal using any HTTP server. For example, Apache or Nginx.
b. Run the Developer Portal with Node.js using the following command:
$ npm install angular-http-server -g
$ cd [DESTINATION_FOLDER]/graviteeio-apim-portal-ui-4.x.0
$ angular-http-server
- Replace [DESTINATION_FOLDER] with the folder location from step 1. {% endtab %} {% endtabs %}