Week 6 - Cloud and Azure Essentials
Introduction to Cloud and Azure
Week 6 Assignment: Deploy Your Pipeline to Azure
This week you will run your containerized pipeline in Azure and store its outputs in blob storage and Postgres. The result should be a cloud-native data pipeline that produces stored outputs you can verify.
Write a Python script that uploads your pipeline's raw output (JSON or CSV) to the shared Azure Blob Storage account. Verify the blob appeared using the CLI or portal.
<aside>
๐ก Get the connection string from your teacher or retrieve it from Key Vault (Chapter 5). Follow the naming convention: raw/<source>/<date>.json.
</aside>
Connect to the shared Postgres server your teacher provided. Create a table for your pipeline output and verify you can insert and query rows from Python.
<aside> ๐ก Get the connection string from your teacher or retrieve it from Key Vault (Chapter 5). Do not use the admin account for your pipeline.
</aside>
Update your pipeline to write to both blob storage and Postgres. Your pipeline should:
POSTGRES_URL and AZURE_STORAGE_CONNECTION_STRING from environment variablesclosing() pattern from Chapter 4 and log the countlogging.getLogger("azure").setLevel(logging.WARNING) (see Chapter 5)<aside> โ ๏ธ Do not commit connection strings or passwords. Use environment variables.
</aside>
Rebuild your Docker image with the cloud storage changes from Task 3 and push it to ACR (either with docker push or through CI). Verify the image is in the registry with az acr repository show-tags.
Create a Container App Job in the shared environment and resource group your teacher provided. Remember to include:
--registry-server pointing to your ACR--replica-timeout 300 so stuck jobs are killed automatically--env-vars for POSTGRES_URL, AZURE_STORAGE_CONNECTION_STRING, and LOG_LEVELConfirm the job starts and logs are visible.
Start the job and confirm it writes to both storage targets:
<aside> โจ๏ธ Hands on: Add a log line that prints the row count written and the blob name uploaded.
</aside>
Delete your Container App Job when you are done:
az containerapp job delete --name <your-job-name> --resource-group <rg> --yes
Do not leave jobs running after the assignment. See Chapter 5 and Chapter 6 for why this matters.
Create AI_ASSIST.md and describe:
You must submit:
AI_ASSIST.mdweek6-azure-assignment/
โโโ src/
โ โโโ pipeline.py
โโโ Dockerfile
โโโ requirements.txt
โโโ README.md
โโโ AI_ASSIST.md
logging instead of print for pipeline status.Your assignment will be evaluated on:
week6/your-name.The HackYourFuture curriculum is licensed underย CC BY-NC-SA 4.0 *https://hackyourfuture.net/*

Built with โค๏ธ by the HackYourFuture community ยท Thank you, contributors
Found a mistake or have a suggestion? Let us know in the feedback form.