Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 2.4 KB

deploy.md

File metadata and controls

65 lines (50 loc) · 2.4 KB

Load Data into an Instance

Introduction

In this lab you will open up some ports on a compute instance to make a web server accessible from anywhere in the world and you will deploy a Micronaut + GraalVM application to that VM.

Estimated Lab Time: 15 minutes

Deploy Micronaut Application to OCI

  1. To make this available to the world, let's live dangerously and open a port.
    1. Open a port in the security list in Instance's network. On the VM details page, click on the 'subnet' link:
    2. Click "Security Lists"
    3. Click "Default Security List"
    4. Click "Add Ingress Rules"
    5. On the "Add Ingress Rules" dialog, add two rules:
    6. You will also need to open up the VM's firewall:
      sudo firewall-cmd --permanent --zone=public --add-port=8080/tcp
      sudo firewall-cmd --permanent --zone=public --add-port=8080/udp
      sudo firewall-cmd --reload
      
    7. Now from any computer use a web browser and access the url http://:8080/pets

Deploy From Development VM To Production VM

TODO Fix this

  1. Before deploying, ensure the wallet exists on the VM by running the snippet produced by setup.sh that looks similar to:

    # run on local machine to push to VM
    scp -i ~/.ssh/id_oci -r /tmp/wallet opc@[VM IP Address]:/tmp/wallet
  2. Build JAR with:

    # run on local machine
    ./gradlew assemble
  3. Push JAR to VM with the snippet produced by setup.sh that looks similar to this:

    # run on local machine to push to VM
    scp -i ~/.ssh/id_oci -r build/libs/micronaut-data-jdbc-graal-atp-0.1-all.jar opc@[VM IP Address]:/app
  4. To run on the VM, SSH in and run the snippet generated by setup.md that looks similar to this:

    # run on VM to start application
    java -jar -DMICRONAUT_OCI_DEMO_PASSWORD [your generated password] /app/micronaut-data-jdbc-graal-atp-0.1-all.jar

Continue through the following section

  1. Cleanup Cleanup

Want to Learn More?