From f4755fbffbe00b75a6c6a2debc87619a57c7f733 Mon Sep 17 00:00:00 2001 From: maxmwang Date: Mon, 16 Dec 2024 03:10:34 -0800 Subject: [PATCH] modify .md file --- .github/workflows/cd-deploy-docs.yaml | 2 +- docs/src/core/infrastructure/onboarding.md | 27 ++++++++++++++-------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cd-deploy-docs.yaml b/.github/workflows/cd-deploy-docs.yaml index 32ca6f1c1..1f7011d24 100644 --- a/.github/workflows/cd-deploy-docs.yaml +++ b/.github/workflows/cd-deploy-docs.yaml @@ -8,7 +8,7 @@ on: jobs: detect-changes: - name: Detect Changes + name: Detect Documentation Changes runs-on: ubuntu-latest outputs: changed: ${{ steps.changed.outputs.any_changed }} diff --git a/docs/src/core/infrastructure/onboarding.md b/docs/src/core/infrastructure/onboarding.md index 430272799..630941565 100644 --- a/docs/src/core/infrastructure/onboarding.md +++ b/docs/src/core/infrastructure/onboarding.md @@ -1,23 +1,30 @@ # Onboarding -The production website is hosted on a remote machine supplied by [the OCF](https://www.ocf.berkeley.edu/). Connecting to this machine requires SSH. +> [!WARNING] +> Running commands in the `hozer` machine can break production! Please continue with caution. + +The production website is hosted on a machine supplied by [the OCF](https://www.ocf.berkeley.edu/). This machine will be referenced as `hozer` or `hozer-51` in these docs. Connecting to this machine to accomplish infra-related tasks requires SSH. This guide assumes basic experience with SSH. -> [!WARNING] -> Running commands in the `hozer` machine can break production! Continue with caution. +1. Please ensure your public SSH key has an identifying comment attached, such as your Berkeley email: + ```sh + ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAq8Lwls394thisIsNotARealKey ga@github.com + ``` + You can directly modify your public key file at `~/.ssh/id_*.pub`, or you can use the following command: + ```sh + ssh-keygen -c -C "someone@berkeley.edu" -f ~/.ssh/id_* + ``` + Note that `-f` takes in the path to your *private* key file, but only modifies the *public* key file. -1. Copy your SSH key to the `hozer` machine's `authorized_keys` file: +2. Copy your SSH key to the `hozer` machine's `authorized_keys` file: ``` ssh-copy-id root@hozer-51.ocf.berkeley.edu ``` The SSH password can be found in the pinned messages of the \#backend staff channel in discord. -> [!IMPORTANT] -> Please add an identifying comment to your public key! For example, your Berkeley email suffices. This helps significantly with key management. - -2. (Optional) Add `hozer-51` to your `~/.ssh/config` file: - ```bash +3. (Optional) Add `hozer-51` to your `~/.ssh/config` file: + ```sh # Begin Berkeleytime hozer config Host hozer-?? HostName %h.ocf.berkeley.edu @@ -25,7 +32,7 @@ This guide assumes basic experience with SSH. # End Berkeleytime hozer config ``` Now, you can quickly SSH into the remote machine from your terminal: - ```bash + ```sh ssh hozer-51 # as opposed to root@hozer-51.ocf.berkeley.edu ```