From e2415278b912ab2d8ae82688493745714eda3614 Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 3 Jan 2023 10:57:35 -0800 Subject: [PATCH 1/9] ruby-3.2.0, updated alpine Signed-off-by: Sean Porter --- Dockerfile.alpine | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 7af529a..585f360 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -8,13 +8,13 @@ RUN apk --no-cache add openssh-client openssl-dev libc6-compat RUN apk --no-cache add wget git sudo bash bash-doc bash-completion -RUN wget -O ruby-install-0.7.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -RUN tar -xzvf ruby-install-0.7.0.tar.gz -RUN cd ruby-install-0.7.0/ && ac_cv_func_isnan=yes ac_cv_func_isinf=yes make install +RUN wget -O ruby-install-0.8.5.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz +RUN tar -xzvf ruby-install-0.8.5.tar.gz +RUN cd ruby-install-0.8.5/ && ac_cv_func_isnan=yes ac_cv_func_isinf=yes make install RUN ac_cv_func_isnan=yes ac_cv_func_isinf=yes ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc -RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi -RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc unf_ext -RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc sys-filesystem +RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi +RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install unf_ext +RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install sys-filesystem RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -exec ldd {} 2>/dev/null \;| grep "=>" | grep -v "vdso.so.1" | awk '{print $3}'| sort -u ) && \ for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done From b760c52a5dc68f01714e41658ceb454d9fff00b9 Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 3 Jan 2023 11:43:54 -0800 Subject: [PATCH 2/9] ruby-3.2.0, fixed alpine tar'n Signed-off-by: Sean Porter --- Dockerfile.alpine | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 585f360..4ecad54 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -7,23 +7,24 @@ RUN apk --no-cache add build-base gmp-dev zlib-dev gdbm-dev db-dev readline-dev RUN apk --no-cache add openssh-client openssl-dev libc6-compat RUN apk --no-cache add wget git sudo bash bash-doc bash-completion - RUN wget -O ruby-install-0.8.5.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz RUN tar -xzvf ruby-install-0.8.5.tar.gz RUN cd ruby-install-0.8.5/ && ac_cv_func_isnan=yes ac_cv_func_isinf=yes make install -RUN ac_cv_func_isnan=yes ac_cv_func_isinf=yes ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc +RUN ac_cv_func_isnan=yes ac_cv_func_isinf=yes ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install unf_ext RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install sys-filesystem RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -exec ldd {} 2>/dev/null \;| grep "=>" | grep -v "vdso.so.1" | awk '{print $3}'| sort -u ) && \ - for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done + for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done RUN LIBS=$(apk info -L libc6-compat 2>/dev/null | grep "^lib/lib" | sort -u ) && \ - for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: /$f" && cp /$f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done + for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: /$f" && cp /$f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done + +RUN mkdir /assets/ -RUN mkdir /assets/ && \ - export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_alpine_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ +RUN export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_alpine_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ + touch $SENSU_ASSET && \ tar -czf $SENSU_ASSET -C /opt/rubies/ruby-${RUBY_VERSION}/ . ENV PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin From 71c15f6f641894797191d08f98ee5620d03250e6 Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 3 Jan 2023 12:02:34 -0800 Subject: [PATCH 3/9] ruby-3.2.0, alpine and amzn builds, updated readme Signed-off-by: Sean Porter --- Dockerfile.alpine | 2 +- Dockerfile.alpine3.8 | 25 ++++++++++++------------ Dockerfile.amzn1 | 10 +++++----- Dockerfile.amzn2 | 10 +++++----- README.md | 18 ++++++++--------- build_scripts/build_and_test_platform.sh | 2 +- 6 files changed, 34 insertions(+), 33 deletions(-) diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 4ecad54..d71fcb1 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -1,6 +1,6 @@ FROM alpine:3.14.1 -ARG RUBY_VERSION=2.4.4 +ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build RUN apk --no-cache add build-base gmp-dev zlib-dev gdbm-dev db-dev readline-dev libffi-dev coreutils yaml-dev linux-headers autoconf diff --git a/Dockerfile.alpine3.8 b/Dockerfile.alpine3.8 index 0d3dbaf..e35d647 100644 --- a/Dockerfile.alpine3.8 +++ b/Dockerfile.alpine3.8 @@ -1,29 +1,30 @@ FROM alpine:3.8 -ARG RUBY_VERSION=2.4.4 +ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build RUN apk --no-cache add build-base gmp-dev zlib-dev gdbm-dev db-dev readline-dev libffi-dev coreutils yaml-dev linux-headers autoconf RUN apk --no-cache add openssh-client openssl-dev libc6-compat RUN apk --no-cache add wget git sudo bash bash-doc bash-completion - -RUN wget -O ruby-install-0.7.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -RUN tar -xzvf ruby-install-0.7.0.tar.gz -RUN cd ruby-install-0.7.0/ && ac_cv_func_isnan=yes ac_cv_func_isinf=yes make install -RUN ac_cv_func_isnan=yes ac_cv_func_isinf=yes ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc -RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi -RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc unf_ext -RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc sys-filesystem +RUN wget -O ruby-install-0.8.5.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz +RUN tar -xzvf ruby-install-0.8.5.tar.gz +RUN cd ruby-install-0.8.5/ && ac_cv_func_isnan=yes ac_cv_func_isinf=yes make install +RUN ac_cv_func_isnan=yes ac_cv_func_isinf=yes ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc +RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi +RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install unf_ext +RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install sys-filesystem RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -exec ldd {} 2>/dev/null \;| grep "=>" | grep -v "vdso.so.1" | awk '{print $3}'| sort -u ) && \ - for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done + for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done RUN LIBS=$(apk info -L libc6-compat 2>/dev/null | grep "^lib/lib" | sort -u ) && \ for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: /$f" && cp /$f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done -RUN mkdir /assets/ && \ - export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_alpine3.8_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ +RUN mkdir /assets/ + +RUN export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_alpine3.8_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ + touch $SENSU_ASSET && \ tar -czf $SENSU_ASSET -C /opt/rubies/ruby-${RUBY_VERSION}/ . ENV PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin diff --git a/Dockerfile.amzn1 b/Dockerfile.amzn1 index f4d67fc..319b312 100644 --- a/Dockerfile.amzn1 +++ b/Dockerfile.amzn1 @@ -1,17 +1,17 @@ FROM amazonlinux:1 -ARG RUBY_VERSION=2.4.4 +ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl -RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \ - tar -xzvf ruby-install-0.7.0.tar.gz && \ - cd ruby-install-0.7.0/ && \ +RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz -o ruby-install-0.8.5.tar.gz && \ + tar -xzvf ruby-install-0.8.5.tar.gz && \ + cd ruby-install-0.8.5/ && \ make install && \ ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \ - PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem + PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi sys-filesystem RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \ for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done diff --git a/Dockerfile.amzn2 b/Dockerfile.amzn2 index 2d845a2..f467086 100644 --- a/Dockerfile.amzn2 +++ b/Dockerfile.amzn2 @@ -1,17 +1,17 @@ FROM amazonlinux:2 -ARG RUBY_VERSION=2.4.4 +ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl -RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \ - tar -xzvf ruby-install-0.7.0.tar.gz && \ - cd ruby-install-0.7.0/ && \ +RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz -o ruby-install-0.8.5.tar.gz && \ + tar -xzvf ruby-install-0.8.5.tar.gz && \ + cd ruby-install-0.8.5/ && \ make install && \ ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \ - PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem + PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi sys-filesystem RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \ for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done diff --git a/README.md b/README.md index 41cf359..63a4b97 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ Please note the following instructions: a local_build Sensu Go Asset. ``` - $ docker build --build-arg "RUBY_VERSION=2.4.4" -t sensu-ruby-runtime:2.4.4-alpine -f Dockerfile.alpine . - $ docker build --build-arg "RUBY_VERSION=2.4.4" -t sensu-ruby-runtime:2.4.4-debian -f Dockerfile.debian . + $ docker build --build-arg "RUBY_VERSION=3.2.0" -t sensu-ruby-runtime:3.2.0-alpine -f Dockerfile.alpine . + $ docker build --build-arg "RUBY_VERSION=3.2.0" -t sensu-ruby-runtime:3.2.0-debian -f Dockerfile.debian . ``` 2. Extract your new sensu-ruby asset, and get the SHA-512 hash for your @@ -56,8 +56,8 @@ Please note the following instructions: ``` $ mkdir assets - $ docker run -v "$PWD/assets:/assets" sensu-ruby-runtime:2.4.4-debian cp /assets/sensu-ruby-runtime_2.4.4_debian_linux_amd64.tar.gz /assets/ - $ shasum -a 512 assets/sensu-ruby-runtime_2.4.4_debian_linux_amd64.tar.gz + $ docker run -v "$PWD/assets:/tmp/assets" sensu-ruby-runtime:3.2.0-debian cp /assets/sensu-ruby-runtime_3.2.0_debian_linux_amd64.tar.gz /tmp/assets/ + $ shasum -a 512 assets/sensu-ruby-runtime_3.2.0_debian_linux_amd64.tar.gz ``` 3. Put that asset somewhere that your Sensu agent can fetch it. Perhaps add it to the Bonsai asset index! @@ -66,7 +66,7 @@ Please note the following instructions: 3. Create an asset resource in Sensu Go. - First, create a configuration file called `sensu-ruby-runtime-2.4.4-debian.json` with + First, create a configuration file called `sensu-ruby-runtime-3.2.0-debian.json` with the following contents: ``` @@ -74,13 +74,13 @@ Please note the following instructions: "type": "Asset", "api_version": "core/v2", "metadata": { - "name": "sensu-ruby-runtime-2.4.4-debian", + "name": "sensu-ruby-runtime-3.2.0-debian", "namespace": "default", "labels": {}, "annotations": {} }, "spec": { - "url": "http://your-asset-server-here/assets/sensu-ruby-runtime-2.4.4-debian.tar.gz", + "url": "http://your-asset-server-here/assets/sensu-ruby-runtime-3.2.0-debian.tar.gz", "sha512": "4f926bf4328fbad2b9cac873d117f771914f4b837c9c85584c38ccf55a3ef3c2e8d154812246e5dda4a87450576b2c58ad9ab40c9e2edc31b288d066b195b21b", "filters": [ "entity.system.os == 'linux'", @@ -94,7 +94,7 @@ Please note the following instructions: Then create the asset via: ``` - $ sensuctl create -f sensu-ruby-runtime-2.4.4-debian.json + $ sensuctl create -f sensu-ruby-runtime-3.2.0-debian.json ``` 4. Create a second asset containing a Ruby script. @@ -134,7 +134,7 @@ Please note the following instructions: }, "spec": { "command": "helloworld.rb", - "runtime_assets": ["sensu-ruby-runtime-2.4.4-debian", "helloworld-v0.1"], + "runtime_assets": ["sensu-ruby-runtime-3.2.0-debian", "helloworld-v0.1"], "publish": true, "interval": 10, "subscriptions": ["docker"] diff --git a/build_scripts/build_and_test_platform.sh b/build_scripts/build_and_test_platform.sh index 2829038..b3890a6 100755 --- a/build_scripts/build_and_test_platform.sh +++ b/build_scripts/build_and_test_platform.sh @@ -1,7 +1,7 @@ #!/bin/bash ignore_errors=0 -ruby_version=2.4.4 +ruby_version=3.2.0 asset_version=${TAG:-local-build} asset_filename=sensu-ruby-runtime_${asset_version}_ruby-${ruby_version}_${platform}_linux_amd64.tar.gz asset_image=sensu-ruby-runtime-${ruby_version}-${platform}:${asset_version} From 14abef88419995d11972b5eb54493bad3799bd5a Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 3 Jan 2023 13:04:09 -0800 Subject: [PATCH 4/9] ruby-3.2.0, dropped centos 6/7 (eol and old gcc) Signed-off-by: Sean Porter --- Dockerfile.centos | 24 ---------- Dockerfile.centos6 | 24 ---------- Dockerfile.centos7 | 24 ---------- Dockerfile.centos8 | 12 ++--- Dockerfile.debian | 10 ++--- Dockerfile.debian10 | 10 ++--- Dockerfile.debian9 | 12 ++--- build_and_test_platform.sh | 2 +- build_scripts/build_centos_platforms.sh | 28 ------------ old/build.sh | 16 ------- old_travis/.travis.yml.old | 12 ----- old_travis/build_platforms.sh | 59 ------------------------- setup/CentOS-Base.repo | 39 ---------------- 13 files changed, 24 insertions(+), 248 deletions(-) delete mode 100644 Dockerfile.centos delete mode 100644 Dockerfile.centos6 delete mode 100644 Dockerfile.centos7 delete mode 100755 old/build.sh delete mode 100644 old_travis/.travis.yml.old delete mode 100755 old_travis/build_platforms.sh delete mode 100644 setup/CentOS-Base.repo diff --git a/Dockerfile.centos b/Dockerfile.centos deleted file mode 100644 index 41802e5..0000000 --- a/Dockerfile.centos +++ /dev/null @@ -1,24 +0,0 @@ -FROM centos:7 - -ARG RUBY_VERSION=2.4.4 -ARG ASSET_VERSION=local_build -ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' - - -RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl - -RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \ - tar -xzvf ruby-install-0.7.0.tar.gz && \ - cd ruby-install-0.7.0/ && \ - make install && \ - ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \ - PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem - -RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \ - for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done - -RUN mkdir /assets/ && \ - export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_$(source /etc/os-release && echo $ID)_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ - tar -czf $SENSU_ASSET -C /opt/rubies/ruby-${RUBY_VERSION}/ . - -ENV PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin diff --git a/Dockerfile.centos6 b/Dockerfile.centos6 deleted file mode 100644 index 87d50dd..0000000 --- a/Dockerfile.centos6 +++ /dev/null @@ -1,24 +0,0 @@ -FROM centos:6 - -ARG RUBY_VERSION=2.4.4 -ARG ASSET_VERSION=local_build -ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' -COPY setup/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo - -RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl - -RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \ - tar -xzvf ruby-install-0.7.0.tar.gz && \ - cd ruby-install-0.7.0/ && \ - make install && \ - ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \ - PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem - -RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \ - for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done - -RUN mkdir /assets/ && \ - export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_centos6_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ - tar -czf $SENSU_ASSET -C /opt/rubies/ruby-${RUBY_VERSION}/ . - -ENV PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin diff --git a/Dockerfile.centos7 b/Dockerfile.centos7 deleted file mode 100644 index d4f8d31..0000000 --- a/Dockerfile.centos7 +++ /dev/null @@ -1,24 +0,0 @@ -FROM centos:7 - -ARG RUBY_VERSION=2.4.4 -ARG ASSET_VERSION=local_build -ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' - - -RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl - -RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \ - tar -xzvf ruby-install-0.7.0.tar.gz && \ - cd ruby-install-0.7.0/ && \ - make install && \ - ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \ - PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem - -RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \ - for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done - -RUN mkdir /assets/ && \ - export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_$(source /etc/os-release && echo $ID$VERSION_ID)_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ - tar -czf $SENSU_ASSET -C /opt/rubies/ruby-${RUBY_VERSION}/ . - -ENV PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin diff --git a/Dockerfile.centos8 b/Dockerfile.centos8 index 36f72fb..7440494 100644 --- a/Dockerfile.centos8 +++ b/Dockerfile.centos8 @@ -1,21 +1,23 @@ FROM centos:8 -ARG RUBY_VERSION=2.4.4 +ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' +RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* +RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* RUN dnf update -y && dnf groupinstall -y "Development Tools" && dnf install -y curl RUN dnf install dnf-plugins-core RUN dnf repolist --all RUN dnf config-manager --set-enabled powertools -RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \ - tar -xzvf ruby-install-0.7.0.tar.gz && \ - cd ruby-install-0.7.0/ && \ +RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz -o ruby-install-0.8.5.tar.gz && \ + tar -xzvf ruby-install-0.8.5.tar.gz && \ + cd ruby-install-0.8.5/ && \ make install && \ ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \ - PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem + PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi sys-filesystem RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \ for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done diff --git a/Dockerfile.debian b/Dockerfile.debian index 1eb69ca..9cd509b 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -1,17 +1,17 @@ FROM debian:9 -ARG RUBY_VERSION=2.4.4 +ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' RUN apt-get update && apt-get install -y build-essential curl -RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \ - tar -xzvf ruby-install-0.7.0.tar.gz && \ - cd ruby-install-0.7.0/ && \ +RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz -o ruby-install-0.8.5.tar.gz && \ + tar -xzvf ruby-install-0.8.5.tar.gz && \ + cd ruby-install-0.8.5/ && \ make install && \ ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \ - PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem + PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi sys-filesystem RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \ for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done diff --git a/Dockerfile.debian10 b/Dockerfile.debian10 index 082cfeb..55ee990 100644 --- a/Dockerfile.debian10 +++ b/Dockerfile.debian10 @@ -1,17 +1,17 @@ FROM debian:10 -ARG RUBY_VERSION=2.4.4 +ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' RUN apt-get update && apt-get install -y build-essential curl -RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \ - tar -xzvf ruby-install-0.7.0.tar.gz && \ - cd ruby-install-0.7.0/ && \ +RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz -o ruby-install-0.8.5.tar.gz && \ + tar -xzvf ruby-install-0.8.5.tar.gz && \ + cd ruby-install-0.8.5/ && \ make install && \ ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \ - PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem + PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi sys-filesystem RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \ for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done diff --git a/Dockerfile.debian9 b/Dockerfile.debian9 index ac98ca0..9cd509b 100644 --- a/Dockerfile.debian9 +++ b/Dockerfile.debian9 @@ -1,23 +1,23 @@ FROM debian:9 -ARG RUBY_VERSION=2.4.4 +ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' RUN apt-get update && apt-get install -y build-essential curl -RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \ - tar -xzvf ruby-install-0.7.0.tar.gz && \ - cd ruby-install-0.7.0/ && \ +RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz -o ruby-install-0.8.5.tar.gz && \ + tar -xzvf ruby-install-0.8.5.tar.gz && \ + cd ruby-install-0.8.5/ && \ make install && \ ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \ - PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem + PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi sys-filesystem RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \ for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done RUN mkdir /assets/ && \ - export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_debian9_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ + export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_debian_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ tar -czf $SENSU_ASSET -C /opt/rubies/ruby-${RUBY_VERSION}/ . ENV PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin diff --git a/build_and_test_platform.sh b/build_and_test_platform.sh index c8dcca5..97a243f 100755 --- a/build_and_test_platform.sh +++ b/build_and_test_platform.sh @@ -1,7 +1,7 @@ #!/bin/bash ignore_errors=0 -ruby_version=2.4.4 +ruby_version=3.2.0 asset_version=${TAG:-local-build} asset_filename=sensu-ruby-runtime_${asset_version}_ruby-${ruby_version}_${platform}_linux_amd64.tar.gz asset_image=sensu-ruby-runtime-${ruby_version}-${platform}:${asset_version} diff --git a/build_scripts/build_centos_platforms.sh b/build_scripts/build_centos_platforms.sh index 68d8c4b..a44d799 100755 --- a/build_scripts/build_centos_platforms.sh +++ b/build_scripts/build_centos_platforms.sh @@ -4,37 +4,9 @@ mkdir -p dist mkdir -p assets mkdir -p scripts -# CentOS 6 platform -# Note: EOL Nov 30, 2020 -platform="centos6" test_platforms="centos:6 centos:7 centos:8 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi - -# CentOS 7 platform -platform="centos7" test_platforms="centos:8 centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04 ubuntu:20.04" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi - # CentOS 8 platform platform="centos8" test_platforms="centos:8 debian:10 ubuntu:20.04" ./build_and_test_platform.sh retval=$? if [[ retval -ne 0 ]]; then exit $retval fi - - - -## CentOS platform -#platform="centos" test_platforms="centos:8 centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04 ubuntu:20.04" ./build_and_test_platform.sh -#retval=$? -#if [[ retval -ne 0 ]]; then -# exit $retval -#fi - - - - diff --git a/old/build.sh b/old/build.sh deleted file mode 100755 index b19099d..0000000 --- a/old/build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -platforms=( alpine alpine3.8 debian debian9 centos centos7 centos6 ) -ruby_version=2.4.4 -asset_version=${TRAVIS_TAG:-local-build} - -mkdir -p dist -mkdir -p assets - -for platform in "${platforms[@]}" -do - echo "Building Docker Image: sensu-ruby-runtime:${ruby_version}-${platform}" - docker build --build-arg "RUBY_VERSION=$ruby_version" --build-arg "ASSET_VERSION=$asset_version" -t sensu-ruby-runtime-${ruby_version}-${platform}:${asset_version} -f Dockerfile.${platform} . - echo "Making Asset: /assets/sensu-ruby-runtime_${asset_version}_ruby-${ruby_version}_${platform}_linux_amd64.tar.gz" - docker run -v "$PWD/dist:/dist" sensu-ruby-runtime-${ruby_version}-${platform}:${asset_version} cp /assets/sensu-ruby-runtime_${asset_version}_ruby-${ruby_version}_${platform}_linux_amd64.tar.gz /dist/ -done diff --git a/old_travis/.travis.yml.old b/old_travis/.travis.yml.old deleted file mode 100644 index cbc072a..0000000 --- a/old_travis/.travis.yml.old +++ /dev/null @@ -1,12 +0,0 @@ -language: ruby -services: - - docker -script: - - "./build_platforms.sh" - - "./checksum.sh" - - "./upload.sh" -env: - global: - - secure: "7RBfc2SoyVYZFFhbXAJeEriPatkzZjf344RILvkD5nU3t4KjaGnnzxfDaLj4md4AH7yR9Mw24c246iTC4oggZz2yvAcGCTPAJxCNdnGeYXLXB8VCPzQWsbl1pl2bnjS8tcWsmm2eTYuWXGHOOA9oHkk+QmFzljQtKEXjPKgXg/DDeRACC3tdjbnhT3RgNHll5+8AYqbmhpiE28E3UwBgeiQlqz8D3c/kGZ+SSjUWIQEyv6pZonpVeR1RVq5f1EkvzYMECl3eHyNVfa7uDFV1+QFk1eqBi+w5PedZZs+XKTotqolQCogRsRWvVYlyIAv4l70pigfzzQnmhGJhN+dgqzPBURjp1+Z/LAl3gAl3LlE3siQgcPpsVLQdg+2IzvyEJe6A1/aJp38335hOX17QmbK/V8Tz2unKiY9rn5KwLZMCJtOVz91llW6itssDTEINeGFJ60zg6+NXHYh3Yr375c7sGS/wqT6xNQAS8UQsDyGOXfbqmIRaF74JF8bCRU2yYIwDPXCZnnEO5rkcnvOu7KyR2vrCruNWFM0jEHnZ3FQ9Am0/oMNPOcVr3+1090q8s7FVY16iy/ayTO/sckez30mPlsFQ7FpuOEwBO4T/YYq6HqcqOu9s4IHITmOco6uDfK2i3XJZR79K9YCYTUUqG9LJd/o/s7UC6FFxFo9W35k=" - - secure: "Qm6pztHzEVUdRbGcEve67M8+7yHEphe37VE+AwxTgARIX7994f1eiGIS8qle4CmHpPmOJ1aRbpRFoGY6wq2Hv8LiGmymE3FDsBpRwH+xy+I61SiZtddGR3svYSKJr6+abXNxc03P25MhKFt8IgV52GqyblcxKN0uXjpyiWikMIvqFo96efP2B/dbESgU48x2mrqi+gZz17VK9b2QPH3TjvyOpJPUWcirWg3KgLd+D1kaRrz0Dj93SuS5QcoTE/qv1Jq2SUBJtz2QPb715afR1HlWDnbGhfqUGigpSw5PgUJZtebTfUea69nhPKx9D1+Z5Q3H6GvRlAdRfwF2aMGGFPQmwVnl7tYuKrUtRyHt3oeYwQBhO2AhDmi16Rov+epgUnrjrOW2C94X3h0OlkCgP0tvXehifG90Ua7D9mPbijioug54NMfzlF4m0XRQq3GLS80CrpROzHUPlO3/mhU+9s2g1rhq7ohHTQ5olc0DgnzyxkX5TojasQYmGLB1Qx+o6r4pIgwE4zNDMcxFw/aYmBP9NuNWNI9ul8LLLCyTdzZj6rS0jFLyk33ZDjPa7rYamyzQ5yzR1iLQu8ueTyFOijFqKf1ZFPzKDj0gRcMsmYy79z86XTrYndg8jmZkJ24rHfErmK3CcwR4AOn3Am76m43vFaIfG9d3TMfBG6cqiho=" - - secure: '09tkrNosscyjjB4v2L8EePC0fAyPfhXBEYSkXvTtU9LJ+0EZwngXrIi5OBqLureCXgcIeps54u9QVkoxhALDx8bRxD2AB9LkHPqvPw/68ozD1QGAc4mdfFOuKpCVp9WlFCYAhIEBLtDBA347D9jX31hPP7VywoGmuCTsFDFIZe6oomGXt3ADciuZpwml4SA7i3FTRITCkuEChzR6jv0s1yrud8sJT2NE2eu5dH6JpjTr9jEQY7WKOtOfdnBQg4ZVZzShRWyVTPFMRAj7F5UXhnunOn6XCc6AWAChMtAE1unqEKoiR8BjbfYZ11z0RuQv83tQwroPjVDsFRv2A5Csxq43Pm9v+rFpfQols3RRi07rL9UTd2FtXrlu/F0PNNavXr8NRftmXdzz/QreSpa6+Jxx0w41/aEg4OGLSGrhqBXGtwyPya0OJeMExNGPxasfNPsmb5ecsHNq7IkFIle0DsrPuD6ENldXcLWNebdZqAmgfPV0NmaKI9nGgNgN0LqUZB2eXa7jpOz0wmuGiX6CTUqqJdxLvibtcyG1oHbUBUFK7gL0VTLcA8uj7ZOdd+O0doD9fKQM8gAwwFRd2NeIPEp8IY+ivmqRmSwMep0YknyWFhep7maEOgn20aUgZK4R7HVxud8vC1j/1YPLALUOerSXCBnA8HGTUcdKuy0PmlM=' diff --git a/old_travis/build_platforms.sh b/old_travis/build_platforms.sh deleted file mode 100755 index 98e1fb3..0000000 --- a/old_travis/build_platforms.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -mkdir -p dist -mkdir -p assets -mkdir -p scripts - - - -# Debian platform -platform="debian" test_platforms="debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04 centos:7 centos:8" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi -platform="debian9" test_platforms="debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04 centos:7 centos:8" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi - -# Alpine platform -platform="alpine" test_platforms="alpine:latest alpine:3 alpine:3.8" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi -platform="alpine3.8" test_platforms="alpine:latest alpine:3 alpine:3.8" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi - -# CentOS platform -platform="centos" test_platforms="centos:8 centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi -# CentOS 7 platform -platform="centos7" test_platforms="centos:8 centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi - -# CentOS 8 platform -platform="centos8" test_platforms="centos:8 debian:10 ubuntu:20.04" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi - -# CentOS 6 platform -platform="centos6" test_platforms="centos:6 centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04" ./build_and_test_platform.sh -retval=$? -if [[ retval -ne 0 ]]; then - exit $retval -fi - diff --git a/setup/CentOS-Base.repo b/setup/CentOS-Base.repo deleted file mode 100644 index 611bf6e..0000000 --- a/setup/CentOS-Base.repo +++ /dev/null @@ -1,39 +0,0 @@ -[C6.10-base] -name=CentOS-6.10 - Base -baseurl=http://vault.centos.org/6.10/os/$basearch/ -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 -enabled=1 -metadata_expire=never - -[C6.10-updates] -name=CentOS-6.10 - Updates -baseurl=http://vault.centos.org/6.10/updates/$basearch/ -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 -enabled=1 -metadata_expire=never - -[C6.10-extras] -name=CentOS-6.10 - Extras -baseurl=http://vault.centos.org/6.10/extras/$basearch/ -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 -enabled=1 -metadata_expire=never - -[C6.10-contrib] -name=CentOS-6.10 - Contrib -baseurl=http://vault.centos.org/6.10/contrib/$basearch/ -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 -enabled=0 -metadata_expire=never - -[C6.10-centosplus] -name=CentOS-6.10 - CentOSPlus -baseurl=http://vault.centos.org/6.10/centosplus/$basearch/ -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 -enabled=0 -metadata_expire=never From f168e9158dee68de0d921d69a59820961d284662 Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 3 Jan 2023 13:57:41 -0800 Subject: [PATCH 5/9] ruby-3.2.0, fix compilation on amzn Signed-off-by: Sean Porter --- Dockerfile.amzn1 | 3 ++- Dockerfile.amzn2 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile.amzn1 b/Dockerfile.amzn1 index 319b312..1adc283 100644 --- a/Dockerfile.amzn1 +++ b/Dockerfile.amzn1 @@ -4,7 +4,8 @@ ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' -RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl +RUN yum update -y && yum groupinstall -y "Development Tools" +RUN yum install -y curl openssl-devel libffi-devel readline-devel psych psych-devel libyaml-devel RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz -o ruby-install-0.8.5.tar.gz && \ tar -xzvf ruby-install-0.8.5.tar.gz && \ diff --git a/Dockerfile.amzn2 b/Dockerfile.amzn2 index f467086..bad01b1 100644 --- a/Dockerfile.amzn2 +++ b/Dockerfile.amzn2 @@ -4,7 +4,8 @@ ARG RUBY_VERSION=3.2.0 ARG ASSET_VERSION=local_build ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)' -RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl +RUN yum update -y && yum groupinstall -y "Development Tools" +RUN yum install -y curl openssl-devel libffi-devel readline-devel psych psych-devel libyaml-devel RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz -o ruby-install-0.8.5.tar.gz && \ tar -xzvf ruby-install-0.8.5.tar.gz && \ From 4b2c2604188975578564cc42bfd5cda23de86e6e Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 3 Jan 2023 14:54:19 -0800 Subject: [PATCH 6/9] ruby-3.2.0, fixed debian 9 asset path Signed-off-by: Sean Porter --- Dockerfile.debian9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.debian9 b/Dockerfile.debian9 index 9cd509b..c474fd3 100644 --- a/Dockerfile.debian9 +++ b/Dockerfile.debian9 @@ -17,7 +17,7 @@ RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd { for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done RUN mkdir /assets/ && \ - export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_debian_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ + export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_debian9_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \ tar -czf $SENSU_ASSET -C /opt/rubies/ruby-${RUBY_VERSION}/ . ENV PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin From 627f9f8afca5a5a4948131b3547c7f215fc4b52d Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 3 Jan 2023 19:06:33 -0800 Subject: [PATCH 7/9] ruby-3.2.0, removed ubuntu 18.04 from debian10 test platform Signed-off-by: Sean Porter --- build_scripts/build_debian_platforms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_scripts/build_debian_platforms.sh b/build_scripts/build_debian_platforms.sh index fd2e1ac..ded38dd 100755 --- a/build_scripts/build_debian_platforms.sh +++ b/build_scripts/build_debian_platforms.sh @@ -20,7 +20,7 @@ if [[ retval -ne 0 ]]; then fi -platform="debian10" test_platforms="debian:10 ubuntu:18.04 ubuntu:20.04 centos:8" ./build_and_test_platform.sh +platform="debian10" test_platforms="debian:10 ubuntu:20.04 centos:8" ./build_and_test_platform.sh retval=$? if [[ retval -ne 0 ]]; then exit $retval From 31df9876ea534579d4eed3597094c81b8b5edfc5 Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 3 Jan 2023 20:10:59 -0800 Subject: [PATCH 8/9] ruby 3.2.0, updated bonsai config Signed-off-by: Sean Porter --- .bonsai.yml | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/.bonsai.yml b/.bonsai.yml index d6ce66e..3e36bf1 100644 --- a/.bonsai.yml +++ b/.bonsai.yml @@ -3,7 +3,7 @@ description: "#{repo}" builds: - platform: "alpine" arch: "amd64" - asset_filename: "#{repo}_#{version}_ruby-2.4.4_alpine_linux_amd64.tar.gz" + asset_filename: "#{repo}_#{version}_ruby-3.2.0_alpine_linux_amd64.tar.gz" sha_filename: "#{repo}_#{version}_sha512-checksums.txt" filter: - "entity.system.os == 'linux'" @@ -12,35 +12,15 @@ builds: - "entity.system.platform_version.split('.')[0] == '3'" - platform: "debian" arch: "amd64" - asset_filename: "#{repo}_#{version}_ruby-2.4.4_debian_linux_amd64.tar.gz" + asset_filename: "#{repo}_#{version}_ruby-3.2.0_debian_linux_amd64.tar.gz" sha_filename: "#{repo}_#{version}_sha512-checksums.txt" filter: - "entity.system.os == 'linux'" - "entity.system.arch == 'amd64'" - "entity.system.platform_family == 'debian'" -- platform: "centos6" - arch: "amd64" - asset_filename: "#{repo}_#{version}_ruby-2.4.4_centos6_linux_amd64.tar.gz" - sha_filename: "#{repo}_#{version}_sha512-checksums.txt" - filter: - - "entity.system.os == 'linux'" - - "entity.system.arch == 'amd64'" - - "entity.system.platform != 'amazon'" - - "entity.system.platform_family == 'rhel'" - - "parseInt(entity.system.platform_version.split('.')[0]) == 6" -- platform: "centos7" - arch: "amd64" - asset_filename: "#{repo}_#{version}_ruby-2.4.4_centos7_linux_amd64.tar.gz" - sha_filename: "#{repo}_#{version}_sha512-checksums.txt" - filter: - - "entity.system.os == 'linux'" - - "entity.system.arch == 'amd64'" - - "entity.system.platform != 'amazon'" - - "entity.system.platform_family == 'rhel'" - - "parseInt(entity.system.platform_version.split('.')[0]) == 7" - platform: "centos8" arch: "amd64" - asset_filename: "#{repo}_#{version}_ruby-2.4.4_centos8_linux_amd64.tar.gz" + asset_filename: "#{repo}_#{version}_ruby-3.2.0_centos8_linux_amd64.tar.gz" sha_filename: "#{repo}_#{version}_sha512-checksums.txt" filter: - "entity.system.os == 'linux'" @@ -50,7 +30,7 @@ builds: - "parseInt(entity.system.platform_version.split('.')[0]) == 8" - platform: "amzn1" arch: "amd64" - asset_filename: "#{repo}_#{version}_ruby-2.4.4_amzn1_linux_amd64.tar.gz" + asset_filename: "#{repo}_#{version}_ruby-3.2.0_amzn1_linux_amd64.tar.gz" sha_filename: "#{repo}_#{version}_sha512-checksums.txt" filter: - "entity.system.os == 'linux'" @@ -59,7 +39,7 @@ builds: - "entity.system.platform_version.split('.')[0] == '2018'" - platform: "amzn2" arch: "amd64" - asset_filename: "#{repo}_#{version}_ruby-2.4.4_amzn2_linux_amd64.tar.gz" + asset_filename: "#{repo}_#{version}_ruby-3.2.0_amzn2_linux_amd64.tar.gz" sha_filename: "#{repo}_#{version}_sha512-checksums.txt" filter: - "entity.system.os == 'linux'" From 243ec40c152213fe72e36a8f37e488572f242111 Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 3 Jan 2023 20:23:57 -0800 Subject: [PATCH 9/9] ruby-3.2.0, more readme edits Signed-off-by: Sean Porter --- README.md | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 63a4b97..01c265b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -# Sensu Go Ruby Runtime Assets -[![Build Status](https://travis-ci.org/sensu/sensu-ruby-runtime.svg?branch=master)](https://travis-ci.org/sensu/sensu-ruby-runtime) +# Sensu Go Ruby 3.2 Runtime Assets This project provides [Sensu Go Assets][sensu-assets] containing portable Ruby runtimes (for various platforms), based on the excellent [ruby-install project @@ -11,27 +10,20 @@ systems running the new Sensu Go Agent via the new Sensu's new Asset framework (i.e. avoiding solutions that would require a Ruby runtime to be redundantly packaged with every ruby-based plugin). -This same project may be used to build Sensu Assets for Ruby-based plugins via -[`bundler`][bundler] or other similar tools. We'll share more information on -building Ruby-based assets with third-party gem depdencies using Bundler soon; -in the interim, please review the instructions below for more information on -how to get started with this project. - [sensu-assets]: https://docs.sensu.io/sensu-go/5.1/reference/assets/ [ruby-install]: https://github.com/postmodern/ruby-install [sensu-plugins]: https://github.com/sensu-plugins/ -[bundler]: https://bundler.io ## Platform Coverage: - Currently this repository only supports a subset of Linux distribution by making use of Docker containers to build and test. - If you would like extend the coverage, please take a look at the Github Action integration and associated build scripts. We're happy to take pull requests that extending the platform coverage. Here's the current platform matrix that we are testing for as of the 0.1 release: + +Currently this repository only supports a subset of Linux distribution by making use of Docker containers to build and test. +If you would like extend the coverage, please take a look at the Github Action integration and associated build scripts. We're happy to take pull requests that extending the platform coverage. Here's the current platform matrix that we are testing for: | Asset Platform | Tested Operating Systems Docker Images | |:---------------|:-------------------------| | alpine (based on alpine:3.8) | Alpine(3, 3.8, latest) | -| centos7 (based on centos:7) | Centos(7,8), Debian(8, 9, 10), Ubuntu(14.04, 16.04, 18.04, 20.04) | | centos8 (based on centos:8) | Centos(8), Debian(10), Ubuntu(20.04) | -| debian (based on debian:9) | Debian(8, 9, 10), Ubuntu(14.04, 16.04, 18.04, 20.04), Centos(7,8) | +| debian (based on debian:9) | Debian(9, 10), Ubuntu(14.04, 16.04, 18.04, 20.04), Centos(7,8) | | amnz1 (based on amazonlinux:1) | Debian(8, 9, 10), Ubuntu(14.04, 16.04, 18.04, 20.04), Centos(7,8) | | amnz2 (based on amazonlinux:2) | Debian(10), Ubuntu(18.04, 20.04), Centos(8) |