forked from pivotal-wesley-robertson/docs-operating-pas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswitching-domains.html.md.erb
123 lines (86 loc) · 6.35 KB
/
switching-domains.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
title: Switching App Domains
owner: Routing
---
This topic describes how to change the domain of an existing <%= vars.platform_name %> installation.
To change the domain of an existing <%= vars.platform_name %> installation:
1. Navigate to the <%= vars.ops_manager %> Installation Dashboard.
1. Click the <%= vars.app_runtime_full %> (<%= vars.app_runtime_abbr %>) tile.
1. Select **Domains** to see the current **Apps domain** for your <%= vars.app_runtime_abbr %> deployment.
<img src="./images/switching_domains/er17-switchdomains-before.png" alt="The page header says 'Domains'. Below this header is the text 'For help configuring these fields, see Configure Domains in Configuring TAS for VMs topic in the VMware Tanzu documentation,' with 'Configure Domain' in blue letters to denote a clickable link. Below this text are two fields labeled 'System domain' and 'Apps domain', with red asterisks to denote that they are required fields. The 'System domain' field contains the text 'yoursystem.yourdomain.com'. The 'Apps domain' field contains the text 'yourapps.yourdomain.com'. At the bottom of the image is a rectangular blue button labeled 'Save'.">
1. In the terminal, run:
cf login -a API-ENDPOINT
Where `API-ENDPOINT` is the API endpoint for your <%= vars.app_runtime_abbr %> instance.
<br>
<br>
The cf CLI prompts you for your <%= vars.platform_name %> username and password, as well as the org and space you want to access. If you do not know your API endpoint, see [Identifying the API Endpoint for Your <%= vars.app_runtime_abbr %> Instance](../opsguide/api-endpoint.html).
1. To view the domains in the space, run:
cf domains
The command returns output similar to the following example:
<pre class="terminal">
$ cf domains
Getting domains in org your-org as admin...
name status
yourapps.yourdomain.com shared
</pre>
If you have more than one shared domain, ensure that the domain you want to change is at the top of the list before you apply the new domain to your <%= vars.app_runtime_abbr %> tile configuration. You can delete and re-create the other shared domains as necessary to push the domain you want to change to the top of the list. If you do this, make sure to re-map the routes for each domain. For more information, see [Configuring Routes and Domains](../devguide/deploy-apps/routes-domains.html).
1. To confirm that your apps are assigned to the domain you plan to change, run:
cf routes
The command returns output similar to the following example:
<pre class='terminal'>
$ cf routes
Getting routes as admin ...
space host domain apps
your-space yourapp yourapps.yourdomain.com yourapp
</pre>
1. To create the new domain you want to use, run:
cf create-shared-domain NEW-DOMAIN
Where `NEW-DOMAIN` is the name you give the new domain.
<br>
<br>
The command returns output similar to the following example:
<pre class='terminal'>
$ cf create-shared-domain newapps.yourdomain.com
Creating shared domain newapps.yourdomain.com as admin...
OK
</pre>
1. To map the new domain to your app, run:
cf map-route APP-NAME NEW-DOMAIN -n HOST-NAME
Where:
* `APP-NAME` is the name of the app you want to map to the new domain.
* `NEW-DOMAIN` is the domain to which you want to map your app.
* `HOST-NAME` is the hostname of the URL for the route you are mapping.
<br>
<br>
The command returns output similar to the following example:
<pre class='terminal'>
$ cf map-route yourapp newapps.yourdomain.com -n yourapp
Creating route yourapp.newapps.yourdomain.com for org your-org / space your-space as admin...
OK
Adding route yourapp.newapps.yourdomain.com to app yourapp in org your-org / space your-space as admin...
OK
</pre>
In this example, both the `APP-NAME` and `HOST-NAME` arguments are `yourapp`, since this is both the name of the app to which you are mapping a route and the intended hostname for the URL.
1. Repeat the previous step for each app in this space. Afterward, check Apps Manager to confirm that the route URL has updated correctly for each app:
<img src= "./images/switching_domains/new_domain_confirmed1.png">
1. Repeat the above steps for each space in your <%= vars.platform_name %> installation except for the System org, beginning with logging into the org and space and ending with confirming the URL update.
<p class='note'><strong>Note:</strong> Ordinarily the System org contains only <%= vars.platform_name %> apps that perform utility functions for your installation. <%= vars.company_name %> does not recommend pushing apps to this org. However, if you have pushed apps to the System org, you must also repeat the above steps for these apps.</p>
1. Once you have confirmed that every app in every space has been mapped to the new domain, delete the old domain by running:
cf delete-shared-domain OLD-DOMAIN
Where `OLD-DOMAIN` is the old domain to delete.
<br>
<br>
The command returns output similar to the following example:
<pre class='terminal'>
$ cf delete-shared-domain yourapps.yourdomain.com
Deleting domain yourapps.yourdomain.com as admin...
This domain is shared across all orgs.
Deleting it will remove all associated routes, and will make any app with this domain unreachable.
Are you sure you want to delete the domain yourapps.yourdomain.com?
</pre>
When prompted, type `yes` to confirm that you want to delete the domain.
1. In the **Domains** pane of the <%= vars.app_runtime_abbr %> tile, enter the new domain in the **Apps domain** field. This configures <%= vars.app_runtime_abbr %> to use the new domain.
<img src="./images/switching_domains/er17-switchdomains-after.png" alt="The page header says 'Domains'. Below this header is the text 'For help configuring these fields, see Configure Domains in Configuring TAS for VMs topic in the VMware Tanzu documentation,' with 'Configure Domain' in blue letters to denote a clickable link. Below this text are two fields labeled 'System domain' and 'Apps domain', with red asterisks to denote that they are required fields. The 'System domain' field contains the text 'yoursystem.yourdomain.com'. The 'Apps domain' field contains the text 'newapps.yourdomain.com'. At the bottom of the image is a rectangular blue button labeled 'Save'.">
1. Return to the <%= vars.ops_manager %> Installation Dashboard.
1. Click **Review Pending Changes**.
1. Click **Apply Changes**. Apps that you push after your update finishes use this new domain.