Installing the CellStore Manager

Execute the following command in order to run the CellStore Manager:

docker run -d -p <CELLSTORE_PORT>:80 --name cellstore-manager 28msec/cellstore-manager:latest server --endpoint <CELLSTORE_ENDPOINT>

where denotes the host port on which the CellStore Manager will be available.

For instance:

docker run -d -p 83:80 --name cellstore-manager 28msec/cellstore-manager:latest server --endpoint http://secxbrl.28.io/v1

Check the CellStore Manager health, following the instructions in the "Checking the CellStore Manager health" section.

Checking the CellStore Manager health

A quick way to check if the Docker instance started correctly is to run on the CellStore Manager host:

curl 'http://localhost:<CELLSTORE_PORT>/index.html' --write-out "Response code: %{http_code}\n" -o /dev/null --silent

For instance:

curl 'http://localhost:83/index.html' --write-out "Response code: %{http_code}\n" -o /dev/null --silent

On an healthy machine the following output will be produced:

Response code: 200

An unhealthy machine will produce a different response code. In this case to inspect the actual error re-run the same command without --write-out "Response code: %{http_code}\n" -o /dev/null --silent at the end.

Checking the CellStore Manager logs

To check the startup logs on the host machine you can run docker logs cellstore-manager

On an healthy CellStore Manager container the last lines look as follows:

#
# Started CellStore Manager
#

Starting the CellStore Manager automatically at boot time

Make sure that the CellStore Manager is not running by listing the running container with docker ps. Note that when the CellStore Manager is initialized using the docker run command it is started automatically. If the CellStore Manager is running use docker stop cellstore-manager to stop it.

Systemd

Create cellstore-manager service:

sudo tee /etc/systemd/system/cellstore-manager.service <<-EOF
[Unit]
Description=28msec CellStore Manager
Requires=docker.service
After=docker.service

[Service]
Restart=always
RestartSec=30
TimeoutStartSec=60
TimeoutStopSec=300
ExecStart=/usr/bin/docker start -a cellstore-manager
ExecStop=/usr/bin/docker stop -t 30 cellstore-manager

[Install]
WantedBy=multi-user.target
EOF

Enable and start service:

sudo chkconfig cellstore-manager on
sudo systemctl start cellstore-manager

Upstart

sudo tee /etc/init/cellstore-manager.conf <<-EOF
description "28msec CellStore Manager"
start on filesystem and started docker
stop on runlevel [!2345]

normal exit 0
respawn
respawn limit unlimited
kill timeout 60

script
  /usr/bin/docker start -a cellstore-manager
end script
pre-stop script
  /usr/bin/docker stop -t 30 cellstore-manager
end script
EOF

Start service:

sudo service cellstore-manager start

Starting/Stopping the CellStore Manager

When the CellStore Manager is initialized using the docker run command it is started automatically. To start/stop the CellStore Manager you can use the following commands:

If you did not create a service:

docker stop cellstore-manager
docker start cellstore-manager

If you created a systemd service:

sudo systemctl stop cellstore-manager
sudo systemctl start cellstore-manager

If you created a upstart service:

sudo service cellstore-manager stop
sudo service cellstore-manager start

Updating the CellStore Manager

  1. Stop the CellStore Manager container if it is running, as described in the "Starting/Stopping the CellStore Manager" section.
  2. Remove the installed CellStore Manager container. The user data will not be removed.
    docker rm cellstore-manager
    
  3. Follow the instructions in the "Installing the CellStore Manager" section.

Troubleshooting

When configuring the CellStore to be started automatically at boot time, ensure that all needed filesystem are already mounted at service start time. On systemd systems you can use systemctl to check the names of mount services.

For any question or bug reports, please contact us.