Enabling Page Redirection
Contents
Enabling Page Redirection#
These docs will walk through how to create a DNS at which the Binder page and JupyterHub are found.
Creating a new DNS Zone#
First we must create a DNS zone to handle the redirection of the pages. We will create a subdomain in the Turing domain.
On the Azure Portal:
Click “+ Create a resource”
Search for “DNS zone”
Click “Create”
Set the subscription to “turingmybinder” and select the “Hub23” resource group. (Or use a different/new subscription and resource group.) Set the Name field to the desired URL, in our case:
hub23.turing.ac.uk
.If you created a new resource group, you will have to set its location.
Click “Review + create”.
View the new DNS zone and copy the four nameservers in the “NS” record.
Send the nameserver to Turing IT Services. Ask them to add the subdomain’s DNS record as an NS record for
hub23
in theturing.ac.uk
DNS zone record.
Creating A records#
We will now set A records that point to the IP addresses of the JupyterHub and Binder page.
When viewing the DNS zone on the Azure Portal, click “+ Record set”
In the Name field, enter “binder” or “hub” (depending on which IP you choose to set a record for first, the process is the same for both).
Set Alias record set to “Yes” and this will bring up some new options.
Make sure the subscription is set to “turingmybinder”. Under Azure resource select one of the two items under Public IP Address. If you view these resources (under the resource group beginning
MC_
), you will be able to see the IP addresses they refer to. Compare these with the output ofkubectl get svc --namespace hub23
in order to ascertain which one is Binder and which is JupyterHub.Click “OK” and repeat the process for the second IP address.
Update deploy/config.yaml
#
Make sure to update deploy/config.yaml
or deploy/prod.yaml
to include the new DNS’s, instead of the raw IP addresses.
If you have GitHub OAuth enabled, the DNS names will have to be inserted instead of the IP addresses in the OAuth app as well.
This shouldn’t generate a new Client ID or Secret.