Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d916a80
Added terraform + ansible automated setup
lorcanrae Mar 11, 2025
fef8caf
ansible setup_vm_part2.yml: added idempotency to forking de-challenges
lorcanrae Mar 13, 2025
b8d3b12
ansible, setup_vm_part2.yml: more idempotency and redundancy on de-ch…
lorcanrae Mar 13, 2025
af9d4ab
ansible, setup_vm_part2.yml: added remote VS Code extensions check an…
lorcanrae Mar 13, 2025
6920796
added ansible config files
lorcanrae Mar 13, 2025
f9971b4
typo corrections in ansible playbooks
lorcanrae Mar 13, 2025
f00bae1
updated curl links
lorcanrae Mar 13, 2025
57dae02
updated network tier in tf.main from STANDARD -> PREMIUM
lorcanrae Mar 13, 2025
097b1f6
automated/readme update
lorcanrae Mar 13, 2025
30faa55
renamed automated to automation
lorcanrae Mar 14, 2025
7760085
automation/README.md: added curl links for tf files and context to te…
lorcanrae Mar 14, 2025
fa02be1
automation/README.md: added more context and TODO tags
lorcanrae Mar 14, 2025
ec15e85
Updated main.tf to create and attach a static external IP address
lorcanrae Mar 18, 2025
f51c763
added outputs.tf for feedback on External IP address
lorcanrae Mar 18, 2025
0ce65c5
automation/README.md: added outputs for manual testing
lorcanrae Mar 18, 2025
8db0daf
Removed redundant partials
lorcanrae Mar 18, 2025
1237bea
ansible: setup_vm_part2.yml, added note to python 3.12.8 install
lorcanrae Mar 18, 2025
f78151d
updated partials
lorcanrae Mar 18, 2025
accfaac
added image assets for automation
lorcanrae Mar 18, 2025
3e55b9e
updated build.rb with new partials
lorcanrae Mar 18, 2025
136f0d4
corrected typo in build.rb
lorcanrae Mar 18, 2025
d61fc91
added back_partials/python_checkup.md
lorcanrae Mar 18, 2025
49961bf
setup guides generated
invalid-email-address Mar 18, 2025
a8ee0a7
updated partials for typos, readability, and order
lorcanrae Mar 18, 2025
173f10e
Merge branch 'lorcanrae/automated-setup' of github.com:lewagon/data-e…
lorcanrae Mar 18, 2025
57b3320
setup guides generated
invalid-email-address Mar 18, 2025
e724bad
partials: typos and syntax
lorcanrae Mar 18, 2025
09ba178
setup guides generated
invalid-email-address Mar 18, 2025
8580618
automation: updated local gcloud and local terraform for windows
lorcanrae Mar 19, 2025
14b9b85
Merge branch 'lorcanrae/automated-setup' of github.com:lewagon/data-e…
lorcanrae Mar 19, 2025
8008b76
setup guides generated
invalid-email-address Mar 19, 2025
ef4cb40
automation: added more windows specific settings
lorcanrae Mar 20, 2025
7190332
build.rb: added ADC creds to local setup
lorcanrae Mar 20, 2025
04e30ed
partials: small note on vm pre-installed software
lorcanrae Mar 20, 2025
6edcad5
setup guides generated
invalid-email-address Mar 20, 2025
d8c372d
altered order of restarting terminal to look zsh
lorcanrae Mar 20, 2025
0143f28
Merge branch 'lorcanrae/automated-setup' of github.com:lewagon/data-e…
lorcanrae Mar 20, 2025
8fff138
setup guides generated
invalid-email-address Mar 20, 2025
22e703f
added heading for when students are on the vm
lorcanrae Mar 20, 2025
67376bc
added heading for VM gcloud auth
lorcanrae Mar 20, 2025
af68740
setup guides generated
invalid-email-address Mar 20, 2025
51974f1
build.rb: added repo_overview partial
lorcanrae Mar 20, 2025
cc0eb60
Merge branch 'lorcanrae/automated-setup' of github.com:lewagon/data-e…
lorcanrae Mar 20, 2025
3e714c4
setup guides generated
invalid-email-address Mar 20, 2025
1bdbc7b
added emojis, fixed dotfiles terminal image asset placement, added mo…
lorcanrae Mar 20, 2025
fc4abd3
split out what the terminal should look like after lw dotfiles
lorcanrae Mar 20, 2025
e8c9d3d
Merge branch 'lorcanrae/automated-setup' of github.com:lewagon/data-e…
lorcanrae Mar 20, 2025
668ab3d
updated build.rb
lorcanrae Mar 20, 2025
6d5402d
setup guides generated
invalid-email-address Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
.DS_Store
.ipynb_ckeckpoints

