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
feature: add user cluster create with terraform sample (metallb) (#593)
* chore: add samples for metalln usercluster terraform
* chore: add cluster name variable
* doc: add intro to user cluster with manuallb
* doc: update readme for the user cluster create
* linkt: fix errors
* lint: fix linting errors
* lint: fix linting errors
* chore: update tfvars files
* chore: add dynamic admin user block
* chore: add region tags
* chore: update tfvars sample
* doc: update readme
* chore: fix sample terraform vars file
* lint: add whitespace at end
* feature: add sample for Anthos bare metal on VMware (metal-lb) (#597)
* Add sample for Anthos VMware on metal lb
* Update sample file with placeholders
* Remove ignored annotations as the field is defaulted
* reformat sample file
* fix lint error
* fix lint error by running terraform fmt
* change back the update on abm directory
* fix: update TF sample files of AVMW for beta release (#604)
* Update provider to google-beta
* Add enable_load_balancer in node pool
* update lb_address_pools sample value to keep consistent with ABM sample
* add authorization field to support admin_users var
* Add instructions of preps for cluster upgrade
* remove google-private in versions and add admin_users in variable
* update the var name for admin_cluster and readme
* Correct gkectl command in readme file
* Update provider in ABM samples to google-beta
* Add upgrade via gcloud command example in readme
* update description for upgrade in readme file
* chore: add readme link to AVMW
* chore: fix docs
---------
Co-authored-by: Naitian Liu <[email protected]>
Copy file name to clipboardExpand all lines: anthos-bm-gcp-terraform/README.md
+40-8
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,14 @@
1
+
> #### This is a terraform script to provision the GCE infrastructure in which Anthos clusters on bare metal (ABM) will be installed. The cluster installation is done using `bash` scripts. This does NOT use the `google_gkeonprem_*` terraform resources of the `google` provider to create the ABM cluster. If you are looking for a sample that is fully based off of the terraform provider, see the [anthos-onprem-terraform](/anthos-onprem-terraform/) directory.
2
+
---
1
3
2
4
## Anthos Baremetal on Google Compute Engine VMs with Terraform
3
5
4
-
This repository shows you how to use Terraform to try Anthos clusters on bare metal in High Availability (HA) mode using Virtual Machines (VMs) running on Compute Engine. For information about how to use the `gcloud` command-line tool to try this, see [Try Anthos clusters on bare metal on Compute Engine VMs](https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/try/gce-vms).
6
+
> Read the dosclaimer on top of this README before you continue.
7
+
8
+
This repository shows you how to use Terraform to try Anthos clusters on bare
9
+
metal in High Availability (HA) mode using Virtual Machines (VMs) running on
10
+
Compute Engine. For information about how to use the `gcloud` command-line tool
11
+
to try this, see [Try Anthos clusters on bare metal on Compute Engine VMs](https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/try/gce-vms).
5
12
6
13
### Pre-requisites
7
14
@@ -12,14 +19,19 @@ This repository shows you how to use Terraform to try Anthos clusters on bare me
12
19
13
20
- A [Google Cloud Project](https://console.cloud.google.com/cloud-resource-manager?_ga=2.187862184.1029435410.1614837439-1338907320.1614299892)_(in which the resources for the setup will be provisioned)_
14
21
15
-
- A [Service Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) in the project that satisfies **one** of the following requirements and its **[key file downloaded](docs/create_sa_key.md)** to the workstation:
22
+
- A [Service Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
23
+
in the project that satisfies **one** of the following requirements and its
24
+
**[key file downloaded](docs/create_sa_key.md)** to the workstation:
16
25
- The Service Account has `Owner` permissions
17
26
- The Service Account has both `Editor` and `Project IAM Admin` permissions
18
27
19
28
---
20
29
### Bare metal infrastructure on Google Cloud using Compute Engine VMs
21
30
22
-
The [Quick starter](docs/quickstart.md) guide sets up the following infrastructure in Google Cloud using Compute Engine VMs. The diagram assumes that the none of the default values for the [variables](variables.tf) were changed other than the ones mentioned in the quick starter.
31
+
The [Quick starter](docs/quickstart.md) guide sets up the following
32
+
infrastructure in Google Cloud using Compute Engine VMs. The diagram assumes
33
+
that the none of the default values for the [variables](variables.tf) were
34
+
changed other than the ones mentioned in the quick starter.
23
35
24
36

25
37
@@ -29,22 +41,42 @@ The [Quick starter](docs/quickstart.md) guide sets up the following infrastructu
29
41
-[Terraform Module Information _(includes variables definitions)_](docs/variables.md)
30
42
31
43
-[Quick start guide](docs/quickstart.md):
32
-
- The terraform script sets up the GCE VM environment. The output of the script prints out the commands to follow to install **Anthos on bare metal** in the provisioned GCE VMs.
44
+
- The terraform script sets up the GCE VM environment. The output of the
45
+
script prints out the commands to follow to install
46
+
**Anthos on bare metal** in the provisioned GCE VMs.
33
47
34
48
-[All in one install](docs/one_click_install.md):
35
-
- The terraform script sets up the GCE VM environment and also triggers the **Anthos on bare metal** installation on the provisioned GCE VMs. The output of the script prints out the commands to SSH into the *admin workstation VM* and monitor the Anthos on bare metal installation process.
49
+
- The terraform script sets up the GCE VM environment and also triggers the
50
+
**Anthos on bare metal** installation on the provisioned GCE VMs. The
51
+
output of the script prints out the commands to SSH into the
52
+
*admin workstation VM* and monitor the Anthos on bare metal installation
53
+
process.
36
54
37
55
-[Manual LB install](docs/manuallb_install.md):
38
-
- The terraform script sets up the GCE environment and triggers the **Anthos on bare metal** installation similar to the [all-in-one install](docs/one_click_install.md). However, in this mode **Anthos on bare metal** is installed with a [`Manual Loadbalancer`](https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/installing/manual-lb) instead of the default [`Bundled LB`](https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/installing/bundled-lb). We use [Google Cloud Loadbalancer](https://cloud.google.com/load-balancing/docs/load-balancing-overview) as the manual loadbalancer for the Anthos on bare metal cluster. The output of the script prints out the same instructions as the all-in-one install; additionally it also prints out the **Public IP** addresses of the loadbalancers.
56
+
- The terraform script sets up the GCE environment and triggers the
57
+
**Anthos on bare metal** installation similar to the
58
+
[all-in-one install](docs/one_click_install.md). However, in this mode
59
+
**Anthos on bare metal** is installed with a
60
+
[`Manual Loadbalancer`](https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/installing/manual-lb) instead of the default
as the manual loadbalancer for the Anthos on bare metal cluster. The
65
+
output of the script prints out the same instructions as the all-in-one
66
+
install; additionally it also prints out the **Public IP** addresses of
67
+
the loadbalancers.
39
68
40
69
-[NFS Shared Storage](docs/nfs.md):
41
-
- An optional NFS server is provisioned in conjunction with any of the install methods above to provide shared storage to the **Anthos on bare metal** cluster.
70
+
- An optional NFS server is provisioned in conjunction with any of the
71
+
install methods above to provide shared storage to the
72
+
**Anthos on bare metal** cluster.
42
73
43
74
---
44
75
## Contributing
45
76
46
77
#### Pre-requisites
47
-
- The same [pre-requisites](#pre-requisites) to run this sample is required for testing as well
78
+
- The same [pre-requisites](#pre-requisites) to run this sample is required for
79
+
testing as well
48
80
49
81
#### Pull requests
50
82
- For improvements to this sample submit your pull requests to the `main` branch
All the samples here, first **emulates** a bare metal infrastucture using
10
+
Compute Engine (GCE) VMs. It is on this imaginary bare metal environment the
11
+
clusters are installed. Thus, as a prestep to all the guides here, you will see
12
+
a step for provisioning the bare metal insfrastructure. If you have your own
13
+
bare metal infrastructure, you can skip that section and adjust the sample to
14
+
suit your environment.
15
+
16
+
<!--
17
+
# TODO: Add links to the Terraform provider once it has been published
18
+
-->
19
+
---
20
+
21
+
### Anthos clusters on bare metal (ABM)
22
+
- Create **admin** clusters with Terraform `(coming soon)`
23
+
- See [guide](https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/installing/creating-clusters/create-admin-cluster-api) for creating an admin cluster using other clients
24
+
- Create **user** clusters with Terraform
25
+
-[MetalLB](./abm_user_cluster_metallb/)
26
+
- ManualLB `(coming soon)`
27
+
- Create **standalone** clusters with Terraform `(coming soon)`
28
+
---
29
+
30
+
### Anthos clusters on VMware (AVMware)
31
+
- Create **admin** clusters with Terraform `(coming soon)`
32
+
- Create **user** clusters with Terraform
33
+
-[MetalLB](./avmw_user_cluster_metallb/)
34
+
- ManualLB `(coming soon)`
35
+
- Create **standalone** clusters with Terraform `(coming soon)`
## Create Anthos on bare metal **user** clusters (MetalLB) with Terraform
2
+
3
+
The steps here acheive the same result as what is explained in the
4
+
[Create an Anthos on bare metal user cluster on Compute Engine VMs using Anthos On-Prem API clients](https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/try/admin-user-gce-vms)
5
+
public documentation. We show an example of how to create an Anthos on bare
6
+
metal **user cluster** with **MetalLB** using the Google provider for Terraform.
7
+
8
+
The sample here has a prerequisite step of creating an **admin cluster** using
9
+
the [script available in this repository](/anthos-bm-gcp-bash/install_admin_cluster.sh).
10
+
Thus, the default variables _(especially IP addresses)_ used in this sample are
11
+
based on the assumption that the admin cluster and the GCE VM based bare metal
12
+
infrstructure for the user cluster was created using that script. If you
13
+
already have an **admin cluster and bare metal nodes for the user cluster**, you
14
+
may skip running this script. However, you will have to update the sample to use
15
+
values appropriate to your environment.
16
+
17
+
---
18
+
### Prerequisite
19
+
20
+
#### Create admin cluster and VMs for user cluster
21
+
22
+
> **Note:** If you already have an admin cluster and the bare metal nodes for
23
+
> a new user cluster, then you can skip this step. But don't forget to update
24
+
> the sample with the values appropriate to your environment.
25
+
26
+
- First you will have to create an admin cluster that will manage your user
27
+
cluster. At the time of writing this guide, admin cluster creation
28
+
**using Terraform** is not supported.
29
+
30
+
- Follow the [instructions here](/anthos-bm-gcp-bash/docs/admin.md) to create an
31
+
admin cluster and to provision the GCE VMs for the user cluster using the
0 commit comments