Precision Labs’ Support Copilot is built and hosted in Microsoft Foundry, and needs to find trustworthy answers in three data sets: CRM accounts, support tickets, and KB articles. In this challenge you will prepare the three environments used for the rest of the hack: an Azure lab subscription (Microsoft Foundry), an Elastic Serverless trial (data and MCP tools), and a GitHub Codespace (your developer environment).
Today’s hack event is providing you with a temporary Azure Lab environment powered by CloudLabs. To use CloudLabs you must register for the event at the following link:
Register for Azure Lab Environment from Microsoft powered by CloudLabs
Once registered, you will receive a confirmation email from: microsoftevents@cloudlabs.ai
NOTE: If you do not see the email in your inbox, please be sure to check your Spam or Junk folders.
When you receive the confirmation email:
Gather the following from the lab environment and keep them handy. You will use them in the Codespace terminal:
odl_user_xxxxx@aiw-ds.cloudlabs.ai)Keep these credentials handy as you will need them to log into the Microsoft Foundry portal.
The following steps guide you to create an Elastic Serverless trial via the Microsoft Marketplace in the Azure portal.
odl_userxxxxx@aiw-ds.cloudlabs.ai) and password you were provided from the lab environment.rg-elastic-hack-john).elastic-wth(US) East US).
WARNING: Do NOT choose “Cloud Hosted” for the Hosting Type as it will not support the features required for this hack.
odl_userxxxxx@aiw-us.cloudlabs.ai).wth-setup, and keep the default privileges..env file in the deployment section below. You will paste it into ELASTIC_API_KEY.Warning: Treat API keys like passwords. Do not paste them in chat, screenshots, or Git.
If you are not able to provision Elastic via the Microsoft Marketplace, expand and follow the instructions below to create a trial directly on Elastic’s website:
WARNING: Choosing a different project type may impact how this lab works!
elastic-wth)wth-setup, and keep the default privileges..env file in the deployment section below. You will paste it into ELASTIC_API_KEY.Warning: Treat API keys like passwords. Do not paste them in chat, screenshots, or Git.
You will use GitHub Codespaces as your development environment. A GitHub Codespace is a development environment hosted in the cloud that you access via a browser. The Azure CLI and Python are pre-installed, and the Codespace installs the sample data loader’s Python packages during creation.
GitHub Codespaces is available to every personal GitHub.com account, which includes a monthly free usage quota. You can check your balance on the GitHub billing page.
Dev container configuration is set to the one for this hack, then click Create Codespace.elasticsearch and python-dotenv Python packages during creation.NOTE: If you close the Codespace, return to GitHub Codespaces to find and re-launch it.
In this section, you will deploy the sample data for this hackathon.
From the Terminal in your Codespace, complete the following:
Add your Elastic values to the configuration file used by the setup scripts. Copy the .env.sample file to .env:
cp .env.sample .env
chmod 600 .env
code .env
Replace the values of these three entries with the URLs and encoded setup API key you copied from your Elastic project:
ELASTICSEARCH_URL=https://<your-elasticsearch-endpoint>
KIBANA_URL=https://<your-kibana-endpoint>
ELASTIC_API_KEY=<your-encoded-setup-api-key>
Save the file before continuing.
WARNING: Keep
.envprivate and never commit it to Git.
Run the data loader:
bash data/load_data.sh
The loader automatically reads the settings from .env.
Warning: Every run deletes and recreates the three workshop sample indices. Wait for the generators to finish and check that the final document counts are 500 accounts, 3,000 tickets, and 150 articles.
NOTE: If the script fails or prints
ERR, read the error, check your.envsettings and project access, and run it again.
precision-crm-accounts, precision-support-tickets, and precision-kb-articles. Click each one and open the Documents tab (or use Discover) to confirm it contains records..env file contains your Elastic values.bash data/load_data.sh completed without errors and printed the expected document counts.