* Test configuration for Azure deployment * ci: re-enable docker build/push * ci: docker push labeled PRs * Use `make deploy` for both local and azure deployments * doc: update AKS_DEPLOYMENT doc * add confirmation in Makefile * Make resource group location configurable
3.9 KiB
CRS Deployment Instructions for Competition Rounds
Prerequisites
Azure Setup
-
Verify Azure subscription resource providers:
- Navigate to: Subscriptions > Settings > Resource Providers
- Ensure these providers are registered:
- Microsoft.Compute
- Microsoft.Storage
- Microsoft.Network
- Microsoft.ContainerService
-
Verify and adjust Azure quotas:
- Total Regional vCPUs: ~2000
- Specific VM type quotas (e.g., Standard LS family vCPUs)
- Note: If deployment fails, incrementally increase quotas in small steps
Pre-deployment Configuration
Version Updates
- Update image tags in
values-prod.templatewith new release version - Update version number in
orchestrator/pyproject.tomlto match image tags - Create a new release with the version as tag name
Environment Configuration
Create a production environment file with the following variables:
Azure Configuration (TF_VAR_*)
- Ensure you're in the round subscription (not dev)
- For Principal Service Provider:
- Use a unique name to prevent azcli from patching existing SP
Competition Configuration
- TS_* variables: Enable as required
- COMPETITION_API_* variables: Set according to competition requirements
- CRS_* variables: Configure as needed
- CRS_API_HOSTNAME: Set to competition-specific value (e.g., ethereal-logic-unscored-2)
- For pre-competition testing: Append suffix (e.g.,
-dev1) to avoid LetsEncrypt rate limits - For production: Set it to something like
-pre-final-test1, then follow the "Post deployment" steps to rename the Tailscale hostname once you have tested things work.
- For pre-competition testing: Append suffix (e.g.,
Service Configuration
- LLM keys: Use organization-provided keys
- LANGFUSE: Disable for production
- OTEL endpoint: Use organization-provided endpoint
Deployment Steps
-
Clean up deployment artifacts:
git clean -dxff deployment/k8s/charts -
Delete old terraform directory:
rm -rf deployment/.terraform -
Update storage configuration:
- Modify
storage_account_nameindeployment/backend.tfto point to production storage
- Modify
-
Ensure
deployment/envpoints to the right environment filels -lah deployment/env -
Deploy:
cd deployment make up
Post-deployment Verification
-
Make sure all pods are up and running:
kubectl get pods -n crs -
Check the tailscale hostname is correct:
curl -u $COMPETITION_API_KEY_ID:$COMPETITION_API_KEY_TOKEN https://ethereal-logic.tasker.aixcc.tech/tailscale/device/ -
Check
/statusworks well:curl -u $COMPETITION_API_KEY_ID:$COMPETITION_API_KEY_TOKEN https://ethereal-logic.tasker.aixcc.tech/crs/status/ethereal-logic-pre-final -
Rename Tailscale hostname if necessary:
curl -u $COMPETITION_API_KEY_ID:$COMPETITION_API_KEY_TOKEN -X PATCH https://ethereal-logic.tasker.aixcc.tech/tailscale/device/ethereal-logic-internal-1806 -H 'Content-Type: application/json' -d '{"hostname":"ethereal-logic-final"}'Where
ethereal-logic-internal-1806is the current hostname of your device (you can get it from the commandcurl -u $COMPETITION_API_KEY_ID:$COMPETITION_API_KEY_TOKEN https://ethereal-logic.tasker.aixcc.tech/tailscale/device/) andethereal-logic-finalis the new hostname you want to test (e.g. the hostname the organizers want to see up and running for the round) -
Task a simple challenge for testing:
curl -u $COMPETITION_API_KEY_ID:$COMPETITION_API_KEY_TOKEN -X POST 'https://api.aixcc.tech/v1/request/ex3-lp-delta-01' --json '{"duration_secs":900}' -
List available challenges for testing:
curl -u $COMPETITION_API_KEY_ID:$COMPETITION_API_KEY_TOKEN -X 'GET' 'https://api.aixcc.tech/v1/request/list/' -
Monitor deployment logs for any errors
-
Verify all services are running correctly
-
Test API endpoints and functionality
-
Check resource utilization in Azure portal