Skip to content

Commit 6d1ea47

Browse files
committed
Merge branch 'master' into feature/#68-gloo-edge-improvements
2 parents 5c73503 + 3b1a435 commit 6d1ea47

File tree

156 files changed

+3991
-22353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+3991
-22353
lines changed

INSTRUCTOR.md

+21-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Install terraform:
66

77
```
8-
# Tested with terraform v0.15.4
8+
# Tested with terraform v0.15.4, v1.0.2
99
brew install terraform
1010
```
1111

@@ -16,6 +16,20 @@ Install ansible:
1616
pip3 install ansible
1717
```
1818

19+
Provide credentials for both AWS and GCP:
20+
```
21+
# Authenticate with GCP. The easiest way to do this is to run
22+
gcloud auth application-default login
23+
# Authenticate with AWS. The easiest way to do this is to run
24+
aws configure
25+
```
26+
27+
Configure region and zone for your remote resources:
28+
```
29+
# Create a file named configuration.auto.tfvars, you can use as template the one called configuration-example.auto.tfvars
30+
# This step is optional, but if you don't do it it will use default values from terraform.tfvars
31+
# Use this file to configure your desired resources too
32+
```
1933
## Deploy
2034

2135
Go to the terraform directory:
@@ -37,7 +51,7 @@ terraform workspace list
3751
terraform workspace select <workspace_name> || terraform workspace new <workspace_name>
3852
```
3953

40-
Edit the `terraform.tfvars` file to adapt it to your needs:
54+
Edit the `configuration.auto.tfvars` file to adapt it to your needs:
4155

4256
- Add as many entries to `environment` as desired (or none). Every entry can be considered an isolated unit from the others
4357
- Inside an `environment` all parameters are optional, and default values are defined in the same file
@@ -69,7 +83,8 @@ If you don't already have the `lab` private key available locally, retrieve it f
6983
---
7084

7185
```
72-
ssh-add lab
86+
eval "$(ssh-agent -s)"
87+
ssh-add ~/.ssh/id_workshop
7388
```
7489

7590
All solo.io enterprise products require a license key. If you'd like to preset limited-term keys on the student Virtual Machines, then set the `LICENSE_KEY` and `GLOO_MESH_LICENSE_KEY` and `PORTAL_LICENSE_KEY` environment variables on your workstation before running the `ansible-playbook` command.
@@ -85,6 +100,9 @@ Run the following command to deploy the Virtual Machines:
85100
```
86101
terraform apply -auto-approve
87102
```
103+
---
104+
**NOTE**
105+
Check TROUBLESHOOTING.md file in case you see errors
88106

89107
# Manual provisioning
90108

SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [Gloo Edge Gateway](./gloo-edge/gloo-edge/README.md)
44
* [Gloo Edge Federation](./gloo-mesh/federation/README.md)
55
* [Gloo Mesh Workshop](./gloo-mesh/README.md)
6+
* [Gloo Mesh Workshop on EKS](./gloo-mesh-eks-beta/README.md)
67
* [Gloo Portal Workshop](./gloo-portal/README.md)
78
* [Istio Day 2 Series](./istio-day2/README.md)
89
* [Deploy Istio for Production](./istio-day2/1-deploy-istio/README.md)

TROUBLESHOOTING.md

+80-1
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,83 @@ ssh-add -L
9696
If not, add it to the agent (the file can be found in shared drive)
9797
```
9898
ssh-add ~/.ssh/rsa_solouser_github
99-
```
99+
```
100+
101+
# Terraform apply error 'resource not found'
102+
There are strong dependencies among the resources created by terraform, and sometimes the child can't get the parent ready before the timeout.
103+
104+
Just run terraform apply again, with the same parameters, and terraform will resume the building
105+
```
106+
terraform apply
107+
```
108+
109+
# Terraform apply failed
110+
Run the same command again, terraform will complete the creation
111+
112+
# Terraform says it is locked
113+
This can happen when a running apply is unexepctely closed, if you are sure there is not terraform process running
114+
```
115+
terraform force-unlock <lockid>
116+
```
117+
118+
# Terraform is very slow
119+
For a large number of resources (example 150 eks cluster => 4900 resources)
120+
121+
Increase the default level of parallelism (10) to a higher number. Be aware that too high numbers can cause rate-limit in cloud api and high cpu usage.
122+
```
123+
terraform apply -parallelism=150
124+
```
125+
126+
Another, maybe better, alternative is to use different workspaces to build the same object in different namespaces.
127+
These 3 commands can run in parallel, and every terraform process will deal with a portion of the final setup
128+
```
129+
TF_WORKSPACE=wkr-eks1 time terraform apply -parallelism=51 -auto-approve
130+
TF_WORKSPACE=wkr-eks2 time terraform apply -parallelism=51 -auto-approve
131+
TF_WORKSPACE=wkr-eks3 time terraform apply -parallelism=51 -auto-approve
132+
```
133+
134+
After all commands are successful (you may need to retry some of them, as TF is not great handling large graphs of dependencies), you can see the outputs
135+
```
136+
TF_WORKSPACE=wkr-eks1 time terraform output eks_cluster_vm
137+
TF_WORKSPACE=wkr-eks2 time terraform output eks_cluster_vm
138+
TF_WORKSPACE=wkr-eks3 time terraform output eks_cluster_vm
139+
```
140+
141+
And finally destroy them
142+
```
143+
TF_WORKSPACE=wkr-eks1 time terraform destroy -parallelism=51 -auto-approve -refresh=false
144+
TF_WORKSPACE=wkr-eks2 time terraform destroy -parallelism=51 -auto-approve -refresh=false
145+
TF_WORKSPACE=wkr-eks3 time terraform destroy -parallelism=51 -auto-approve -refresh=false
146+
```
147+
148+
# Terraform says the maximum number of resources are created
149+
```
150+
https://eu-west-1.console.aws.amazon.com/servicequotas
151+
https://console.cloud.google.com/iam-admin/quotas?project=solo-test-236622
152+
```
153+
154+
# Terraform is not working
155+
Make sure you have credentials in your system
156+
157+
```
158+
# GCP
159+
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#configuring-the-provider
160+
gcloud auth application-default login
161+
162+
# AWS
163+
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication
164+
aws configure
165+
````
166+
167+
# Terraform is creating my resources in an undesired region/zone
168+
Make sure you have specified your preferences in file configuration.auto.tfvars
169+
170+
```
171+
# GCP
172+
project = "solo-test-236622"
173+
region = "europe-west4"
174+
zone = "europe-west4-a"
175+
176+
# AWS
177+
default_region = "eu-west-1"
178+
````

0 commit comments

Comments
 (0)