docs: update instructions (#44267)

* docs: update instructions

* docs: update instructions

* Update docs/devops.md

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
This commit is contained in:
Mrugesh Mohapatra
2021-11-24 23:11:11 +05:30
committed by GitHub
parent 35b55f071a
commit d409194dd8

View File

@ -455,7 +455,7 @@ Provisioning VMs with the Code
2. Update `npm` and install PM2 and setup `logrotate` and startup on boot
```console
npm i -g npm@6
npm i -g npm@8
npm i -g pm2
pm2 install pm2-logrotate
pm2 startup
@ -830,7 +830,7 @@ nvm ls
Install the latest Node.js LTS, and reinstall any global packages
```console
nvm install 'lts/*' --reinstall-packages-from=default
nvm install --lts --reinstall-packages-from=default
```
Verify installed packages
@ -839,10 +839,10 @@ Verify installed packages
npm ls -g --depth=0
```
Alias the `default` Node.js version to the current LTS
Alias the `default` Node.js version to the current LTS (pinned to latest major version)
```console
nvm alias default lts/*
nvm alias default 16
```
(Optional) Uninstall old versions
@ -851,9 +851,23 @@ nvm alias default lts/*
nvm uninstall <version>
```
> [!WARNING]
> [!ATTENTION]
> For client applications, the shell script can't be resurrected between Node.js versions with `pm2 resurrect`. Deploy processes from scratch instead. This should become nicer when we move to a docker based setup.
>
> If using PM2 for processes you would also need to bring up the applications and save the process list for automatic recovery on restarts.
Get the uninstall instructions/commands with the `unstartup` command and use the output to remove the systemctl services
```console
pm2 unstartup
```
Get the install instructions/commands with the `startup` command and use the output to add the systemctl services
```console
pm2 startup
```
Quick commands for PM2 to list, resurrect saved processes, etc.
```console
@ -872,9 +886,6 @@ pm2 save
pm2 logs
```
> [!ATTENTION]
> For client applications, the shell script can't be resurrected between Node.js versions with `pm2 resurrect`. Deploy processes from scratch instead. This should become nicer when we move to a docker based setup.
## Installing and Updating Azure Pipeline Agents
See: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops and follow the instructions to stop, remove and reinstall agents. Broadly you can follow the steps listed here.