Skip to content

Commit

Permalink
Added TAS capabilities, and local development (#69)
Browse files Browse the repository at this point in the history
* Connection String Modified for Order Service (#184)

* Link missing for Deploy to Azure

If I push the link of the "Deploy to Azure" button, it failed to show the Form in the Azure Portal.

And it seems that the link had changed as follows.

Previous Link (Currently Failed)
https://raw.githubusercontent.com/Azure-Samples/acme-fitness-store/Azure/workshops/azure-spring-apps-enterprise/full/03-workshop-environment-setup/acmedeploy.json)

Now (Correct Link)
https://raw.githubusercontent.com/Azure-Samples/acme-fitness-store/Azure/azure-spring-apps-enterprise/workshops/azure-spring-apps-enterprise/full/03-workshop-environment-setup/acmedeploy.json

So I modified the link for it.

* Connection String Modified for Order Service

If I configured the Connection String for Npgsql (C#).
Following error was showed and couldn't start the order service.

So I modified to be able to access to the PostgreSQL from the catalog service.

```bash
az keyvault secret set \
    --vault-name acme-fitness-kv-yoshio \
    --name "ConnectionStrings--OrderContext" \
    --value "Server=$POSTGRES_SERVER.postgres.database.azure.com;Database=$ORDER_SERVICE_DB;Port=5432;SSL Mode=Require;Trust Server Certificate=true;User ID=$POSTGRES_SERVER_USER;Password=$POSTGRES_SERVER_PASSWORD"
```

```text
Unhandled exception. System.ArgumentException: To validate server certificates, please use VerifyFull or VerifyCA instead of Require. To disable validation, explicitly set 'Trust Server Certificate' to true. See https://www.npgsql.org/doc/release-notes/6.0.html for more details.
```

* Modified Env Value

I modified the expression of the env variables

* I modified the style with more visible

I modified the style with more visible.

I also tried to the separate line and works fine.

* Add markdown link check (#187)

* Add markdown link check

* update link

* Fix links

* fix links

* fix link

* fix links

* fix links and typos

* fix

* fix

* Rename Azure AD (#188)

* Rename Azure AD

* update link

* update name

* Create Japanese Translation documents for Workshop (#149)

* Created Japanese Translation Documents for Workshop

Created Japanese Translation Documents for Workshop

* Create Japanese Translation documents for Workshop

Create Japanese Translation documents for Workshop

* Deleted wrong explanation

Deleted wrong explanation

* Updated Markdown missing

Updated Markdown missing

* Modified Markdown expression

Modified Markdown expression

* Upload Image files

Upload Image files

* Added AI Workshop

Added AI Workshop

* Modified Link for AI

Modified Link for AI

* Create README.md

Create README.md

* Update README.md

Modified from "Azure Active Directory" to "Microsoft Entra ID"

* Update README.md

コマンドの実行順によるエラーが発生したため、順番を訂正

* Update README.md

Log Analytics ワークスペースが作成されていなかったため

* Update README.md

正しく動作するように修正

* Update README.md

Keyvault が作成されていないのに Key Vault の操作があったため、
Keyvault の作成を追加

* Update README.md

ルーティング設定のファイルの場所が異なるため、ディレクトリを移動。
Portal API のサンプル画面が表示されていなかったため、画面ダンプを追加

* Update README.md

Java アプリのデプロイに失敗していたため、正しい引数に修正

* Update README.md

説明を追記

* Update README.md

PostgreSQL のパスワード設定などを追記

* Update README.md

Update README.md

* Update for intermediate

Update for intermediate

* Update README.md

Modified Invalid URL for the image

* Update README.md

Added OpenAI Environment Variables

* Update README.md

Modified Environment Variable name

* Update README.md

Deleted English explanations

* Update README.md

Modified the Connection String for PostgreSQL from C#

* Modified Connection Strings

Modified Connection Strings

* Update README.md

Modified the style with more visible

* Update README.md

Update README.md

* Update README.md

Update README.md

* Update README.md

説明を修正

* Update README.md

Log Analytics は ARM テンプレートで作成されるため、作成方法は削除

* Modified LR

Modified Line separator

* Modified to run the script before az login

Modified to run the script before az login

* Deleted Invalid command

Deleted Invalid command

* Modified Invalid explanation for change the KEY_VAULT settings

Modified Invalid explanation for change the KEY_VAULT settings

* Added BP_JVM_VERSION arguments

Added BP_JVM_VERSION arguments

* Deleted invalid character and english statement

Deleted invalid character and english statement

* Modified operation for run the scripts

Modified operation for run the scripts

* Deleted command which no need to execute

Deleted command which no need to execute

* Added detail instructions

Added detail instructions.
This modification was coming from @suzukiyuhsuke san's feedback.

* Added explanation

Added explanation

* modified the directory name from ja to ja-jp

From the request from Dingmeng-san, I modified the directory name from ja to ja-jp

* I moved the ja-jp directory under the azure-spring-apps-enterprise directory

I moved the ja-jp directory under the azure-spring-apps-enterprise directory

* update home page

* copy pictures

* Update links

* update links

* update links

* update links

* update links

* update links

* remove pictures

* update links

* update links

* Update README.md

Update Japanese sentence more natural by Japanese people.

* Update README.md

I added line separator

* Update README.md

I would like to add line separator

---------

Co-authored-by: Dingmeng Xue <dixue@microsoft.com>

* Sync code with origin (#190)

* Sync code with origin

* update

* Update demo scripts and github actions for deployment (#194)

* update payment.yml

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* Fix deployment action of Assist app (#195)

* update payment.yml

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* Optimize image size of samples (#196)

* update payment.yml

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* Optimize image size of samples

* Update dependencies of AI project (#197)

* update payment.yml

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* Optimize image size of samples

* Update dependencies of AI project

* update bom

* Fix product number issue on UI (#198)

* update payment.yml

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* Optimize image size of samples

* Update dependencies of AI project

* update bom

* Fix product number issue on UI

* Update tutorial (#199)

* update payment.yml

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* Optimize image size of samples

* Update dependencies of AI project

* update bom

* Fix product number issue on UI

* Update docs

* update

* Add MongoDb vector store (#200)

* Add cosmos vector store (#192)

* add cosmos db vector store

* add cosmos db vector store

* Polish CosmosDBVectorStore code (#193)

* refactor cosmosDB vector store

---------

Co-authored-by: Theo van Kraay <theo.van@microsoft.com>
Co-authored-by: Mark Heckler <mark.heckler@gmail.com>

* Update application.yaml to remove the mongo client autoconfiguration (#201)

* Fix the wrong env in the readme file (#203)

* Enable incremental product embedding (#207)

* Adding Azure for Spring Developers full day workshop.

* Adding content for Azure for Spring Developers full day workshop.

* Fixed typo.

* Added lab02.

* Updated Lab02

* Added Lab03

* - Allow adding, editing, and deleting products
- Update Assist service:
  + Add a vectorstore, which doesn't calculate the embeddings when provided in the documents
  + Enable adding/updating documents
  + List the index out of date documents
  + Add a job to update the documents for some products
- Update the source file of bikes.json and accessories.json to have id, which equals to the id of the product sql file, and the vector_store.json.

* Update ProductVo -> ProductValueObject

* Remove files

* Remove day sessions

* Revert doc

* Reverted code around ProductResponse

* Add new product scripts

* update

* Rename OPENAI_APIKEY to OPENAI_API_KEY

* remove bind operation

---------

Co-authored-by: Neven Cvetkovic <neven.cvetkovic@gmail.com>
Co-authored-by: Xiaolu Dai <xiada@microsoft.com>
Co-authored-by: Xiaolu Dai <31124698+saragluna@users.noreply.github.com>

* Full day Azure for Spring Developers workshop (#206)

* Adding Azure for Spring Developers full day workshop.

* Adding content for Azure for Spring Developers full day workshop.

* Fixed typo.

* Added lab02.

* Updated Lab02

* Added Lab03

* Quick fix.

* Added Lab04

* Added Lab05.

* Added Lab06. Added placeholders for two additional labs - databases and SSO.

* Reorganized Lab07 and Lab08 to be optional.

* Added Lab09 to prepare Azure OpenAI service.

* Fixed TYPO in the env variable name.

* Added Lab10

* Added Lab 11 - summary

* Fixed typo in the link.

* Added missing command to load the environment variables.

* Made AI lab not optional.

* Updated az cli version to 2.61.0

* Updated references to `asa-student` user.

* Fixed typo.

* Fixed typo.

* Changed the order of commands. Fixed the flow.

* Changed test port from 8081 to 9090 because Web Preview in Cloud Shell does not allow ports <1024 and 8080-8090.

* Added --verbose to commands.

* Fixed broken links.

* Update setup-ai-env-variables-template.sh

* Update README.md

* rename SPRING_AI_AZURE_OPENAI_APIKEY

---------

Co-authored-by: Neven Cvetkovic <neven.cvetkovic@gmail.com>

* Remove db from catalog workflow (#208)

* basic mods to get it running on TPCF

* ACME Fitness

* tPCF install README draft

* Made Commit to address missing Azure ChatRole, replaced with Message Type

Co-authored-by: Carlos Poon <carlos.poon@broadcom>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188008984] Update Spring AI from 0.8.1-SNAPSHOT to 1.0.0-SNAPSHOT

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broacom.com>

* [#188008992] Populate vector store for local and TAS.

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188030586] update docker files for local

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188031441] Added local config server

    Co-authored-by: Brian Shim <brian.shim@broadcom.com>
    Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
    Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188030586] - Added local config needed for acme-identity

Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188031441] Set up local port numbers for shopping, assist, catalog, identity, and payment apps (8080,8081,8082,8083,8804 respectively)

Co-authored-by: Carlos Poon <carlos.poon@braodcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* Updated gradle

* [#188031421] Lombok + cleanup payment

* [#188009049] Setup SERVER_URL for UI; Added manifest.yml for deploying to TAS

Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* Move Local Config server into a local development directory.

* [#188031421] Add lombok to assist and cleanup some of the files

* [#188009049] UI app is configurable via SERVER_URL environment variable

* Added mvnwrapper and instructions for starting local config in README.

* Update MVN version and local deploy.

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188030586] Update the Seed data to be 1536 and update to JDK 21 for manifest

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* Update Readme acme-catalog

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188030586]
- Remove server url config for frontend for TAS to work.
- Moved cf bind service json configs, and fixed issue with malformed json.
- Updated README with route service binding instructions

    Co-authored-by: Brian Shim <brian.shim@broadcom.com>
    Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
    Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* Introduce config and scripts for running local Spring Cloud Gateway and Spring Authorization configs and routes needed to standup Identity.

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: David Joo <david.joo@braodcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188030594] Added local gateway routes, fixed local port number for acme-cart and acme-order apps

Co-authored-by: Carlos Poon <carlos.poon@braodcom.com>
Co-authored-by: Brian Shim <brian.shim@braodcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188079709] Added work around to point to OPENAI directly bypassing the GENAI tile as a temporary work around.

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* extra routes

* [#188079644] Deleted redundant route files.  Renamed assist route file, and added order routes file.

    Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>

* [#188009035] - Updated acme-order to be TAS and local compatible.

Co-authored-by: Andrew Stakhov <andrew.stakhov@gmail.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>

* [#188030588] Add local discovery server

* Update local README with Local Development

* Add Discovery Service and fix missing Profile properties.

Co-authored-by: Andrew Stakhov <andrew.stakhov@gmail.com>
Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>

* [#188052396] Moved ASA, TAP specific content to deprecated section

* Local run fixes

- Fix Payment service local yaml
- Address Spring AI ChatClient constructor
- Removed unused reference in transaction.html.
- Updated README.md

* [#188052396] - Remove Azure reference for Cart service

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>

* [#188093312] Swapped out java springboot eureka-server and config-server projects with docker image equivalents

Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>

* Update README with additional readme for identity, catalog and payment.

Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>

* [#188030781] Updated README local machine instructions

Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>

* [#188104035] Add auth & gateway start scripts into docker-compose.yaml for local development

Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [#188103872] Fixed logout using ajax call causing CORS issue

Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* Fix acme-assist embedding jar versioning

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [#188104035] Run gateway and auth servers in a single container for local development

Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [#188110597] - Move local development to its own README.md

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [#188110595] - Rename spring-cloud-gateway to spring-enterprise

Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [#188103921] Fix liveness actuator endpoint on Catalog

Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* Readme changes and URL change

Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [#188110593, #188104038, #188110606] Consolidate docker compose files into a single local-development one

Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [#188084899] - Update to utilize internal routes for TAS

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* Update manifest.yml

SSO parameters.   untested.
Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* Update manifest.yml

typo
Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [##188103872] - Update local routes.yml such that login is only triggered when asked. Logout works with new jar.

Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* Update README for spring-enterprise naming.
Fix CatalogLiveness error in console log.
Refactor run.sh

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* Remove vector store jobs, vector store will init on launch

Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [#188135934] Update catalog and pay apps to use JDK v21 and gradle wrapper v8.8

* [#188104038] Aligned container names in local docker compose yaml

* Fix local acme-assist

* [#188110588] Convert from Maven to Gradle

Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: David Joo <david.joo@broadcom.com>
Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>

* [#188115649] Add Cypress test for checkout flow

    Co-authored-by: Brian Shim <brian.shim@broadcom.com>
    Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>

* [#188103932] - Rename order-service to acme-order

* [#188127213] Clean up front end (delete dead code & irrelevant pages)

    Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
    Co-authored-by: David Joo <david.joo@broadcom.com>

* [#188143766] Fixed a CORS error when running the app locally by removing unnecessary sso redirect for /userinfo endpoint

* [#188143766] Remove sso login redirect for all data routes

* [#188150227] Automatically build acme-cart image in local docker compose

* README and manifest update

* [#188156382] Select fewer bikes to mark as new.

    Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>
    Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>

* Add updated high level architecture for TAS

* [#188157066] Updated config server TAS/TPCF instructions

---------

Co-authored-by: Yoshio Terada <tyoshio2002@yahoo.co.jp>
Co-authored-by: Dingmeng Xue <dixue@microsoft.com>
Co-authored-by: Theo van Kraay <theo.van@microsoft.com>
Co-authored-by: Mark Heckler <mark.heckler@gmail.com>
Co-authored-by: Xiaolu Dai <31124698+saragluna@users.noreply.github.com>
Co-authored-by: Neven Cvetkovic <neven.cvetkovic@gmail.com>
Co-authored-by: Xiaolu Dai <xiada@microsoft.com>
Co-authored-by: Stuart Charlton <stuart.charlton@broadcom.com>
Co-authored-by: Carlos Poon <pcarlos@vmware.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broadcom.com>
Co-authored-by: Brian Shim <brian.shim@broadcom.com>
Co-authored-by: Carlos Poon <carlos.poon@broadcom.com>
Co-authored-by: Dayo Ajayi <dayo.ajayi@broacom.com>
Co-authored-by: David Joo <david.joo@braodcom.com>
Co-authored-by: Carlos Poon <carlos.poon@braodcom.com>
Co-authored-by: Brian Shim <brian.shim@braodcom.com>
Co-authored-by: Andrew Stakhov <andrew.stakhov@gmail.com>
Co-authored-by: David Joo <david.joo@broadcom.com>
Co-authored-by: Tony Thompson <tony.thompson@broadcom.com>
Co-authored-by: Stu Charlton <scharlton@vmware.com>
  • Loading branch information
22 people authored Aug 23, 2024
1 parent 27d2b4a commit 7816762
Show file tree
Hide file tree
Showing 588 changed files with 17,555 additions and 11,824 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/assist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy Assist
on:
workflow_dispatch:
inputs: { }
push:
branches:
- Azure
paths:
- 'apps/acme-assist/**'
env:
SPRING_APPS_SERVICE: ${{ secrets.SPRING_APPS_SERVICE }}
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
KEY_VAULT: ${{ secrets.KEY_VAULT }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AI_APP: assist-service
AZURE_OPENAI_MODEL: gpt-35-turbo-16k
AZURE_OPENAI_EMBEDDINGMODEL: text-embedding-ada-002

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/acme-assist
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Run the Maven local build
run: mvn package clean
- name: Set up Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION }}
- name: Set up Azure Spring Extension
run: az extension add --name spring
- name: Deploy Assist
run: |
az spring app deploy --name ${AI_APP} \
--resource-group ${RESOURCE_GROUP} \
--service ${SPRING_APPS_SERVICE} \
--source-path ./ \
--build-env BP_JVM_VERSION=17 \
--env \
SPRING_AI_AZURE_OPENAI_ENDPOINT=${AZURE_OPENAI_ENDPOINT} \
SPRING_AI_AZURE_OPENAI_API_KEY=${AZURE_OPENAI_API_KEY}
22 changes: 15 additions & 7 deletions .github/workflows/cart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ on:
paths:
- 'apps/acme-cart/**'
env:
SPRING_APPS_SERVICE: ${{ secrets.TF_PROJECT_NAME }}-asa
RESOURCE_GROUP: ${{ secrets.TF_PROJECT_NAME }}-grp
KEY_VAULT: ${{ secrets.TF_PROJECT_NAME }}-keyvault
SPRING_APPS_SERVICE: ${{ secrets.SPRING_APPS_SERVICE }}
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
KEY_VAULT: ${{ secrets.KEY_VAULT }}
CUSTOM_BUILDER: no-bindings-builder
CART_SERVICE_APP: cart-service

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7"]
python-version: ["3.11"]
defaults:
run:
working-directory: apps/acme-cart
Expand All @@ -41,18 +45,22 @@ jobs:
- name: Set up Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION }}
- name: Set up Azure Spring Extension
run: az extension add --name spring
- name: Deploy Cart
run: |
keyvault_uri=$(az keyvault show \
--resource-group ${RESOURCE_GROUP} \
--name ${KEY_VAULT} | jq -r '.properties.vaultUri')
--name ${KEY_VAULT} \
--query properties.vaultUri -o tsv)
gateway_url=$(az spring gateway show \
--resource-group ${RESOURCE_GROUP} \
--service ${SPRING_APPS_SERVICE} | jq -r '.properties.url')
--service ${SPRING_APPS_SERVICE} \
--query properties.url -o tsv)
az spring app deploy \
--name ${CART_SERVICE_APP} \
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:
paths:
- 'apps/acme-catalog/**'
env:
SPRING_APPS_SERVICE: ${{ secrets.TF_PROJECT_NAME }}-asa
RESOURCE_GROUP: ${{ secrets.TF_PROJECT_NAME }}-grp
KEY_VAULT: ${{ secrets.TF_PROJECT_NAME }}-keyvault
SPRING_APPS_SERVICE: ${{ secrets.SPRING_APPS_SERVICE }}
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
KEY_VAULT: ${{ secrets.KEY_VAULT }}
CATALOG_SERVICE_APP: catalog-service

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -31,25 +35,22 @@ jobs:
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
arguments: build -x test
build-root-directory: apps/acme-catalog
- name: Set up Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION }}
- name: Set up Azure Spring Extension
run: az extension add --name spring
- name: Deploy Catalog
run: |
keyvault_uri=$(az keyvault show \
--resource-group ${RESOURCE_GROUP} \
--name ${KEY_VAULT} | jq -r '.properties.vaultUri')
az spring app deploy \
az spring app deploy \
--name ${CATALOG_SERVICE_APP} \
--resource-group "$RESOURCE_GROUP" \
--service "$SPRING_APPS_SERVICE" \
--env "SPRING_CLOUD_AZURE_KEYVAULT_SECRET_PROPERTY_SOURCES_0_ENDPOINT=${keyvault_uri}" "SPRING_CLOUD_AZURE_KEYVAULT_SECRET_PROPERTY_SOURCES_0_NAME='acme-fitness-store-vault'" "SPRING_PROFILES_ACTIVE=default,key-vault" \
--config-file-pattern catalog/default,catalog/key-vault \
--config-file-pattern catalog/default \
--build-env BP_JVM_VERSION=17 \
--source-path ./
--source-path ./
19 changes: 13 additions & 6 deletions .github/workflows/identity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:
paths:
- 'apps/acme-identity/**'
env:
SPRING_APPS_SERVICE: ${{ secrets.TF_PROJECT_NAME }}-asa
RESOURCE_GROUP: ${{ secrets.TF_PROJECT_NAME }}-grp
KEY_VAULT: ${{ secrets.TF_PROJECT_NAME }}-keyvault
SPRING_APPS_SERVICE: ${{ secrets.SPRING_APPS_SERVICE }}
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
KEY_VAULT: ${{ secrets.KEY_VAULT }}
IDENTITY_SERVICE_APP: identity-service

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -36,20 +40,23 @@ jobs:
- name: Set up Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION }}
- name: Set up Azure Spring Extension
run: az extension add --name spring
- name: Deploy Identity
run: |
keyvault_uri=$(az keyvault show \
--resource-group ${RESOURCE_GROUP} \
--name ${KEY_VAULT} | jq -r '.properties.vaultUri')
--name ${KEY_VAULT} \
--query properties.vaultUri -o tsv)
az spring app deploy \
--name ${IDENTITY_SERVICE_APP} \
--resource-group "$RESOURCE_GROUP" \
--service "$SPRING_APPS_SERVICE" \
--env "SPRING_CLOUD_AZURE_KEYVAULT_SECRET_PROPERTY_SOURCES_0_ENDPOINT=${keyvault_uri}" "SPRING_CLOUD_AZURE_KEYVAULT_SECRET_PROPERTY_SOURCES_0_NAME='acme-fitness-store-vault'" "SPRING_PROFILES_ACTIVE=default,key-vault" \
--env "SPRING_CLOUD_AZURE_KEYVAULT_SECRET_PROPERTY_SOURCES_0_ENDPOINT=${keyvault_uri}" "SPRING_CLOUD_AZURE_KEYVAULT_SECRET_PROPERTY_SOURCES_0_NAME=${KEY_VAULT}" "SPRING_PROFILES_ACTIVE=default,key-vault" \
--config-file-pattern identity/default,identity/key-vault \
--build-env BP_JVM_VERSION=17 \
--source-path ./
14 changes: 14 additions & 0 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Markdown Links Check

on: [pull_request]

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.github/workflows/mlc_config.json'
29 changes: 29 additions & 0 deletions .github/workflows/mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"ignorePatterns": [
{
"pattern": "^http://127.0.0.1"
},
{
"pattern": "^https://127.0.0.1"
},
{
"pattern": "^http://localhost"
},
{
"pattern": "^https://localhost"
},
{
"pattern": "^http://proxyserver"
},
{
"pattern": "^http://example.com"
},
{
"pattern": "^https://example.com"
},
{
"pattern": "^https://github.com/Azure-Samples/acme-fitness-store/invitations"
}
],
"aliveStatusCodes": [200]
}
23 changes: 16 additions & 7 deletions .github/workflows/order.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ on:
paths:
- 'apps/acme-order/**'
env:
SPRING_APPS_SERVICE: ${{ secrets.TF_PROJECT_NAME }}-asa
RESOURCE_GROUP: ${{ secrets.TF_PROJECT_NAME }}-grp
KEY_VAULT: ${{ secrets.TF_PROJECT_NAME }}-keyvault
SPRING_APPS_SERVICE: ${{ secrets.SPRING_APPS_SERVICE }}
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
KEY_VAULT: ${{ secrets.KEY_VAULT }}
CUSTOM_BUILDER: no-bindings-builder
ORDER_SERVICE_APP: order-service

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -33,22 +37,27 @@ jobs:
- name: Set up Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION }}
- name: Set up Azure Spring Extension
run: az extension add --name spring
- name: Deploy Order
run: |
keyvault_uri=$(az keyvault show \
--resource-group ${RESOURCE_GROUP} \
--name ${KEY_VAULT} | jq -r '.properties.vaultUri')
--resource-group ${RESOURCE_GROUP} \
--name ${KEY_VAULT} \
--query properties.vaultUri -o tsv)
gateway_url=$(az spring gateway show \
--resource-group ${RESOURCE_GROUP} \
--service ${SPRING_APPS_SERVICE} | jq -r '.properties.url')
--service ${SPRING_APPS_SERVICE} \
--query properties.url -o tsv)
az spring app deploy \
--name ${ORDER_SERVICE_APP} \
--resource-group "$RESOURCE_GROUP" \
--service "$SPRING_APPS_SERVICE" \
--env "ConnectionStrings__KeyVaultUri=${keyvault_uri}" "AcmeServiceSettings__AuthUrl=https://${gateway_url}" "DatabaseProvider=Postgres" \
--builder ${CUSTOM_BUILDER} \
--source-path ./
12 changes: 9 additions & 3 deletions .github/workflows/payment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ on:
paths:
- 'apps/acme-payment/**'
env:
SPRING_APPS_SERVICE: ${{ secrets.TF_PROJECT_NAME }}-asa
RESOURCE_GROUP: ${{ secrets.TF_PROJECT_NAME }}-grp
SPRING_APPS_SERVICE: ${{ secrets.SPRING_APPS_SERVICE }}
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
PAYMENT_SERVICE_APP: payment-service

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -35,7 +39,9 @@ jobs:
- name: Set up Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION }}
- name: Set up Azure Spring Extension
run: az extension add --name spring
- name: Deploy Payment
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/shopping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ on:
paths:
- 'apps/acme-shopping/**'
env:
SPRING_APPS_SERVICE: ${{ secrets.TF_PROJECT_NAME }}-asa
RESOURCE_GROUP: ${{ secrets.TF_PROJECT_NAME }}-grp
SPRING_APPS_SERVICE: ${{ secrets.SPRING_APPS_SERVICE }}
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
FRONTEND_APP: frontend

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -30,7 +34,9 @@ jobs:
- name: Set up Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION }}
- name: Set up Azure Spring Extension
run: az extension add --name spring
- name: Deploy Shopping
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ __pycache__
.DS_Store
.env*.secret
.idea
.metadata
custom-filters

*.iml
*.jar

azure-spring-apps-enterprise/scripts/setup-env-variables.sh
azure-spring-apps-enterprise/scripts/setup-db-env-variables.sh
Expand Down Expand Up @@ -57,3 +59,7 @@ hello-world/

# vsCode
.vscode

# Cypress
**/cypress/downloads
**/cypress/screenshots
Loading

0 comments on commit 7816762

Please sign in to comment.