Minimal snmpd configuration for the Docker containers. Also change the pid-dir to /var/run/ since
that is what all the tests are expecting. Can we pass the tests now?
This commit is contained in:
parent
4182ee3540
commit
f9d2acf025
6 changed files with 18 additions and 12 deletions
|
|
@ -122,9 +122,11 @@ RUN apk add --update flex bison fcgi-dev
|
||||||
RUN apk add --update net-snmp net-snmp-tools
|
RUN apk add --update net-snmp net-snmp-tools
|
||||||
|
|
||||||
# Some custom configuration for SNMP
|
# Some custom configuration for SNMP
|
||||||
RUN sed -i 's/#rocommunity public localhost/rocommunity public localhost/' /etc/snmp/snmpd.conf
|
RUN echo "master agentx" > /etc/snmp/snmpd.conf
|
||||||
RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmpd.conf
|
RUN echo "agentaddress 127.0.0.1" >> /etc/snmp/snmpd.conf
|
||||||
RUN echo "agentxperms 777 777" >> /etc/snmpd.conf
|
RUN echo "rwcommunity public localhost" >> /etc/snmp/snmpd.conf
|
||||||
|
RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmp/snmpd.conf
|
||||||
|
RUN echo "agentxperms 777 777" >> /etc/snmp/snmpd.conf
|
||||||
|
|
||||||
# Test-specific (for test scripts)
|
# Test-specific (for test scripts)
|
||||||
RUN apk add --update sudo curl procps grep make bash expect
|
RUN apk add --update sudo curl procps grep make bash expect
|
||||||
|
|
|
||||||
|
|
@ -123,9 +123,11 @@ RUN apk add --update flex bison fcgi-dev
|
||||||
RUN apk add --update net-snmp net-snmp-tools
|
RUN apk add --update net-snmp net-snmp-tools
|
||||||
|
|
||||||
# Some custom configuration for SNMP
|
# Some custom configuration for SNMP
|
||||||
RUN sed -i 's/#rocommunity public localhost/rocommunity public localhost/' /etc/snmp/snmpd.conf
|
RUN echo "master agentx" > /etc/snmp/snmpd.conf
|
||||||
RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmpd.conf
|
RUN echo "agentaddress 127.0.0.1" >> /etc/snmp/snmpd.conf
|
||||||
RUN echo "agentxperms 777 777" >> /etc/snmpd.conf
|
RUN echo "rwcommunity public localhost" >> /etc/snmp/snmpd.conf
|
||||||
|
RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmp/snmpd.conf
|
||||||
|
RUN echo "agentxperms 777 777" >> /etc/snmp/snmpd.conf
|
||||||
|
|
||||||
# Need to add www user manually, but group www-data already exists on Alpine
|
# Need to add www user manually, but group www-data already exists on Alpine
|
||||||
RUN adduser -D -H -G www-data www-data
|
RUN adduser -D -H -G www-data www-data
|
||||||
|
|
|
||||||
|
|
@ -146,9 +146,11 @@ RUN apk add --update sudo curl procps grep make bash expect
|
||||||
RUN apk add --update net-snmp net-snmp-tools
|
RUN apk add --update net-snmp net-snmp-tools
|
||||||
|
|
||||||
# Some custom configuration for SNMP
|
# Some custom configuration for SNMP
|
||||||
RUN sed -i 's/#rocommunity public localhost/rocommunity public localhost/' /etc/snmp/snmpd.conf
|
RUN echo "master agentx" > /etc/snmp/snmpd.conf
|
||||||
RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmpd.conf
|
RUN echo "agentaddress 127.0.0.1" >> /etc/snmp/snmpd.conf
|
||||||
RUN echo "agentxperms 777 777" >> /etc/snmpd.conf
|
RUN echo "rwcommunity public localhost" >> /etc/snmp/snmpd.conf
|
||||||
|
RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmp/snmpd.conf
|
||||||
|
RUN echo "agentxperms 777 777" >> /etc/snmp/snmpd.conf
|
||||||
|
|
||||||
# Expose https port for restconf
|
# Expose https port for restconf
|
||||||
EXPOSE 80/tcp
|
EXPOSE 80/tcp
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ chmod 775 /usr/local/bin/test/site.sh
|
||||||
|
|
||||||
# Start snmpd, we need this for the SNMP tests and the app clixon_snmp. Log to stdout, then we can
|
# Start snmpd, we need this for the SNMP tests and the app clixon_snmp. Log to stdout, then we can
|
||||||
# use Docker logs to see what's happening.
|
# use Docker logs to see what's happening.
|
||||||
snmpd -Lo -p /run/snmpd.pid
|
snmpd -Lo -p /var/run/snmpd.pid
|
||||||
|
|
||||||
# Alt: let backend be in foreground, but test scripts may
|
# Alt: let backend be in foreground, but test scripts may
|
||||||
# want to restart backend
|
# want to restart backend
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ chmod g+w /www-data/fastcgi_restconf.sock
|
||||||
|
|
||||||
# Start snmpd, we need this for the SNMP tests and the app clixon_snmp. Log to stdout, then we can
|
# Start snmpd, we need this for the SNMP tests and the app clixon_snmp. Log to stdout, then we can
|
||||||
# use Docker logs to see what's happening.
|
# use Docker logs to see what's happening.
|
||||||
snmpd -Lo -p /run/snmpd.pid
|
snmpd -Lo -p /var/run/snmpd.pid
|
||||||
|
|
||||||
# Alt: let backend be in foreground, but test scripts may
|
# Alt: let backend be in foreground, but test scripts may
|
||||||
# want to restart backend
|
# want to restart backend
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ openssl req -x509 -config ./ca.cnf -nodes -newkey rsa:4096 -keyout /etc/ssl/priv
|
||||||
|
|
||||||
# Start snmpd, we need this for the SNMP tests and the app clixon_snmp. Log to stdout, then we can
|
# Start snmpd, we need this for the SNMP tests and the app clixon_snmp. Log to stdout, then we can
|
||||||
# use Docker logs to see what's happening.
|
# use Docker logs to see what's happening.
|
||||||
snmpd -Lo -p /run/snmpd.pid
|
snmpd -Lo -p /var/run/snmpd.pid
|
||||||
|
|
||||||
# Alt: let backend be in foreground, but test scripts may
|
# Alt: let backend be in foreground, but test scripts may
|
||||||
# want to restart backend
|
# want to restart backend
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue