README
¶
btpeer_manager
A CLI application that makes managing btpeers in our lab easier by automating common operations including:
- Building chameleond and preparing the bundle for btpeer deployment
- Chameleond bundle release management, handling the config logic and GCS uploading
- Image release management, handling the config logic and GCS uploading
[TOC]
Installation
From depot_tools
The btpeer_manager
tool is available in
depot_tools
as a shim which automatically installs the binary
preferred method of installing this tool is through CIPD, e.g.:
$ echo 'chromiumos/infra/btpeer_manager/${platform} latest' | cipd ensure -ensure-file - -root .
will install the btpeer_manager
binary in the current directory (as specified
by the -root
argument).
Key Directories & Files
btpeer_manager
relies on your chromiumos source directory to identify its
source directory and the chameleond source directory. It assumes your
chromiumos source directory is located at ~/chromiumos
, but you can use a
different directory by passing it with the --chromiumos_src_dir
flag.
Local:
<chromiumos_src_dir>/src/platform/
chameleon/
- Chameleond source repositorydist/
- Where chameleond builds are created by the chameleond makefile (generated when chameleond is built)
dev/contrib/btpeer_manager/
- This directory, and the primary dir for toolbuild/
- Default working directory location (generated by CLI)bundles/
- Where built and downloaded chameleond bundles are storedconfig/
- Where copies of the chameleond and image config JSON are download to and uploaded fromimages
- Where images are downloaded to
go/
bin/
- Stores the CLI executable (generated once built)pkg/
- Download golang package dependencies (generated on build)src/
- CLI source code
Google Cloud Storage (GCS):
gs://chromeos-connectivity-test-artifacts
btpeer/
- Test artifacts related to btpeersbtpeer_chameleond_config_prod.json
Productionchameleond
release config for btpeersbtpeer_chameleond_config_test.json
Testchameleond
release config for btpeersraspios_cros_btpeer_image_config_prod.json
Productionimage
release config for btpeersraspios_cros_btpeer_image_config_test.json
Testimage
release config for btpeerschameleond/
- Contains all released chameleond bundleschameleond-0.0.2-<chameleon_commit>.tar.gz
Chameleond bundle built with a specific chameleon repository commit
raspios_cros_btpeer/
- Contains all released images<image_uuid>/
Subdir for files related to a specific image*.img.gz
Image binary, compressed withgz
*.info
Package manifestraspios_cros_btpeer_build_info.json
Copy of the build info present in the image rootfs at/etc/chromiumos/raspios_cros_btpeer_build_info.json
, as defined in proto bychromiumos.test.lab.api.RaspiosCrosBtpeerImageBuildInfo
.
Usage
Below are different usage examples highlighting how btpeer_manager
is meant
to be used. All usage is meant to be preformed outside your chroot on your main
system and probably will not all work from within it. Logs are printed to
stdout in most cases to highlight important actions and decisions made by the tool.
For ease of reference, copies of CLI help text is included for the different command sections.
Note: The help and log output may differ in your usage since they are contextual
and the README may be slightly out of sync with the latest changes, but it should
match for the most part. You can always check what commands and flags are
available to your installed version with the --help
flag.
$ btpeer_manager --help
Utility for managing btpeers
Usage:
btpeer_manager [command]
Available Commands:
chameleond Commands related to managing chameleond on btpeers
clean Deletes temporary/build files created by btpeer_manager.
completion Generate the autocompletion script for the specified shell
help Help about any command
image Commands related to managing images on btpeers
Flags:
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
-h, --help help for btpeer_manager
-v, --version version for btpeer_manager
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
Use "btpeer_manager [command] --help" for more information about a command.
btpeer_manager chameleond
$ btpeer_manager chameleond --help
Commands related to managing chameleond on btpeers
Usage:
btpeer_manager chameleond [command]
Available Commands:
make Builds chameleond in your chroot and prepares bundle for btpeer distribution
release Commands related to managing chameleond releases for btpeers
Flags:
-h, --help help for chameleond
Global Flags:
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
Use "btpeer_manager chameleond [command] --help" for more information about a command.
btpeer_manager chameleond make
$ btpeer_manager chameleond make
16:59:54.388707 Running "make clean" from within chroot in chameleon source dir "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon"
cat: /etc/hostname: No such file or directory
cat: /etc/hostname: No such file or directory
16:59:55.644385 Running "make" from within chroot in chameleon source dir "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon"
cat: /etc/hostname: No such file or directory
cat: /etc/hostname: No such file or directory
armv7a-cros-linux-gnueabihf-gcc -g -Wall -O2 -static -Iinclude -c src/histogram.c -o bin/histogram.o
armv7a-cros-linux-gnueabihf-gcc -g -Wall -O2 -static -Iinclude -o bin/histogram bin/histogram.o
armv7a-cros-linux-gnueabihf-gcc -g -Wall -O2 -static -Iinclude -c src/hpd_control.c -o bin/hpd_control.o
...(many lines of logs from chameleond make)...
copying v3/v4l-mjpeg-server/server.c -> chameleond-0.0.2/v3/v4l-mjpeg-server
Writing chameleond-0.0.2/setup.cfg
Creating tar archive
removing 'chameleond-0.0.2' (and everything under it)
rm bin/pixeldump.o bin/printer.o bin/avsync.o bin/hpd_control.o bin/histogram.o
17:00:09.568961 Searching for built bundle files in "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist"
17:00:09.569076 Found chameleond bundle archive "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist/chameleond-0.0.2.tar.gz"
17:00:09.569089 Found chameleond commit file "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist/commit"
17:00:09.569094 Reading chameleond commit from chameleond commit file "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist/commit"
17:00:09.569138 Read chameleond commit as "cf50534"
17:00:09.569142 Preparing bundle archive for distribution
17:00:09.616519 New btpeer chameleond bundle archive "chameleond-0.0.2-cf50534.tar.gz" ready for distribution at "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles/chameleond-0.0.2-cf50534.tar.gz"
Note: If you haven't entered your chroot recently (or more specifically,
used sudo
recently), it will prompt you for your sudo password. This isn't
done by btpeer_manager
, but by cros_sdk
like usual since it uses that to
preform the operations in your chroot. Your stdin is piped cros_sdk
to allow
this you to still enter it.
btpeer_manager chameleond release
All of these release commands are dependent upon access to the GCS bucket we use
to store our chameleond bundles and the release config files,
chromeos-connectivity-test-artifacts.
By default, access is achieved using the gcloud application-default credentials
for ease of use, but you can also specify a GCS cred JSON file if you have one
with the --gcloud_cred_file
flag (docs).
The default behavior is to use the test release config. To use the prod config
you must specify the --prod
flag. This applies to anytime the command reads or
modifies a config file. The bundles themselves are the same between prod and
test, only the config changes.
$ btpeer_manager chameleond release --help
Commands related to managing chameleond releases for btpeers
Usage:
btpeer_manager chameleond release [command]
Available Commands:
config Commands for reading and updating the release config
download Downloads a released chameleond bundle
upload Uploads a local bundle to GCS and adds it to the release config
Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-h, --help help for release
-p, --prod Uses the production config when present, or the test config when not present
Global Flags:
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
Use "btpeer_manager chameleond release [command] --help" for more information about a command.
btpeer_manager chameleond release download
$ btpeer_manager chameleond release download --help
Downloads a released chameleond bundle
Usage:
btpeer_manager chameleond release download [flags]
Flags:
--commit string Download the bundle for this chameleond commit (case-insensitive)
--cros_version string Download the bundle for this ChromeOS release version (compatible with --dut)
--dut string Download the next bundle if the dut is in the verification pool, or the select it by cros_version otherwise (--cros_version required)
-h, --help help for download
--next Download the next bundle
Global Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-p, --prod Uses the production config when present, or the test config when not present
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
$ btpeer_manager chameleond release download --next
DirContext: {
"Working": {
"BaseDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build",
"ChameleondBundlesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles",
"ConfigDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config"
},
"Src": {
"ChromiumosDirPath": "/usr/local/google/home/jaredbennett/chromiumos",
"BTPeerManagerDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager",
"ChameleonDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon",
"ChameleonDistDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist"
}
}
17:39:24.130573 Creating new GCS client using application-default credentials
17:39:24.571006 Successfully retrieved BluetoothPeerChameleondConfig from "gs://chromeos-connectivity-test-artifacts/btpeer/btpeer_chameleond_config_test.json"
17:39:24.571099 BluetoothPeerChameleondConfig:
{
"nextChameleondCommit": "723e87b",
"nextDutHosts": [],
"nextDutReleaseVersions": [],
"bundles": [
{
"chameleondCommit": "723e87b",
"archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-723e87b.tar.gz",
"minDutReleaseVersion": "0"
}
]
}
17:39:24.571150 Selected bundle:
{
"chameleondCommit": "723e87b",
"archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-723e87b.tar.gz",
"minDutReleaseVersion": "0"
}
17:39:24.571190 Downloading chameleond bundle archive "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-723e87b.tar.gz"
17:39:25.841606 Successfully downloaded chameleond bundle to "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles/chameleond-0.0.2-723e87b.tar.gz"
btpeer_manager chameleond release upload
$ btpeer_manager chameleond release upload --help
Uploads a local bundle to GCS and adds it to the release config
Usage:
btpeer_manager chameleond release upload <min_cros_version> <path_to_bundle_archive> [flags]
Flags:
-h, --help help for upload
--next Sets the NextChameleondCommit to this new bundle's ChameleondCommit
--overwrite_cros_version Allows for replacing other bundles in the bundle config with matching min_cros_version values
--overwrite_existing_bundle Allows overwriting of an bundle that already exists with the same ChameleondCommit
Global Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-p, --prod Uses the production config when present, or the test config when not present
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
In this example, we are uploading a bundle previously built with
btpeer_manager chameleond make
, specifying it as the next bundle, setting its
minimum ChromeOS build version as 1234.5.6
, and applying our config changes
to just the test config (since --prod
is not included).
Note: It isn't required to use an absolute path for the bundle, but it can be easier.
$ btpeer_manager chameleond release upload 1234.5.6 /usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles/chameleond-0.0.2-cf50534.tar.gz --next
DirContext: {
"Working": {
"BaseDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build",
"ChameleondBundlesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles",
"ConfigDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config"
},
"Src": {
"ChromiumosDirPath": "/usr/local/google/home/jaredbennett/chromiumos",
"BTPeerManagerDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager",
"ChameleonDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon",
"ChameleonDistDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist"
}
}
17:48:52.852550 Creating new GCS client using application-default credentials
17:48:53.066573 Successfully retrieved BluetoothPeerChameleondConfig from "gs://chromeos-connectivity-test-artifacts/btpeer/btpeer_chameleond_config_test.json"
17:48:53.066685 Bundle ChameleondCommit: "cf50534"
17:48:53.066712 Uploading chameleond bundle from "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles/chameleond-0.0.2-cf50534.tar.gz" to "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-cf50534.tar.gz"
17:48:54.010811 Successfully uploaded 33714306 bytes to "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-cf50534.tar.gz"
17:48:54.010871 Successfully uploaded new chameleond bundle:
{
"chameleondCommit": "cf50534",
"archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-cf50534.tar.gz",
"minDutReleaseVersion": "1234.5.6"
}
17:48:54.311275 Saved new BluetoothPeerChameleondConfig to "gs://chromeos-connectivity-test-artifacts/btpeer/btpeer_chameleond_config_test.json":
{
"nextChameleondCommit": "cf50534",
"nextDutHosts": [],
"nextDutReleaseVersions": [],
"bundles": [
{
"chameleondCommit": "723e87b",
"archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-723e87b.tar.gz",
"minDutReleaseVersion": "0"
},
{
"chameleondCommit": "cf50534",
"archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-cf50534.tar.gz",
"minDutReleaseVersion": "1234.5.6"
}
]
}
17:48:54.311309 See 'btpeer_manager chameleond release config --help' for ways to update the config further if needed
btpeer_manager chameleond release config
These commands allow you to get and set the release config quickly and easily.
A common workflow would be to retrieve the current test config with get
and
push it to production with a subsequent set --prod
call. Another thing you can
do is call get
, make local changes to the config file, and then call set
to
upload your manual changes. Every time btpeer_manager
saves a config to GCS
it validates it too, so if you make a typo or logic error it will yell at you
and not upload your bad config.
$ btpeer_manager chameleond release config --help
Commands for reading and updating the release config
Usage:
btpeer_manager chameleond release config [command]
Available Commands:
get Downloads the release config from storage
set Updates the release config in storage
Flags:
-h, --help help for config
Global Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-p, --prod Uses the production config when present, or the test config when not present
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
Use "btpeer_manager chameleond release config [command] --help" for more information about a command.
btpeer_manager chameleond release config get
$ btpeer_manager chameleond release config get
DirContext: {
"Working": {
"BaseDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build",
"ChameleondBundlesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles",
"ConfigDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config"
},
"Src": {
"ChromiumosDirPath": "/usr/local/google/home/jaredbennett/chromiumos",
"BTPeerManagerDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager",
"ChameleonDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon",
"ChameleonDistDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist"
}
}
17:58:25.515647 Creating new GCS client using application-default credentials
17:58:25.918004 Successfully retrieved BluetoothPeerChameleondConfig from "gs://chromeos-connectivity-test-artifacts/btpeer/btpeer_chameleond_config_test.json"
17:58:25.918440 Saved copy of config to "file:///usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config/btpeer_chameleond_config.json"
btpeer_manager chameleond release config set
$ btpeer_manager chameleond release config set
DirContext: {
"Working": {
"BaseDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build",
"ChameleondBundlesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles",
"ConfigDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config"
},
"Src": {
"ChromiumosDirPath": "/usr/local/google/home/jaredbennett/chromiumos",
"BTPeerManagerDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager",
"ChameleonDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon",
"ChameleonDistDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist"
}
}
17:59:00.553684 Creating new GCS client using application-default credentials
17:59:00.788089 Successfully retrieved BluetoothPeerChameleondConfig from "gs://chromeos-connectivity-test-artifacts/btpeer/btpeer_chameleond_config_test.json"
17:59:00.788140 Reading config file "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config/btpeer_chameleond_config.json"
17:59:00.788401 Successfully read BluetoothPeerChameleondConfig from "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config/btpeer_chameleond_config.json":
{
"nextChameleondCommit": "cf50534",
"nextDutHosts": [],
"nextDutReleaseVersions": [],
"bundles": [
{
"chameleondCommit": "723e87b",
"archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-723e87b.tar.gz",
"minDutReleaseVersion": "0"
},
{
"chameleondCommit": "cf50534",
"archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-cf50534.tar.gz",
"minDutReleaseVersion": "1234.5.6"
}
]
}
17:59:01.069812 Saved new BluetoothPeerChameleondConfig to "gs://chromeos-connectivity-test-artifacts/btpeer/btpeer_chameleond_config_test.json":
{
"nextChameleondCommit": "cf50534",
"nextDutHosts": [],
"nextDutReleaseVersions": [],
"bundles": [
{
"chameleondCommit": "723e87b",
"archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-723e87b.tar.gz",
"minDutReleaseVersion": "0"
},
{
"chameleondCommit": "cf50534",
"archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-cf50534.tar.gz",
"minDutReleaseVersion": "1234.5.6"
}
]
}
btpeer_manager image
$ btpeer_manager image --help
Commands related to managing images on btpeers
Usage:
btpeer_manager image [command]
Available Commands:
release Commands related to managing btpeer images
Flags:
-h, --help help for image
Global Flags:
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
Use "btpeer_manager image [command] --help" for more information about a command.
btpeer_manager image release
$ btpeer_manager image release --help
Commands related to managing btpeer images
Usage:
btpeer_manager image release [command]
Available Commands:
config Commands for reading and updating the image release config
download Downloads a released image
upload Uploads a local image to GCS and adds it to the image release config
Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-h, --help help for release
-p, --prod Uses the production config when present, or the test config when not present
Global Flags:
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
Use "btpeer_manager image release [command] --help" for more information about a command.
btpeer_manager image release upload
$ btpeer_manager image release upload --help
Uploads a local image to GCS and adds it to the image release config
Usage:
btpeer_manager image release upload <path_to_image_file_in_pi_gen_deploy_dir> [flags]
Flags:
--current Sets the CurrentImageUuid to this new image's UUID
-h, --help help for upload
--next Sets the NextImageUuid to this new image's UUID
Global Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-p, --prod Uses the production config when present, or the test config when not present
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
$ /bin/bash /btpeer_manager image release upload /usr/local/google/home/jaredbennett/chromiumos/src/third_party/pi-gen-btpeer/deploy/image_2024-04-24-raspios-cros-btpeer.img.gz
DirContext: {
"Working": {
"BaseDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build",
"ChameleondBundlesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles",
"ConfigDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config"
},
"Src": {
"ChromiumosDirPath": "/usr/local/google/home/jaredbennett/chromiumos",
"BTPeerManagerDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager",
"ChameleonDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon",
"ChameleonDistDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist"
}
}
13:03:48.998216 Creating new GCS client using application-default credentials
13:03:49.200026 Successfully retrieved RaspiosCrosBtpeerImageConfig from "gs://chromeos-connectivity-test-artifacts/btpeer/raspios_cros_btpeer_image_config_test.json"
13:03:49.200064 Preparing to upload image, build info, and package info files
13:03:49.200104 Identified image file as "/usr/local/google/home/jaredbennett/chromiumos/src/third_party/pi-gen-btpeer/deploy/image_2024-04-24-raspios-cros-btpeer.img.gz"
13:03:49.200132 Identified build info file as "/usr/local/google/home/jaredbennett/chromiumos/src/third_party/pi-gen-btpeer/deploy/raspios_cros_btpeer_build_info.json"
13:03:49.200158 Identified package info file as "/usr/local/google/home/jaredbennett/chromiumos/src/third_party/pi-gen-btpeer/deploy/2024-04-24-raspios-cros-btpeer.info"
13:03:49.200170 Reading build info file "/usr/local/google/home/jaredbennett/chromiumos/src/third_party/pi-gen-btpeer/deploy/raspios_cros_btpeer_build_info.json"
13:03:49.200538 Successfully unmarshalled build info file "/usr/local/google/home/jaredbennett/chromiumos/src/third_party/pi-gen-btpeer/deploy/raspios_cros_btpeer_build_info.json" as RaspiosCrosBtpeerImageBuildInfo: {
"imageUuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"imageBuildTime": "2024-04-24T22:47:17Z",
"sources": {
"https://chromium.googlesource.com/chromiumos/config": "fc0f57ee",
"https://chromium.googlesource.com/chromiumos/platform/btpeerd": "eac10d3",
"https://chromium.googlesource.com/chromiumos/platform/btsocket": "d52a38f",
"https://chromium.googlesource.com/chromiumos/platform/chameleon": "70f5f1e",
"https://chromium.googlesource.com/chromiumos/third_party/pi-gen-btpeer": "db84bb0"
}
}
13:03:49.200565 Identified ImageUuid as "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e"
13:03:49.200589 Uploading file from "/usr/local/google/home/jaredbennett/chromiumos/src/third_party/pi-gen-btpeer/deploy/image_2024-04-24-raspios-cros-btpeer.img.gz" to "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
13:04:11.718753 Successfully uploaded 1379026325 bytes to "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
13:04:11.718861 Uploading file from "/usr/local/google/home/jaredbennett/chromiumos/src/third_party/pi-gen-btpeer/deploy/raspios_cros_btpeer_build_info.json" to "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/raspios_cros_btpeer_build_info.json"
13:04:11.917212 Successfully uploaded 527 bytes to "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/raspios_cros_btpeer_build_info.json"
13:04:11.917265 Uploading file from "/usr/local/google/home/jaredbennett/chromiumos/src/third_party/pi-gen-btpeer/deploy/2024-04-24-raspios-cros-btpeer.info" to "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/2024-04-24-raspios-cros-btpeer.info"
13:04:12.115490 Successfully uploaded 111549 bytes to "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/2024-04-24-raspios-cros-btpeer.info"
13:04:12.115639 Successfully uploaded new image:
{
"uuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"path": "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
}
13:04:12.367350 Saved new RaspiosCrosBtpeerImageConfig to "gs://chromeos-connectivity-test-artifacts/btpeer/raspios_cros_btpeer_image_config_test.json":
{
"currentImageUuid": "",
"nextImageUuid": "",
"nextImageVerificationDutPool": [],
"images": [
{
"uuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"path": "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
}
]
}
13:04:12.367380 See 'btpeer_manager image release config --help' for ways to update the config further if needed
btpeer_manager image release download
$ btpeer_manager image release download --help
Downloads a released image
Select the image by passing one of the selection flags. Selection flags cannot
be combined.
Usage:
btpeer_manager image release download [flags]
Flags:
--current Download the current image
--dut string Download the next image if the dut is in the verification pool, otherwise download the current image
-h, --help help for download
--next Download the next image
--uuid string Download the image with a matching UUID known by the image config
Global Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-p, --prod Uses the production config when present, or the test config when not present
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
$ btpeer_manager image release download --prod --current
DirContext: {
"Working": {
"BaseDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build",
"ChameleondBundlesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles",
"ImagesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/images",
"ConfigDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config"
},
"Src": {
"ChromiumosDirPath": "/usr/local/google/home/jaredbennett/chromiumos",
"BTPeerManagerDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager",
"ChameleonDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon",
"ChameleonDistDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist"
}
}
14:50:51.340874 Creating new GCS client using application-default credentials
14:50:51.684993 Successfully retrieved RaspiosCrosBtpeerImageConfig from "gs://chromeos-connectivity-test-artifacts/btpeer/raspios_cros_btpeer_image_config_prod.json"
14:50:51.685071 RaspiosCrosBtpeerImageConfig:
{
"currentImageUuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"nextImageUuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"nextImageVerificationDutPool": [
"chromeos15-row14-rack10-host5"
],
"images": [
{
"uuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"path": "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
}
]
}
14:50:51.685111 Selected image:
{
"uuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"path": "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
}
14:50:51.685176 Downloading image "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz" to "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/images/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
14:51:06.751452 Successfully downloaded image to "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/images/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
btpeer_manager image release config
$ btpeer_manager image release config --help
Commands for reading and updating the image release config
Usage:
btpeer_manager image release config [command]
Available Commands:
get Downloads the image release config from storage
set Updates the image release config in storage
Flags:
-h, --help help for config
Global Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-p, --prod Uses the production config when present, or the test config when not present
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
Use "btpeer_manager image release config [command] --help" for more information about a command.
btpeer_manager image release config get
$ btpeer_manager image release config get --help
Downloads the image release config from storage
Usage:
btpeer_manager image release config get [flags]
Flags:
--dst string Path to save config to (defaults to "<working_dir>/config/raspios_cros_btpeer_image_config.json"
-h, --help help for get
--print Print the config rather than save it to a file
Global Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-p, --prod Uses the production config when present, or the test config when not present
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
$ btpeer_manager image release config get --prod
DirContext: {
"Working": {
"BaseDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build",
"ChameleondBundlesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles",
"ImagesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/images",
"ConfigDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config"
},
"Src": {
"ChromiumosDirPath": "/usr/local/google/home/jaredbennett/chromiumos",
"BTPeerManagerDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager",
"ChameleonDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon",
"ChameleonDistDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist"
}
}
14:50:16.139768 Creating new GCS client using application-default credentials
14:50:16.524537 Successfully retrieved RaspiosCrosBtpeerImageConfig from "gs://chromeos-connectivity-test-artifacts/btpeer/raspios_cros_btpeer_image_config_prod.json"
14:50:16.526396 Saved copy of config to "file:///usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config/raspios_cros_btpeer_image_config.json"
btpeer_manager image release config set
$ btpeer_manager image release config set --help
Updates the image release config in storage
Usage:
btpeer_manager image release config set [flags]
Flags:
--force Bypass config validation failures and forcefully update the config
-h, --help help for set
--src string Path to read new config from (defaults to "<working_dir>/config/raspios_cros_btpeer_image_config.json"
Global Flags:
--bucket string GCS storage bucket to use (both prod and test use the same bucket) (default "chromeos-connectivity-test-artifacts")
--chromiumos_src_dir string Path to local chromiumos source directory (default "/usr/local/google/home/jaredbennett/chromiumos")
--gcloud_cred_file string The gcloud credential file to use with the GCS API (uses gcloud CLI application-default credentials when unset)
-p, --prod Uses the production config when present, or the test config when not present
--working_dir string Path to base working directory create build directory (defaults to btpeer_manager source dir)
$ btpeer_manager image release config set
DirContext: {
"Working": {
"BaseDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build",
"ChameleondBundlesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/bundles",
"ImagesDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/images",
"ConfigDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config"
},
"Src": {
"ChromiumosDirPath": "/usr/local/google/home/jaredbennett/chromiumos",
"BTPeerManagerDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager",
"ChameleonDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon",
"ChameleonDistDirPath": "/usr/local/google/home/jaredbennett/chromiumos/src/platform/chameleon/dist"
}
}
13:28:43.628046 Creating new GCS client using application-default credentials
13:28:43.838424 Successfully retrieved RaspiosCrosBtpeerImageConfig from "gs://chromeos-connectivity-test-artifacts/btpeer/raspios_cros_btpeer_image_config_test.json"
13:28:43.838474 Reading config file "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config/raspios_cros_btpeer_image_config.json"
13:28:43.838748 Successfully read RaspiosCrosBtpeerImageConfig from "/usr/local/google/home/jaredbennett/chromiumos/src/platform/dev/contrib/btpeer_manager/build/config/raspios_cros_btpeer_image_config.json":
{
"currentImageUuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"nextImageUuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"nextImageVerificationDutPool": [],
"images": [
{
"uuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"path": "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
}
]
}
13:28:44.104683 Saved new RaspiosCrosBtpeerImageConfig to "gs://chromeos-connectivity-test-artifacts/btpeer/raspios_cros_btpeer_image_config_test.json":
{
"currentImageUuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"nextImageUuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"nextImageVerificationDutPool": [],
"images": [
{
"uuid": "1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e",
"path": "gs://chromeos-connectivity-test-artifacts/btpeer/raspios-cros-btpeer/1c2bcdcf-73f3-41da-a71b-c4e08fbb5e4e/image_2024-04-24-raspios-cros-btpeer.img.gz"
}
]
}
Documentation
¶
Overview ¶
Package main includes the main function for running btpeer_manager as an executable.
Directories
¶
Path | Synopsis |
---|---|
Package cmd defines the CLI for btpeer_manager.
|
Package cmd defines the CLI for btpeer_manager. |
chameleond
Package chameleond defines commands related to managing chameleond on btpeers.
|
Package chameleond defines commands related to managing chameleond on btpeers. |
chameleond/release
Package release provides commands for managing chameleond releases for btpeers.
|
Package release provides commands for managing chameleond releases for btpeers. |
chameleond/release/config
Package config defines the "config" subcommand.
|
Package config defines the "config" subcommand. |
common
Package common provides prompts functions for btpeer_manager commands.
|
Package common provides prompts functions for btpeer_manager commands. |
image
Package image provides commands for managing images on btpeers.
|
Package image provides commands for managing images on btpeers. |
image/release
Package release provides commands for managing btpeer image releases for btpeers.
|
Package release provides commands for managing btpeer image releases for btpeers. |
image/release/config
Package config defines the "config" subcommand.
|
Package config defines the "config" subcommand. |
Package dirs defines the working and source directories used by btpeer_manager.
|
Package dirs defines the working and source directories used by btpeer_manager. |
Package fileutils defines generic file utilities.
|
Package fileutils defines generic file utilities. |
Package log contains logging utilities for btpeer_manager.
|
Package log contains logging utilities for btpeer_manager. |
release
|
|
chameleond
Package chameleond provides commands for managing chameleond releases for btpeers.
|
Package chameleond provides commands for managing chameleond releases for btpeers. |
image
Package image provides commands for managing release images on btpeers.
|
Package image provides commands for managing release images on btpeers. |