|
1 | | -## Virtual Machine (VM) |
2 | | - |
3 | | -**👌 Note: Skip to the next section if you already have a VM set up** |
4 | | - |
5 | | -_Note: The following section requires you already have a [Google Cloud Platform](https://cloud.google.com/) account associated with an active [Billing account](https://console.cloud.google.com/billing)._ |
6 | | - |
7 | | -- Go to console.cloud.google.com > > Compute Engine > VM instances > Create instance |
8 | | -- Name it `lewagon-data-eng-vm-<github_username>`, replace `<github_username>` with your own, e.g. `krokrob` |
9 | | -- Region `europe-west1`, choose the closest one among the [available regions](https://cloud.google.com/compute/docs/regions-zones#available) |
10 | | - |
11 | | - <img alt="gcloud-console-vm-create-instance" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-create-instance.png" width=500> |
12 | | -- In the section `Machine configuration` under the sub-heading `Machine type` |
13 | | -- Select General purpose > PRESET > e2-standard-4 |
14 | | - |
15 | | - <img alt="gcloud-console-vm-e2-standard4" src="https://wagon-public-assets.s3.eu-west-3.amazonaws.com/v9dv42llst8qjp2uj0d1yr00po1g" width=500> |
16 | | -- Boot disk > Change |
17 | | - - Operating system > Ubuntu |
18 | | - - Version > Ubuntu 22.04 LTS x86/64 |
19 | | - - Boot disk type > Balanced persistent disk |
20 | | - - Size > upgrade to 150GB |
21 | | - |
22 | | - <img alt="gcloud-console-vm-ubunt" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-ubunt.png" width=500> |
23 | | -- Open `Networking, Disks, ...` under `Advanced options` |
24 | | -- Open `Networking` |
25 | | - |
26 | | - <img alt="gcloud-console-vm-networking" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-networking.png" width=500> |
27 | | -- Go to `Network interfaces` and click on `default default (...)` with a downward arrow on the right. |
28 | | - |
29 | | - <img alt="gcloud-console-vm-network-interfaces" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-network-interfaces.png" width=500> |
30 | | -- This opened a box `Edit network interface` |
31 | | -- Go to the dropdown `External IPv4 address`, click on it, click on `RESERVE STATIC EXTERNAL IP ADDRESS` |
32 | | - |
33 | | - <img alt="gcloud-console-vm-create-static-ip" src="https://wagon-public-assets.s3.eu-west-3.amazonaws.com/1ax09j2zld7x0lsvpp9p8ld8u5vc" width=300> |
34 | | -- Give it a name, like "lewagon-data-eng-vm-ip-<github_username>" (replace `<github_username>` with your own) and description "Le Wagon - Data Engineering VM IP". This will take a few seconds. |
35 | 1 |
|
36 | | - <img alt="gcloud-console-reserve-static-ip" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-reserve-static-ip.png" width=300> |
37 | | - |
38 | | -- You will now have a public IP associated with your account, and later to your VM instance. Click on `Done` at the bottom of the section `Edit network interface` you were in. |
39 | | - |
40 | | - <img alt="gcloud-console-new-external-ip" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-new-external-ip.png" width=300> |
41 | | - |
42 | | -### Public SSH key |
43 | | -- Open the `Security` section |
44 | | - |
45 | | - <img alt="gcloud-console-vm-security" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-security.png" width=300> |
46 | | -- Open the `Manage access` subsection |
47 | | - |
48 | | - <img alt="gcloud-console-manage-access" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-manage-access.png" width=200> |
49 | | -- Go to `Add manually generated SSH keys` and click `Add item` |
50 | | - |
51 | | - <img alt="gcloud-console-add-manual-ssh-key" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-add-manual-ssh-key.png" width=500> |
52 | | -- In your terminal display your public SSH key: |
53 | | - - Windows: navigate to where you created your SSH key and open `id_ed25519.pub` |
54 | | - |
55 | | - - Mac/Linux users can use: |
56 | | - ```bash |
57 | | - cat ~/.ssh/id_ed25519.pub |
58 | | - # OR cat ~/.ssh/de-bootcamp.pub if you created a unique key |
59 | | - ``` |
60 | | -- Copy your public SSH key and paste it: |
61 | | - |
62 | | - <img alt="gcloud-console-add-ssh-key-pub" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-add-ssh-key-pub.png" width=500> |
63 | | -- On the right hand side you should see |
64 | | - |
65 | | - <img alt="gcloud-console-vm-price-month" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-price-month.png" width=300> |
66 | | -- You should be good to go and click `CREATE` at the bottom |
| 2 | +## Virtual Machine (VM) |
67 | 3 |
|
68 | | - <img alt="gcloud-console-vm-create" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-create.png" width=500> |
69 | | -- It will take a few minutes for your virtual machine (VM) to be created. Your instance will show up like below when ready, with a green circled tick, named `lewagon-data-eng-vm-krokrob` (`krokrob` being replaced by your GitHub username). |
| 4 | +_Note: The VM setup requires a [Google Cloud Platform](https://cloud.google.com/) account associated with an active [Billing account](https://console.cloud.google.com/billing)_ |
70 | 5 |
|
71 | | - <img alt="gcloud-console-vm-instance-running" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-instance-running.png" width=500> |
72 | | -- Click on your instance |
| 6 | +ℹ️ In the guide, left click to drag the screenshots if necessary |
73 | 7 |
|
74 | | - <img alt="gcloud-console-vm-running" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-running.png" width=500> |
75 | | -- Go down to the section `SSH keys`, and write down your username (you need it for the next section) |
| 8 | +ℹ️ You may adjust the aspect ratio of your browser window to see the full screenshots |
76 | 9 |
|
77 | | - <img alt="gcloud-console-vm-username" src="https://wagon-public-datasets.s3.amazonaws.com/data-engineering/setup/gcloud-console-vm-username.png" width=300> |
| 10 | +<a href="https://scribehow.com/embed/Create_a_Google_Cloud_VM_Instance_with_SSH_Key__1ohFlAbSR9yoG28S0PDfwg"> |
| 11 | + <img src="images/scribe_gcp_vm.png" alt="scribe gcp vm" width="500"> |
| 12 | +</a> |
78 | 13 |
|
79 | | -Congrats, your virtual machine is up and running, it is time to connect it with VS Code! |
| 14 | +**👌 Follow [this guide](https://scribehow.com/embed/Create_a_Google_Cloud_VM_Instance_with_SSH_Key__1ohFlAbSR9yoG28S0PDfwg) or skip to the next section if you already have a VM set up** |
0 commit comments