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/django-on-gcp/firewall_setup.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,15 +29,15 @@ Navigate to the Google Cloud Console and create a new firewall rule:
29
29
30
30
Fill in the rule details to allow traffic on port 8000:
31
31
32
-
- Set **Name** to `allow-django-8000`.
32
+
- Set **Name** to `allow-tcp-8000`.
33
33
- Select your network (the default is `default`; your organization may use a different network).
34
34
- Set **Direction of traffic** to **Ingress**.
35
35
- Set **Action on match** to **Allow**.
36
36
- Set **Targets** to **Specified target tags**.
37
-
- Enter `django-server` in the **Target tags** field.
37
+
- Enter `allow-tcp-8000` in the **Target tags** field.
38
38
- Set **Source IPv4 ranges** to `0.0.0.0/0` (allows traffic from any IP address; restrict this in production).
39
39
40
-

40
+

Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/django-on-gcp/installation.md
+48-42Lines changed: 48 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,80 +10,86 @@ layout: learningpathall
10
10
11
11
After connecting to your SUSE Linux Enterprise Server (SLES) VM using SSH, you'll install the Google Cloud CLI, update your system, install Python 3.11, and set up a virtual environment for your Django project.
12
12
13
-
## Install Google Cloud CLI (gcloud)
14
-
15
-
The Google Cloud CLI is required to authenticate with GCP and allow your Django application VM to interact with Google Cloud services such as GKE, Cloud SQL, Artifact Registry, Memorystore, and to build, deploy, and operate the Django platform.
13
+
## Prepare the system
16
14
17
-
### Download gcloud SDK (Arm64)
15
+
Update the system packages and install dependencies:
Verify that Python and pip are installed correctly:
32
33
33
-
### Initialize gcloud
34
+
```bash
35
+
python3.11 --version
36
+
pip3.11 --version
37
+
```
38
+
The output should be similar to:
34
39
35
-
```console
36
-
source ~/.bashrc
37
-
gcloud init
40
+
```output
41
+
Python 3.11.10
42
+
pip 22.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)
38
43
```
39
44
40
-
During initialization:
45
+
## Install Google Cloud CLI (gcloud)
41
46
42
-
- Select the correct project (for example: imperial-time-xxxxxx)
43
-
- Choose the default region (for example: us-central1)
47
+
The Google Cloud CLI is required to authenticate with GCP and allow your Django application VM to interact with Google Cloud services such as GKE, Cloud SQL, Artifact Registry, Memorystore, and to build, deploy, and operate the Django platform.
44
48
45
-
### Verify authentication
49
+
### Install Google Cloud SDK (gcloud)
50
+
51
+
The Google Cloud SDK is required to create and manage GKE clusters.
Begin by refreshing your package list and upgrading installed software to ensure you have the latest versions and security patches:
66
+
After installation completes, exit and reconnect to apply the PATH changes:
61
67
62
68
```console
63
-
sudo zypper refresh
64
-
sudo zypper update -y
69
+
exit
65
70
```
66
71
67
-
##Install Python 3.11 and development tools
72
+
### Initialize gcloud
68
73
69
-
Django requires Python 3.10 or later. You'll install Python 3.11 along with pip (Python's package manager) and essential build tools needed for compiling Python packages:
74
+
Authenticate and configure the Google Cloud CLI:
70
75
71
76
```console
72
-
sudo zypper install -y python311 python311-pip python311-devel git gcc make
77
+
gcloud init
73
78
```
74
79
75
-
Verify that Python and pip are installed correctly:
80
+
During initialization, select **Login with a new account**. You'll be prompted to authenticate using your browser and receive an auth code to copy back. Select the project you want to use and choose default settings when unsure.
76
81
77
-
```bash
78
-
python3.11 --version
79
-
pip3.11 --version
80
-
```
82
+
### Verify authentication
81
83
82
-
The output is similar to:
84
+
```console
85
+
gcloud auth list
86
+
```
83
87
88
+
You should see an output similar to:
84
89
```output
85
-
Python 3.11.10
86
-
pip 22.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)
This architecture represents a production-grade microservice deployment where compute runs on Arm, while data services are provided through fully managed GCP offerings over private networking.
37
37
38
-
### Install Docker (Container Runtime)
39
-
Docker is required to build, run, and test container images locally before pushing them to Artifact Registry.
38
+
## Enable the SUSE Containers module
40
39
41
-
**Update system packages and install prerequisites:**
40
+
Enable the SUSE Containers Module to ensure that Docker and container-related tools are fully supported.
**Make the binary executable and move it to PATH:**
111
+
Note the **PROJECT_ID** for use in the next step.
112
+
113
+
### Set the active project
114
+
115
+
Ensure the correct GCP project is selected:
79
116
80
117
```console
81
-
chmod +x kubectl
82
-
sudo mv kubectl /usr/local/bin/
118
+
gcloud config set project <YOUR_PROJECT_ID>
83
119
```
84
120
85
-
**Verify kubectl installation:**
121
+
Replace `<YOUR_PROJECT_ID>` with your actual project ID from the previous step.
122
+
123
+
### Install the auth plugin for gcloud
86
124
87
125
```console
88
-
kubectl version --client
126
+
gcloud components install gke-gcloud-auth-plugin
89
127
```
90
-
This confirms that the Kubernetes client is correctly installed on the VM.
91
128
92
129
### Create Artifact Registry
93
130
Artifact Registry is used to store and distribute the Docker images for your Django application. This ensures that all Kubernetes nodes pull trusted, versioned images from a private Google-managed repository.
0 commit comments