diff options
author | Paul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com> | 2019-09-17 18:01:16 +0300 |
---|---|---|
committer | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2019-09-17 17:01:16 +0200 |
commit | 4dc34c078d5ae030d444e820c1f50ae533ac540d (patch) | |
tree | aa97ec8b1d26404a470ebd6c52eb8ebbd680cc6d /netdata-installer.sh | |
parent | 74074e815bc02c5d6b28d7f6f90b9872ee5ba5de (diff) |
netdata/installer: Add support for offline installs using kickstart or kickstart-static64 (#6693)
* netdata/installer: Introduce parameter, for offiline installs
1) introduce parameter --local-tarball-override that takes two files as input
2) make kickstart and kickstart-static64 handle this parameter by overriding the download process and use the given tarballs
* netdata/installer: update checksums
* netdata/installer: attempt to update readme.md
* netdata/installer: [ci skip] add documentation for static64
* netdata/installer: Offline installation -- expect go.d plugin binaries also for the intall to proceed
1) Introduce two more artifacts on the tarball override parameter (go.d plugin tarball and go.d plugin config tarball)
2) Adjust the installer to expect the offline install, when the path is set use that file instead of downloading anything
* Update packaging/installer/README.md
Co-Authored-By: Joel Hans <joel.g.hans@gmail.com>
* Update packaging/installer/README.md
Co-Authored-By: Joel Hans <joel.g.hans@gmail.com>
* netdata/installer: add offline installer section
* netdata/installer: don't shift there, we shift by one when needed
* netdata/installer: Update md5sum
* netdata/installer: adjust proposed commands to fetch proper binary based on OS and ARCH
* netdata/packaging: first round of feedback
* netdata/packaging: dont remove the files provided by the users
* netdata/packaging: local-tarball-override -> local-files
1) rename parameter name
2) update md5sums in readme
* netdata/packaging: fixes and nits
1) checksumi -> checksum
2) we are using sh, so conditionals are with single equal sign (fixed it)
3) unfortunately add one more option to the --local-files parameter, to define the required packages script.
Might make sense in the end to just pass a directory structure there and inform the user of the files we expect to see there
* netdata/packaging: update md5sum
* netdata/packaging: do not move, copy
* netdata/packaging: heres a few more missed mv->cp fixes
* netdata/packaging: [ci skip] Refine error message on kickstart-static64.sh, to help cases when user confuses kickstart.sh with kickstart-static64.sh
* netdata/packaging: update documentation to properly instruct on offline install how t orun the kickstart itself
* netdata/packaging: fix documentation - missing one more script call
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-x | netdata-installer.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh index 781cd9b1d9..1373e1e195 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -807,9 +807,19 @@ install_go() { tmp=$(mktemp -d /tmp/netdata-go-XXXXXX) GO_PACKAGE_BASENAME="go.d.plugin-${GO_PACKAGE_VERSION}.${OS}-${ARCH}.tar.gz" - download_go "https://github.com/netdata/go.d.plugin/releases/download/${GO_PACKAGE_VERSION}/${GO_PACKAGE_BASENAME}" "${tmp}/${GO_PACKAGE_BASENAME}" + if [ -z "${NETDATA_LOCAL_TARBALL_OVERRIDE_GO_PLUGIN}" ]; then + download_go "https://github.com/netdata/go.d.plugin/releases/download/${GO_PACKAGE_VERSION}/${GO_PACKAGE_BASENAME}" "${tmp}/${GO_PACKAGE_BASENAME}" + else + progress "Using provided go.d tarball ${NETDATA_LOCAL_TARBALL_OVERRIDE_GO_PLUGIN}" + run cp "${NETDATA_LOCAL_TARBALL_OVERRIDE_GO_PLUGIN}" "${tmp}/${GO_PACKAGE_BASENAME}" + fi - download_go "https://github.com/netdata/go.d.plugin/releases/download/${GO_PACKAGE_VERSION}/config.tar.gz" "${tmp}/config.tar.gz" + if [ -z "${NETDATA_LOCAL_TARBALL_OVERRIDE_GO_PLUGIN_CONFIG}" ]; then + download_go "https://github.com/netdata/go.d.plugin/releases/download/${GO_PACKAGE_VERSION}/config.tar.gz" "${tmp}/config.tar.gz" + else + progress "Using provided config file for go.d ${NETDATA_LOCAL_TARBALL_OVERRIDE_GO_PLUGIN_CONFIG}" + run cp "${NETDATA_LOCAL_TARBALL_OVERRIDE_GO_PLUGIN_CONFIG}" "${tmp}/config.tar.gz" + fi if [ ! -f "${tmp}/${GO_PACKAGE_BASENAME}" ] || [ ! -f "${tmp}/config.tar.gz" ] || [ ! -s "${tmp}/config.tar.gz" ] || [ ! -s "${tmp}/${GO_PACKAGE_BASENAME}" ]; then run_failed "go.d plugin download failed, go.d plugin will not be available" |