## Terraform
**/.terraform/*
*.tfstate
*.tfstate.*
crash.log
crash.*.log
override.tf
override.tf.json
*_override.tf
*_override.tf.json
.terraform.tfstate.lock.info
*.terraformrc
terraform.rc
1,252 changes: 585 additions & 667 deletions LINUX.md

Large diffs are not rendered by default.

1,249 changes: 590 additions & 659 deletions WINDOWS.md

Large diffs are not rendered by default.

34 changes: 0 additions & 34 deletions _partials/docker.md

This file was deleted.

7 changes: 7 additions & 0 deletions _partials/dotfiles_terminal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

Once you have finished installing the **dotfiles**, kill your terminal (little trash can at the top right of the terminal window) and re-open it. You might have to do it a few times until it looks similar to:

![](/images/vscode_after_ansible1.png)

The terminal should read as `zsh`.
11 changes: 11 additions & 0 deletions _partials/gcp_adc_auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Application Default Credentials

Application Default Credentials are for authenticating our **code** (Terraform and Python 🐍) to interact with Google services and resources. It's a small distinction between `gcloud` and **code**, but an important one.

To authenticate your **Application Default Credentials**, in your terminal run:

```bash
gcloud auth application-default login
```

And follow the prompts. It should open a web-page to login to your Google account.
3 changes: 3 additions & 0 deletions _partials/gcp_auth_vm_heading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## VM gcloud and Application Default Credentials

We'll be doing some of the steps again, but that's because the virtual machine is a completely new computer! Luckily for us, `gcloud` comes pre-installed on the virtual machine.
36 changes: 36 additions & 0 deletions _partials/gcp_cli_oauth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
### Authenticate gcloud

We need to authenticate the `gcloud` CLI tool and set the project so it can interact with Google from the terminal.

To authenticate `gcloud`, run:

```bash
gcloud auth login
```

And following the prompts. For pasting into the terminal, your might need to use CTRL + SHIFT + V

You also need to set the GCP project that your are working in. For this section, you'll need your GCP Project ID, which can be found on the GCP Console at this [link here](https://console.cloud.google.com). Makes sure you copy the _Project ID_ and **not** the _Project number_.

To set your project, replace `<YOUR_PROJECT_ID>` with your GCP Project ID and run:

```bash
gcloud config set project <YOUR_PROJECT_ID>
```

Confirm your setup with:

```bash
gcloud config list
```

You should get an output similar to:

```bash
[core]
account = [email protected] # Should be your GCP email
disable_usage_reporting = True
project = my-gcp-project # Should be your GCP Project ID

Your active configuration is: [default]
```
69 changes: 66 additions & 3 deletions _partials/gcp_cli_setup.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,77 @@
## Google Cloud CLI

## `gcloud` CLI
The `gcloud` Command Line Interface (CLI) is used to communicate with Google Cloud Platform services through your terminal.

Before Setting up our Google Cloud Platform account let's configure the `gcloud` CLI (A command line interface for Google Cloud Platform). Run the below and follow the terminal prompts to update your $PATH and enable shell command completion for the `.zshrc` file:
### Install gcloud

$MAC_START
Install with `brew`:

```bash
brew install --cask google-cloud-sdk
```

Then you can:
Then install `gcloud` with:

```bash
$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/install.sh
```

To test your install, open a new terminal and run:

```bash
gcloud --version
```

👉 [Install documentation 🔗](https://cloud.google.com/sdk/docs/install#mac)
$MAC_END
$WINDOWS_START

To install, download the Google Cloud CLI installer from this [link here 🔗](https://cloud.google.com/sdk/docs/install#windows).

Once it's finished downloading, launch the installer and follow the prompts. You only need to install `gcloud` for the current user.

On the last screen of the installer there will be four check boxes. Makes sure that the boxes for `Start Google SDK Shell` and `Run gcloud init to configure the Google Cloud CLI` are selected then click **Finish**. This should open a new **Command Prompt** window and ask a series of questions like:
- **Do you want to log in?** - type `y` and hit enter and following the prompts. It should open a web-browser to log in to your Google account.
- **Pick cloud project to use** - Select your GCP Project ID that you want to connect with `gcloud`
- **Select your region and zone** - You can safely enter `n`. It's not important to us at the moment.

Once you've completed the `gcloud` setup, close **Command Prompt** and re-open it, then run:

```bash
gcloud config list
```

You should get an output similar to:

```
[accessibility]
screen_reader = True/False # depends on install options
[core]
account = [email protected]
disable_usage_reporting = True/False # depends on install options
project = your_gcp_project

Your active configurations: [default]
```

Now `gcloud` is installed and authenticated 🚀
$WINDOWS_END
$LINUX_START
Add the `APT` repository and install with:

```bash
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
sudo apt-get install apt-transport-https ca-certificates gnupg
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk
sudo apt-get install google-cloud-sdk-app-engine-python
```

To test your install, open a new terminal and run:

```bash
gcloud --version
```
👉 [Install documentation 🔗](https://cloud.google.com/sdk/docs/install#deb)
$LINUX_END
52 changes: 0 additions & 52 deletions _partials/gcp_setup_end.md

This file was deleted.

11 changes: 0 additions & 11 deletions _partials/gcp_setup_mid.md

This file was deleted.

67 changes: 0 additions & 67 deletions _partials/gcp_setup_wsl.md

This file was deleted.

36 changes: 36 additions & 0 deletions _partials/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,40 @@ A part of the setup will be done on your **local machine** but most of the confi

Please **read instructions carefully and execute all commands in the following order**. If you get stuck, don't hesitate to ask a teacher for help :raising_hand:

This setup is largely automated with **Terraform** and **Ansible**. There are three main components to the setup! **Terraform** and **ansible** are _Infrastructure as Code_ tools.
- **Terraform** excels at creating and destroying cloud resources, like virtual machines, IP addresses, databases and more!
- **Ansible** is used to configure linux machines with specific settings and software. Perfect for fine-tuning the Virtual Machine you will be creating!

## Part 1: Setup your local computer

In this section you'll setup your local computer and create some accounts. It will include things like:
1. Install some communication tools: Zoom, Slack
2. Create some accounts: Github, Google Cloud Platform (GCP)
3. Install Visual Studio Code (VS Code)
4. Install and authentication the GCP command line tool: `gcloud`
5. Install **terraform** on your local computer
6. Create your virtual machine with **terraform** and connect to it with **VS Code**!

## Part 2: Configure your Virtual Machine Part 1

All parts of this section happen on your virtual machine.

This section includes:
1. Authenticate your virtual machine with `gcloud`
2. Download and run an **ansible** playbook to partially configure your virtual machine
3. Login to the Github command line tool on your virtual machine
4. Copy the Le Wagon recommended **dotfiles**. **Dotfiles** are settings that will enhance your terminal and developer experience!

## Part 3: Configure your Virtual Machine Part 2

All parts of this section happen on your virtual machine.

In this section you will:
1. Download and run a second **ansible** playbook for some more fine tuning
2. Test your set up to make sure that everything has installed correctly
3. Create isolated python environments for all your challenges


Don't worry, we'll go into more detail in each of the individual sections.

Let's start :rocket:
7 changes: 0 additions & 7 deletions _partials/kata.md

This file was deleted.

Loading