Commit bbadc49 1 parent 6adf8ad commit bbadc49 Copy full SHA for bbadc49
File tree 3 files changed +18
-1
lines changed
3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ ENV TINI_VERSION v0.18.0
12
12
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
13
13
RUN chmod +x /tini
14
14
15
+ ENV MCAC_VERSION 0.1.2
16
+ ADD https://github.com/datastax/metric-collector-for-apache-cassandra/releases/download/v${MCAC_VERSION}/datastax-mcac-agent-${MCAC_VERSION}.tar.gz /opt/mcac-agent.tar.gz
17
+ RUN mkdir /opt/mcac-agent && tar zxvf /opt/mcac-agent.tar.gz -C /opt/mcac-agent --strip-components 1 && rm /opt/mcac-agent.tar.gz
18
+
15
19
# backwards compat with upstream ENTRYPOINT
16
20
COPY scripts/docker-entrypoint.sh /usr/local/bin/
17
21
RUN chmod +x /usr/local/bin/docker-entrypoint.sh && \
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ ENV TINI_VERSION v0.18.0
12
12
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
13
13
RUN chmod +x /tini
14
14
15
+ ENV MCAC_VERSION 0.1.2
16
+ ADD https://github.com/datastax/metric-collector-for-apache-cassandra/releases/download/v${MCAC_VERSION}/datastax-mcac-agent-${MCAC_VERSION}.tar.gz /opt/mcac-agent
17
+
15
18
# backwards compat with upstream ENTRYPOINT
16
19
COPY scripts/docker-entrypoint.sh /usr/local/bin/
17
20
RUN chmod +x /usr/local/bin/docker-entrypoint.sh && \
Original file line number Diff line number Diff line change @@ -54,6 +54,16 @@ if [ "$1" = 'mgmtapi' ]; then
54
54
# 1. configbuilder will overwrite the cassandra-env-sh, so we don't want to set this after
55
55
# 2. We don't wan't operator or configbuilder to care so much about the version number or
56
56
# the fact this jar even exists.
57
+
58
+ if ! grep -qxF " JVM_OPTS=\"\$ JVM_OPTS -javaagent:/opt/mcac-agent/lib/datastax-mcac-agent.jar\" " < /etc/cassandra/cassandra-env.sh ; then
59
+ # ensure newline at end of file
60
+ echo " " >> /etc/cassandra/cassandra-env.sh
61
+ echo " JVM_OPTS=\"\$ JVM_OPTS -javaagent:/opt/mcac-agent/lib/datastax-mcac-agent.jar\" " >> /etc/cassandra/cassandra-env.sh
62
+
63
+ echo " " >> /opt/mcac-agent/config/metric-collector.yaml
64
+ echo " data_dir_max_size_in_mb: 100" >> /opt/mcac-agent/config/metric-collector.yaml
65
+ fi
66
+
57
67
if ! grep -qxF " JVM_OPTS=\"\$ JVM_OPTS -javaagent:/etc/cassandra/datastax-mgmtapi-agent-0.1.0-SNAPSHOT.jar\" " < /etc/cassandra/cassandra-env.sh ; then
58
68
# ensure newline at end of file
59
69
echo " " >> /etc/cassandra/cassandra-env.sh
@@ -63,7 +73,7 @@ if [ "$1" = 'mgmtapi' ]; then
63
73
CASSANDRA_RPC_ADDRESS=' 0.0.0.0'
64
74
CASSANDRA_BROADCAST_RPC_ADDRESS=" $( _ip_address) "
65
75
66
- # Not needed as the operator will set all this but leaving for testing
76
+ # Not needed as the operator will set all this but leaving for testing
67
77
for yaml in \
68
78
cluster_name \
69
79
endpoint_snitch \
You can’t perform that action at this time.
0 commit comments