The scripts in this directory are convenience wrappers around primarily two tools:
make-fuchsia-vol that is a host tool in the build, and
gcloud which is the command like client for Google Cloud.
The scripts are usable via
//scripts/gce/gce as an executable bash script.
gcloud auth login gcloud config set project my-awesome-cloud gcloud config set compute/region us-west1 gcloud config set compute/zone us-west1-a
The following incantation will create the relevant disk images and boot a Fuchsia instance:
cd $FUCHSIA_ROOT fx set core.x64 --release fx build fx gce create-fuchsia-image fx gce create-instance sleep 60 fx gce serial fx gce delete-instance
The gce script suite comes with an
env.sh that sets default environment variables used by gce subcommands. The
gce entrypoint script sources this. Users can override all of the variables seen in
env.sh, for example, altering the name of the GCE instance you create/delete can be done by setting
$FUCHSIA_GCE_INSTANCE. See the contents of the script for more options.
The Fuchsia disk images are built as standard x86-64 EFI bootable GPT volumes.
gce entrpoint script sources
env.sh, then looks for a command script in the
gce scripts directory that matches the first argument given to it. If it finds one, it shifts the first argument and execs that script.
~/.ssh/google_compute_engine to your