Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit 44763bb

Browse files
committed
Update the mode of the scripts, remove the explicitly named node in the config
1 parent 51175e0 commit 44763bb

File tree

4 files changed

+27
-16
lines changed

4 files changed

+27
-16
lines changed

docker/riak/bin/automatic_clustering.sh

100644100755
File mode changed.

docker/riak/bin/newrelic-plugin-agent.sh

100644100755
-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/sh
22
# Replace the name of the node
33
sed -i 's/REPLACE_WITH_REAL_KEY/'$NEWRELIC_KEY'/g' /etc/newrelic/newrelic-plugin-agent.cfg
4-
sed -i 's/RIAK_NAME/'$NODE_NAME'/g' /etc/newrelic/newrelic-plugin-agent.cfg
54
cd /opt/source
65
python setup.py install
76
newrelic-plugin-agent -c /etc/newrelic/newrelic-plugin-agent.cfg -f

docker/riak/bin/start-cluster.sh

+27-14
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ if env | grep -q "DOCKER_RIAK_DEBUG"; then
66
set -x
77
fi
88

9-
DOCKER_RIAK_CLUSTER_SIZE=${DOCKER_RIAK_CLUSTER_SIZE:-5}
9+
RIAK_CLUSTER_SIZE=${DOCKER_RIAK_CLUSTER_SIZE:-5}
10+
RIAK_AUTOMATIC_CLUSTERING=${DOCKER_RIAK_AUTOMATIC_CLUSTERING:-1}
1011

1112
if docker ps -a | grep "nrpa/riak" >/dev/null; then
1213
echo ""
@@ -24,25 +25,37 @@ echo
2425
echo "Bringing up cluster nodes:"
2526
echo
2627

27-
for index in $(seq -f "%02g" "1" "${DOCKER_RIAK_CLUSTER_SIZE}");
28+
for index in $(seq -f "%02g" "1" "${RIAK_CLUSTER_SIZE}");
2829
do
2930
if [ "${index}" -gt "1" ] ; then
30-
docker run -e "DOCKER_RIAK_CLUSTER_SIZE=${DOCKER_RIAK_CLUSTER_SIZE}" \
31-
-e "DOCKER_RIAK_AUTOMATIC_CLUSTERING=${DOCKER_RIAK_AUTOMATIC_CLUSTERING}" \
32-
-e NEWRELIC_KEY=$NEWRELIC_KEY \
33-
-e NODE_name="riak${index}" \
34-
-P --name "riak${index}" \
35-
--link "riak01" \
31+
docker run -e DOCKER_RIAK_CLUSTER_SIZE=${RIAK_CLUSTER_SIZE} \
32+
-e DOCKER_RIAK_AUTOMATIC_CLUSTERING=${RIAK_AUTOMATIC_CLUSTERING} \
33+
-e NEWRELIC_KEY=${NEWRELIC_KEY} \
34+
-h riak${index} \
35+
-P \
36+
--name riak${index} \
37+
--link riak01 \
3638
--volumes-from SOURCE \
3739
-d nrpa/riak > /dev/null 2>&1
3840
else
39-
docker run -e "DOCKER_RIAK_CLUSTER_SIZE=${DOCKER_RIAK_CLUSTER_SIZE}" \
40-
-e "DOCKER_RIAK_AUTOMATIC_CLUSTERING=${DOCKER_RIAK_AUTOMATIC_CLUSTERING}" \
41-
-e NEWRELIC_KEY=$NEWRELIC_KEY \
42-
-e NODE_name="riak${index}" \
41+
docker run -e DOCKER_RIAK_CLUSTER_SIZE=${RIAK_CLUSTER_SIZE} \
42+
-e DOCKER_RIAK_AUTOMATIC_CLUSTERING=${RIAK_AUTOMATIC_CLUSTERING} \
43+
-e NEWRELIC_KEY=${NEWRELIC_KEY} \
44+
-h riak${index} \
45+
-P \
46+
--name riak${index} \
4347
--volumes-from SOURCE \
44-
-P --name "riak${index}" \
45-
-d nrpa/riak > /dev/null 2>&1
48+
-d nrpa/riak
49+
50+
echo "docker run -e DOCKER_RIAK_CLUSTER_SIZE=${RIAK_CLUSTER_SIZE} \
51+
-e DOCKER_RIAK_AUTOMATIC_CLUSTERING=${RIAK_AUTOMATIC_CLUSTERING} \
52+
-e NEWRELIC_KEY=${NEWRELIC_KEY} \
53+
-h riak${index} \
54+
-P \
55+
--name riak${index} \
56+
--volumes-from SOURCE \
57+
-d nrpa/riak"
58+
#> /dev/null 2>&1
4659
fi
4760

4861
CONTAINER_ID=$(docker ps | egrep "riak${index}[^/]" | cut -d" " -f1)

docker/riak/newrelic-plugin-agent.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Application:
55
wake_interval: 60
66

77
riak:
8-
name: RIAK_NAME
98
host: localhost
109
port: 8098
1110

0 commit comments

Comments
 (0)