Quickstart: Add a project for your team¶
In this quickstart, you add a project for a team with one call, then change one of its settings with the same call. A project is one team's own resource group, with its AI services and its access group.
Tip
Run it guided. The ESAF Tutorial Guide types this call for you and checks every step: open an ESAF tutorial and the track Scenarios 1-3. Download the ESAF Tutorial Guide. It's a private preview: ask Joakim Åström on LinkedIn for a preview code.
The scenario video, 9 minutes. Watch it in the ESAF Tutorial Guide under Resources > Scenario videos.
Every project lives on a scale set, one floor of the Factory. This quickstart puts project 002 on Dev scale set 001, and names that scale set in every call. You must name it once Dev has more than one scale set, as it does after Quickstart: Add a scale set.
Prerequisites¶
- A Factory from Quickstart: Create your AI Factory.
- The Factory API running, and your tool connected. See Quickstart: Install the ESAF tools.
- A free three-digit project number, for example
002.
Add the project¶
"Upsert" means add or update. A new project is registered and deployed. An existing project gets its settings saved and is deployed again.
- In the app, open the menu and select Configuration wizard > Quick setup & tear down.
- Select 3. Add or update project.
- Set Environment to
dev, Project number to002and Project scale set to001. - Tick I approve this scenario: it runs at once and changes Azure., then select Run selected scenario.
- Follow Job status on the same page until it shows that the job succeeded.
In Bash, with API_URL, API_KEY and FOLDER set as in
Quickstart: Create your AI Factory:
A new project takes about an hour: the recorded runs took 50 to 65 minutes.
Change a setting¶
Send the same call with the settings you want to change. Settings you leave out keep their value.
- On the same page, select 3. Add or update project and enter the same project.
- In Optional settings JSON, enter the settings to change, for example
{"tag_costcenter": "lab"}. - Tick I approve this scenario: it runs at once and changes Azure., then select Run selected scenario.
jq -n --arg folder "$FOLDER" \
'{folder: $folder, approved: true, project: "002", environment: "dev", scale_set: "001",
settings: {tag_costcenter: "lab"}}' |
curl --silent --show-error --fail-with-body -X POST "$API_URL/api/v1/esaf/upsert-project" \
--header "X-API-Key: $API_KEY" --header 'Content-Type: application/json' --data @-
| Parameter | What it does |
|---|---|
project |
Sets the project number, three digits as a string: "002". |
environment |
Selects "dev", "stage" or "prod". It's required. |
scale_set |
Selects the scale set. It's required when the environment has more than one. |
settings |
Replaces the settings you name. |
display_name |
Gives a new project a display name. |
Verify the result¶
The job ends with status succeeded, and your folder holds the new project:
In Azure, you see one more resource group, for project 002. After the settings change, its resources carry the new cost center tag.
If the call is refused:
| Message | Fix |
|---|---|
More than one dev scale set matches; pass scale_set. |
Name the scale set: --scale-set 001 or scale_set="001". |
environment must be dev, stage or prod |
Use one of the three names, in lower case. |
A job stays blocked |
Read blockers in the job, fix what they name, and run the call again. |
Clean up resources¶
Delete the project when the team no longer needs it:
| Tool | Call |
|---|---|
| CLI | azurefactory esaf delete-project 002 dev --wait |
| Python SDK | esaf.delete_project("002", "dev") |
| REST | POST /api/v1/esaf/delete-project |
See Quickstart: Clean up.
Next step¶
Back: Quickstart: Add a scale set
Next: Quickstart: Create your first agent by enabling ESAF Agent Chat
Related:
- The six scenarios: every call and its parameters.
- Usage docs: hand the project over to the team.
- Microsoft Entra groups and personas: who gets access to a project.
