🚀 Setting Up a Lab in GCP
Introduction​
In this tutorial, we will go through setting up a lab environment on Google Cloud Platform (GCP). This setup will allow you to create a development environment suitable for cybersecurity research, testing, or general development tasks.
1. Setting Up GCP and CLI​
- Log in to the Google Cloud Console.
- Create or select a project.
- Enable the "Compute Engine" API.
Install the GCP CLI:
gcloud auth login
gcloud config set project [PROJECT_ID]
2. Creating a VM Instance​
gcloud compute instances create my-lab \
--image-family=ubuntu-2204-lts \
--image-project=ubuntu-os-cloud \
--boot-disk-size=20G \
--zone=us-west1-b \
--machine-type=e2-medium
3. SSH into the Instance​
gcloud compute ssh my-lab
4. Setting Up the Development Environment​
Install necessary tools:
sudo apt update && sudo apt install git docker.io -y
Configure Docker permissions:
sudo usermod -aG docker $USER
5. Stopping the VM​
Stop the instance when not in use to avoid costs:
gcloud compute instances stop my-lab