docs: add flight manuals and tooling for docsify (#38510)
* docs: add flight manuals and tooling for docsify * chore: typos in paths and titles
This commit is contained in:
parent
13b248d464
commit
7473bcc40e
@ -1,14 +1,17 @@
|
||||
- **Overview**
|
||||
- [Introduction](/ 'Contribute to the freeCodeCamp.org Community')
|
||||
- **Guides**
|
||||
- **Code Contribution Guides**
|
||||
- [How to work on coding challenges](/how-to-work-on-coding-challenges)
|
||||
- [How to setup freeCodeCamp locally](/how-to-setup-freecodecamp-locally)
|
||||
- [How to open a pull request](/how-to-open-a-pull-request)
|
||||
- [How we do DevOps at freeCodeCamp.org](/devops.md)
|
||||
- **DevOps Guides**
|
||||
- [Overview and Workflows](/devops.md)
|
||||
- [Flight Manual: 01 - List Azure Virtual Machines](/flight-manuals/01-getting-list-of-virtual-machines.md)
|
||||
- [Flight Manual: 02 - Provision API Instances](/flight-manuals/02-spinning-api-instances.md)
|
||||
<!-- Prevent going to next section-->
|
||||
- []()
|
||||
----
|
||||
- **Community**
|
||||
- [GitHub Repository](https://github.com/freecodecamp/freecodecamp)
|
||||
- [Contributor category on Forum](https://freecodecamp.org/forum/c/contributors)
|
||||
- [Contributors category on Forum](https://freecodecamp.org/forum/c/contributors)
|
||||
- [Chat room for Contributors](https://gitter.im/FreeCodeCamp/Contributors)
|
||||
|
45
docs/flight-manuals/01-getting-list-of-virtual-machines.md
Normal file
45
docs/flight-manuals/01-getting-list-of-virtual-machines.md
Normal file
@ -0,0 +1,45 @@
|
||||
### Getting a list of the VMs from Azure
|
||||
|
||||
Install Azure CLI `az`: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
|
||||
|
||||
> (onetime) Install on macOS with [`homebrew`](https://brew.sh):
|
||||
|
||||
```
|
||||
brew install azure-cli
|
||||
```
|
||||
|
||||
> (onetime) Login:
|
||||
|
||||
```
|
||||
az login
|
||||
```
|
||||
|
||||
> **Get the list of VM names and IP addresses:**
|
||||
|
||||
```
|
||||
az vm list-ip-addresses --output table
|
||||
```
|
||||
|
||||
### Getting a list of the VMs from Digital Ocean
|
||||
|
||||
Install Digital Ocean CLI `doctl`: https://github.com/digitalocean/doctl#installing-doctl
|
||||
|
||||
> (onetime) Install on macOS with [`homebrew`](https://brew.sh):
|
||||
|
||||
```
|
||||
brew install doctl
|
||||
```
|
||||
|
||||
> (onetime) Login:
|
||||
|
||||
Authentication and context switching: https://github.com/digitalocean/doctl#authenticating-with-digitalocean
|
||||
|
||||
```
|
||||
doctl auth init
|
||||
```
|
||||
|
||||
> **Get the list of VM names and IP addresses:**
|
||||
|
||||
```
|
||||
doctl compute droplet list --format "ID,Name,PublicIPv4"
|
||||
```
|
39
docs/flight-manuals/02-spinning-api-instances.md
Normal file
39
docs/flight-manuals/02-spinning-api-instances.md
Normal file
@ -0,0 +1,39 @@
|
||||
### Provisioning VMs with API Code and starting up services
|
||||
1. Install Node LTS.
|
||||
2. Update `npm` and install PM2 and setup logrotate and startup on boot
|
||||
```
|
||||
npm i -g npm
|
||||
npm i -g pm2
|
||||
pm2 install pm2-logrotate
|
||||
pm2 startup
|
||||
```
|
||||
3. Clone freeCodeCamp, setup env and keys, install dependencies, and make first build.
|
||||
```
|
||||
git clone https://github.com/freeCodeCamp/freeCodeCamp.git
|
||||
cd freeCodeCamp
|
||||
```
|
||||
|
||||
Create the `.env` from the secure credentials storage.
|
||||
|
||||
```
|
||||
npm ci
|
||||
```
|
||||
|
||||
```
|
||||
npm run ensure-env && npm run build:server
|
||||
```
|
||||
4. Start Instances
|
||||
```
|
||||
cd api-server
|
||||
pm2 start production-start.js -i max --max-memory-restart 600M --name org
|
||||
```
|
||||
5. Logging, Monitoring and Reloading on updates to code changes
|
||||
```
|
||||
pm2 logs
|
||||
```
|
||||
```
|
||||
pm2 monitor
|
||||
```
|
||||
```
|
||||
pm2 reload all --update-env && pm2 logs
|
||||
```
|
1030
package-lock.json
generated
1030
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -25,6 +25,7 @@
|
||||
"docker:seed": "docker-compose run --rm freecodecamp npm run seed",
|
||||
"docker:test": "docker-compose -f docker-compose.tests.yml run --rm tests bash",
|
||||
"docker:test:init": "docker-compose -f docker-compose.tests.yml run -u root --rm tests bash change_volumes_owner.sh",
|
||||
"docs:serve": "docsify serve ./docs",
|
||||
"ensure-env": "cross-env DEBUG=fcc:* node ./tools/scripts/build/ensure-env.js",
|
||||
"format": "npm-run-all -p format:*",
|
||||
"format:js": "npm run lint:js -- --fix",
|
||||
@ -56,6 +57,7 @@
|
||||
"babel-eslint": "^10.0.2",
|
||||
"cross-env": "^5.2.0",
|
||||
"debug": "^4.1.1",
|
||||
"docsify-cli": "^4.4.0",
|
||||
"dotenv": "^6.2.0",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-prettier": "^4.3.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user