Deploy an Application

You can deploy an application to Oracle Application Container Cloud Service by using the service user interface console, the command-line interface, or by using the REST API.

Deploying the Archive by Using the Service User Interface Console

To deploy your application by using the Oracle Application Container Cloud Service console, see Creating an Application in Using Oracle Application Container Cloud Service

img/obecloud.png Tutorial - Deploy a Java application to Oracle Cloud

Deploying the Archive by Using the Command-line Interface

To deploy your application using the command-line interface, use the accs push command.

Example 3-18 Deploying a Java Application by Using the Command-line Interface

psm accs push -n MyJavaApp -r java -s Monthly \
-p /home/myapp.zip \
-m /local-path-to-manifest.json -d /local-path-to-deployment.json

To learn more, see psm accs push in PaaS Service Manager Command Line Interface Reference.

img/obecloud.pngTutorial - Deploy an application by using the command-line interface

Deploying the Archive by Using the REST API

To deploy your application by using the REST API, create your archive and place it in your Oracle Cloud Infrastructure Object Storage Classic account.

Example 3-19 Creating a Storage Container

curl -i -X PUT -H -u joe@example.com:password \
https://ExampleIdentityDomain.storage.oraclecloud.com/v1/Storage-ExampleIdentityDomain/MyPrivateApp

Example 3-20 Uploading the Archive to the Storage Container

curl -i -X PUT -u joe@example.com:password \
https://ExampleIdentityDomain.storage.oraclecloud.com/v1/Storage-ExampleIdentityDomain/MyPrivateApp/MyPrivateApp.zip \
-T local-path/MyPrivateApp.zip

Example 3-21 Deploying a Java Application by Using the REST API

curl -X POST -u joe@example.com:password \
-H "X-ID-TENANT-NAME:ExampleIdentityDomain" \
-H "Content-Type: multipart/form-data" -F "name=MyPrivateApp" \
-F "runtime=java" -F "subscription=Monthly" \
-F "deployment=@deployment.json" \
-F "archiveURL=mydomain/binaries/myprivapp.zip" \
-F "notes=notes for deployment" \
https://apaas.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain
img/obecloud.png Tutorial - Deploying an Express application to Oracle Application Container Cloud Service

Any option on the command line (such as subscription or name) takes precedence over the same option in a metadata file, if there is a difference.

To learn more, see Create an Application in REST API for Oracle Application Container Cloud Service.