Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 3.37 KB

README.md

File metadata and controls

50 lines (40 loc) · 3.37 KB

Instructions

Deploying single page app to Azure Static Web using Oracle Database Service for Azure (ODSA) with REST (ORDS) and GitHub actions

Steps to complete

  • Create Azure ODSA Autonomous Database with following options:
    • Select BYOL or License included as billing model depending on your case
    • Use suitable Azure cloud region e.g. UK-South
    • Define database admin password e.g. RockenRoll123#! This will be used also later as a GitHub Actions Secret
  • Create Azure Blob private container for the database wallet
  • Download Wallet.zip from ODSA and upload it to the Blob container
  • Create SAS for the Wallet.zip in the private container
  • Fork or copy the contents of this repo to your GitHub. Make sure .github directory is not copied to repo since it will be created by Azure Static Web during it's creation. When forking, delete this directory after the repo is forked.
  • Create the following GitHub Actions Secrets to the repo
    • DBNAME Database name e.g. pricing
    • REGION Corresponding OCI region e.g. uk-london-1 that you used for Azure earlier. This is just used to create the APEX "price admin" app link on the Azure Static Web app page.
    • PASSWORD Database admin password that you used earlier e.g. RockenRoll123#!
    • SAS Wallet.zip Azure Blob access that you created earlier in quotation marks (") e.g.
      "https://pricing.blob.core.windows.net/wallet-private/Wallet.zip?sp=r&st=2022-11-26T08:23:00Z&se=2023-11-26T16:23:00Z&spr=https&sv=2021-06-08&sr=b&sig=W4kL6mb.........R7jcUc%3D"
  • Create Azure Static Web app of type VueJS from your GitHub repo and specify app location: /html in the Build details
  • Add the contents of the github-workflow-run file to the .github/workflows .yaml under line #20 as it is here

After committing and pushing the workflow yaml change (use -f option for the git add) GitHub Azure actions will automatically build and deploy (CI/CD) the Azure Static Web app from gitHub source. Part of the CI/CD is the Liquibase that will create ODSA PRICEADMINSchema, add data to it, then create ORDS REST services and finally create the APEX sample app for administration.

Access Azure Static Web from your browser.

Access APEX "price admin" application from the Admin -link on the page. APEX user is priceadmin and password is the one created earlier as sercret i.e. RockenRoll123#! Edit prices and options and then save and reload the Static Web app html page.

Special thanks to my colleague @Christophe Pruvost for his SQLCli action

See on Youtube

https://www.youtube.com/watch?v=w7b_Jx7CvT4