Skip to content

Commit fb373e4

Browse files
authored
Merge pull request #65 from lewagon/lorcanrae/poc-main-corrections
Proof of Concept -> `main` corrections
2 parents 80c0319 + 8544c9e commit fb373e4

File tree

13 files changed

+447
-262
lines changed

13 files changed

+447
-262
lines changed

LINUX.md

Lines changed: 97 additions & 54 deletions
Large diffs are not rendered by default.

WINDOWS.md

Lines changed: 106 additions & 65 deletions
Large diffs are not rendered by default.

_partials/gcp_cli_setup.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The `gcloud` Command Line Interface (CLI) is used to communicate with Google Clo
55
### Install gcloud
66

77
$MAC_START
8+
89
Install with `brew`:
910

1011
```bash
@@ -24,7 +25,9 @@ gcloud --version
2425
```
2526

2627
👉 [Install documentation 🔗](https://cloud.google.com/sdk/docs/install#mac)
28+
2729
$MAC_END
30+
2831
$WINDOWS_START
2932

3033
To install, download the Google Cloud CLI installer from this [link here 🔗](https://cloud.google.com/sdk/docs/install#windows).
@@ -34,7 +37,7 @@ Once it's finished downloading, launch the installer and follow the prompts. You
3437
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:
3538
- **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.
3639
- **Pick cloud project to use** - Select your GCP Project ID that you want to connect with `gcloud`
37-
- **Select your region and zone** - You can safely enter `n`. It's not important to us at the moment.
40+
- **Select your region and zone** - You can safely enter `n`. It's not important at the moment.
3841

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

@@ -44,7 +47,7 @@ gcloud config list
4447

4548
You should get an output similar to:
4649

47-
```
50+
```bash
4851
[accessibility]
4952
screen_reader = True/False # depends on install options
5053
[core]
@@ -56,8 +59,11 @@ Your active configurations: [default]
5659
```
5760

5861
Now `gcloud` is installed and authenticated 🚀
62+
5963
$WINDOWS_END
64+
6065
$LINUX_START
66+
6167
Add the `APT` repository and install with:
6268

6369
```bash
@@ -74,4 +80,5 @@ To test your install, open a new terminal and run:
7480
gcloud --version
7581
```
7682
👉 [Install documentation 🔗](https://cloud.google.com/sdk/docs/install#deb)
83+
7784
$LINUX_END

_partials/gcp_setup.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,28 @@ Once the verification goes through, you should receive an email stating that "Yo
118118

119119
## GCP APIs
120120

121-
You will use different GCP services during the bootcamp which needs to be activated and configured.
121+
When you create a GCP Project, not every service is enabled by default. To enable a service (like using a VM or storing a Docker image in Artifact Registry) you have to enable the GCP API for that service.
122122

123123
### Default APIs
124124

125-
Go to your project [APIs dashboard](https://console.cloud.google.com/apis/dashboard), you can see a bunch of APIs are already enabled:
125+
Go to your project [APIs dashboard 🔗](https://console.cloud.google.com/apis/dashboard), you can see a bunch of APIs are already enabled:
126126

127127
<img alt='GCP APIs dashboard' src="images/gcp_apis_dashboard.png" width=200>
128128

129-
### Enable Compute Engine (virtual machines) API
129+
### Enable additional APIs
130130

131-
**👌 Note: Skip to the next section if you already have Compute Engine enabled**
131+
You'll need to enable some additional API's so that Terraform can create cloud resources on your behalf.
132132

133-
- In the search bar, type _compute_ and click on the Compute Engine result
134-
<img alt='APIs search' src="images/gcp_apis_search.png" width=500>
135-
- Click on `ENABLE`
133+
**Cloud Resource Manager**
136134

137-
<img alt='APIs enable' src="images/gcp_apis_enable.png" width=300>
138-
- Compute Engine is now enabled on your project
135+
On the [APIs dashboard 🔗](https://console.cloud.google.com/apis/dashboard) page, click on [Enable APIs and services 🔗](https://console.cloud.google.com/apis/library) and make sure your project is selected in the box in the top left.
136+
137+
In the search box, search for: _cloud resource manager api_ and select the **Cloud Resource Manager API**. On the next page, click on **Enable**.
138+
139+
**Service Usage**
140+
141+
Navigate back to the [APIs and Services 🔗](https://console.cloud.google.com/apis/library) page and search for: _service usage api_ and select the top result: **Service Usage API**. On the next page, click on **Enable**. ❗ This API might already enabled - not a problem if it is!
142+
143+
**Compute Engine**
144+
145+
Navigate back to the [APIs and Services 🔗](https://console.cloud.google.com/apis/library) page and search for: _compute engine api_ and select: **Compute Engine API**. On the next page, click on **Enable**. ❗ This API might already enabled - not a problem if it is!

_partials/intro.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,29 @@ A part of the setup will be done on your **local machine** but most of the confi
66

77
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:
88

9-
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.
9+
This setup is largely automated with [**Terraform** 🔗](https://developer.hashicorp.com/terraform) and [**Ansible** 🔗](https://docs.ansible.com/). **Terraform** and **ansible** are [_Infrastructure as Code_ 🔗](https://en.wikipedia.org/wiki/Infrastructure_as_code) tools.
1010
- **Terraform** excels at creating and destroying cloud resources, like virtual machines, IP addresses, databases and more!
11-
- **Ansible** is used to configure linux machines with specific settings and software. Perfect for fine-tuning the Virtual Machine you will be creating!
11+
- **Ansible** is used to configure linux machines with specific settings and software. Perfect for fine-tuning the Virtual Machine you will be creating with Terraform!
12+
13+
There are three main components to the setup!
1214

1315
## Part 1: Setup your local computer
1416

15-
In this section you'll setup your local computer and create some accounts. It will include things like:
16-
1. Install some communication tools: Zoom, Slack
17+
In this section you'll setup your local computer and create some accounts. It will include:
18+
1. Installing the primary communication tool you'll use on the bootcamp: **Slack**!
1719
2. Create some accounts: Github, Google Cloud Platform (GCP)
18-
3. Install Visual Studio Code (VS Code)
20+
3. Install **Visual Studio Code (VS Code)**
1921
4. Install and authentication the GCP command line tool: `gcloud`
20-
5. Install **terraform** on your local computer
21-
6. Create your virtual machine with **terraform** and connect to it with **VS Code**!
22+
5. Install **Terraform** on your local computer
23+
6. Create your virtual machine with **Terraform** and connect to it with **VS Code**!
2224

2325
## Part 2: Configure your Virtual Machine Part 1
2426

2527
All parts of this section happen on your virtual machine.
2628

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

@@ -35,11 +37,14 @@ This section includes:
3537
All parts of this section happen on your virtual machine.
3638

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

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

4546
Let's start :rocket:
47+
48+
---
49+
50+
# Part 1: Local Setup

_partials/terraform.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,30 @@
33
Terraform is a tool for infrastructure as code (IAC) to create (and destroy) resources to create in the cloud.
44

55
$MAC_START
6+
67
You can use `brew` to install terraform. In your terminal, run:
78

89
```bash
910
brew tap hashicorp/tap
1011
brew install hashicorp/tap/terraform
1112
```
1213
$MAC_END
14+
1315
$WINDOWS_START
16+
1417
### Download
1518

1619
To install terraform, download the **zip archive** from the Terraform install page at this [link here 🔗](https://developer.hashicorp.com/terraform/install).
1720

18-
❗ If you are using Windows 10 or 11, download the **AMD64** version (64 bit version).
21+
❗ If you are using Windows 10 or 11, download the **AMD64** version (64 bit version).
1922

2023
1. Using file explorer to go to the location you downloaded the **terraform zip archive**
2124

2225
2. **Unzip** the archive and two files should appear: `terraform.exe` and `license.txt`.
2326

2427
3. Copy `terraform.exe`
2528

26-
4. Navigate to your home directory (`C:\Users\<YOUR_USERNAME>\`) and create a directory named `cli_apps`
29+
4. Navigate to your home directory (`C:\Users\<YOUR_USERNAME>\`) and create a directory named `terraform_cli`
2730

2831
5. Paste `terraform.exe` in the `cli_apps` directory
2932

@@ -32,19 +35,24 @@ To install terraform, download the **zip archive** from the Terraform install pa
3235
We need to manually add **Terraform** to the `PATH` environment variable. The `PATH` variable contains a list of directories that your computer looks in for programs that we run from the command prompt.
3336

3437
To update your path:
35-
1. Open Windows Search and search for: **Environment Variables**
38+
1. Open Windows Search and search for: **Environment variables**
39+
40+
2. Select and open **Edit environment variables for your account**
3641

37-
2. Click **Environment Variables** or **Edit environment variables for your account**
42+
3. Under **User variables for <YOUR_USERNAME>** click on the variable named: `Path` to select it, then click on **Edit**
3843

39-
3. Click **New** on to top right of this window
44+
3. In the new pop out window, click **New** on to top right
4045

41-
4. Enter: `C:\Users\YOUR_USERNAME\cli_apps` - Make sure to replace `YOUR_USERNAME` with your computers user name.
46+
4. Enter: `C:\Users\YOUR_USERNAME\terraform_cli` - Make sure to replace `YOUR_USERNAME` with _your user name_. You can obtain your user name by running `echo %username%` in **Command Prompt**
4247

4348
5. Click **Ok** to close the `Path` variable window, and click **Ok** again to close the Environment Variable window.
4449

4550
6. Close **Command Prompt** and open it again
51+
4652
$WINDOWS_END
53+
4754
$LINUX_START
55+
4856
Install some basic requirements:
4957
```bash
5058
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
@@ -74,10 +82,26 @@ Now we can install terraform directly with **apt** 👇
7482
sudo apt update
7583
sudo apt-get install terraform
7684
```
85+
7786
$LINUX_END
7887

7988
Verify the installation with:
8089

8190
```bash
8291
terraform --version
8392
```
93+
94+
The output should look similar to:
95+
96+
```bash
97+
Terraform v1.14.3
98+
on <your_operating_system>_<your_cpu_architecture>
99+
100+
# Windows example
101+
# Terraform v1.14.3
102+
# on windows_amd64
103+
104+
# Linux example
105+
# Terraform v1.14.3
106+
# on linux_amd64
107+
```

0 commit comments

Comments
 (0)