Skip to content
Rob Nelson edited this page Feb 13, 2015 · 1 revision

Running Tate-server - Docker Highly Recommended

  • while it is certainly possible to install and run tate directly on your host, documentation is primarily provided for running via docker.

Requirements

  • requires mazacoind with "txindex=1" set in mazacoin.conf
  • ALL other requirements are documented in the Dockerfile in the root of the project

Host Installation

  • Install mazacoind
  • Follow installation instructions provided in the Dockerfile in the root of the project

Important notes!!!

  • tate requires a proper hostname!!
  • set $HOSTNAME and correctly configure your docker container OR host to use this in /etc/hosts

PORTS

Tate clients expect to connect on ports:

  • 50001 tcp
  • 50002 SSL/tcp
  • 8000 http Mazacoind expects to connect on ports:
  • 12832 RPC
  • 12835 Network Peers

If you're using Docker, remember to open those ports to the host with -p OUTSIDE_PORT:INSIDE_PORT If you're using docker it's best to leave the RPC port unexposed to the local network. You can do this easily in 1 of 3 ways:

  1. use mazaclub/tateserver-mazacoind - fully self-contained
  2. use --link=mazacoind_container_name:mazacoind when starting your tate-server container
  3. provide another network route, i.e. via coreos/flannel or openvpn

Use Examples

We recommend using Tate-server via Docker. We've built a couple different methods for you do to this

  1. Use combined tateserver-mazacoind image with host bindmounts
  2. Use combined image with datacontainer and --volumes-from
  3. Use Separate images for mazacoind and tate-server, with host bindmounts
  4. Use separate images, with datacontainer

Of those option 1 is the most straightforward:

  1. make local directories for your tateserver & mazacoind data
    • mkdir -pv /opt/data/{home/maza, var/tate-server}
  2. If you have a mazacoin.conf, install it now
    mkdir /opt/data/TATE/home/maza/.mazacoin
    cp /your/mazacoin.conf /opt/data/TATE/home/maza/.mazacoin/mazacoin.conf
    chmod 0600 /opt/data/TATE/home/maza/.mazacoin.conf.
  1. If you have mazacoin blockdata in /opt/data/TATE/home/maza/.mazacoin
    • Was txindex=1 set in the last running mazacoin.conf in that dir?
    • Is txindex=1 set now?
    • If txindex=1 was NOT set you must now add reindex=1 to mazacoin.conf
    • Tate requires a fully indexed blockchain, and must reindex if it is not present
    • the mazachain only takes a few minutes to DL, consider removing the blockdata, redownloading the mazachain
  2. If you have no data, and wish a quickstart, a Docker image with recent data is provided
     docker pull mazaclub/tateserver-data
     docker run -it --rm -v /opt/data/TATE/var/tate-server:/data/tate /drop-ship.sh tate
 Mazacoin blockdata is also provided in that image:
     docker run -it --rm -v /opt/data/TATE/home/maza:/data/maza /drop-ship.sh maza
  1. Now that you have a data directory, and maybe some data, start the docker image:
     docker run -d \
       -v /opt/data/TATE/home/maza:/home/maza \
       -v /opt/data/TATE/var/tate-server:/var/tate-server \
       -v /opt/data/TATE/app/certs:/app/certs \ 
       -e HOSTNAME=your.local.fqdn \
       -h your.local.fqdn \
       -p 50001:50001 \
       -p 50002:50002 \
       -p 8000:8000 \
       -p 12835:12835 \
       mazaclub/tateserver-mazacoind

It didnt work!

  1. Is mazacoin.conf set correctly?
    • check rpcpassword, txindex, reindex, and rpcallowip settings
  2. Does Tate know the right HOSTNAME?
  3. Are you using the start script provided in app/start.sh?
    • ensure you're setting all of the Environment Variables correctly,
    • defaults are provided
    • if using host installations, manually set these in the script
    • if using docker use -e VAR=value to override defaults

How the Docker images work

mazaclub/tateserver-mazacoind is the combination of mazaclub/mazacoind-base and mazaclub/tate-server

The images are based on phusion/baseimage. This image provides a "mini" init process

  • /etc/service/PROCESS/run starts each daemon required
    • /etc/service/mazacoind/run for example,starts mazacoind
  • Daemons start and run in foreground init will restart on crash/exit
  • Our images configure apps to run as UID 2211 GID 2211 (maza.maza)