|Table of Contents|
This topic describes how to create, Dockerize, and publish an API Builder Standalone application to the AMPLIFY Runtime Services cloud. Prerequisites, instructions, and references are provided to help you successfully deploy and publish your application to the AMPLIFY Runtime Services cloud and to test your published application.
AMPLIFY Platform account
You need to have an account on https://platform.axway.com.
The installation of Docker is via a dedicated installer for your specific operating system. For additional Docker installation information, refer to the Docker documentation.
API Builder CLI
The API Builder CLI is a node module published in the npm public repository. To install, execute the following command:
For additional API Builder CLI installation information, refer to the API Builder Getting Started Guide.
AMPLIFY Cloud Services (ACS) CLI
The AMPLIFY Cloud Services CLI (ACS) is a node module published in the npm public repository. To install, execute the following command:
For additional AMPLIFY Cloud Services CLI information, refer to the AMPLIFY Runtime Services Command-Line Interface Reference.
Create your application
$ api-builder init myproject
Create your Platform application
Log in to the AMPLIFY Platform using your https://platform.axway.com username and password. Create a project in the cloud with the same name as your "myproject" sub-directory. Then, configure your project to use PORT 8080. This is because the container is built with PORT 8080 by default.
You may already have an existing project, "myproject". If you do, and you know that it is not being used and you wish to delete it, or if you want to delete this example project on ARS, you can execute: acs remove myproject.
Build a Docker image
To build a Docker image of your project, execute the following commands.
$ cd ./myproject $ docker build --tag demo-image ./
Publish image to Platform
To publish the Docker image of your project to the Platform, execute the following command.
It can take up to 10 minutes for your project to be deployed and your service to be accessible. You should Check publish status before trying to access your service in the cloud.
App will be available at https://<guid>.cloudapp-enterprise.appcelerator.com
Even though your image was sent to ARS, it can take up to 10 minutes to start (for example,
Status: Deploying). You should check the
Status of your project before trying to access your service that is running in the cloud. The service will not be available until status shows
$ acs logcat myproject
Try your application
To try your application in the cloud, you will require your API key, which can be found in "myproject/conf/default.js". On successful publication of your project, you also received a URL with a GUID prefix to access your application from the Internet. Replace the <key> and <guid> with the API key and GUID values in the following command.