|
| 1 | +# Specify Test Panel User Guide |
| 2 | + |
| 3 | +This guide summarizes how to work with the [Specify 7 Test Panel](https://github.com/specify/specify7-test-panel) as an SSH user. |
| 4 | + |
| 5 | + |
| 6 | +## 🔑 Create and Use SSH Keys for the Specify Test Panel |
| 7 | + |
| 8 | + |
| 9 | +### 1. **Create a Directory for Your Keys** |
| 10 | + |
| 11 | +Open your terminal and run: |
| 12 | + |
| 13 | +```bash |
| 14 | +mkdir -p ~/Documents/specify_keys |
| 15 | +cd ~/Documents/specify_keys |
| 16 | +``` |
| 17 | + |
| 18 | +### 2. **Generate a New SSH Key** |
| 19 | + |
| 20 | +Run the following command to create a secure SSH key: |
| 21 | + |
| 22 | +```bash |
| 23 | +ssh-keygen -t rsa -b 2048 |
| 24 | +``` |
| 25 | + |
| 26 | +- When prompted: |
| 27 | + **Enter file in which to save the key:** |
| 28 | + Type: `specify_key` and press **Enter** |
| 29 | + |
| 30 | +- When prompted: |
| 31 | + **Enter passphrase:** |
| 32 | + Press **Enter** (leave empty unless you want to secure it with a passphrase) |
| 33 | + |
| 34 | +- When prompted again: |
| 35 | + **Enter same passphrase again:** |
| 36 | + Press **Enter** |
| 37 | + |
| 38 | +### 3. **Verify Key Creation** |
| 39 | + |
| 40 | +Run: |
| 41 | + |
| 42 | +```bash |
| 43 | +ls |
| 44 | +``` |
| 45 | + |
| 46 | +You should see: |
| 47 | + |
| 48 | +``` |
| 49 | +specify_key |
| 50 | +specify_key.pub |
| 51 | +``` |
| 52 | + |
| 53 | +### 4. **Copy Your Public Key** |
| 54 | + |
| 55 | +Run: |
| 56 | + |
| 57 | +```bash |
| 58 | +cat specify_key.pub |
| 59 | +``` |
| 60 | + |
| 61 | +- Copy the full output. |
| 62 | +- Send this to the person managing the Specify test panel server so they can add your key. |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## 🖥️ Connect to the Test Panel Server |
| 67 | + |
| 68 | +Once your key has been added, connect by running: |
| 69 | + |
| 70 | +```bash |
| 71 | +ssh -i ~/Documents/specify_keys/specify_key [email protected] |
| 72 | +``` |
| 73 | + |
| 74 | +> Replace the path if your folder or key is named differently. |
| 75 | +
|
| 76 | +When prompted: |
| 77 | + |
| 78 | +``` |
| 79 | +Are you sure you want to continue connecting (yes/no/[fingerprint])? |
| 80 | +``` |
| 81 | + |
| 82 | +Type `yes` and press **Enter**. |
| 83 | + |
| 84 | +You are now connected to the **Specify Test Panel**. |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +## 🐳 Docker: View and Access Running Containers |
| 89 | + |
| 90 | +### 1. **See All Running Docker Instances** |
| 91 | + |
| 92 | +Run: |
| 93 | + |
| 94 | +```bash |
| 95 | +docker stats --no-stream |
| 96 | +``` |
| 97 | + |
| 98 | +### 2. **Filter by Instance Name** |
| 99 | + |
| 100 | +To search for a specific instance, run: |
| 101 | + |
| 102 | +```bash |
| 103 | +docker stats --no-stream | grep <instance-name> |
| 104 | +``` |
| 105 | + |
| 106 | +_Example:_ |
| 107 | + |
| 108 | +```bash |
| 109 | +docker stats --no-stream | grep ojsmnh2025-production |
| 110 | +``` |
| 111 | + |
| 112 | +### 3. **Access the Container** |
| 113 | + |
| 114 | +Copy the **second column** from the output (example: `specify7-test-panel-osjmnh2025-production-2-1`), then run: |
| 115 | + |
| 116 | +```bash |
| 117 | +docker exec -it <container-name> bash |
| 118 | +``` |
| 119 | + |
| 120 | +_Example:_ |
| 121 | + |
| 122 | +```bash |
| 123 | +docker exec -it specify7-test-panel-osjmnh2025-production-2-1 bash |
| 124 | +``` |
| 125 | + |
| 126 | +Now you're inside the running Docker container. |
| 127 | + |
| 128 | +--- |
| 129 | + |
| 130 | +## 🛠️ Django Migrations |
| 131 | + |
| 132 | +### 1. **View List Of All Migrations** |
| 133 | + |
| 134 | +Run: |
| 135 | + |
| 136 | +```bash |
| 137 | +ve/bin/python manage.py showmigrations |
| 138 | +``` |
| 139 | + |
| 140 | +- Migrations that have already run will be marked with `[X]`. |
| 141 | + |
| 142 | +### 2. **Run a Migration** |
| 143 | + |
| 144 | +Run: |
| 145 | + |
| 146 | +```bash |
| 147 | +ve/bin/python manage.py migrate <app-name> <migration-name or number> |
| 148 | +``` |
| 149 | + |
| 150 | +_Example:_ |
| 151 | + |
| 152 | +```bash |
| 153 | +ve/bin/python manage.py migrate specify 0029 |
| 154 | +``` |
0 commit comments