API Gateway package and deploy tools ( https://docs.axway.com/bundle/axway-open-docs/page/docs/apim_installation/apigtw_install/install_deploy_tools/index.html) has the following limitations and user should install the software on Jenkins / other Continuous Integration machine / create docker image to access the CLI.
- Does not provide a maven plugin to deploy fed, pol and env files.
- No CLI support for downloading fed from existing gateway.
Axway Amplify APIM deployment project provides utility to export and import fed, pol and env artifacts. The utilities are delivered as standalone CLI and maven plugin for CI tool integration.
CLI utility uses APIM product APIs (API Gateway API - http://apidocs.axway.com/swagger-ui/index.html?productname=apigateway&productversion=7.7.0&filename=api-gateway-swagger.json) internally to interact with Axway APIM.
- Axway AMPLIFY API Management 7.5.3 or above
- JDK 1.8.0_xxx
- Apache Maven 3.3.9 or above
- Trust API Gateway Admin Node manager domain certificate
-
Download ANM certificate from browser
-
Import the certificate to java key store
keytool -import -trustcacerts -keystore "C:\Program Files\Java\jdk1.8.0_111\jre\lib\security\cacerts" -storepass changeit -alias domain -file c:\Users\rnatarajan\Desktop\domain.cer -noprompt
```bash
$mvn clean install -Dmaven.test.skip=true
```
- Ignore maven plugin test project
$mvn clean install -Dmaven.test.skip=true -pl !apim-deployment-samples\gateway-plugin-deploy-fed,!apim-deployment-samples\gateway-plugin-deploy-polenv,!apim-deployment-samples\gateway-plugin-export-fed,!apim-deployment-samples\gateway-plugin-export-polenv
Example for Linux:
#mvn clean install -Dmaven.test.skip=true -pl \!apim-deployment-samples/gateway-plugin-deploy-fed,\!apim-deployment-samples/gateway-plugin-deploy-polenv,\!apim-deployment-samples/gateway-plugin-export-fed,\!apim-deployment-samples/gateway-plugin-export-polenv
You can run the following command to see available options:
#java -jar apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar --help
usage: Gateway Deployment
-e,--envFile <arg> Environment File
-f,--fedFile <arg> Federation File
-g,--group <arg> Domain group name
-h,--help Help options
-n,--instance <arg> Domain instance name
-o,--operation <arg> Name of Operation : export or deploy
-p,--password <arg> Admin Node Manager password
-pol,--polFile <arg> PolicyFile File
-s,--gatewayURL <arg> Admin Node Manager URL
-t,--type <arg> Possbile values: fed, polenv
-u,--username <arg> Admin Node Manager username
The following sections provide examples of using the tool.
In this section you can find examples of the commands to deploy FED, POL and ENV files to your target configuration.
Now you can deploy a FED file to your installation for Axway API Management.For example,
- for Windows:
java -jar apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar --operation=deploy --gatewayURL=https://localhost:8090 --username=admin --password=changeme --group=finance --fedFile=D:\\api\\finance.fed --type=fed
- and for Linux:
java -jar apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar --operation=deploy --gatewayURL=https://localhost:8090 --username=admin --password=changeme --group=Finance --fedFile=/home/axway/finance.fed --type=fed
For example,
- for Windows
java -jar apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar --operation=deploy --gatewayURL=https://localhost:8090 --username=admin --password=changeme --group=finance --instance=server1 --fedFile=D:\\api\\finance.fed --type=fed
- and for Linux
java -jar apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar --operation=deploy --gatewayURL=https://localhost:8090 --username=admin --password=changeme --group=Finance --instance=server1 --fedFile=/home/axway/finance.fed --type=fed
For example,
- for Windows
java -jar apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar --operation=deploy --gatewayURL=https://localhost:8090 --username=admin --password=changeme --group=finance --polFile=D:\\api\\finance.pol --envFile=D:\\api\\finance.env --type=polenv
- and for Linux
java -jar apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar --operation=deploy --gatewayURL=https://localhost:8090 --username=admin --password=changeme --group=Finance --polFile=/home/axway/finance.pol --envFile=/home/axway/finance.env --type=polenv
For example,
- for Windows:
java -jar apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar --operation=deploy --gatewayURL=https://localhost:8090 --username=admin --password=changeme --group=finance --instance=server1 --polFile=D:\\api\\finance.pol --envFile=D:\\api\\finance.env --type=polenv
- and for Linux:
java -jar apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar --operation=deploy --gatewayURL=https://localhost:8090 --username=admin --password=changeme --group=Finance --instance=server1 --polFile=/home/axway/finance.pol --envFile=/home/axway/finance.env --type=polenv
If API Gateway installed behind a proxy, use the following system properties
- proxyHost
- proxyPort
- proxyProtocol - http or https
Example
java -jar -DproxyHost=10.10.2.2 -DproxyPort=8080 --proxyProtocol=https apim-deployment-project/gateway-standalone/target/gateway-standalone-1.0.0.jar -o=deploy -s=https://localhost:8090 -u=admin -p=changeme -g=finance -n=server1 -f=D:\\api\\finance.fed -t=fed
Please read Contributing.md for details on our code of conduct, and the process for submitting pull requests to us.