Oracle by Example brandingDeploy an Application from GitHub by Using the Command-Line Interface

section 0Before You Begin

This 15-minute tutorial shows you how to deploy a Java application in Oracle Application Container Cloud Service from a Git repository by using the command-line interface (CLI).

Background

The Oracle Application Container Cloud Service GitHub integration enables you to deploy your applications directly from a Git repository.

In this tutorial, you create a Git repository to upload your application. Then you can deploy it by using the CLI, which acts as a thin wrapper over Platform as a Service (PaaS) REST APIs.

What Do You Need?


section 1Create a Git Repository

  1. Log in to github.com.
  2. Click + and then select New repository.
  3. In the Repository name field, enter myJavaApp, select Public, and then click Create repository.
  4. Extract the contents of the hello-world-app.zip file.
  5. Open a Git Bash window and go to the hello-world-app directory.
  6. Create your repository.
    git init
    git add .                              
    git commit -m "Starting Node project"
    git remote add origin https://github.com/YourGitProject/myJavaApp.git
    git push -u origin master

section 2Deploy an Application to Oracle Application Container Cloud Service

  1. In the command-line window, deploy the MyJavaApp application. Make a note of the job ID. You'll use it in the next step.
    psm accs push -n MyJavaApp -r java -s hourly \
    -g https://github.com/YourGitProject/myJavaApp.git \
    -m /local-path-to-manifest.json
  2. Check the deployment job status and replace the job-ID placeholder with your job ID.
    psm accs operation-status -j job-ID -of json
  3. Get the application information. Make a note of the URL, you'll use it in the next step.
    psm accs check-health -n myJavaApp
  4. Open the application in the CLI, replacing the url-app placeholder with your URL.
    curl url-app
    Note: A "Hello World" message indicates that you successfully deployed the application in Oracle Application Container Cloud Service.

more informationWant to Learn More?