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: network/vpc/reference-content/use-case-basic.mdx
+32-8Lines changed: 32 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,11 @@ The architecture diagram below shows the infrastructure for this use-case.
27
27
28
28
This is a basic infrastructure to leverage VPC isolation:
29
29
30
-
- Instances are hosting the application without having their own public/flexible IP addresses.
31
-
- Managed Database is accessed by the Instances over the Private Network only, with no exposure to the public internet.
32
-
- Load Balancer distributes user traffic to the Instances over the Private Network
33
-
- Administrators can access the Instances via the Public Gateway
34
-
- External services are accessed by the Instances via the Public Gateway
30
+
-[Instances](/compute/instances/concepts/#instance) are hosting the application without having their own [public/flexible IP addresses](/compute/instances/concepts/#flexible-ip).
31
+
-[Managed Database](/managed-databases/postgresql-and-mysql/concepts/#managed-database) is accessed by the Instances over the Private Network only, with no exposure to the public internet.
32
+
-[Load Balancer](/network/load-balancer/concepts/) distributes user traffic to the Instances over the Private Network.
33
+
- Administrators can access the Instances via the [Public Gateway](/network/public-gateways/concepts/#public-gateway).
34
+
- External services are accessed by the Instances via the Public Gateway.
35
35
36
36
## Detail
37
37
@@ -55,6 +55,10 @@ External services like Transactional Email, Serverless, and NATS, Queues, Topics
55
55
56
56
The Public Gateway, with its public IP address, allows controlled access between the public internet and the VPC. Features such as SSH bastion allow selected administrators with the correct credentials to connect to resources within the VPC, and static NAT and/or advertisement of a default route provides the ability to direct traffic through the gateway to and from the resources within.
57
57
58
+
### Cost control
59
+
60
+
Creating Scaleway resources without their own public IP addresses saves money, as these addresses are a billed resource, while the creation, configuration and assignment of IP addresses from a Private Network is free of charge.
61
+
58
62
## Applications
59
63
60
64
This kind of infrastructure is appropriate for many applications, including but not limited to:
@@ -64,9 +68,29 @@ This kind of infrastructure is appropriate for many applications, including but
64
68
65
69
## Tutorial
66
70
67
-
Follow the steps below to create this infrastructure using the Scaleway console:
68
-
69
-
71
+
Follow the steps below to create this infrastructure using the [Scaleway console](https://console.scaleway.com/organization):
72
+
73
+
1.[Create a VPC](/network/vpc/how-to/create-vpc/) (or use the [default VPC](/network/vpc/how-to/create-vpc/#how-to-identify-your-default-vpcs) pre-created for each Scaleway Project in the appropriate [region](/network/vpc/concepts/#region-and-availability-zone)).
74
+
2.[Create a Private Network](/network/vpc/how-to/create-private-network/) inside the VPC. You can either let Scaleway create the network with an auto-generate subnet, which will provide the private IP addresses for attached resources, or specify a self-defined subnet.
75
+
3.[Create a Public Gateway](/network/public-gateways/how-to/create-a-public-gateway/) (TODO should it advertize the default route?) and [attach it to the Private Network](/network/public-gateways/how-to/configure-a-public-gateway/#how-to-attach-a-public-gateway-to-a-private-network).
76
+
4.[Set up SSH bastion](/network/public-gateways/how-to/use-ssh-bastion/) on the Public Gateway, to allow administrator access.
77
+
5.[Create a Managed Database](/managed-databases/postgresql-and-mysql/how-to/create-a-database/)
78
+
6.[Detach the Managed Database's public endpoint](/managed-databases/postgresql-and-mysql/how-to/remove-public-endpoint/)[QUESTION - NECESSARY?] and [attach it to the Private Network](/managed-databases/postgresql-and-mysql/how-to/connect-database-private-network/) you created in step 2.
79
+
7. Create and configure external services as required, e.g. [Object Storage](/storage/object/quickstart/), [Transactional Email](/managed-services/transactional-email/quickstart/) and [Secret Manager](/identity-and-access-management/secret-manager/quickstart/).
80
+
8.[Create your Instances](/compute/instances/how-to/create-an-instance/), using the configuration best-suited to your application. Do not assign public IPv4 or IPv6 addresses to the Instances. Add Block Storage volumes as required (or you can create and attach these [later](/storage/block/quickstart/).)
81
+
<Messagetype="tip">
82
+
If you are creating several Instances with the exact same configuration running the exact same template, consider creating just one Instance, configuring and installing it to communicate with the other resources inside and outside the VPC as required, then [creating an image](/compute/instances/how-to/create-a-backup/) of this Instance and creating the remaining Instances [using this image](/compute/instances/how-to/create-a-backup/#how-to-create-or-restore-an-instance-from-an-image).
83
+
</Message>
84
+
9.[Attach each Instance to the Private Network](/compute/instances/how-to/use-private-networks/#how-to-attach-instances-to-an-existing-private-network) you created at step 2. Either let Scaleway automatically choose an IP from the Private Network's subnet for each Instance, or used [reserved IPs](s/network/ipam/how-to/reserve-ip/) to specify the IP for each Instance on the network.
85
+
10.[Create a Load Balancer](/network/load-balancer/how-to/create-load-balancer/), ensuring you assign a public (flexible) IP address. Do not yet create the frontends and backends.
86
+
11.[Attach the Load Balancer to the Private Network](/network/load-balancer/how-to/use-with-private-network/#how-to-attach-a-private-network-to-your-load-balancer). As before, you can use an auto-selected IP, or a specific reserved IP from the subnet.
87
+
12.[Create a frontend and backend for the Load Balancer](/network/load-balancer/how-to/create-frontends-backends/). Choose the most appropriate configuration for your purpose and application, following advice and tips in the linked documentation. When configuring the Load Balancer's backend servers, enter the private IP addresses of the Instances on the Private Network.
88
+
13.[Create your domain](/network/domains-and-dns/how-to/register-internal-domain/) and [add a DNS record](/network/domains-and-dns/how-to/manage-dns-records/#how-to-add-dns-records) (e.g. an A record) to point it to the public IP of your Load Balancer. While instructions show how to do this with Scaleway's **Domains and DNS** product, you can also use an external domain and configure it with another provider.
70
89
71
90
## Terraform
72
91
92
+
A Terraform template for this architecture is provided in full on our [Terraform Scaleway Provider pages](TODO-LINK). Terraform allows you to create Infrastructure as Code (IaC) to build, configure and manage your infrastructure with configuration files, rather than with the Scaleway console. The following snippet shows an extract of the configuration file:
0 commit comments