Skip to content

Latest commit

 

History

History
80 lines (44 loc) · 5.51 KB

File metadata and controls

80 lines (44 loc) · 5.51 KB

1. Environment Creation and Resources Deployment

Expected Duration: 30 minutes

Welcome to your very first challenge! Your goal in this challenge is to create the services and enviornment necessary to conduct this hackathon. You will deploy the required resources in Azure, create your development enviornment and all the assets necessary for the subsequent challenges. By completing this challenge, you will set up the foundation for the rest of the hackathon.

If something is not working correctly, please do let your coach know!

1.1 Fork the Repository

Before you start, please fork this repository to your GitHub account by clicking the Fork button in the upper right corner of the repository's main screen (or follow the documentation). This will allow you to make changes to the repository and save your progress.

1.2 Development Environment

GitHub Codespaces is a cloud-based development environment that allows you to code from anywhere. It provides a fully configured environment that can be launched directly from any GitHub repository, saving you from lengthy setup times. You can access Codespaces from your browser, Visual Studio Code, or the GitHub CLI, making it easy to work from virtually any device.

To open GitHub Codespaces, click on the button below:

Open in GitHub Codespaces

Please select your forked repository from the dropdown and, if necessary, adjust other settings of GitHub Codespace.

NOTE: If GitHub Codespaces is not enabled in your organization, you can enable it by following the instructions here, or, if you cannot change your GitHub organization's settings, create a free personal GitHub account here. The Github Free Plan includes 120 core hours per month, equivalent to 60 hours on a 2-core machine, along with 15 GB of storage.

1.3 Resource Deployment Guide

The first step on this hackathon will be to create the resources we will use throughout the day. You can deploy using either the one-click button or manual method below.

Before anything else, let's log in into the CLI with our account. Please paste the code underneath and follow the necessary instructions.

az login --use-device-code

1.3.1 Resources Deployment

Now, time to deploy our resources to Azure!

Deploy to Azure

Deployment Parameters:

  • servicePrincipalObjectId: Leave this field empty.
  • resource group: Introduce the unique name for your resource group (defined above).

NOTE: Some parts of your deployment may fail if the resource provider Microsoft.AlertsManagement is not registered in your. Follow the documentation to register it and the re-run the deployment.

Resource deployment can take up to 10 minutes, afterwards you'll be able to find most of the resources on your resource group. In the meantime, you can proceed with the next step - opening a pre-configured development environment in GitHub Codespaces.

1.4 Verify the creation of your resources

Go back to your Azure Portal and find your Resource Groupthat should by now contain 9 resources and look like this:

alt text

1.5 Let's retrieve the necessary keys

After deploying the resources, you will need to configure the environment variables in the .env file. Double check you have logged in into your Azure account on the CLI. If that's settled, let's move into retrieving our keys. The .env file is a configuration file that contains the environment variables for the application. The .env file is automatically created by running the following command within the terminal in your Codespace.

Then run the get-keys script with your resource group name:

./get-keys.sh --resource-group YOUR_RESOURCE_GROUP_NAME

Replace YOUR_RESOURCE_GROUP_NAME with the actual name of the resource group created on step 1.3.

This script will connect to Azure and fetch the necessary keys and populate the .env file with the required values in the root directory of the repository.

1.6 Verify .env setup

When the script is finished, review the .env file to ensure that all the values are correct. If you need to make any changes, you can do so manually.

The repo has an .env.sample file that shows the relevant environment variables that need to be configured in this project. The script should create a .env file that has these same variables but populated with the right values for your Azure resources.

If the file is not created, simply copy over .env.sample to .env - then populate those values manually from the respective Azure resource pages using the Azure Portal.

Conclusion

By reaching this section you should have every resource and installed the requirements necessary to conduct the hackathon. In the next challenges, you will use these services to start strongly your Azure AI Agents journey.

Now the real fun begins!