A sample application that demonstrates how to structure an application for Multi Cloud development and deployment.
The app subproject contains the application code with no Cloud specific dependencies or configuration.
The aws subproject depends on the app project and introduces configuration (defined in aws/src/main/resources/application-ec2.yml) and dependencies (defined in aws/build.gradle) that integrate the application with services of AWS:
- AWS RDS MySQL
- AWS CloudWatch Metrics
- AWS CloudWatch Tracing
- AWS Secrets Manager
- AWS S3 Object Storage
The oci subproject depends on the app project and introduces configuration (defined in oci/src/main/resources/application-oraclecloud.yml) and dependencies (defined in oci/build.gradle) that integrate the application with services of Oracle Cloud:
- Oracle Cloud Autonomous Transaction Processing (ATP)
- Oracle Cloud Application Monitoring (Metrics)
- Oracle Cloud Application Performance Monitoring (Tracing)
- Oracle Cloud Vault (Secrets)
- Oracle Cloud Object Storage
The oci-infra subproject contains terraform scripts to deploy oci subproject to the OCI. It uses OCI CLI for authentication.
To run it you have perform the following steps:
- Install OCI CLI and configure it.
- Install Terraform CLI.
- Edit
terraform.tfvarswith necessary information. - If you are not using an OCI "always free" tenancy you need to set
is_free_tiertofalseinapm.tfanddatabase.tf. - Run
./gradlew shadowJarin the root of the project. - Run
terraform initinsideoci-infrasubproject. - Run
terraform applyinsideoci-infrasubproject.
After successful build the application URL will be written to the terminal window.
You can destroy the Cloud resources when you are done by running terraform destroy.
The aws-infra subproject builds and deploys aws subproject to the AWS. It uses AWS CDK to achieve this.
To run it you have perform the following steps:
- Install AWS CDK.
- Run
cdk bootstrapinsideaws-infrasubproject. - Run
cdk deployinsideaws-infrasubproject.
After successful build the application URL will be written to the terminal window.
You can destroy the Cloud resources when you are done by running cdk destroy.