Skip to content

Instantly share code, notes, and snippets.

@jeremyje
Created September 6, 2014 20:11
Show Gist options
  • Select an option

  • Save jeremyje/de9023feba2cedf55e8a to your computer and use it in GitHub Desktop.

Select an option

Save jeremyje/de9023feba2cedf55e8a to your computer and use it in GitHub Desktop.
Creates a VM running Arch Linux to profile systemd startup performance.
#!/bin/bash
INSTANCE_ID=${RANDOM}
INSTANCE_NAME=systemd-arch-profile-${INSTANCE_ID}
ZONE_NAME=us-central1-a
MACHINE_TYPE=f1-micro
echo "Creating Instance, ${INSTANCE_NAME}"
gcloud compute instances create ${INSTANCE_NAME} \
--image arch-v20140906 \
--machine-type ${MACHINE_TYPE} \
--zone ${ZONE_NAME} \
--metadata-from-file startup-script=startup-profile-systemd.sh \
--scopes compute-rw storage-full
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment