Git Product home page Git Product logo

gcn-micronaut-atp-price-spa's Introduction

GCN Micronaut "Price" page SPA with ATP - powered by Graal Cloud Native

GraalVM Cloud Native (GCN) Micronaut sample project with REST API and single page web app and AutonomousDB.

The intention of this sample project is to demonstrate the VS Code GCN extensions & tooling. The database classes and interfaces were generated with the GCN extension from the database schema that is a very handy tool for developers.

Instructions

  1. Create a sample ATP database instance with schema and data and public access https://github.com/mikarinneoracle/atp-ords-liquibase-demo (Choose the part #2 to use Resource Manager/Terraform).
  2. Create the VS Code project by cloning this repo locally. After cloning remove the git directory from project root by rm -rf .git in the project terminal.
  3. Edit application-dev.yaml line 12 by placing the OCID of the ATP instance created in the first step.
  4. Edit application-oraclecloud.yaml line 12 by placing the OCID of the ATP instance created in the first step.
  5. Build and run the app locally in VS Code by navigating to Application.java under oci/src/main/java/com/example/ directory and clicking the Run Java button ( โ–ท ).
    This will work locally since I'm configuring the environment dev by default in Application.java line 31 (in the GCN generated project the default environment is oraclecloud).
  6. Create DevOps project from VS Code and build and deploy the JVM container to OKE using the extension tooling.
    Tip: I've modified the GCN generated build pipeline a bit so that I've added a new step to end of it to trigger the OKE deployment pipeline automatically after the build. Also, for automatic builds when committing code I've added a trigger to OCI DevOps project to kick-off the deployment pipeline (and hence also the deployment pipeline) automatically. This works for both JVM and GraalVM Native builds.
  7. Create OCI load balancer with kubectl to access the the application from browser:
kubectl apply -f - <<EOF
apiVersion: v1
kind: Service
metadata:
  name: gcn-micronaut-atp-price-spa-lb
spec:
  selector:
    app:  gcn-micronaut-atp-price-spa
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8080
  type: LoadBalancer
EOF
  1. Access the OCI load balancer url from browser e.g.
kubectl get svc
NAME                         TYPE           CLUSTER-IP      EXTERNAL-IP       PORT(S)             AGE
gcn-micronaut-atp-price-lb   LoadBalancer   10.96.100.164   138.2.167.156     80:30258/TCP        8s

Micronaut 4.0.3 Documentation


Feature data-jdbc documentation

Feature flyway documentation

Feature http-client documentation

Feature jdbc-hikari documentation

Feature oracle-cloud-atp documentation

Feature oracle-cloud-sdk documentation

Feature serialization-jackson documentation

Feature test-resources documentation

Feature validation documentation

gcn-micronaut-atp-price-spa's People

Contributors

mikarinneoracle avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.