Hi there!
This repository is hosting the code and documentation of the A Cloud Guru Challenge: Your resume in Azure.
The idea is to build a resume and host it using Azure services.
For a detailed view of the journey, you should take a look at my blog article
- Create a GitHub repository
- Create the website (HTML, CSS...)
- Add a visitor counter on the website
- Create CosmoDB database
- Create Azure function to get number of views
- Deploy the website to Azure Static Web App
- Enable HTTPS and custom domain support
- Set up GitHub actions
- Add tests to the counter function
Additional steps:
- Migrate out of Azure static web apps
- Azure Blob storage
- HTTPS
- Custom domain
- Function
- CI/CD Github Actions
- Static website
- Counter Function (Python)
Last step:
I already worked on the Cloud Resume challenge before. The goal was to host my resume on AWS.
I have a decent knowledge of AWS and passed the AZ-900 but I'm not working on a daily basis with Azure. This challenge is a way to get some experience with it.
- Use Azure Static Apps
- Configure Custom domain
- Add to your DNS entries a CNAME pointing to the Static App url
- Verify it (Custom domains > Add+)
-
Create an Azure account
-
Install VSCode extension and Core tools (v3) (run
func
in terminal to check the installation) -
Configure a new HTTPTrigger (with Python for me)
-
Create CosmosDB account from portal (serverless mode)
-
Create a Cosmos container
-
Create a document with a counter property
-
Add CORS for the static website to be able to call the Azure function
don't forget to check the Enable Access-Control-Allow-Credentials option
to set up the python env:
python3 -m venv .env
&source .venv/bin/activate
- create a storage account and run the following:
az storage blob service-properties update --account-name myresume --static-website --404-document error.html --index-document index.html
az storage blob upload-batch -s ./front -d '$web' --account-name myresume
Use cdnverify to avoid downtime when migrating
Custom domain https with CDN managed certificates
- Generate deployment credentials and copy the json for later use
az ad sp create-for-rbac --name {myStaticSite} --role contributor --scopes /subscriptions/{subscription-id}/resourceGroups/{resource-group} --sdk-auth
-
Add a secret to Github repository with the json
-
Create a new workflow under .github/workflows/
(link to be added to the workflow file...)
Note that if you are using Azure Static Web Apps, the workflow file is already generated.
-
Use az login to set up credentials
-
Create a template.json and set up the blank template
-
Create resource group for the template
az group create \
--name resumeGroup \
--location "East US 2"
templateFile="{path to your template file}"
az deployment group create \
--name blanktemplate \
--resource-group resumeGroup \
--template-file $templateFile
- Add storage resource