dist/docker/redhat: Start up JMX proxy and include tools

Make the Docker image more user-friendly by starting up JMX proxy in the
background and install Scylla tools in the image. Also add a welcome
banner like we have with our AMI so that users have pointers to nodetool
and cqlsh, as well as our documentation.
Message-Id: <1460376059-3678-1-git-send-email-penberg@scylladb.com>
This commit is contained in:
Pekka Enberg
2016-04-11 15:00:59 +03:00
parent 355c3ea331
commit 144d1e3216
3 changed files with 31 additions and 3 deletions

View File

@@ -7,13 +7,17 @@ ADD scylla.repo /etc/yum.repos.d/
RUN yum -y clean expire-cache
RUN yum -y update
RUN yum -y remove boost-thread boost-system
RUN yum -y install scylla-server hostname
RUN yum -y install scylla-server scylla-jmx scylla-tools hostname
RUN yum clean all
ADD start-scylla /start-scylla
RUN chown scylla /start-scylla
ADD bashrc /var/lib/scylla/.bashrc
RUN chown scylla /var/lib/scylla/.bashrc
USER scylla
EXPOSE 10000 9042 9160 7000 7001
VOLUME /var/lib/scylla
CMD /start-scylla
CMD /start-scylla && /bin/bash

20
dist/docker/redhat/bashrc vendored Normal file
View File

@@ -0,0 +1,20 @@
echo
echo ' _____ _ _ _____ ____ '
echo ' / ____| | | | | __ \| _ \ '
echo ' | (___ ___ _ _| | | __ _| | | | |_) |'
echo ' \___ \ / __| | | | | |/ _` | | | | _ < '
echo ' ____) | (__| |_| | | | (_| | |__| | |_) |'
echo ' |_____/ \___|\__, |_|_|\__,_|_____/|____/ '
echo ' __/ | '
echo ' |___/ '
echo ''
echo ''
echo 'Nodetool:'
echo ' nodetool help'
echo 'CQL Shell:'
echo ' cqlsh'
echo 'More documentation available at: '
echo ' http://www.scylladb.com/doc/'
echo
export CQLSH_HOST=$(hostname -i)

View File

@@ -9,4 +9,8 @@ sed -e "s/seeds:.*/seeds: $IP/g" /var/lib/scylla/conf/scylla.yaml > $HOME/scylla
--options-file $HOME/scylla.yaml \
--listen-address $IP \
--rpc-address $IP \
--network-stack posix
--network-stack posix &> /dev/null &
source /etc/sysconfig/scylla-jmx
export SCYLLA_HOME SCYLLA_CONF
exec /usr/lib/scylla/jmx/scylla-jmx -l /usr/lib/scylla/jmx &> /dev/null &