Set up your environment and deploy your first application on Oracle Application Container Cloud using the REST API by performing the following tasks.
Step 1: Obtain Account Information
Username and password
The URL of your Oracle Application Container Cloud instance, which is listed in the welcome email you receive with your trial or purchased subscription.
The identity domain for your subscription to Oracle Application Container Cloud.
Step 2: Install cURL
You can use the cURL command-line tool to access the Oracle Application Container Cloud REST API.
In your browser, navigate to the cURL Home Page.
Locate the SSL-enabled version of the cURL software that corresponds to your operating system, download the ZIP file, and install the software.
Step 3: Deploy the Sample Welcome Application
curl -i -X POST -H "Authorization:firstname.lastname@example.org:joePassword" \ -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \ -H "Content-Type: multipart/form-data" \ -F "name=ApaaSApplicationName" -F "runtime=java" \ -F "subscription=Hourly" \ https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain
The response body will include information about the application, including the ID of the deployed application (ExampleAppId in next step).
Step 4: Review the Details of Your First Application
The following example shows how to view the details of an application by submitting a GET request on the REST resource using cURL:
curl -i -X GET -H "Authorization:email@example.com:joePassword" \ -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \ https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppId
Step 5: Deploy Your First Application
To deploy an application using the REST API, first create your archive (a
.tgz file plus, optionally, a non-zipped manifest file in the same directory) and place it in your Oracle Cloud Storage Service account.
This example shows how to deploy a Java application called MyFirstApp by submitting a POST request using cURL. The
archiveURL points to the location of your archive within your storage service account.
curl -X POST -u firstname.lastname@example.org:password \ -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \ -H "Content-Type: multipart/form-data" -F "name=MyFirstApp" \ -F "runtime=java" -F "subscription=Monthly" \ -F "email@example.com" -F "firstname.lastname@example.org" \ -F "archiveURL=mydomain/binaries/myapp.zip" \ -F "notes=notes for deployment" \ https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain
As you can see from the example, you have the option of supplying
manifest.json separately or within the zipped archive (or both). If you do specify a
manifest.json on the command line, that file will be given priority if there is also a
manifest.json in the zipped archive.
More generally, any option on the command line (such as the subscription or name) takes precedence over the same option in a metadata file, if there is a difference.