30 Days DevOps Challenge - Weather Dashboard #Week1-Day1

Hi I am Ford, I have been in the IT career for 8 years as an IT support, in year 2024 I started my journey in cloud technology and up to now I continue to learn more about this technology.
#Week1-Day1 #DevOpsAllStarsChallenge
Setting Up Your Weather Dashboard with Azure Blob Storage
Introduction
Hi my Name is Ford and I recently joined a 30daysdevopschallenge. In this article we are Creating a weather dashboard that fetches data from the OpenWeather API and stores it in Azure Blob Storage. This guide will walk you through the steps to set up your environment, create necessary Azure resources, and run the script to save weather data for various cities.
Prerequisites
Before you begin, ensure you have the following:
Python 3.6 or higher installed on your machine.
An Azure subscription.
An OpenWeather API key.
Step-by-Step Instructions
Clone the Repository
Start by cloning the project repository to your local machine:
git clone https://github.com/annoyedalien/30daysdevops-week1.git cd 30daysdevops-week1Create a Virtual Environment
Set up a virtual environment to manage your project dependencies:
python3 -m venv venv source venv/bin/activateInstall Dependencies
Install the required libraries using
pip:pip install -r requirements.txtCreate a
.envFileCreate a
.envfile in the project directory to store your credentials:💡OPENWEATHER_API_KEY you must signup to https://home.openweathermap.org/ to get your own api keyAZURE_SUBSCRIPTION_ID=your_subscription_id AZURE_RESOURCE_GROUP=your_resource_group AZURE_STORAGE_ACCOUNT=your_storage_account AZURE_CONTAINER_NAME=your_container_name OPENWEATHER_API_KEY=your_openweather_api_keyRun the Script
Execute the main script to create Azure resources and fetch weather data:
python main.pyThe script will:
Create the Azure Resource Group if it doesn't exist.
Create the Azure Storage Account if it doesn't exist.
Create the Azure Blob Container if it doesn't exist.
Fetch weather data for specified cities.
Save the weather data to Azure Blob Storage.
Cleanup
./deleteall.sh
This will:
Delete all resource groups and all resources
Conclusion
By following these steps, you will have a fully functional weather dashboard that stores data in Azure Blob Storage. This project not only helps you understand how to interact with Azure services programmatically but also demonstrates the power of combining APIs and cloud storage for data management.