-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweaks in getting started guides. (#10780)
* Re-uses DNS section in linux guide. * Fixes confusing DNS variable in dig section.
- Loading branch information
1 parent
862413c
commit adaef79
Showing
3 changed files
with
61 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
Set up two `A` DNS records - `tele.example.com` for all traffic and `*.tele.example.com` | ||
for web apps using application access. | ||
|
||
<Details title="DNS instructions for cloud providers" opened={false}> | ||
|
||
<Tabs> | ||
<TabItem label="GCP Cloud DNS"> | ||
```code | ||
$ MYZONE="myzone" | ||
$ MYDNS="tele.example.com" | ||
$ gcloud dns record-sets transaction start --zone="${MYZONE?}" | ||
$ gcloud dns record-sets transaction add ${MYIP?} --name="${MYDNS?}" --ttl="30" --type="A" --zone="${MYZONE?}" | ||
$ gcloud dns record-sets transaction add ${MYIP?} --name="*.${MYDNS?}" --ttl="30" --type="A" --zone="${MYZONE?}" | ||
$ gcloud dns record-sets transaction describe --zone="${MYZONE?}" | ||
$ gcloud dns record-sets transaction execute --zone="${MYZONE?}" | ||
``` | ||
</TabItem> | ||
|
||
<TabItem label="AWS Route 53"> | ||
```code | ||
# Tip for finding AWS zone id by the domain name. | ||
$ MYZONE_DNS="example.com" | ||
$ MYZONE=$(aws route53 list-hosted-zones-by-name --dns-name=${MYZONE_DNS?} | jq -r '.HostedZones[0].Id' | sed s_/hostedzone/__) | ||
$ MYDNS="tele.example.com" | ||
# Create a JSON file changeset for AWS. | ||
$ jq -n --arg ip ${MYIP?} --arg dns ${MYDNS?} '{"Comment": "Create records", "Changes": [{"Action": "CREATE","ResourceRecordSet": {"Name": $dns, "Type": "A", "TTL": 300, "ResourceRecords": [{ "Value": $ip}]}},{"Action": "CREATE", "ResourceRecordSet": {"Name": ("*." + $dns), "Type": "A", "TTL": 300, "ResourceRecords": [{ "Value": $ip}]}}]}' > myrecords.json | ||
# Review records before applying. | ||
$ cat myrecords.json | jq | ||
# Apply the records and capture change id | ||
$ CHANGEID=$(aws route53 change-resource-record-sets --hosted-zone-id ${MYZONE?} --change-batch file://myrecords.json | jq -r '.ChangeInfo.Id') | ||
# Verify that change has been applied | ||
$ aws route53 get-change --id ${CHANGEID?} | jq '.ChangeInfo.Status' | ||
# "INSYNC" | ||
``` | ||
</TabItem> | ||
</Tabs> | ||
|
||
</Details> | ||
|
||
<Admonition | ||
type="tip" | ||
title="Tip" | ||
> | ||
You can use `dig` to make sure that DNS records are propagated: | ||
|
||
```code | ||
$ dig tele.example.com | ||
``` | ||
</Admonition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters