Skip to content

Commit 5c99a6b

Browse files
authored
docs: add some details to docs, lower sections into relevant subsections (#398)
* docs: add some details to docs, lower sections into relevant subsections * meta: add pr template * Update .github/PULL_REQUEST_TEMPLATE.md * Update .github/PULL_REQUEST_TEMPLATE.md * docs: add a callout to avoid needless pages * docs: add a nugget to let user know that this is when users are added
1 parent 448b8a7 commit 5c99a6b

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
By submitting this pull request, you agree to:
3+
- follow the [PSF's Code of Conduct](https://www.python.org/psf/conduct/)
4+
-->
5+
## Description
6+
7+
-
8+
9+
<!--
10+
If applicable, please add in issue numbers this pull request will close, if applicable
11+
Examples: Fixes #4321 or Closes #1234
12+
13+
Ensure you are using a supported keyword to properly link an issue:
14+
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
15+
-->
16+
## Closes
17+
18+
-
19+

docs/guides/migration-recipe.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ index 68387c9..7a8ace1 100644
8383
2. Create a new droplet with a new version of Ubuntu, appropriate resources, and name it according to a hostname + current LTS version
8484
- See the current preferred version of Ubuntu in [the Server Guide](server.rst)
8585
86-
### Provision new host for migration
86+
#### Provision new host for migration
8787
8888
1. SSH into `new-host` via the IP address provided by DigitalOcean:
8989
```console
@@ -125,7 +125,8 @@ index 68387c9..7a8ace1 100644
125125
```console
126126
sudo salt-call state.highstate
127127
```
128-
7. Log out of `root` session
128+
7. Log out of `root` session. The first `highstate` run adds the users defined in `pillar/base/users.sls` so that you
129+
can log in as your user.
129130
8. Ensure that the new host is not passing health checks in the load balancer:
130131
```console
131132
ssh -L 4646:127.0.0.1:4646 lb-a.nyc1.psf.io
@@ -136,7 +137,7 @@ index 68387c9..7a8ace1 100644
136137
sudo salt-call state.highstate
137138
```
138139

139-
### Begin data migration
140+
#### Begin data migration to new host
140141

141142
1. SSH into `new-host` to enable forwarding of `ssh-agent`
142143
```console
@@ -151,12 +152,16 @@ index 68387c9..7a8ace1 100644
151152
```console
152153
sudo service nginx stop
153154
```
155+
```{note}
156+
Don't forget to pause service checks for both the old and new hosts in things like Dead Man's Snitch, Pingdom, etc.
157+
```
154158
4. Ensure that any additional volumes are mounted and in the correct location:
155159
- Check what disks are currently mounted and where: `df`
156160
- Determine where any additional disks should be mounted (based on salt configuration of services, for example `docs` and `downloads` roles need a big `/srv` for their data storage
157161
- Ensure mounting of any external disks are in the right location using `mount` command with appropriate arguments
158162
- Ensure that the volumes will be remounted on startup by configuring them in `/etc/fstab`
159-
5. Run rsync once to move the bulk of data and as necessary to watch for changes:
163+
5. If the service has pillar data for backups (see `pillar/prod/backup/$service.sls`),
164+
run `rsync` once to move the bulk of data and as necessary to watch for changes:
160165
```console
161166
sudo -E -s rsync -av --rsync-path="sudo rsync" username@hostname: /pathname/ /pathname/
162167
```
@@ -178,9 +183,10 @@ index 68387c9..7a8ace1 100644
178183
sudo service nginx stop
179184
```
180185

181-
### Finish data migration and restart cron/public-facing services
186+
#### Finish data migration and restart cron/public-facing services
182187

183-
1. Run `rsync` once more to finalize data migration:
188+
1. If the service has pillar data for backups (see `pillar/prod/backup/$service.sls`),
189+
run `rsync` once more to finalize data migration:
184190
```console
185191
sudo -E -s rsync -av --rsync-path="sudo rsync" username@hostname: /pathname/ /pathname/
186192
```
@@ -207,7 +213,8 @@ index 68387c9..7a8ace1 100644
207213
sudo shutdown -h now
208214
```
209215
2. Destroy the `old-host` in DigitalOcean
210-
3. Change the `new-host` name in DigitalOcean by removing the suffix or similar that was used to differentiate it from the old-host.
216+
3. Change the `new-host` name in DigitalOcean by removing the suffix or similar that was used to differentiate
217+
it from the old host (e.g., `new-hostname-2404` -> `old-hostname`)
211218
4. List out and delete the old host keys:
212219
```console
213220
sudo salt-key -L

0 commit comments

Comments
 (0)