Skip to content

EdgeLake/docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying EdgeLake

The following provides direction to deploy EdgeLake using makefile for Docker-based deployment.

Requirements

  • Docker
  • docker-compose
  • Makefile
sudo snap install docker
sudo apt-get -y install docker-compose 
sudo apt-get -y install make
 
# Grant non-root user permissions to use docker
USER=`whoami` 
sudo groupadd docker 
sudo usermod -aG docker ${USER} 
newgrp docker

Prepare Machine

Clone docker-compose from EdgeLake repository

git clone https://github.com/EdgeLake/docker-compose
cd docker-compose

Deploy EdgeLake via Docker

  1. Edit LEDGER_CONN in query and operator using IP address of master node
  2. Update .env configurations for the node(s) being deployed
#--- General ---
# Information regarding which AnyLog node configurations to enable. By default, even if everything is disabled, AnyLog starts TCP and REST connection protocols
NODE_TYPE=master
# Name of the AnyLog instance
NODE_NAME=anylog-master
# Owner of the AnyLog instance
COMPANY_NAME=New Company

#--- Networking ---
# Port address used by AnyLog's TCP protocol to communicate with other nodes in the network
ANYLOG_SERVER_PORT=32048
# Port address used by AnyLog's REST protocol
ANYLOG_REST_PORT=32049
# A bool value that determines if to bind to a specific IP and Port (a false value binds to all IPs)
TCP_BIND=false
# A bool value that determines if to bind to a specific IP and Port (a false value binds to all IPs)
REST_BIND=false

#--- Blockchain ---
# TCP connection information for Master Node
LEDGER_CONN=127.0.0.1:32048

#--- Advanced Settings ---
# Whether to automatically run a local (or personalized) script at the end of the process
DEPLOY_LOCAL_SCRIPT=false
  1. Start Node using makefile
make up EDGELAKE_TYPE=[NODE_TYPE]

Makefile Commands for Docker

  • help
Usage: make [target] EDGELAKE_TYPE=[anylog-type]
Targets:
  build       Pull the docker image
  up          Start the containers
  attach      Attach to EdgeLake instance
  exec        Attach to shell interface for container
  down        Stop and remove the containers
  logs        View logs of the containers
  clean       Clean up volumes and network
  help        Show this help message
         supported EdgeLake types: master, operator and query
Sample calls: make up EDGELAKE_TYPE=master | make attach EDGELAKE_TYPE=master | make clean EDGELAKE_TYPE=master
  • Bring up a query node
make up EDGELAKE_TYPE=query
  • Attach to query node
# to detach: ctrl-d
make attach EDGELAKE_TYPE=query  
  • Bring down query node
make down EDGELAKE_TYPE=query

If a node-type is not set, then a generic node would automatically be used

Makefile Commands

  • build - pull docker image
  • up - Using docker-compose, start a container of AnyLog based on node type
  • attach - Attach to an AnyLog docker container based on node type
  • exec - Attach to the shell interface of an AnyLog docker container, based on the node type
  • log - check docker container logs based on container type
  • down - Stop container based on node type
  • clean - remove everything associated with container (including volume and image) based on node type

About

docker-compose files for EdgeLake

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •