Skip to content

Latest commit

 

History

History
145 lines (92 loc) · 4.36 KB

File metadata and controls

145 lines (92 loc) · 4.36 KB

Linux-Specific Workshop Notes

This document provides Linux-specific guidance for the Terraform workshop.

Installation on Linux

Quick Installation

Follow the official installation guides for your distribution:

Package Manager Quick Reference

Authentication Setup

Google Cloud Console

  1. Go to Google Cloud Console and log in with your Google account.
  2. Note the project ID you'll be using for the workshop.

gcloud Authentication

In your terminal:

# Log in to Google Cloud
gcloud auth login

# Set the workshop project (if not prompted during login)
gcloud config set project cloud-labs-workshop-42clws

# Set up application default credentials for Terraform
gcloud auth application-default login

# Verify your setup
gcloud config list

Setup Verification

Run the setup verification script:

./verify-setup.sh

This script will check that you have all required tools installed and properly configured.

Terminal Environment

Linux uses bash as the default shell on most distributions. The workshop commands are designed for bash and work out of the box.

Terminal Applications

Most Linux distributions include a terminal application. Common ones include GNOME Terminal (Ubuntu), Konsole (KDE), or your distribution's default.

Common Linux Issues and Solutions

Common Issues and Solutions:

  • "terraform: command not found": Ensure Terraform is in your PATH. Restart your terminal after installation.

  • "gcloud: command not found": Ensure Google Cloud SDK is in your PATH. You may need to restart your terminal or reinstall the SDK.

  • "gcloud auth list shows no accounts": Run gcloud auth login to authenticate.

  • "Permission denied" when accessing project: Ensure you have the necessary IAM roles in the project. Contact workshop facilitators if using the provided project.

  • "Application Default Credentials not found": Run gcloud auth application-default login to set up credentials for Terraform.

  • Terraform provider errors: Make sure you're in the infra/ directory and have run terraform init.

PATH Issues

If commands aren't found after installation:

# Check your PATH
echo $PATH

# Restart your shell
exec -l $SHELL

Google Cloud SDK Issues

If gcloud command is not found after installation:

# Restart your shell
exec -l $SHELL

# Or source the SDK if manually installed
source ~/google-cloud-sdk/path.bash.inc

For more help, see the official troubleshooting guide.

Text Editor Setup

Recommended: VS Code

Visual Studio Code is recommended for the workshop.

Installation: Follow the official VS Code Linux installation guide for your distribution.

Terraform extension:

# Install the Terraform extension
code --install-extension HashiCorp.terraform

Alternative Editors

Terraform-specific plugins are available for: (Neo)Vim, IntelliJ IDEA and more.

Quick Reference

Common Commands

# Navigation and files
cd directory              # Change directory
ls -la                    # List files
vim filename.tf           # Edit with vim
code filename.tf          # Edit with VS Code

# System information
lsb_release -a            # Distribution info

Getting Help

terraform --help
gcloud --help
man terraform            # Manual pages

If you encounter issues during the workshop, try the solutions above or ask workshop facilitators for help.