commit | 559bcd51e8449b0681407ab920a4094a569713a6 | [log] [tgz] |
---|---|---|
author | Jason Stanko <jstanko@google.com> | Tue Jan 07 01:12:41 2025 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jan 07 17:04:56 2025 |
tree | bce4c9198552b22e6516198b7a41b29edce1f83b | |
parent | 655624dc04d0671d2fff4da0c6069c5ae44b49a3 [diff] |
passport: Fix dockerfile for default builder In order to build using the default buildx builder some changes are needed: 1. Explicitly set the dockerfile syntax version. 2. Explicitly set the branch (#main) for remote building. BUG=None TEST=./scripts/build_docker.sh Change-Id: Ia27a961602f9636f166c663a83ec0dad30ba7c27 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/passport/+/6151063 Reviewed-by: Brett Brotherton <bbrotherton@google.com> Tested-by: Jason Stanko <jstanko@google.com> Commit-Queue: Jason Stanko <jstanko@google.com>
A service for controlling components in ChromeOS peripheral testbeds.
See go/cros-pass-port
The executable can be built on your local machine by running ./scripts/build.sh
The service can be started in server
mode by running:
./go/bin/passport
The service can be built on your local machine by running ./scripts/build_docker.sh
If you want to use TOT rather than your local checkout you should add the REMOTE_SOURCE
variable to your build command e.g.
REMOTE_SOURCE=1 ./scripts/build_docker.sh
The container can be started on your local machine by running
docker run -p 8200:8300 passport:amd64
The service can be started on a remote machine by running ./scripts/docker_on_remote.sh <HOSTNAME>
For a remote satlab device this would look like
./scripts/docker_on_remote.sh moblab@XXX.XXX.XXX.XXX
The script will automatically start the service at port 8300
on the remote machine.
To connect to it locally, you will likely need to forward this port to your local machine.
The docker_on_remote.sh
will print out an ssh tunnel command that can be used to connect to the service, the output will look like:
$ ./scripts/docker_on_remote.sh moblab@XXX.XXX.XXX.XXX ... ... ================================================================== Successfully updated passport on host moblab@YYY.YYY.YYY.YYY SSH COMMAND: ssh -L 8300:1XXX.XXX.XXX.XXX:8300 moblab@YYY.YYY.YYY.YYY ==================================================================
Once a service is running, it can be verified in a separate terminal by running:
./go/bin/passport -mode DETECT
This will probe for all components connected to the machine and log them to STDOUT. This can also be used to check an already running service on a remote machine by forwarding the remote port to your local machine. The default port is 8300 but a different one can be provided via the -port
flag e.g.
./go/bin/passport -port 9999 -mode DETECT
It's also possible to quickly test the executable locally without starting two separate processes by running:
./go/bin/passport -mode TEST
This will perform the same actions as DETECT
except both the client and server will be started in the same process without needing a separate terminal window.