You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/node-js-gcp/instance.md
+57-29Lines changed: 57 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,54 +16,82 @@ For support on GCP setup, see the Learning Path [Getting started with Google Clo
16
16
17
17
## Provision a Google Axion C4A Arm VM in Google Cloud Console
18
18
19
-
To create a virtual machine using the C4A instance type in Google Cloud Platform:
20
-
21
-
- Open [Google Cloud Console](https://console.cloud.google.com/).
22
-
- In the left menu, select **Compute Engine**, then select **VM Instances**.
23
-
- Select **Create Instance**.
24
-
- In the **Machine configuration** section:
25
-
- Enter a unique **Instance name**.
26
-
- Choose your preferred **Region** and **Zone**.
19
+
To create a virtual machine based on the C4A instance type:
20
+
- Navigate to the [Google Cloud Console](https://console.cloud.google.com/).
21
+
- Go to **Compute Engine > VM Instances** and select **Create Instance**.
22
+
- Under **Machine configuration**:
23
+
- Populate fields such as **Instance name**, **Region**, and **Zone**.
27
24
- Set **Series** to `C4A`.
28
-
- Select `c4a-standard-4` for the machine type.
25
+
- Select `c4a-standard-4` for machine type.
29
26
30
27

31
28
32
-
This configuration gives you four Arm vCPUs and 16 GB memory, optimized for Arm workloads.
33
29
34
-
## Select OS and finalize VM settings
30
+
- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server** or **Ubuntu**.
31
+
- If using use **SUSE Linux Enterprise Server**. Select "Pay As You Go" for the license type.
32
+
- If using **Ubuntu**, under the **Version** tab, please scroll down and select the aarch64 version of **Ubuntu 22.04 LTS**.
33
+
- Once appropriately selected, please Click **Select**.
34
+
- Under **Networking**, enable **Allow HTTP traffic**.
35
+
- Click **Create** to launch the instance.
36
+
- Once created, you should see a "SSH" option to the right in your list of VM instances. Click on this to launch a SSH shell into your VM instance:
35
37
36
-
After configuring the machine type, you'll need to select the operating system and finalize your VM settings. Follow the steps below to select an Arm64-based OS image, configure networking, and launch your instance. This ensures your VM is ready for Arm-native development and accessible for further setup.
38
+

37
39
40
+
- A window from your browser should come up and you should now see a shell into your VM instance:
38
41
39
-
- In the **OS and Storage** section, select **Change**:
40
-
- Choose an Arm64-based OS image. For this Learning Path, select **SUSE Linux Enterprise Server**.
41
-
- For **License type**, select **Pay as you go**.
42
-
- Select **Select** to confirm your choices.
42
+

43
43
44
-
- In the **Networking** section, enable **Allow HTTP traffic**.
44
+
## Explore your instance
45
45
46
-
- Select **Review and create** to review your configuration.
46
+
### Run uname
47
47
48
-
- Select **Create**to launch your VM instance.
48
+
Use the [uname](https://en.wikipedia.org/wiki/Uname) utility to verify that you are using an Arm-based server. For example:
49
49
50
-
- After the VM is created, locate your instance in the **VM Instances** list.
51
-
- Select the **SSH** button next to your instance to open a browser-based SSH shell.
50
+
```console
51
+
uname -m
52
+
```
53
+
will identify the host machine as `aarch64`.
52
54
53
-
{{% notice Note %}}
54
-
If you don't see the **SSH** option, refresh the page or check that your VM is running. The SSH shell opens in a new browser window, giving you direct access to your Arm-based VM.
55
-
{{% /notice %}}
55
+
### Run hello world
56
56
57
+
Install the `gcc` compiler:
57
58
58
-

59
+
{{< tabpane code=true >}}
60
+
{{< tab header="Ubuntu" language="bash">}}
61
+
sudo apt update
62
+
sudo apt install -y build-essential
63
+
{{< /tab >}}
64
+
{{< tab header="SUSE Linux" language="bash">}}
65
+
sudo zypper refresh
66
+
sudo zypper install -y gcc
67
+
{{< /tab >}}
68
+
{{< /tabpane >}}
59
69
60
-
A window from your browser should come up and you should now see a shell into your VM instance:
70
+
Using a text editor of your choice, create a file named `hello.c` with the contents below:
61
71
62
-

72
+
```C
73
+
#include<stdio.h>
74
+
intmain(){
75
+
printf("hello world\n");
76
+
return 0;
77
+
}
78
+
```
79
+
Build and run the application:
80
+
81
+
```console
82
+
gcc hello.c -o hello
83
+
./hello
84
+
```
85
+
86
+
The output is shown below:
63
87
88
+
```output
89
+
hello world
90
+
```
64
91
65
-
## What you've accomplished
92
+
## Automating Arm Based Infrastructure Deployment
66
93
67
-
You've successfully provisioned a Google Axion C4A Arm virtual machine running SUSE Linux Enterprise Server. You're now ready to install Node.js and deploy your workloads on Arm.
94
+
Cloud infrastructure deployment is typically done via Infrastructure as code (IaC) automation tools. There are Cloud Service Provider specific tools like [Google Cloud Deployment Manager](https://cloud.google.com/deployment-manager/docs/).
68
95
96
+
There are also Cloud Service Provider agnostic tools like [Terraform](https://www.terraform.io/).There is a [deploying Arm VMs on (GCP) using Terraform learning path](/learning-paths/servers-and-cloud-computing/gcp) that should be reviewed next.
0 commit comments