Start/stop one GCP instance easily via the command line. At start time, it updates the ssh config so the instance can be logged into easily.
To start an instance, run:
cim start
To stop an instance, run:
cim stop
To start a VSCode window connected to the instance, run:
cim code
Note: if the instance is stopped, running cim code
will implicitly start the instance.
-
Create a
cloud_instance_management/constants.py
with the following contents:PROJECT_ID = "" # Google Cloud Project ID INSTANCE_NAME = "" # Instance ID given to the relevant instance LOCAL_INSTANCE_NAME = "" # Host ID of the relevant instance in the ~/.ssh/config file
Note: assumes that ~/.ssh/config has been setup for this instance before.
-
Run
poetry install