In this lab you will take a fresh OCI compute instance and set it up for development for an application that uses Micronaut, ATP and GraalVM.
Estimated Lab Time: 10 minutes
Objectives
In this lab you will:
- SSH into a remote VM
- Install git, GraalVM and Micronaut
Prerequisites
- Followed the Setup OCI lab
- An OCI compute instance setup with RSA keys installed
- The compute instance has the ATP wallet setup and installed
-
Use SSH to access your Development Compute Instance. You have a choice: connect to your compute instance from Cloud Shell or from your local terminal.
ssh -i ~/.ssh/local_id_rsa opc@${COMPUTE_IP}
-
Setup the Compute Instance by installing the software needed to run this lab.
Install Git:
sudo yum install -y git git --version
Install GraalVM: Use Graal Enterprise https://docs.oracle.com/en/graalvm/enterprise/20/guide/overview/oci/create-instance.html
sudo yum -y install graalvm20-ee-11-20.2.0-1.el7.x86_64 sudo yum -y install graalvm20-ee-11-native-image java -version
Make sure the version number of the java command that is on the path is the one that was installed:
java 11.0.8.0.2 2020-07-09 LTS Java(TM) SE Runtime Environment GraalVM EE 20.2.0 (build 11.0.8.0.2+1-LTS-jvmci-20.2-b03) Java HotSpot(TM) 64-Bit Server VM GraalVM EE 20.2.0 (build 11.0.8.0.2+1-LTS-jvmci-20.2-b03, mixed mode, sharing)
Install SDKMAN:
curl -s https://get.sdkman.io | bash source "$HOME/.sdkman/bin/sdkman-init.sh"
Install Micronaut:
sdk install micronaut mn --version
Note: This is a small chance this doesn't work in which case you can bypass using sdk manager:
wget https://github.com/micronaut-projects/micronaut-starter/releases/download/v2.0.0/micronaut-cli-2.0.0.zip unzip micronaut-cli-2.0.0.zip rm micronaut-cli-2.0.0.zip echo 'export PATH=/home/opc/micronaut-cli-2.0.0/bin:$PATH' >> ~/.bashrc source ~/.bashrc mn --version
Make sure the version number of the mn command that is on the path is the one that was installed:
Micronaut Version: 2.0.0 JVM Version: 11.0.8.0.2
Install Gradle:
sdk install gradle
or do it in steps: