Skip to main content

CLI tool for managing Google Cloud Managed Instance Groups

Project description

migs - Google Cloud MIG CLI Tool

A command-line tool that wraps the gcloud CLI to provide an easier experience for managing Google Cloud Managed Instance Groups.

Features

  • List MIGs in your project
  • Spin up/down VMs with custom names
  • Track your personal VMs
  • Automatic SSH config management for VS Code Remote Explorer
  • Easy file/directory uploads

Installation

pip install -e .

Prerequisites

  • Python 3.8+
  • gcloud CLI installed and authenticated (gcloud auth login)
  • SSH keys configured for Google Compute Engine

Usage

List all MIGs

migs list

Spin up a VM

migs up my-mig --name my-dev-vm
migs up my-mig --name my-dev-vm --async  # Don't wait for creation
migs up my-mig --name my-dev-vm -d 2h  # Auto-delete after 2 hours
migs up my-mig --name my-dev-vm --duration=2h  # Alternative syntax

List your VMs

migs vms

Sync VM state

migs sync  # Sync local VM list with GCP state
migs sync --discover  # Also discover and claim untracked VMs

Check VM connectivity

migs check my-dev-vm  # Test SSH connectivity

SSH into a VM

migs ssh my-dev-vm
migs ssh my-dev-vm -- tmux attach  # Pass additional SSH arguments

Run scripts

migs run my-dev-vm ./setup.sh  # Runs in tmux session
migs run my-dev-vm ./deploy.sh --session deploy  # Custom session name

Upload files

migs upload my-dev-vm ./myfile.txt
migs upload my-dev-vm ./mydir/ /home/user/

Download files

migs download my-dev-vm /remote/file.txt
migs download my-dev-vm /remote/dir/ ./local/

Spin down a VM

migs down my-dev-vm

SSH Config

The tool automatically updates your ~/.ssh/config file with entries for your VMs, making them accessible in VS Code Remote Explorer.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

migs-0.1.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

migs-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file migs-0.1.0.tar.gz.

File metadata

  • Download URL: migs-0.1.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for migs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08d4d3b7a4d29d5d695e9812cd32a5d23f335bd86e442107176917eb1e86f226
MD5 17775b06ed8fc8d745bd50a6cb03b495
BLAKE2b-256 97f1a723f2551476921067b001b073fc6b8e2ffe22d09c86c521d10349dca15d

See more details on using hashes here.

File details

Details for the file migs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: migs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for migs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c0a1d44370e086095e9eb95f1feae74e335efe05f22c38b1f0102711a956e73
MD5 64b11a04f17c1911336f62c6362041dc
BLAKE2b-256 f6f92dc07c74363d47819a62054add80fc45789f9a4277485284be56838d25f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page