Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensu run time at arm centos #29

Open
lk3687051 opened this issue Mar 24, 2020 · 1 comment
Open

sensu run time at arm centos #29

lk3687051 opened this issue Mar 24, 2020 · 1 comment

Comments

@lk3687051
Copy link

This is my Docker file.
FROM arm64v8/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
ENV http_proxy=http://172.20.22.18:1081
ENV https_proxy=https://172.20.22.18:1081

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

RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install ffi

Add by luke

RUN PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install -E sensu-plugins-process-checks
sensu-plugins-network-checks sensu-plugins-memory-checks sensu-plugins-load-checks sensu-plugins-cpu-checks
sensu-plugins-disk-checks sensu-plugins-ssl sensu-plugins-io-checks sensu-plugins-filesystem-checks
sensu-plugins-load-checks sensu-plugins-raid-checks sensu-plugins-uptime-checks

RUN yum install -y sysstat
RUN mv /usr/bin/iostat /opt/rubies/ruby-${RUBY_VERSION}/bin/

end

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

when I create the asset. it can not running okay.
image

Then I test on the system, if I change the /var/cache/sensu/sensu-agent/338b88b568a3213fa234640da2e037d1487fc3c639bc62340f2fb71eac8af9a90566cffc768d15035406ac5c049350006d73f3a07ae15f9528e1c6a9af2944cb to some short path, It works fine.

How can I fix the problem.

@lk3687051
Copy link
Author

@jspaleta hi, Do you have some comment of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant