@@ -13,16 +13,15 @@ echo -e "🚀 APIM Samples environment starting...\n"
1313# CONFIGURATION
1414# ------------------------------
1515
16- echo -e " 1/5) Checking configuration ...\n"
16+ echo -e " 1/5) Setting environment variables ...\n"
1717
1818WORKSPACE_ROOT=" /workspaces/Apim-Samples"
1919VENV_PATH=" $WORKSPACE_ROOT /.venv"
2020PYTHON_EXECUTABLE=" $VENV_PATH /bin/python"
2121
22- echo -e " 📋 Configuration:\n"
23- echo " Workspace : $WORKSPACE_ROOT "
24- echo " Virtual Environment : $VENV_PATH "
25- echo " Python Executable : $PYTHON_EXECUTABLE "
22+ echo " Workspace : $WORKSPACE_ROOT "
23+ echo " Virtual Environment : $VENV_PATH "
24+ echo " Python Executable : $PYTHON_EXECUTABLE "
2625echo " "
2726
2827# ------------------------------
@@ -39,7 +38,8 @@ if [ -d "$VENV_PATH" ]; then
3938 # Activate and verify
4039 source " $VENV_PATH /bin/activate"
4140 echo " ✅ Python version: $( python --version) "
42- echo " ✅ Packages installed: $( pip list | wc -l) "
41+ # Commenting out the number of packages installed as this does take some time to run. When the setup was verified, a count of 125 packages was printed.
42+ # echo " ✅ Packages installed: $(pip list | wc -l)"
4343 else
4444 echo " ❌ Python executable not found"
4545 exit 1
5454# GENERATE .ENV FILE
5555# ------------------------------
5656
57- echo -e " 3 /5) Verifying .env file...\n"
57+ echo -e " \n3 /5) Verifying .env file...\n"
5858
5959cd " $WORKSPACE_ROOT "
6060if [ -f " .env" ]; then
7878# AZURE CLI SETUP
7979# ------------------------------
8080
81- echo -e " 3/4 ) Configuring Azure CLI...\n"
81+ echo -e " \n4/5 ) Configuring Azure CLI...\n"
8282
8383az config set core.login_experience_v2=off 2> /dev/null || true
8484
8585# Install extensions used by infrastructure samples
8686# - containerapp: Required for infrastructure/apim-aca and infrastructure/afd-apim
8787# - front-door: Required for infrastructure/afd-apim and shared/python/utils.py
88+ echo " Installing containerapp extension..."
8889az extension add --name containerapp --only-show-errors 2> /dev/null || true
90+ echo " Installing front-door extension..."
8991az extension add --name front-door --only-show-errors 2> /dev/null || true
90- echo " ✅ Azure CLI configured"
92+ echo " \n ✅ Azure CLI configured"
9193
9294# ------------------------------
9395# FINAL VERIFICATION
9496# ------------------------------
9597
96- echo " 📊 Environment Summary:"
97- echo " Python: $( python --version) at $( which python) "
98- echo " Virtual Environment: $VIRTUAL_ENV "
99- echo " Packages: $( pip list | wc -l) installed"
100- echo " .env File: $( [ -f .env ] && echo " ✅" || echo " ❌" ) "
101- echo " Azure CLI: $( az --version | head -1) "
98+ echo -e " \n5/5) Environment Summary\n"
99+ echo " Virtual Environment : $VIRTUAL_ENV "
100+ echo " Python : $( python --version) at $( which python) "
101+ # Commenting out the number of packages installed as this does take some time to run. When the setup was verified, a count of 125 packages was printed.
102+ # echo " Packages: $(pip list | wc -l) installed"
103+ echo " .env File : $( [ -f .env ] && echo " ✅" || echo " ❌" ) "
104+ echo " Azure CLI :"
105+ echo " $( az --version | head -1) "
102106
103107# Verify Jupyter kernel registration
104108echo " Jupyter Kernels: $( jupyter kernelspec list --json | python -c " import sys, json; data=json.load(sys.stdin); print(len(data['kernelspecs'])) if 'kernelspecs' in data else print('0')" 2> /dev/null || echo " unknown" ) "
0 commit comments