fluent / fluent-package-builder

td-agent (Fluentd) Building and Packaging System
Apache License 2.0
22 stars 26 forks source link

deb rpm: add helper script to generate install script #679

Open kenhys opened 1 week ago

kenhys commented 1 week ago

Currently, fluent-package install script is hosted on https://toolbelt.treasuredata.com and maintained under private repository.

It rely on deploying commercial cloud service and if we lost access to that private repository, can't manage them anymore. As a workaround, support to generate similar install script and upload it as static file.

kenhys commented 1 week ago

Expected to be used with:

ruby make-install-script.rb /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io --channel 5 --verify -d
Template path: /work/fluent/fluent-package-builder/f-p-b.repo/fluent-package/make-install-script.erb
Processing fluent-package 5 ...
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-redhat-fluent-package5.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-redhat-fluent-package5.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-amazon2-fluent-package5.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-amazon2-fluent-package5.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-amazon2023-fluent-package5.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-amazon2023-fluent-package5.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-ubuntu-noble-fluent-package5.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-ubuntu-noble-fluent-package5.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-ubuntu-jammy-fluent-package5.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-ubuntu-jammy-fluent-package5.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-ubuntu-focal-fluent-package5.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-ubuntu-focal-fluent-package5.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-debian-bullseye-fluent-package5.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-debian-bullseye-fluent-package5.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-debian-bookworm-fluent-package5.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-debian-bookworm-fluent-package5.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-redhat-fluent-package5-lts.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-redhat-fluent-package5-lts.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-amazon2-fluent-package5-lts.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-amazon2-fluent-package5-lts.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-amazon2023-fluent-package5-lts.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-amazon2023-fluent-package5-lts.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-ubuntu-noble-fluent-package5-lts.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-ubuntu-noble-fluent-package5-lts.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-ubuntu-jammy-fluent-package5-lts.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-ubuntu-jammy-fluent-package5-lts.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-ubuntu-focal-fluent-package5-lts.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-ubuntu-focal-fluent-package5-lts.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-debian-bullseye-fluent-package5-lts.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-debian-bullseye-fluent-package5-lts.sh
Generated: /work/fluent/fluent-package-builder/fluentd.cdn.cncf.io/sh/install-debian-bookworm-fluent-package5-lts.sh
[OK] Compared with: https://toolbelt.treasuredata.com/sh/install-debian-bookworm-fluent-package5-lts.sh
kenhys commented 1 week ago

3, 4, and 5 was supported.

kenhys commented 1 week ago

2, 2.5 was supported.

kenhys commented 1 week ago

It might better to refactor more.

kenhys commented 1 week ago

And need to archive current install script.

kenhys commented 1 week ago

Supported to make installation scripts archive.

kenhys commented 1 week ago

Still 2.5 target is broken.

kenhys commented 1 week ago

How to verify

  1. ruby make-install-script.rb -b PATH_TO_REPOSITORY

it creates installation script backup under toolbelt/*

  1. ruby make-install-script -v PATH_TO_REPOSITORY

It checks installation script under PATH_TO_REPOSITORY and verify it with https://toolbelt.treasuredata.com

  1. ruby make-install-script -v -a PATH_TO_REPOSITORY

It checks installation script under PATH_TO_REPOSITORY and verify it with locally backup installation script.