diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b15f649..d39ed43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - name: create-artifact run: | ls -lai - mv ${{ inputs.type }}/* . + find ./${{ inputs.type }} -maxdepth 1 -type f | xargs mv -t . sed -i -e "/###HEADER###/r interface-header.yaml" -e "//d" interface.yaml rm interface-header.yaml sed -i -e "/###APPLICATION_GROUP###/r interface-application-group.yaml" -e "//d" interface.yaml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a91c6f5..543cd19 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ on: - dotnet jobs: call-workflow-passing-data: - uses: oracle-quickstart/appstack/.github/workflows/build.yml@main + uses: ./.github/workflows/build.yml with: branch: ${{ github.event.inputs.branch }} type: ${{ github.event.inputs.type }} diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 7d444ae..8ee43c4 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -2,7 +2,7 @@ name: 'Build on push' on: push jobs: call-workflow-passing-data: - uses: oracle-quickstart/appstack/.github/workflows/build.yml@main + uses: ./.github/workflows/build.yml with: branch: ${{github.ref_name}} type: 'java' diff --git a/README.md b/README.md index e93fb36..eabbd61 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ App Stack ========= -This repository has automation for various application deployments on the Oracle Cloud Infrastructure (OCI) using serverless resources such as Container Instances and Autonomous Database. In the current version only Java applications are supported. +This repository has automation for various application deployments on the Oracle Cloud Infrastructure (OCI) using serverless resources such as Container Instances and Autonomous Database. The Container Instances service is an ideal deployment platform as it is serverless and cost effective. + +**App Stack** is a customizable Terraform Stack designed to automate the deployment of applications (the backend only) in a serverless infrastructure. Follow the instructions below to learn how to utilize the stack to seamlessly deploy Java applications to Container Instances, creating a production-ready environment. + +![Blueprint architecture](https://github.com/oracle-quickstart/appstack/blob/main/images/blueprintarchitecture.svg) + # Target Applications **Web applications** Server-side HTML applications, a.k.a. servlets or Java Server Pages **Back-end servers** REST APIs -# App Stack for Java - -**App Stack for Java** is a customizable Terraform Stack designed to automate the deployment of Java applications (the backend only) in a serverless infrastructure. Follow the instructions below to learn how to utilize the stack to seamlessly deploy Java applications to Container Instances, creating a production-ready environment. - -[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-quickstart/appstack/releases/download/v0.1.4/appstackforjava.zip) -![Blueprint architecture](https://github.com/oracle-quickstart/appstack/blob/main/images/blueprintarchitecture.svg) +# App Stack for Java Your Java application can be packaged in 3 ways: 1. As **source code**: this is the most valuable use case. Your source code can be in a github repo and mirrored in OCI DevOps (see details below). The stack will create a build pipeline that: @@ -27,14 +27,28 @@ Your Java application can be packaged in 3 ways: In all cases the deployment is done on Container Instances behind a load balancer. -## Release and status +[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-quickstart/appstack/releases/download/v0.1.4/appstackforjava.zip) + +## Usage Instructions + +Please refer to the [usage instructions](./java/usage_instructions.md) for details about each field of the stack form. + +## Tutorial + +[MyTodoList SpringBoot application tutorial](./java/tutorials/mytodolist/tutorial.md). + + +# App Stack for .Net +TODO : write .Net specific description + +# Release and status - This is v0.1.4: initial release as a preview. -## Prerequisites +# Prerequisites -For deploying your Java App with the App Stack, here is the list of OCI prerequisites. +For deploying your application with the App Stack, here is the list of OCI prerequisites. -- **DevOps project (optional):** A Java application in an OCI DevOps project (can be a mirror of an existing GitHub repo). This isn't required if the application is provided as a container image. +- **DevOps project (optional):** An application in an OCI DevOps project (can be a mirror of an existing GitHub repo). This isn't required if the application is provided as a container image. - **Database:** an existing Autonomous Database - Shared Infrastructure (ADB-S) can be used with the stack. The stack may create a new one, if specified during the Stack configuration. - **Vault (optional):** An authentication token can either be provided or created by the stack. It is used for connecting to the DevOps repos. A Vault is necessary to store this token, the Vault isn't required if the application is provided as a container image. - **DNS (optional):** A DNS zone for creating the application URL (for example https://myapp.domain.com). If not provided during the stack configuration, the application will be available through the load balancer's public IP. You can then configure your third-party DNS provider to point to this IP address. @@ -55,7 +69,7 @@ For deploying your Java App with the App Stack, here is the list of OCI prerequi Allow dynamic-group 'appstack-devops' to manage devops-family in tenancy ``` -## Which Cloud Resources will be used? +# Which Cloud Resources will be used? The [Oracle Cloud Free Tier service](https://www.oracle.com/cloud/free/) allows you to build, test, and deploy your applications on Oracle Cloud for free. Upon signing up, the service comes with a $300 credit with 30 days expiration; following the expiration or the exhaustion of the credit, most of the provisioned services remain available as [Always Free](https://www.oracle.com/cloud/free/#always-free). You may add additional credit for services that do not fall under Always-Free. - **Container Instances** for building and running the app. This service is part of Free-Tier but not an Always-Free resource. @@ -67,12 +81,7 @@ The [Oracle Cloud Free Tier service](https://www.oracle.com/cloud/free/) allows - **HTTPS Certificates**. This service is part of Always-Free with some limits. - **DNS** for application URL. This service is part of Free-Tier but not an Always-Free resource. - -## Usage Instructions - -Please refer to the [usage instructions](./usage_instructions.md) for details about each field of the stack form. - -### What will the stack do? +## What will the stack do? - Create a new repository called "_config" that includes: - **wallet.zip:** The database wallet (the zip that includes tnsnames.ora, cwallet.sso and ojdbc.properties) If the database wallet is rotated this zip file needs to be updated. @@ -87,34 +96,30 @@ Please refer to the [usage instructions](./usage_instructions.md) for details ab - Terraform script for provisioning the Autonomous Database - Dependencies to pull JDBC, UCP, R2DBC, and so on from Maven Central. -## Destroying the stack +# Destroying the stack Before you can destroy the stack and all the resources that have been created you must manually delete the artifact that the stack has created under the "Artifact Registry". -## Tutorial - -[MyTodoList SpringBoot application tutorial](./tutorials/mytodolist/tutorial.md). - -## Contributing +# Contributing This project welcomes contributions from the community. Before submitting a pull request, see [CONTRIBUTING](./CONTRIBUTING.md) for details. -## License +# License Copyright (c) 2023, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. See [LICENSE](./LICENSE) for more details. -## Support +# Support Please review the [troubleshooting document](./troubleshooting/troubleshooting.md). For support you can [file issues on GitHub](https://github.com/oracle-quickstart/appstack/issues). You can also send an email to the product team at "appstack_ww at oracle.com". -## Appendix +# Appendix -### Build instructions +## Build instructions To build the zip on a mac from this directory: ``` zip -r ../appstackforjava.zip . -x "*.git*" -x "*.DS_Store" -x "images/*" -x "listing/*" -x "*.md" -x "troubleshooting/*" -x "tutorials/*" -x "screenshots/*" -x "*.md" diff --git a/listing/overview.html b/java/listing/overview.html similarity index 100% rename from listing/overview.html rename to java/listing/overview.html diff --git a/listing/system-requirements.html b/java/listing/system-requirements.html similarity index 100% rename from listing/system-requirements.html rename to java/listing/system-requirements.html diff --git a/listing/usage-information.html b/java/listing/usage-information.html similarity index 100% rename from listing/usage-information.html rename to java/listing/usage-information.html diff --git a/screenshots/2_Application.png b/java/screenshots/2_Application.png similarity index 100% rename from screenshots/2_Application.png rename to java/screenshots/2_Application.png diff --git a/troubleshooting/screenshots/1_statefailed.png b/java/troubleshooting/screenshots/1_statefailed.png similarity index 100% rename from troubleshooting/screenshots/1_statefailed.png rename to java/troubleshooting/screenshots/1_statefailed.png diff --git a/troubleshooting/screenshots/2_logerror.png b/java/troubleshooting/screenshots/2_logerror.png similarity index 100% rename from troubleshooting/screenshots/2_logerror.png rename to java/troubleshooting/screenshots/2_logerror.png diff --git a/troubleshooting/screenshots/3_buildpipelinelog.png b/java/troubleshooting/screenshots/3_buildpipelinelog.png similarity index 100% rename from troubleshooting/screenshots/3_buildpipelinelog.png rename to java/troubleshooting/screenshots/3_buildpipelinelog.png diff --git a/troubleshooting/screenshots/4_artifactalreadyexists.png b/java/troubleshooting/screenshots/4_artifactalreadyexists.png similarity index 100% rename from troubleshooting/screenshots/4_artifactalreadyexists.png rename to java/troubleshooting/screenshots/4_artifactalreadyexists.png diff --git a/troubleshooting/screenshots/5_deleteartifact.png b/java/troubleshooting/screenshots/5_deleteartifact.png similarity index 100% rename from troubleshooting/screenshots/5_deleteartifact.png rename to java/troubleshooting/screenshots/5_deleteartifact.png diff --git a/troubleshooting/troubleshooting.md b/java/troubleshooting/troubleshooting.md similarity index 100% rename from troubleshooting/troubleshooting.md rename to java/troubleshooting/troubleshooting.md diff --git a/tutorials/mytodolist/screenshots/10_devopslogging.png b/java/tutorials/mytodolist/screenshots/10_devopslogging.png similarity index 100% rename from tutorials/mytodolist/screenshots/10_devopslogging.png rename to java/tutorials/mytodolist/screenshots/10_devopslogging.png diff --git a/tutorials/mytodolist/screenshots/11_externalconnection.png b/java/tutorials/mytodolist/screenshots/11_externalconnection.png similarity index 100% rename from tutorials/mytodolist/screenshots/11_externalconnection.png rename to java/tutorials/mytodolist/screenshots/11_externalconnection.png diff --git a/tutorials/mytodolist/screenshots/12_validateexternalconnection.png b/java/tutorials/mytodolist/screenshots/12_validateexternalconnection.png similarity index 100% rename from tutorials/mytodolist/screenshots/12_validateexternalconnection.png rename to java/tutorials/mytodolist/screenshots/12_validateexternalconnection.png diff --git a/tutorials/mytodolist/screenshots/13_createrepo.png b/java/tutorials/mytodolist/screenshots/13_createrepo.png similarity index 100% rename from tutorials/mytodolist/screenshots/13_createrepo.png rename to java/tutorials/mytodolist/screenshots/13_createrepo.png diff --git a/tutorials/mytodolist/screenshots/14_mirrorrepo.png b/java/tutorials/mytodolist/screenshots/14_mirrorrepo.png similarity index 100% rename from tutorials/mytodolist/screenshots/14_mirrorrepo.png rename to java/tutorials/mytodolist/screenshots/14_mirrorrepo.png diff --git a/tutorials/mytodolist/screenshots/15_repo.png b/java/tutorials/mytodolist/screenshots/15_repo.png similarity index 100% rename from tutorials/mytodolist/screenshots/15_repo.png rename to java/tutorials/mytodolist/screenshots/15_repo.png diff --git a/tutorials/mytodolist/screenshots/16_stackbutton.png b/java/tutorials/mytodolist/screenshots/16_stackbutton.png similarity index 100% rename from tutorials/mytodolist/screenshots/16_stackbutton.png rename to java/tutorials/mytodolist/screenshots/16_stackbutton.png diff --git a/tutorials/mytodolist/screenshots/17_createstack.png b/java/tutorials/mytodolist/screenshots/17_createstack.png similarity index 100% rename from tutorials/mytodolist/screenshots/17_createstack.png rename to java/tutorials/mytodolist/screenshots/17_createstack.png diff --git a/tutorials/mytodolist/screenshots/18_generalconfig.png b/java/tutorials/mytodolist/screenshots/18_generalconfig.png similarity index 100% rename from tutorials/mytodolist/screenshots/18_generalconfig.png rename to java/tutorials/mytodolist/screenshots/18_generalconfig.png diff --git a/tutorials/mytodolist/screenshots/19_appconfig.png b/java/tutorials/mytodolist/screenshots/19_appconfig.png similarity index 100% rename from tutorials/mytodolist/screenshots/19_appconfig.png rename to java/tutorials/mytodolist/screenshots/19_appconfig.png diff --git a/tutorials/mytodolist/screenshots/1_springbootrepo.png b/java/tutorials/mytodolist/screenshots/1_springbootrepo.png similarity index 100% rename from tutorials/mytodolist/screenshots/1_springbootrepo.png rename to java/tutorials/mytodolist/screenshots/1_springbootrepo.png diff --git a/tutorials/mytodolist/screenshots/20_apm.png b/java/tutorials/mytodolist/screenshots/20_apm.png similarity index 100% rename from tutorials/mytodolist/screenshots/20_apm.png rename to java/tutorials/mytodolist/screenshots/20_apm.png diff --git a/tutorials/mytodolist/screenshots/21_db.png b/java/tutorials/mytodolist/screenshots/21_db.png similarity index 100% rename from tutorials/mytodolist/screenshots/21_db.png rename to java/tutorials/mytodolist/screenshots/21_db.png diff --git a/tutorials/mytodolist/screenshots/22_vault.png b/java/tutorials/mytodolist/screenshots/22_vault.png similarity index 100% rename from tutorials/mytodolist/screenshots/22_vault.png rename to java/tutorials/mytodolist/screenshots/22_vault.png diff --git a/tutorials/mytodolist/screenshots/23_url.png b/java/tutorials/mytodolist/screenshots/23_url.png similarity index 100% rename from tutorials/mytodolist/screenshots/23_url.png rename to java/tutorials/mytodolist/screenshots/23_url.png diff --git a/tutorials/mytodolist/screenshots/24_network.png b/java/tutorials/mytodolist/screenshots/24_network.png similarity index 100% rename from tutorials/mytodolist/screenshots/24_network.png rename to java/tutorials/mytodolist/screenshots/24_network.png diff --git a/tutorials/mytodolist/screenshots/25_applystack.png b/java/tutorials/mytodolist/screenshots/25_applystack.png similarity index 100% rename from tutorials/mytodolist/screenshots/25_applystack.png rename to java/tutorials/mytodolist/screenshots/25_applystack.png diff --git a/tutorials/mytodolist/screenshots/26_stacksuccess.png b/java/tutorials/mytodolist/screenshots/26_stacksuccess.png similarity index 100% rename from tutorials/mytodolist/screenshots/26_stacksuccess.png rename to java/tutorials/mytodolist/screenshots/26_stacksuccess.png diff --git a/tutorials/mytodolist/screenshots/27_appinformation.png b/java/tutorials/mytodolist/screenshots/27_appinformation.png similarity index 100% rename from tutorials/mytodolist/screenshots/27_appinformation.png rename to java/tutorials/mytodolist/screenshots/27_appinformation.png diff --git a/tutorials/mytodolist/screenshots/28_iamalive.png b/java/tutorials/mytodolist/screenshots/28_iamalive.png similarity index 100% rename from tutorials/mytodolist/screenshots/28_iamalive.png rename to java/tutorials/mytodolist/screenshots/28_iamalive.png diff --git a/tutorials/mytodolist/screenshots/29_containerinstances.png b/java/tutorials/mytodolist/screenshots/29_containerinstances.png similarity index 100% rename from tutorials/mytodolist/screenshots/29_containerinstances.png rename to java/tutorials/mytodolist/screenshots/29_containerinstances.png diff --git a/tutorials/mytodolist/screenshots/2_githubtoken.png b/java/tutorials/mytodolist/screenshots/2_githubtoken.png similarity index 100% rename from tutorials/mytodolist/screenshots/2_githubtoken.png rename to java/tutorials/mytodolist/screenshots/2_githubtoken.png diff --git a/tutorials/mytodolist/screenshots/30_ciinstanc.png b/java/tutorials/mytodolist/screenshots/30_ciinstanc.png similarity index 100% rename from tutorials/mytodolist/screenshots/30_ciinstanc.png rename to java/tutorials/mytodolist/screenshots/30_ciinstanc.png diff --git a/tutorials/mytodolist/screenshots/31_viewlogs.png b/java/tutorials/mytodolist/screenshots/31_viewlogs.png similarity index 100% rename from tutorials/mytodolist/screenshots/31_viewlogs.png rename to java/tutorials/mytodolist/screenshots/31_viewlogs.png diff --git a/tutorials/mytodolist/screenshots/32_logs.png b/java/tutorials/mytodolist/screenshots/32_logs.png similarity index 100% rename from tutorials/mytodolist/screenshots/32_logs.png rename to java/tutorials/mytodolist/screenshots/32_logs.png diff --git a/tutorials/mytodolist/screenshots/3_compartment.png b/java/tutorials/mytodolist/screenshots/3_compartment.png similarity index 100% rename from tutorials/mytodolist/screenshots/3_compartment.png rename to java/tutorials/mytodolist/screenshots/3_compartment.png diff --git a/tutorials/mytodolist/screenshots/4_vault.png b/java/tutorials/mytodolist/screenshots/4_vault.png similarity index 100% rename from tutorials/mytodolist/screenshots/4_vault.png rename to java/tutorials/mytodolist/screenshots/4_vault.png diff --git a/tutorials/mytodolist/screenshots/5_vault_createkey.png b/java/tutorials/mytodolist/screenshots/5_vault_createkey.png similarity index 100% rename from tutorials/mytodolist/screenshots/5_vault_createkey.png rename to java/tutorials/mytodolist/screenshots/5_vault_createkey.png diff --git a/tutorials/mytodolist/screenshots/6_vault_createsecret.png b/java/tutorials/mytodolist/screenshots/6_vault_createsecret.png similarity index 100% rename from tutorials/mytodolist/screenshots/6_vault_createsecret.png rename to java/tutorials/mytodolist/screenshots/6_vault_createsecret.png diff --git a/tutorials/mytodolist/screenshots/7_dynamicgroup.png b/java/tutorials/mytodolist/screenshots/7_dynamicgroup.png similarity index 100% rename from tutorials/mytodolist/screenshots/7_dynamicgroup.png rename to java/tutorials/mytodolist/screenshots/7_dynamicgroup.png diff --git a/tutorials/mytodolist/screenshots/8_policy.png b/java/tutorials/mytodolist/screenshots/8_policy.png similarity index 100% rename from tutorials/mytodolist/screenshots/8_policy.png rename to java/tutorials/mytodolist/screenshots/8_policy.png diff --git a/tutorials/mytodolist/screenshots/9_devopsproject.png b/java/tutorials/mytodolist/screenshots/9_devopsproject.png similarity index 100% rename from tutorials/mytodolist/screenshots/9_devopsproject.png rename to java/tutorials/mytodolist/screenshots/9_devopsproject.png diff --git a/tutorials/mytodolist/tutorial.md b/java/tutorials/mytodolist/tutorial.md similarity index 100% rename from tutorials/mytodolist/tutorial.md rename to java/tutorials/mytodolist/tutorial.md diff --git a/usage_instructions.md b/usage_instructions.md index 265f216..4f51bad 100644 --- a/usage_instructions.md +++ b/usage_instructions.md @@ -10,9 +10,12 @@ Choose the **compute compartment** and **availability domain** where will all re ## Your Application -This section describes the packaging and deployment of your application. +This section describes the packaging and deployment of your application for the different programming languages : -![](./screenshots/2_Application.png) +
+ Java + +![](./java/screenshots/2_Application.png) The stack supports different kinds of deployments: *source code* deployment, java *artifact* deployment or *container image* deployment. Each type of deployment has different prerequisites and requires different parameters. *Source code* deployment is possible if the *source code* of the application is stored in OCI DevOps (mirrored repositories from other sources like GitHub to OCI DevOps); Java *artifact* deployment requires a Java *artifact* to be present if the OCI *artifact* Registry; and *container image* deployment requires the *container image* to the present in an OCI Container Registry accessible by the Stack, the image must be configured to respond to HTTPS requests through the exposed port. @@ -38,6 +41,12 @@ The stack supports different kinds of deployments: *source code* deployment, jav - **Full path to the image in the container registry** - **Exposed port:** port exposed by the container image +
+
+ .Net + TODO : complete +
+ ## Stack authentication ![](./screenshots/7_Vault.png)