ComputeInstanceStatus is a small macOS statusbar app that allows you to monitor the state of a single GCP Compute VM instance. The app allows you to start and stop the instance, and it will visually remind you that the instance is running.
ComputeInstanceStatus uses a small, NodeJS based CLI tool that connects to GCP through the @google-cloud/compute
package.
The CLI is bundled with pkg as a standalone executable.
Download the latest release.
- In the Google Cloud Console, create a service account that has access to the instance you intend to use.
I recommend you create a custom role with the permissions
compute.instances.start
,compute.instances.stop
andcompute.instances.get
. Assign this role to the service account. - Download the service account in .JSON format and store it somewhere on your machine.
- Run the ComputeInstanceStatus app, click the statusbar icon, and open preferences.
- Select the service account file and enter the zone and name of your instance.
- Click 'Test connection' to check whether the details you entered are valid.
After the current instance status is determined, you are now able to start and stop the instance. The instance status is updated every 5 seconds.