mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
Merge remote-tracking branch 'origin/main' into fuzzer-runner-docker
This commit is contained in:
@@ -87,7 +87,7 @@ crs-instance-id:
|
||||
deploy:
|
||||
@echo "Deploying environment..."
|
||||
@if [ ! -f deployment/env ]; then \
|
||||
echo "Error: Configuration file not found. Run 'make setup-local' first."; \
|
||||
echo "Error: Configuration file not found. Run 'make setup-local' or `make setup-azure` first."; \
|
||||
exit 1; \
|
||||
fi
|
||||
@if [ ! -f external/buttercup-cscope/configure.ac ]; then \
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
**Note:** Buttercup uses third-party AI providers (LLMs from companies like OpenAI, Anthropic and Google), which cost money. Please ensure that you manage per-deployment costs by using the built-in LLM budget setting.
|
||||
|
||||
**Note:** Buttercup works best with access to models from OpenAI **and** Anthropic, but can be run with at least one API key from one third-party provider. You can a combination of OpenAI, Anthropic, and Google LLMs.
|
||||
**Note:** Buttercup works best with access to models from OpenAI **and** Anthropic, but can be run with at least one API key from one third-party provider. You can use a combination of OpenAI, Anthropic, and Google LLMs.
|
||||
|
||||
### Supported Systems
|
||||
|
||||
|
||||
+18
-1
@@ -41,6 +41,16 @@ setup_service_principal() {
|
||||
else
|
||||
print_success "Using RESOURCE_GROUP_NAME from deployment/env: $RESOURCE_GROUP_NAME"
|
||||
fi
|
||||
RESOURCE_GROUP_LOCATION="${TF_VAR_resource_group_location:-}"
|
||||
if [ -z "$RESOURCE_GROUP_LOCATION" ] || [ "$RESOURCE_GROUP_LOCATION" = "<your-resource-group-location>" ]; then
|
||||
read -p "Enter resource group location (default: eastus): " RESOURCE_GROUP_LOCATION
|
||||
if [ -z "$RESOURCE_GROUP_LOCATION" ]; then
|
||||
RESOURCE_GROUP_LOCATION="eastus"
|
||||
print_status "No value provided. Using default: $RESOURCE_GROUP_LOCATION"
|
||||
fi
|
||||
else
|
||||
print_success "Using RESOURCE_GROUP_LOCATION from deployment/env: $RESOURCE_GROUP_LOCATION"
|
||||
fi
|
||||
|
||||
# Check if resource group exists, if not ask to create it
|
||||
if ! az group show --name "$RESOURCE_GROUP_NAME" >/dev/null 2>&1; then
|
||||
@@ -53,7 +63,7 @@ setup_service_principal() {
|
||||
fi
|
||||
|
||||
print_status "Creating resource group: $RESOURCE_GROUP_NAME"
|
||||
az group create --name "$RESOURCE_GROUP_NAME" --location eastus
|
||||
az group create --name "$RESOURCE_GROUP_NAME" --location "$RESOURCE_GROUP_LOCATION"
|
||||
print_success "Resource group created successfully"
|
||||
else
|
||||
print_success "Using existing resource group: $RESOURCE_GROUP_NAME"
|
||||
@@ -66,6 +76,13 @@ setup_service_principal() {
|
||||
echo "export TF_VAR_resource_group_name=\"$RESOURCE_GROUP_NAME\"" >> deployment/env
|
||||
fi
|
||||
|
||||
# Write RESOURCE_GROUP_LOCATION to deployment/env (uncomment or add line)
|
||||
if grep -q '^[# ]*export TF_VAR_resource_group_location=' deployment/env; then
|
||||
portable_sed "s|^[# ]*export TF_VAR_resource_group_location=.*|export TF_VAR_resource_group_location=\"$RESOURCE_GROUP_LOCATION\"|" deployment/env
|
||||
else
|
||||
echo "export TF_VAR_resource_group_location=\"$RESOURCE_GROUP_LOCATION\"" >> deployment/env
|
||||
fi
|
||||
|
||||
# Only prompt to create a new service principal if TF_VAR_ARM_CLIENT_ID and TF_VAR_ARM_CLIENT_SECRET are not set
|
||||
if [ -z "$TF_VAR_ARM_CLIENT_ID" ] || [ "$TF_VAR_ARM_CLIENT_ID" = "<your-client-id>" ] || [ -z "$TF_VAR_ARM_CLIENT_SECRET" ] || [ "$TF_VAR_ARM_CLIENT_SECRET" = "<your-client-secret>" ]; then
|
||||
read -p "Do you want to create a new service principal? (y/N): " -n 1 -r
|
||||
|
||||
Reference in New Issue
Block a user