build_and_setup_exchange_instance.sh allows to be downloaded from gitlab and next executed without cloning repository.
Only dockerized deployment is supported, to eliminate need to install hived dependencies on host machine.
Script covers following deployment scenarios:
- On local machine exists already prebuilt image to be deployed - then source checkout and build procedures are skipped.
- If build step is needed, it can be done by checkout of specified branch or using existing directory containing hived sources (see
Prepare step for Hived node data directory
- If not present,
config.inifile is automatically copied from doc/example_config.ini. Otherwise it is left untouched.
block_log.artifactsfile(s) are missing in the
blockchainsudirectory located inside specified node data-directory, they will be automatically downloaded. By default, there is used
https://gtg.openhive.network/get/blockchain/compressed/url, which can be customized by passing alternate url to
- Additional (regular) hived options can be passed directly to the script to intruct hived to perform some actions (i.e. loading snapshot or performing a replay).
--help to display its options.
./scripts/build_and_setup_exchange_instance.sh parameters: --help Usage: ./scripts/build_and_setup_exchange_instance.sh <image_tag> [OPTION[=VALUE]]... [<hived_option>]... Setup script for a Hived instance dedicated to use of exchange purposes. Allows to (optionally build if not present) image containing preconfigured hived instance and next start a container holding it. If you need to rebuild image, just remove the image using docker tools OPTIONS: --webserver-http-endpoint=<endpoint> Allows to map hived internal http endpoint to specified external one. As endpoint can be passed simple port number or ip-address:port. --webserver-ws-endpoint=<endpoint> Allows to map hived internal WS endpoint to specified external one. As endpoint can be passed simple port number or ip-address:port. --p2p-endpoint=<endpoint> Allows to map hived internal P2P endpoint to specified external one. As endpoint can be passed simple port number or ip-address:port. --data-dir=DIRECTORY_PATH Allows to specify given directory as hived data directory. This directory should contain a config.ini file to be used by hived --shared-file-dir=DIRECTORY_PATH Allows to specify dedicated location for shared_memory_file.bin --branch=branch Optionally specify a branch of Hived to checkout and build. Defaults to master branch. --use-source-dir=PATH Allows to specify explicit Hived source directory instead of performing git clone/checkout. ./scripts/build_and_setup_exchange_instance.sh: line 42: blockchain: command not found --block-log-base-url=url Optional, allows to download Hive blockchain block_log file(s) from given url. File(s) will be downloaded into subdirectory located inside specified node data directory (by --data-dir option). --name=CONTAINER_NAME Allows to specify a dedicated name to the spawned container instance --docker-option=OPTION Allows to specify additional docker option, to be passed to underlying docker run spawn. --option-file=PATH Allows to specify options through file --help Display this help screen and exit