Add '--smp', '--memory', and '--overprovisioned' options to the Docker
image. The options are written to /etc/scylla.d/docker.conf file, which
is picked up by the Scylla startup scripts.
You can now, for example, restrict your Docker container to 1 CPU and 1
GB of memory with:
$ docker run --name some-scylla penberg/scylla --smp 1 --memory 1G --overprovisioned 1
Needed by folks who want to run Scylla on Docker in production.
Cc: Sasha Levin <alexander.levin@verizon.com>
Message-Id: <1470680445-25731-1-git-send-email-penberg@scylladb.com>
(cherry picked from commit 6a5ab6bff4)
21 lines
530 B
Python
Executable File
21 lines
530 B
Python
Executable File
#!/usr/bin/env python3
|
|
import os
|
|
import scyllasetup
|
|
import logging
|
|
import commandlineparser
|
|
|
|
logging.basicConfig(filename="/var/log/scylla/docker-entrypoint.log", level=logging.DEBUG, format="%(message)s")
|
|
|
|
try:
|
|
arguments = commandlineparser.parse()
|
|
setup = scyllasetup.ScyllaSetup(arguments)
|
|
setup.developerMode()
|
|
setup.cpuSet()
|
|
setup.io()
|
|
setup.scyllaYAML()
|
|
setup.cqlshrc()
|
|
setup.arguments()
|
|
os.system("/usr/bin/supervisord -c /etc/supervisord.conf")
|
|
except:
|
|
logging.exception('failed!')
|