Installing CellStore with Docker, Part 5: Creating CellStore service
Estimated reading time: 1 minuteThese instructions are meant for the first installation only of CellStore. For updates, refer to the update instruction.
- 1: Docker
- 2: Database
- 3: Creating CellStore container
- 4: Starting CellStore
- 5: Creating CellStore service
- 6: Setup DTS cache
- 7: Additional Configuration and Optimization
CellStore will not start automatically when the host machine is started. You can do so manually following the instructions in the Managing the CellStore section.
If you want CellStore to start automatically, you need to create a service in the host machine, according to the init system of the host machine.
For your convenience we provide below instructions for systemd and upstart. While these instructions are suitable to most distributions, you might need to make amends in some cases.
Systemd
We start by writing the service definition:
tee /etc/systemd/system/cellstore.service <<-EOF
[Unit]
Description=Reportix CellStore
Requires=docker.service
After=docker.service
[Service]
Restart=on-failure
RestartSec=30
TimeoutStartSec=120
TimeoutStopSec=120
ExecStart=/usr/bin/docker start -a cellstore
ExecStop=/usr/bin/docker stop -t 120 cellstore
[Install]
WantedBy=multi-user.target
EOF
Then we enable and start the service:
chkconfig cellstore on
systemctl start cellstore
Upstart
We start by writing the service definition:
tee /etc/init/platform.conf <<-EOF
description "Reportix CellStore"
start on filesystem and started docker
stop on runlevel [!2345]
normal exit 0
respawn
respawn limit unlimited
kill timeout 120
script
/usr/bin/docker start -a cellstore
end script
pre-stop script
/usr/bin/docker stop -t 120 cellstore
end script
EOF
Then we start the service:
sudo service platform start
Get started
After setting up CellStore, try learning the basics over at Getting started with CellStore.
cellstore, install, installation, documentation, container, image