From 6e9428a234a1160138f6f91c82c14f64fb697294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= Date: Fri, 10 Jun 2022 15:05:09 +0200 Subject: [PATCH] Fix gcp debug image command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- debugd/README.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/debugd/README.md b/debugd/README.md index e17560a4b..06187d796 100644 --- a/debugd/README.md +++ b/debugd/README.md @@ -2,7 +2,7 @@ ## Build cdbg -``` +```shell mkdir -p build cmake .. make cdbg @@ -13,6 +13,7 @@ make cdbg With `cdbg` and `yq` installed in your path: 0. Write the configuration file for cdbg `cdbg-conf.yaml`: + ```yaml cdbg: authorizedKeys: @@ -25,9 +26,13 @@ With `cdbg` and `yq` installed in your path: [Unit] Description=… ``` + 1. Run `constellation config generate` to create a new default configuration + 2. Locate the latest debugd images for [GCP](#debugd-gcp-image) and [Azure](#debugd-azure-image) + 3. Modify the `constellation-conf.yaml` to use an image with the debugd already included and add required firewall rules: + ```shell-session # Set timestamp from cloud provider image name export TIMESTAMP=01234 @@ -51,23 +56,29 @@ With `cdbg` and `yq` installed in your path: }" \ constellation-conf.yaml ``` -4. Run `constellation create […]` -5. Run `./cdbg deploy` -6. Run `constellation init […]` as usual +4. Run `constellation create […]` + +5. Run `./cdbg deploy` + +6. Run `constellation init […]` as usual ### debugd GCP image -For GCP, run the following command to get a list of all constellation images, sorted by their creation date: -``` -gcloud compute images list --filter="name~'constellation-.+'" --sort-by=~creationTimestamp --project constellation-images +For GCP, run the following command to get a list of all constellation debug images, sorted by their creation date: + +```shell +gcloud compute images list --filter="name~'constellation-coreos-debugd.+'" --sort-by=~creationTimestamp --project constellation-images ``` + Choose the newest debugd image with the naming scheme `constellation-coreos-debugd-`. ### debugd Azure Image For Azure, run the following command to get a list of all constellation debugd images, sorted by their creation date: -``` + +```shell az sig image-version list --resource-group constellation-images --gallery-name Constellation --gallery-image-definition constellation-coreos-debugd --query "sort_by([], &publishingProfile.publishedDate)[].id" -o table ``` + Choose the newest debugd image and copy the full URI.