Skip to content

Commit 72d19af

Browse files
lorcanraegithub-actions
andauthored
Post Windows Tests > Updates (#71)
* partial/terraform.md: Windows Path var simplify, macOS example output * partial/terraform.md: typo in windows section * partial/terraform_vm: updated link for GCP regions * vscode_ssh_connection: terminal closed on connection fallback * partial/dotfiles_simple: added section for alumni 2021 or earlier * automation/playbook 1: added apt update to playbook one, minor refactor on sudo section * setup guides generated --------- Co-authored-by: github-actions <[email protected]>
1 parent ee444a0 commit 72d19af

File tree

8 files changed

+237
-49
lines changed

8 files changed

+237
-49
lines changed

LINUX.md

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,12 @@ Terraform is a tool for [Infrastructure as Code (IaC) 🔗](https://en.wikipedia
397397

398398

399399

400-
Install some basic requirements:
400+
Install some system requirements requirements:
401401
```bash
402402
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
403403
```
404404

405-
Terraform is not available to **apt** by default, so we need to manually add the repository.
405+
Terraform is not available on **apt** by default, so we need to manually add the repository.
406406
```bash
407407
wget -O- https://apt.releases.hashicorp.com/gpg | \
408408
gpg --dearmor | \
@@ -421,7 +421,7 @@ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
421421
sudo tee /etc/apt/sources.list.d/hashicorp.list
422422
```
423423

424-
Now we can install terraform directly with **apt** 👇
424+
Now we can install terraform directly with **apt** using:
425425
```bash
426426
sudo apt update
427427
sudo apt-get install terraform
@@ -440,10 +440,6 @@ The output should look similar to:
440440
Terraform v1.14.3
441441
on <your_operating_system>_<your_cpu_architecture>
442442

443-
# Windows example
444-
# Terraform v1.14.3
445-
# on windows_amd64
446-
447443
# Linux example
448444
# Terraform v1.14.3
449445
# on linux_amd64
@@ -523,10 +519,10 @@ instance_user = "<YOUR_COMPUTER_USER_NAME>"
523519

524520
We'll need to change some values in this file. Here's were you can find the required values:
525521
- **project_id:** from the GCP Console at this [link here](https://console.cloud.google.com).
526-
- **region:** take a look at the GCP Region and Zone documentation at this [link here](https://cloud.google.com/compute/docs/regions-zones). We strongly recommend you choose the closest geographical region.
527-
- **zone:** Zone is a subset of region. it is almost always the same as **region** appended with `-a`, `-b`, or `-c`.
522+
- **region:** take a look at the GCP Region and Zone documentation at this [link here](https://cloud.google.com/compute/docs/regions-zones#available). We generally recommend you choose a geographically nearby region.
523+
- **zone:** Zone is a subset of region. it is almost always the same as **region** appended with `-a`, `-b`, or `-c`. The zone you select within a region should not have a functional impact.
528524
- **instance_name:** we recommend naming your VM: `lw-de-vm-<YOUR_GITHUB_USERNAME>`. Replacing `<YOUR_GITHUB_USERNAME>` with your GitHub username.
529-
- **instance_user:** in your terminal, run `whoami`
525+
- **instance_user:** in your terminal, run `whoami`, and enter the value
530526

531527
After completing this file, it might look similar to:
532528

@@ -624,7 +620,9 @@ A new VS Code window will open. You may be asked to select the platform of the r
624620

625621
![](/images/vscode_remote_fingerprint.png)
626622

627-
And you are connected! It should look similar too:
623+
And you are connected 🎉 It should look similar to the below image.
624+
625+
If you don't see a terminal open at the bottom or side of VS Code, you can open a terminal by selecting **Terminal** from the top ribbon menu and selecting **New Terminal** (makes sure to remember the key binding for later 😎)
628626

629627
![](/images/vscode_remote_connected.png)
630628

@@ -835,6 +833,50 @@ To customise this configuration for yourself, you'll need to **fork** the reposi
835833

836834
**Forking** creates a copy of the repository under your account (`your_github_username/dotfiles`), which you can then modify with your personal information, such as your name.
837835

836+
<details>
837+
<summary><strong>❗ I started a Le Wagon _Web Development_ or _Data Science_ bootcamp in 2021 or earlier.</strong></summary>
838+
839+
Open a ticket with a TA and do the following:
840+
- Compare your existing dotfiles with the current Le Wagon [dotfile 🔗](https://github.com/lewagon/dotfiles), particularly the `.zshrc` and `settings.json` - if there is no meaningful difference, continue with the setup.
841+
- If you are OK with losing your existing dotfiles - delete your existing dotfiles repository and continue with the setup
842+
- If you do not want to lose your existing dotfiles, you can either:
843+
1. Work with branches
844+
2. Create a _psuedo fork_ of the Le Wagon dotfiles repository
845+
846+
**Option 1. I want to work with branches:**
847+
- Create a branch of your existing dotfiles setup
848+
- On `main`, pull from `upstream`, resolve conflicts, commit and push. It is important that you accept incoming changes to the `.zshrc` and `settings.json` files
849+
- Continue with the setup
850+
851+
**Option 2. I want a separate repo for this set of dotfiles:**
852+
- Cloning the repository to a different target name
853+
```bash
854+
mkdir -p ~/dotfiles-wagon && git clone [email protected]:lewagon/dotfiles.git ~/dotfiles-wagon
855+
```
856+
- Rename the existing `origin` remote to `upstream`
857+
```bash
858+
cd ~/dotfiles-wagon && git remote rename origin upstream
859+
```
860+
- Create a new GitHub repository from directory
861+
```bash
862+
cd ~/dotfiles-wagon && gh repo create dotfiles-wagon --source=. --remote=origin
863+
```
864+
- Verify your remotes:
865+
```bash
866+
git remote -v
867+
868+
# origin [email protected]:<your_github_username>/dotfiles-wagon.git (fetch)
869+
# origin [email protected]:<your_github_username>/dotfiles-wagon.git (push)
870+
# upstream [email protected]:lewagon/dotfiles.git (fetch)
871+
# upstream [email protected]:lewagon/dotfiles.git (push)
872+
```
873+
- Delete this current folder
874+
```bash
875+
cd ~ && rm -rf ~/dotfiles-wagon
876+
```
877+
- Continue with the setup - replace occurrences of `dotfiles` in the following commands with `dotfiles-wagon`
878+
</details>
879+
838880
Open your terminal on your VM and run the following command:
839881

840882
```bash

WINDOWS.md

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ To install terraform, download the **zip archive** from the Terraform install pa
352352

353353
4. Navigate to your home directory (`C:\Users\<YOUR_USERNAME>\`) and create a directory named `terraform_cli`
354354

355-
5. Paste `terraform.exe` in the `cli_apps` directory
355+
5. Paste `terraform.exe` in the `terraform_cli` directory
356356

357357
### Add terraform to PATH
358358

@@ -365,9 +365,9 @@ To update your path:
365365

366366
3. Under **User variables for <YOUR_USERNAME>** click on the variable named: `Path` to select it, then click on **Edit**
367367

368-
3. In the new pop out window, click **New** on to top right
368+
3. In the new pop out window, click **New** on the top right
369369

370-
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**
370+
4. Into the empty box that was just created, enter: `%USERPROFILE%\terraform_cli`
371371

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

@@ -390,10 +390,6 @@ on <your_operating_system>_<your_cpu_architecture>
390390
# Windows example
391391
# Terraform v1.14.3
392392
# on windows_amd64
393-
394-
# Linux example
395-
# Terraform v1.14.3
396-
# on linux_amd64
397393
```
398394

399395

@@ -474,10 +470,10 @@ instance_user = "<YOUR_COMPUTER_USER_NAME>"
474470

475471
We'll need to change some values in this file. Here's were you can find the required values:
476472
- **project_id:** from the GCP Console at this [link here](https://console.cloud.google.com).
477-
- **region:** take a look at the GCP Region and Zone documentation at this [link here](https://cloud.google.com/compute/docs/regions-zones). We strongly recommend you choose the closest geographical region.
478-
- **zone:** Zone is a subset of region. it is almost always the same as **region** appended with `-a`, `-b`, or `-c`.
473+
- **region:** take a look at the GCP Region and Zone documentation at this [link here](https://cloud.google.com/compute/docs/regions-zones#available). We generally recommend you choose a geographically nearby region.
474+
- **zone:** Zone is a subset of region. it is almost always the same as **region** appended with `-a`, `-b`, or `-c`. The zone you select within a region should not have a functional impact.
479475
- **instance_name:** we recommend naming your VM: `lw-de-vm-<YOUR_GITHUB_USERNAME>`. Replacing `<YOUR_GITHUB_USERNAME>` with your GitHub username.
480-
- **instance_user:** in Command Prompt, run `echo %username%`
476+
- **instance_user:** in Command Prompt, run `echo %username%`, and enter the value
481477

482478
After completing this file, it might look similar to:
483479

@@ -596,7 +592,9 @@ A new VS Code window will open. You may be asked to select the platform of the r
596592

597593
![](/images/vscode_remote_fingerprint.png)
598594

599-
And you are connected! It should look similar too:
595+
And you are connected 🎉 It should look similar to the below image.
596+
597+
If you don't see a terminal open at the bottom or side of VS Code, you can open a terminal by selecting **Terminal** from the top ribbon menu and selecting **New Terminal** (makes sure to remember the key binding for later 😎)
600598

601599
![](/images/vscode_remote_connected.png)
602600

@@ -807,6 +805,50 @@ To customise this configuration for yourself, you'll need to **fork** the reposi
807805

808806
**Forking** creates a copy of the repository under your account (`your_github_username/dotfiles`), which you can then modify with your personal information, such as your name.
809807

808+
<details>
809+
<summary><strong>❗ I started a Le Wagon _Web Development_ or _Data Science_ bootcamp in 2021 or earlier.</strong></summary>
810+
811+
Open a ticket with a TA and do the following:
812+
- Compare your existing dotfiles with the current Le Wagon [dotfile 🔗](https://github.com/lewagon/dotfiles), particularly the `.zshrc` and `settings.json` - if there is no meaningful difference, continue with the setup.
813+
- If you are OK with losing your existing dotfiles - delete your existing dotfiles repository and continue with the setup
814+
- If you do not want to lose your existing dotfiles, you can either:
815+
1. Work with branches
816+
2. Create a _psuedo fork_ of the Le Wagon dotfiles repository
817+
818+
**Option 1. I want to work with branches:**
819+
- Create a branch of your existing dotfiles setup
820+
- On `main`, pull from `upstream`, resolve conflicts, commit and push. It is important that you accept incoming changes to the `.zshrc` and `settings.json` files
821+
- Continue with the setup
822+
823+
**Option 2. I want a separate repo for this set of dotfiles:**
824+
- Cloning the repository to a different target name
825+
```bash
826+
mkdir -p ~/dotfiles-wagon && git clone [email protected]:lewagon/dotfiles.git ~/dotfiles-wagon
827+
```
828+
- Rename the existing `origin` remote to `upstream`
829+
```bash
830+
cd ~/dotfiles-wagon && git remote rename origin upstream
831+
```
832+
- Create a new GitHub repository from directory
833+
```bash
834+
cd ~/dotfiles-wagon && gh repo create dotfiles-wagon --source=. --remote=origin
835+
```
836+
- Verify your remotes:
837+
```bash
838+
git remote -v
839+
840+
# origin [email protected]:<your_github_username>/dotfiles-wagon.git (fetch)
841+
# origin [email protected]:<your_github_username>/dotfiles-wagon.git (push)
842+
# upstream [email protected]:lewagon/dotfiles.git (fetch)
843+
# upstream [email protected]:lewagon/dotfiles.git (push)
844+
```
845+
- Delete this current folder
846+
```bash
847+
cd ~ && rm -rf ~/dotfiles-wagon
848+
```
849+
- Continue with the setup - replace occurrences of `dotfiles` in the following commands with `dotfiles-wagon`
850+
</details>
851+
810852
Open your terminal on your VM and run the following command:
811853

812854
```bash

_partials/dotfiles_simple.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,50 @@ To customise this configuration for yourself, you'll need to **fork** the reposi
66

77
**Forking** creates a copy of the repository under your account (`your_github_username/dotfiles`), which you can then modify with your personal information, such as your name.
88

9+
<details>
10+
<summary><strong>❗ I started a Le Wagon _Web Development_ or _Data Science_ bootcamp in 2021 or earlier.</strong></summary>
11+
12+
Open a ticket with a TA and do the following:
13+
- Compare your existing dotfiles with the current Le Wagon [dotfile 🔗](https://github.com/lewagon/dotfiles), particularly the `.zshrc` and `settings.json` - if there is no meaningful difference, continue with the setup.
14+
- If you are OK with losing your existing dotfiles - delete your existing dotfiles repository and continue with the setup
15+
- If you do not want to lose your existing dotfiles, you can either:
16+
1. Work with branches
17+
2. Create a _psuedo fork_ of the Le Wagon dotfiles repository
18+
19+
**Option 1. I want to work with branches:**
20+
- Create a branch of your existing dotfiles setup
21+
- On `main`, pull from `upstream`, resolve conflicts, commit and push. It is important that you accept incoming changes to the `.zshrc` and `settings.json` files
22+
- Continue with the setup
23+
24+
**Option 2. I want a separate repo for this set of dotfiles:**
25+
- Cloning the repository to a different target name
26+
```bash
27+
mkdir -p ~/dotfiles-wagon && git clone [email protected]:lewagon/dotfiles.git ~/dotfiles-wagon
28+
```
29+
- Rename the existing `origin` remote to `upstream`
30+
```bash
31+
cd ~/dotfiles-wagon && git remote rename origin upstream
32+
```
33+
- Create a new GitHub repository from directory
34+
```bash
35+
cd ~/dotfiles-wagon && gh repo create dotfiles-wagon --source=. --remote=origin
36+
```
37+
- Verify your remotes:
38+
```bash
39+
git remote -v
40+
41+
# origin [email protected]:<your_github_username>/dotfiles-wagon.git (fetch)
42+
# origin [email protected]:<your_github_username>/dotfiles-wagon.git (push)
43+
# upstream [email protected]:lewagon/dotfiles.git (fetch)
44+
# upstream [email protected]:lewagon/dotfiles.git (push)
45+
```
46+
- Delete this current folder
47+
```bash
48+
cd ~ && rm -rf ~/dotfiles-wagon
49+
```
50+
- Continue with the setup - replace occurrences of `dotfiles` in the following commands with `dotfiles-wagon`
51+
</details>
52+
953
Open your terminal on your VM and run the following command:
1054

1155
```bash

_partials/terraform.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ To install terraform, download the **zip archive** from the Terraform install pa
2929

3030
4. Navigate to your home directory (`C:\Users\<YOUR_USERNAME>\`) and create a directory named `terraform_cli`
3131

32-
5. Paste `terraform.exe` in the `cli_apps` directory
32+
5. Paste `terraform.exe` in the `terraform_cli` directory
3333

3434
### Add terraform to PATH
3535

@@ -42,9 +42,9 @@ To update your path:
4242

4343
3. Under **User variables for <YOUR_USERNAME>** click on the variable named: `Path` to select it, then click on **Edit**
4444

45-
3. In the new pop out window, click **New** on to top right
45+
3. In the new pop out window, click **New** on the top right
4646

47-
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**
47+
4. Into the empty box that was just created, enter: `%USERPROFILE%\terraform_cli`
4848

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

@@ -54,12 +54,12 @@ $WINDOWS_END
5454

5555
$LINUX_START
5656

57-
Install some basic requirements:
57+
Install some system requirements requirements:
5858
```bash
5959
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
6060
```
6161

62-
Terraform is not available to **apt** by default, so we need to manually add the repository.
62+
Terraform is not available on **apt** by default, so we need to manually add the repository.
6363
```bash
6464
wget -O- https://apt.releases.hashicorp.com/gpg | \
6565
gpg --dearmor | \
@@ -78,7 +78,7 @@ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
7878
sudo tee /etc/apt/sources.list.d/hashicorp.list
7979
```
8080

81-
Now we can install terraform directly with **apt** 👇
81+
Now we can install terraform directly with **apt** using:
8282
```bash
8383
sudo apt update
8484
sudo apt-get install terraform
@@ -98,11 +98,19 @@ The output should look similar to:
9898
Terraform v1.14.3
9999
on <your_operating_system>_<your_cpu_architecture>
100100

101+
$MAC_START
102+
# macOS (M chip) example
103+
# Terraform 1.14.3
104+
# on darwin_arm64
105+
$MAC_END
106+
$WINDOWS_START
101107
# Windows example
102108
# Terraform v1.14.3
103109
# on windows_amd64
104-
110+
$WINDOWS_END
111+
$LINUX_START
105112
# Linux example
106113
# Terraform v1.14.3
107114
# on linux_amd64
115+
$LINUX_END
108116
```

_partials/terraform_vm.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,17 @@ instance_user = "<YOUR_COMPUTER_USER_NAME>"
119119

120120
We'll need to change some values in this file. Here's were you can find the required values:
121121
- **project_id:** from the GCP Console at this [link here](https://console.cloud.google.com).
122-
- **region:** take a look at the GCP Region and Zone documentation at this [link here](https://cloud.google.com/compute/docs/regions-zones). We strongly recommend you choose the closest geographical region.
123-
- **zone:** Zone is a subset of region. it is almost always the same as **region** appended with `-a`, `-b`, or `-c`.
122+
- **region:** take a look at the GCP Region and Zone documentation at this [link here](https://cloud.google.com/compute/docs/regions-zones#available). We generally recommend you choose a geographically nearby region.
123+
- **zone:** Zone is a subset of region. it is almost always the same as **region** appended with `-a`, `-b`, or `-c`. The zone you select within a region should not have a functional impact.
124124
- **instance_name:** we recommend naming your VM: `lw-de-vm-<YOUR_GITHUB_USERNAME>`. Replacing `<YOUR_GITHUB_USERNAME>` with your GitHub username.
125125
$MAC_START
126-
- **instance_user:** in your terminal, run `whoami`
126+
- **instance_user:** in your terminal, run `whoami`, and enter the value
127127
$MAC_END
128128
$WINDOWS_START
129-
- **instance_user:** in Command Prompt, run `echo %username%`
129+
- **instance_user:** in Command Prompt, run `echo %username%`, and enter the value
130130
$WINDOWS_END
131131
$LINUX_START
132-
- **instance_user:** in your terminal, run `whoami`
132+
- **instance_user:** in your terminal, run `whoami`, and enter the value
133133
$LINUX_END
134134

135135
After completing this file, it might look similar to:

_partials/vscode_ssh_connection.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ A new VS Code window will open. You may be asked to select the platform of the r
6262

6363
![](/images/vscode_remote_fingerprint.png)
6464

65-
And you are connected! It should look similar too:
65+
And you are connected 🎉 It should look similar to the below image.
66+
67+
If you don't see a terminal open at the bottom or side of VS Code, you can open a terminal by selecting **Terminal** from the top ribbon menu and selecting **New Terminal** (makes sure to remember the key binding for later 😎)
6668

6769
![](/images/vscode_remote_connected.png)
6870

automation/vm-ansible-setup/playbooks/setup_vm_part1.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@
1414
- "Running Ubuntu version: {{ ansible_distribution_release }}"
1515
- "On architecture: {{ architecture }}"
1616

17-
- name: Install apt packages
17+
- name: apt update, upgrade, and install
1818
block:
19+
- name: Update and upgrade apt packages
20+
ansible.builtin.apt:
21+
update_cache: yes
22+
upgrade: dist
23+
environment:
24+
DEBIAN_FRONTEND: noninteractive
25+
NEEDRESTART_MODE: a
26+
1927
- name: Install required apt packages
2028
apt:
2129
name:
@@ -57,8 +65,8 @@
5765
- libpython3-dev
5866
- openjdk-8-jdk-headless
5967
state: present
60-
become: true
61-
tags: apt
68+
become: true
69+
tags: apt
6270

6371
- name: Set zsh as default shell
6472
user:

0 commit comments

Comments
 (0)