Skip to content

Commit

Permalink
docs: update AWS instructions
Browse files Browse the repository at this point in the history
This PR adds some docs changes where we had incorrect commands in the
AWS docs.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
  • Loading branch information
rsmitty authored and talos-bot committed Apr 21, 2021
1 parent a739d1b commit 93623d4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
14 changes: 9 additions & 5 deletions website/content/docs/v0.10/Cloud Platforms/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ aws ec2 authorize-security-group-ingress \
--group-name talos-aws-tutorial-sg \
--protocol all \
--port 0 \
--group-id $SECURITY_GROUP \
--source-group $SECURITY_GROUP
```

Expand All @@ -111,15 +110,14 @@ aws ec2 authorize-security-group-ingress \
--group-name talos-aws-tutorial-sg \
--protocol tcp \
--port 6443 \
--cidr 0.0.0.0/0 \
--group-id $SECURITY_GROUP
--cidr 0.0.0.0/0

aws ec2 authorize-security-group-ingress \
--region $REGION \
--group-name talos-aws-tutorial-sg \
--protocol tcp \
--port 50000-50001 \
--cidr 0.0.0.0/0 \
--group-id $SECURITY_GROUP
--cidr 0.0.0.0/0
```

### Create a Load Balancer
Expand Down Expand Up @@ -148,7 +146,10 @@ created join.yaml
created talosconfig
```

Take note that the generated configs are too long for AWS userdata field if the `--with-examples` and `--with-docs` flags are not passed.

At this point, you can modify the generated configs to your liking.

Optionally, you can specify `--config-patch` with RFC6902 jsonpatch which will be applied during the config generation.

#### Validate the Configuration Files
Expand Down Expand Up @@ -178,6 +179,7 @@ aws ec2 run-instances \
--user-data file://init.yaml \
--subnet-id $SUBNET \
--security-group-ids $SECURITY_GROUP \
--associate-public-ip-address \
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=talos-aws-tutorial-cp-0}]"
```

Expand All @@ -194,6 +196,7 @@ while [[ "$CP_COUNT" -lt 3 ]]; do
--user-data file://controlplane.yaml \
--subnet-id $SUBNET \
--security-group-ids $SECURITY_GROUP \
--associate-public-ip-address \
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=talos-aws-tutorial-cp-$CP_COUNT}]"
((CP_COUNT++))
done
Expand Down Expand Up @@ -223,6 +226,7 @@ aws elbv2 create-target-group \
--name talos-aws-tutorial-tg \
--protocol TCP \
--port 6443 \
--target-type ip \
--vpc-id $VPC
```

Expand Down
20 changes: 15 additions & 5 deletions website/content/docs/v0.8/Cloud Platforms/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ aws ec2 authorize-security-group-ingress \
--group-name talos-aws-tutorial-sg \
--protocol all \
--port 0 \
--group-id $SECURITY_GROUP \
--source-group $SECURITY_GROUP
```

Expand All @@ -111,15 +110,14 @@ aws ec2 authorize-security-group-ingress \
--group-name talos-aws-tutorial-sg \
--protocol tcp \
--port 6443 \
--cidr 0.0.0.0/0 \
--group-id $SECURITY_GROUP
--cidr 0.0.0.0/0

aws ec2 authorize-security-group-ingress \
--region $REGION \
--group-name talos-aws-tutorial-sg \
--protocol tcp \
--port 50000-50001 \
--cidr 0.0.0.0/0 \
--group-id $SECURITY_GROUP
--cidr 0.0.0.0/0
```

### Create a Load Balancer
Expand Down Expand Up @@ -148,6 +146,15 @@ created join.yaml
created talosconfig
```

Take note that in this version of Talos, the generated configs are too long for AWS userdata field.
Comments can be removed to workaround this with a sed command like:

```bash
cat init.yaml | sed 's/ #.//' > temp.yaml; mv temp.yaml init.yaml

cat controlplane.yaml | sed 's/ #.//' > temp.yaml; mv temp.yaml controlplane.yaml
```

At this point, you can modify the generated configs to your liking.

#### Validate the Configuration Files
Expand Down Expand Up @@ -177,6 +184,7 @@ aws ec2 run-instances \
--user-data file://init.yaml \
--subnet-id $SUBNET \
--security-group-ids $SECURITY_GROUP \
--associate-public-ip-address \
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=talos-aws-tutorial-cp-0}]"
```

Expand All @@ -193,6 +201,7 @@ while [[ "$CP_COUNT" -lt 3 ]]; do
--user-data file://controlplane.yaml \
--subnet-id $SUBNET \
--security-group-ids $SECURITY_GROUP \
--associate-public-ip-address \
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=talos-aws-tutorial-cp-$CP_COUNT}]"
((CP_COUNT++))
done
Expand Down Expand Up @@ -222,6 +231,7 @@ aws elbv2 create-target-group \
--name talos-aws-tutorial-tg \
--protocol TCP \
--port 6443 \
--target-type ip \
--vpc-id $VPC
```

Expand Down
20 changes: 15 additions & 5 deletions website/content/docs/v0.9/Cloud Platforms/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ aws ec2 authorize-security-group-ingress \
--group-name talos-aws-tutorial-sg \
--protocol all \
--port 0 \
--group-id $SECURITY_GROUP \
--source-group $SECURITY_GROUP
```

Expand All @@ -111,15 +110,14 @@ aws ec2 authorize-security-group-ingress \
--group-name talos-aws-tutorial-sg \
--protocol tcp \
--port 6443 \
--cidr 0.0.0.0/0 \
--group-id $SECURITY_GROUP
--cidr 0.0.0.0/0

aws ec2 authorize-security-group-ingress \
--region $REGION \
--group-name talos-aws-tutorial-sg \
--protocol tcp \
--port 50000-50001 \
--cidr 0.0.0.0/0 \
--group-id $SECURITY_GROUP
--cidr 0.0.0.0/0
```

### Create a Load Balancer
Expand Down Expand Up @@ -148,6 +146,15 @@ created join.yaml
created talosconfig
```

Take note that in this version of Talos, the generated configs are too long for AWS userdata field.
Comments can be removed to workaround this with a sed command like:

```bash
cat init.yaml | sed 's/ #.//' > temp.yaml; mv temp.yaml init.yaml

cat controlplane.yaml | sed 's/ #.//' > temp.yaml; mv temp.yaml controlplane.yaml
```

At this point, you can modify the generated configs to your liking.

#### Validate the Configuration Files
Expand Down Expand Up @@ -177,6 +184,7 @@ aws ec2 run-instances \
--user-data file://init.yaml \
--subnet-id $SUBNET \
--security-group-ids $SECURITY_GROUP \
--associate-public-ip-address \
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=talos-aws-tutorial-cp-0}]"
```

Expand All @@ -193,6 +201,7 @@ while [[ "$CP_COUNT" -lt 3 ]]; do
--user-data file://controlplane.yaml \
--subnet-id $SUBNET \
--security-group-ids $SECURITY_GROUP \
--associate-public-ip-address \
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=talos-aws-tutorial-cp-$CP_COUNT}]"
((CP_COUNT++))
done
Expand Down Expand Up @@ -222,6 +231,7 @@ aws elbv2 create-target-group \
--name talos-aws-tutorial-tg \
--protocol TCP \
--port 6443 \
--target-type ip \
--vpc-id $VPC
```

Expand Down

0 comments on commit 93623d4

Please sign in to comment.