Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .semaphore/vms/configure-test-vm
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,16 @@ set +x
echo "$DOCKERHUB_PASSWORD" | ssh "ubuntu@${vm_ip}" -- docker login --username "$DOCKERHUB_USERNAME" --password-stdin
scp -r -C "$HOME/secrets" "ubuntu@${vm_ip}:/home/ubuntu/secrets"
Comment thread
caseydavenport marked this conversation as resolved.
set -x
"${ssh_cmd[@]}" "gcloud auth activate-service-account --key-file=/home/ubuntu/secrets/secret.google-service-account-key.json && \
gcloud config set project unique-caldron-775 && \

"${ssh_cmd[@]}" "gcloud config set project unique-caldron-775 && \
Comment thread
caseydavenport marked this conversation as resolved.
gcloud storage cp '${GCS_WORKFLOW_DIR}/${COMPONENT}/fv-artifacts/*' /tmp && \
tar -xzf /tmp/working-copy.tgz && \
${CALICO_DIR_NAME}/${COMPONENT}/.semaphore/load-test-artifacts"

if [ "$ENABLE_JIT_HARDENING" = "true" ]; then
echo "Enabling BPF JIT hardening on test VM"
"${ssh_cmd[@]}" sudo sysctl -w net.core.bpf_jit_harden=2
fi
fi

# Login using the VM's service account.
"${ssh_cmd[@]}" 'gcloud auth configure-docker gcr.io --quiet'
2 changes: 2 additions & 0 deletions .semaphore/vms/run-tests-on-vms
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ fi
# Do a bulk create; this is faster and it saves API quota.
echo "Creating test VMs in bulk..."
gcloud --quiet compute instances bulk create \
--service-account="semaphore-v2-gcr@unique-caldron-775.iam.gserviceaccount.com" \
--scopes="https://www.googleapis.com/auth/cloud-platform" \
Comment thread
caseydavenport marked this conversation as resolved.
--predefined-names="$names" \
--zone=${zone} \
--machine-type=${VM_MACHINE_TYPE} \
Expand Down