Install Standalone Hippo Service
Prerequisite
- Install docker-compose: https://docs.docker.com/compose/reference/
- Download tddms-standalone image in the on-premise environment; The following example set the image path as: transwarp/tddms-standalone:develop
Configuration File Preparation
Copy path /usr/local/standalone-template from image to local side. The local path used in this example is: /root/standalone-template.
docker cp $(docker create --name tc transwarp/tddms-standalone:develop):/usr/local/standalone-template . && docker rm tc
cd standalone-template path, the content will be shown as below:
[root@tw-node46 example]# ll
total 8
drwxr-xr-x 3 root root 4096 Jul 12 19:39 conf
-rw-r--r-- 1 root root 591 Jul 12 19:39 docker-compose.yml
drwxr-xr-x 2 root root 6 Jul 12 19:39 log
The configuration files required for Hippo service reside in conf directory; docker-compose.yml is required for Docker Compose service; log directory is empty and used only for mounting logs.
Container Networking
Using container networking in Standalone Hippo deployment is the most user-friendly way. But there are some limitations when using container networking:
- Cannot be scaled out to cluster mode
- Cross-cluster related features in Hippo are not available, including:
- Copy by query
- Cross-cluster replication
If users would like to apply the features described above (or they are deploying services like ArgoDB, TimeLyre, Scope…), they should consider host networking in Hippo deployment. The example shown below uses container networking as well.
Configure Docker Compose
The content of docker-compose.yml file is listed below:
version: "3"
services:
hippo:
ports:
- "7788:18902"
- "7789:18822"
volumes:
- /mnt/disk1/hippo-standalone-master/data:/vdir/mnt/disk1/shiva-master-hippo/data/
- /mnt/disk1/hippo-standalone-tserver/data:/vdir/mnt/disk1/shiva-tabletserver-hippo/data
- /mnt/disk2/hippo-standalone-tserver/data:/vdir/mnt/disk2/shiva-tabletserver-hippo/data
- /root/standalone-template/log:/var/log/hippo
- /root/standalone-template/conf:/etc/hippo/conf
environment:
CONF_DIR: "/etc/hippo/conf"
LOG_DIR: "/var/log/hippo"
image: "transwarp/tddms-standalone:develop"
A service called “hippo” is configured in this file, and the key items of this service are listed below:
- ports
- Map container ports of Hippo HTTP Server and Webserver to ports on the host
- 18902 is HTTP Server port and should match conf/elasticsearch.yml
- 18822 is Webserver port and should match conf/shiva-restful.sh
- volumes
- First line: configures mount path of Master data. Mount local path /mnt/disk1/hippo-standalone-master/data to /vdir/mnt/disk1/shiva-master-hippo/data/ inside the container. Kindly note: users should create local path manually during the first deployment.
- Second / third line: configures mount path of TServer data. In this example, two disks, disk1 and disk2, are used and mounted to two directories separately:
/vdir/mnt/disk1/shiva-tabletserver-hippo/data and /vdir/mnt/disk2/shivatabletserver-hippo/dataKindly note
users should create the directories manually during the first deployment. The number of disks can be configured on demand.
- Fourth line: configures mount path for logs inside the container. The local patch can be changed on demand as well. By default, the log will be retained in the log directory of standalone-template
- Fifth line: configures mount path for configuration items inside the container. The items required for Hippo service reside in standalone-template directory
Kindly note
the data directories of Master and TServer should match the content in configuration file of conf directory. Details will be listed in below chapter
- environment
- CONF_DIR and LOG_DIR should match the mount path of configuration and log directory inside the container
- image
- The image to be used for this Hippo service. If image tag is not “transwarp/tddms-standalone:develop”, please adjust it accordingly
Configure Path for Disk Device
With container networking, users should only configure the disk path for Master and TServer:
-
master.conf: data_path=/vdir/mnt/disk1/shiva-master-hippo/data, represents that Master data will be stored in this container directory. Kindly note: this path must match the mount path of Docker Compose configuration file (volumes). There will be only one disk path used for Master data
-
store.conf: configures disk path for TServer. There are two stores configured in the template by default and data_dir represents the directory inside the container. Kindly note: this path must match the mount path mentioned in Docker Compose configuration file (volumes) as well
Start / Stop Service
After configuring the required items, users can perform start operation via “docker-compose up” in standalone-template directory. When “Hippo standalone start successfully” is output, the start process is done.
- Start service from backend in Detached mode via “docker-compose up -d”
- Check service status via “docker-compose ps”
- Stop service via “docker-compose stop hippo”
Host Networking (Recommended)
Besides disk path, Hippo IP, port and Master Group are required to configure when using host networking in Standalone Hippo deployment.
Configure Docker Compose
The content of docker-compose.yml file, which is the configuration file of Docker Compose Service, is listed below:
version: "3"
services:
hippo:
network_mode: "host"
volumes:
- /mnt/disk1/hippo-standalone-master/data:/vdir/mnt/disk1/shiva-master-hippo/data/
- /mnt/disk1/hippo-standalone-tserver/data:/vdir/mnt/disk1/shiva-tabletserver-hippo/data
- /mnt/disk2/hippo-standalone-tserver/data:/vdir/mnt/disk2/shiva-tabletserver-hippo/data
- /root/standalone-template/log:/var/log/hippo
- /root/standalone-template/conf:/etc/hippo/conf
environment:
CONF_DIR: "/etc/hippo/conf"
LOG_DIR: "/var/log/hippo"
image: "transwarp/tddms-standalone:develop"
The disparity between this file and the previous one for container networking is the network mode setting:
- network_mode: set to host
Configure IP
Users should configure Hippo IP in two configuration files listed below. 10.0.0.46 is the example IP address used here.
- master.conf: public_host=10.0.0.46
- topology.conf: public_host=10.0.0.46
Configure Port
Users should configure ports, which can be adjusted accordingly later, for Master, TServer, HTTP Server and Webserver.
- Master port: configures "master_service_port=18650" in master.conf, which represents that Master will use 4 consecutive ports starting with 18650
- TServer port: configures "manage_service_port=18702" in tabletserver.conf, which represents that TServer will use 4 consecutive ports starting with 18702
- HTTP port: configures "http.port: 18902" in elasticsearch.yml, which represents that HTTP Server will be listening at port 18902
- Webserver port: configures "-Dhttp_port=18822" in shiva-restful.sh, which represents that Webserver will be listening at port 18822
- Kindly note: Master and TServer ports will be fixed during the initial deployment and are now allowed to change later
Configure Master Group
Users should configure "export MASTER_GROUP=10.0.0.46:18650", which is IP and port for Standalone mode, in shiva-env.sh file. Master Group is the service address of Master actually.
MISC
Alter Log Directory in The Container
For Standalone mode, the default log directory in the container is /var/log/hippo. If users would like o
change, they can perform the following operations:
- Alter related items of log directories configured in volumes and environment in docker-compose.yml
- Alter --log_dir in master.falgs
- Alter fileName and filePattern of log4j in log4j2.xml.webserver
- Alter path.logs in search.yml
- Alter HeapDumpPath and ErrorFile in jvm.options
- Alter fileName and filePattern of log4j in log4j2.xml.tserver
- Alter fileName and filePattern of log4j in log4j2.xml.httpserver
Alter Configuration File Directory in The Container
For Standalone mode, the default configuration file directory in the container is /etc/hippo/conf. If users would like to change, they can perform the operations listed below:
- Alter related items of configuration file directories in volumes and environment in docker-compose.yml
- Alter the following items in tabletserver.conf:
- topology_conf
- store_conf
- dynamic_config_path
- jvm_options_file
- log4j_file
- search_conf_file
- plugin_path
JVM Heap Parameter Configuration
Hippo Standalone mode will kick off HTTP Server and Webserver Java processes. When memory is limited, users may need adjust JVM heap size accordingly.
- Configure heap size for HTTP Server in shiva-http-server.sh (JAVA_OPS). The size should not be too small; At least 8 GB; Defaults to 31 GB
- Configure heap size for Webserver in shiva-restful.sh (JAVA_OPS)
Configure JVM Subprocess For Service
Hippo will kick off subprocess in TServer, and the related parameters in subprocess are configured in jvm.options. The heap size defaults to 31 GB.
Configure Windows
Hippo Standalone mode is available in Windows. Users should apply one parameter when deployed in Windows:
- Configure " --workaround_for_docker_on_windows = true" in tabletserver.flags
Updated 7 months ago