Process updated for GitHub CLI and gcp service account.
Co-authored-by: jmhbnz <mail@jamesblair.net>
This commit is contained in:
16
4-create-virtual-machine.sh
Executable file
16
4-create-virtual-machine.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# Step 4 - Create virtual machine
|
||||
|
||||
# Once we have a project we can create a new virtual machine. To create a virtual machine we need to ensure compute engine apis are enabled.
|
||||
|
||||
# Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode:
|
||||
|
||||
|
||||
# Ensure compute engine apis are enabled in the project
|
||||
gcloud services enable compute.googleapis.com
|
||||
|
||||
# Create name for virtual machine based on date
|
||||
export gcp_machine_name="gitlab-gcp-"$(date +"%s")
|
||||
|
||||
# Create the new machine
|
||||
gcloud compute instances create $gcp_machine_name --zone australia-southeast1-a
|
||||
Reference in New Issue
Block a user