Skip to content

Remote log bundle support#674

Merged
torgermiller merged 12 commits intomainfrom
remote-log-bundle-support
Jun 27, 2025
Merged

Remote log bundle support#674
torgermiller merged 12 commits intomainfrom
remote-log-bundle-support

Conversation

@torgermiller
Copy link
Contributor

@torgermiller torgermiller commented Jun 24, 2025

Adds remote log bundle support.

When the user specifies a log bundle as an http path the file is downloaded to a local temp file and that local temp file is used to complete the upgrade prepare.

Example use:

./sdpctl appliance upgrade prepare --image=~/Downloads/appgate/Appgate-SDP-6.5.0.img.zip --logserver-bundle=http://127.0.0.1:8080/logserver-6.5.image.zip

@torgermiller torgermiller marked this pull request as ready for review June 24, 2025 21:15
Copy link
Collaborator

@mandopaloooza mandopaloooza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing usage for --logserver-bundle?

❯ go run main.go appliance upgrade prepare -h

...

Flags:
      --actual-hostname string    If the actual hostname is different from that which you are connecting to the appliance admin API, this flag can be used for setting the actual hostname
      --dev-keyring               Use the development keyring to verify the upgrade image
      --docker-registry string    Custom docker registry for downloading function docker images. Needs to be accessible by the sdpctl host machine.
      --force                     Force prepare of upgrade on appliances even though the version uploaded is the same or lower than the version already running on the appliance
  -h, --help                      help for prepare
      --host-on-controller        Use the primary Controller as image host when uploading from remote source
      --image string              Upgrade image file or URL
      --logserver-bundle string   Path to a local LogServer image bundle file to upload and use when upgrading a LogServer appliance.
      --no-interactive            Suppress interactive prompt with auto accept
      --skip-container-bundle     skip the bundling of the docker images for functions that need them, e.g. the LogServer
      --throttle int              Upgrade is done in batches using a throttle value. You can control the throttle using this flag (default 5)

Global Flags:
      --api-version int          Peer API version override
      --ci-mode                  Log to stderr instead of file and disable progress-bars
      --debug                    Enable debug logging
      --descending               Change the direction of sort order when using the '--order-by' flag. Using this will reverse the sort order for all keywords specified in the '--order-by' flag.
      --events-path string       send logs to unix domain socket path
  -e, --exclude stringToString   Filter appliances using a comma separated list of key-value pairs. Regex syntax is used for matching strings. Example: '--exclude name=controller,site=<site-id> etc.'.
                                 Available keywords to filter on are: name, id, tags|tag, version, hostname|host, active|activated, site|site-id, function (default [])
  -i, --include stringToString   Include appliances. Adheres to the same syntax and key-value pairs as '--exclude' (default [])
      --no-verify                Don't verify TLS on for the given command, overriding settings from config file
      --order-by strings         Order appliance lists by keywords, i.e. 'name', 'id' etc. Accepts a comma separated list of keywords, where first mentioned has priority. Applies to the 'appliance list' and 'appliance stats' commands. (default [name])
  -p, --profile string           Profile configuration to use
  -t, --timeout duration         Timeout for the upgrade operation. The timeout applies to each appliance which is being operated on (default 30m0s)

@torgermiller
Copy link
Contributor Author

torgermiller commented Jun 26, 2025

Missing usage for --remote-log-bundle?

❯ go run main.go appliance upgrade prepare -h

...

Flags:
      --actual-hostname string    If the actual hostname is different from that which you are connecting to the appliance admin API, this flag can be used for setting the actual hostname
      --dev-keyring               Use the development keyring to verify the upgrade image
      --docker-registry string    Custom docker registry for downloading function docker images. Needs to be accessible by the sdpctl host machine.
      --force                     Force prepare of upgrade on appliances even though the version uploaded is the same or lower than the version already running on the appliance
  -h, --help                      help for prepare
      --host-on-controller        Use the primary Controller as image host when uploading from remote source
      --image string              Upgrade image file or URL
      --logserver-bundle string   Path to a local LogServer image bundle file to upload and use when upgrading a LogServer appliance.
      --no-interactive            Suppress interactive prompt with auto accept
      --skip-container-bundle     skip the bundling of the docker images for functions that need them, e.g. the LogServer
      --throttle int              Upgrade is done in batches using a throttle value. You can control the throttle using this flag (default 5)

Global Flags:
      --api-version int          Peer API version override
      --ci-mode                  Log to stderr instead of file and disable progress-bars
      --debug                    Enable debug logging
      --descending               Change the direction of sort order when using the '--order-by' flag. Using this will reverse the sort order for all keywords specified in the '--order-by' flag.
      --events-path string       send logs to unix domain socket path
  -e, --exclude stringToString   Filter appliances using a comma separated list of key-value pairs. Regex syntax is used for matching strings. Example: '--exclude name=controller,site=<site-id> etc.'.
                                 Available keywords to filter on are: name, id, tags|tag, version, hostname|host, active|activated, site|site-id, function (default [])
  -i, --include stringToString   Include appliances. Adheres to the same syntax and key-value pairs as '--exclude' (default [])
      --no-verify                Don't verify TLS on for the given command, overriding settings from config file
      --order-by strings         Order appliance lists by keywords, i.e. 'name', 'id' etc. Accepts a comma separated list of keywords, where first mentioned has priority. Applies to the 'appliance list' and 'appliance stats' commands. (default [name])
  -p, --profile string           Profile configuration to use
  -t, --timeout duration         Timeout for the upgrade operation. The timeout applies to each appliance which is being operated on (default 30m0s)

Good point that does need an update. Just pushed a fix.

Copy link
Collaborator

@mandopaloooza mandopaloooza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for addressing comments so quickly 😃

@torgermiller
Copy link
Contributor Author

LGTM! Thanks for addressing comments so quickly 😃

Sure thing. Appreciate the insightful feedback!

@torgermiller torgermiller merged commit 424dff9 into main Jun 27, 2025
3 checks passed
@torgermiller torgermiller deleted the remote-log-bundle-support branch June 27, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants