updated SSH executable details
This commit is contained in:
@@ -72,6 +72,18 @@ All repos hosted at `gitea.dooplex.hu/admin/`. Git credentials are stored (`git
|
||||
|
||||
SSH key-based authentication is configured and working. No password prompts.
|
||||
|
||||
**IMPORTANT — SSH binary:** Claude Code runs in Git Bash, which has its own SSH at
|
||||
`/usr/bin/ssh` (= `C:\Program Files\Git\usr\bin\ssh.exe`). This binary does NOT have
|
||||
access to the Windows SSH agent and will fail silently (exit 0/141 with no output).
|
||||
Always use the Windows native OpenSSH binary with the full path:
|
||||
|
||||
```
|
||||
SSH=/c/Windows/System32/OpenSSH/ssh.exe
|
||||
```
|
||||
|
||||
All SSH commands in this file use `$SSH` — set it at the start of your session or
|
||||
substitute the full path manually.
|
||||
|
||||
| Host | IP | User | Role |
|
||||
|------|----|------|------|
|
||||
| Build server | 192.168.0.180 | kisfenyo | Build + push container images |
|
||||
@@ -105,15 +117,20 @@ The build server (192.168.0.180) has the build toolchain. The version tag should
|
||||
|
||||
!! Important: use "kisfenyo" user for SSH, as written below
|
||||
|
||||
First, check the current running version:
|
||||
First, set the SSH variable (required for every session — Git Bash's built-in ssh does NOT work):
|
||||
```bash
|
||||
ssh kisfenyo@192.168.0.162 "docker ps --filter name=felhom-controller --format '{{.Image}}'"
|
||||
SSH=/c/Windows/System32/OpenSSH/ssh.exe
|
||||
```
|
||||
|
||||
Check the current running version:
|
||||
```bash
|
||||
$SSH kisfenyo@192.168.0.162 "docker ps --filter name=felhom-controller --format '{{.Image}}'"
|
||||
```
|
||||
|
||||
Then build with the next version (e.g., if current is 0.2.10, use 0.2.11):
|
||||
IMPORTANT!: Build directory is: ~/build/felhom-controller
|
||||
```bash
|
||||
ssh kisfenyo@192.168.0.180 "cd ~/build/felhom-controller && git -C ~/git/deploy-felhom-compose pull && ./build.sh <NEW_VERSION> --push"
|
||||
$SSH kisfenyo@192.168.0.180 "cd ~/build/felhom-controller && git -C ~/git/deploy-felhom-compose pull && ./build.sh <NEW_VERSION> --push"
|
||||
```
|
||||
|
||||
The build script:
|
||||
@@ -125,28 +142,29 @@ The build script:
|
||||
### Step 3: Deploy on the demo node
|
||||
|
||||
```bash
|
||||
ssh kisfenyo@192.168.0.162 "cd /opt/docker/felhom-controller && sudo docker pull gitea.dooplex.hu/admin/felhom-controller:<NEW_VERSION> && sudo sed -i 's|image: gitea.dooplex.hu/admin/felhom-controller:.*|image: gitea.dooplex.hu/admin/felhom-controller:<NEW_VERSION>|' docker-compose.yml && sudo docker compose up -d"
|
||||
$SSH kisfenyo@192.168.0.162 "cd /opt/docker/felhom-controller && sudo docker pull gitea.dooplex.hu/admin/felhom-controller:<NEW_VERSION> && sudo sed -i 's|image: gitea.dooplex.hu/admin/felhom-controller:.*|image: gitea.dooplex.hu/admin/felhom-controller:<NEW_VERSION>|' docker-compose.yml && sudo docker compose up -d"
|
||||
```
|
||||
|
||||
### Step 4: Verify the deployment
|
||||
|
||||
```bash
|
||||
ssh kisfenyo@192.168.0.162 "docker ps --filter name=felhom-controller --format '{{.Image}} {{.Status}}'"
|
||||
$SSH kisfenyo@192.168.0.162 "docker ps --filter name=felhom-controller --format '{{.Image}} {{.Status}}'"
|
||||
```
|
||||
|
||||
Should show the new version and "Up" status. Also check logs for startup errors:
|
||||
```bash
|
||||
ssh kisfenyo@192.168.0.162 "docker logs felhom-controller --tail 20"
|
||||
$SSH kisfenyo@192.168.0.162 "docker logs felhom-controller --tail 20"
|
||||
```
|
||||
|
||||
### Build workflow summary
|
||||
|
||||
| Step | Command | Where |
|
||||
|------|---------|-------|
|
||||
| 0. Set SSH var | `SSH=/c/Windows/System32/OpenSSH/ssh.exe` | Local (once per session) |
|
||||
| 1. Commit + push | `git add -A && git commit -m "..." && git push` | Local (this repo) |
|
||||
| 2. Build + push image | `ssh 192.168.0.180 "cd ~/build/felhom-controller... ./build.sh <VER> --push"` | Build server |
|
||||
| 3. Deploy | `ssh 192.168.0.162 "... docker compose up -d"` | Demo node |
|
||||
| 4. Verify | `ssh 192.168.0.162 "docker ps ..."` | Demo node |
|
||||
| 2. Build + push image | `$SSH kisfenyo@192.168.0.180 "cd ~/build/felhom-controller... ./build.sh <VER> --push"` | Build server |
|
||||
| 3. Deploy | `$SSH kisfenyo@192.168.0.162 "... docker compose up -d"` | Demo node |
|
||||
| 4. Verify | `$SSH kisfenyo@192.168.0.162 "docker ps ..."` | Demo node |
|
||||
|
||||
**IMPORTANT:** If you make changes to the app-catalog-felhom.eu repo, commit and push those too:
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user