Skip to content

Commit f53afa8

Browse files
committed
chore: add script to build and deploy onctl to controller VM
Uses onctl ssh --upload to transfer the linux/amd64 binary and installs it to /usr/local/bin/onctl.
1 parent aa3a82a commit f53afa8

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎scripts/deploy-controller.sh‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
REMOTE_PATH="/usr/local/bin/onctl"
5+
6+
echo "Building onctl for linux/amd64..."
7+
make build-amd64
8+
9+
echo "Uploading to onctl-controller:/tmp/onctl..."
10+
./onctl ssh onctl-controller --upload "onctl-amd64:/tmp/onctl"
11+
12+
echo "Installing binary..."
13+
./onctl ssh onctl-controller -- "install -m 755 /tmp/onctl ${REMOTE_PATH} && rm /tmp/onctl"
14+
15+
echo "Done. Verifying:"
16+
./onctl ssh onctl-controller -- "onctl version"

0 commit comments

Comments
 (0)
⌂ 换网址