mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
Introducing make economy and docker
This commit is contained in:
parent
65a232bd9d
commit
150959b182
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Pull base image.
|
||||||
|
FROM golang:1.4.2-wheezy
|
||||||
|
|
||||||
|
# Set the env variables to non-interactive
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
ENV DEBIAN_PRIORITY critical
|
||||||
|
ENV DEBCONF_NOWARNINGS yes
|
||||||
|
ENV TERM linux
|
||||||
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||||
|
|
||||||
|
# Install go
|
||||||
|
# ADD tendermint user
|
||||||
|
RUN useradd tendermint
|
||||||
|
|
||||||
|
# Get rid of tendermint user login shell
|
||||||
|
RUN usermod -s /sbin/nologin tendermint
|
||||||
|
|
||||||
|
ADD . /go/src/github.com/tendermint/tendermint
|
||||||
|
WORKDIR /go/src/github.com/tendermint/tendermint
|
||||||
|
RUN make
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
USER tendermint
|
||||||
|
ENV USER tendermint
|
||||||
|
ENV TMROOT /tendermint_root
|
||||||
|
# docker run -v $(pwd)/tendermint_root:/tendermint_root
|
||||||
|
CMD [ "./tendermint", "daemon" ]
|
8
Makefile
8
Makefile
@ -17,5 +17,11 @@ list_deps:
|
|||||||
get_deps:
|
get_deps:
|
||||||
go get github.com/tendermint/tendermint/...
|
go get github.com/tendermint/tendermint/...
|
||||||
|
|
||||||
|
tendermint_root/priv_validator.json: tendermint_root/priv_validator.json.orig
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
|
economy: tendermint_root/priv_validator.json
|
||||||
|
docker run -v $(CURDIR)/tendermint_root:/tendermint_root -p 8080:8080 tendermint
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f tendermint
|
rm -f tendermint tendermint_root/priv_validator.json
|
||||||
|
25
Vagrantfile
vendored
Normal file
25
Vagrantfile
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# -*- mode: ruby -*-
|
||||||
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
|
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
||||||
|
VAGRANTFILE_API_VERSION = "2"
|
||||||
|
|
||||||
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
config.vm.box = "phusion-open-ubuntu-14.04-amd64"
|
||||||
|
config.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box"
|
||||||
|
# Or, for Ubuntu 12.04:
|
||||||
|
|
||||||
|
config.vm.provider :vmware_fusion do |f, override|
|
||||||
|
override.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vmwarefusion.box"
|
||||||
|
end
|
||||||
|
|
||||||
|
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
|
||||||
|
# Install Docker
|
||||||
|
pkg_cmd = "wget -q -O - https://get.docker.io/gpg | apt-key add -;" \
|
||||||
|
"echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list;" \
|
||||||
|
"apt-get update -qq; apt-get install -q -y --force-yes lxc-docker; "
|
||||||
|
# Add vagrant user to the docker group
|
||||||
|
pkg_cmd << "usermod -a -G docker vagrant; "
|
||||||
|
config.vm.provision :shell, :inline => pkg_cmd
|
||||||
|
end
|
||||||
|
end
|
@ -71,8 +71,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
roundDuration0 = 30 * time.Second // The first round is 60 seconds long.
|
roundDuration0 = 10 * time.Second // The first round is 60 seconds long.
|
||||||
roundDurationDelta = 10 * time.Second // Each successive round lasts 15 seconds longer.
|
roundDurationDelta = 3 * time.Second // Each successive round lasts 15 seconds longer.
|
||||||
roundDeadlinePrevote = float64(1.0 / 3.0) // When the prevote is due.
|
roundDeadlinePrevote = float64(1.0 / 3.0) // When the prevote is due.
|
||||||
roundDeadlinePrecommit = float64(2.0 / 3.0) // When the precommit vote is due.
|
roundDeadlinePrecommit = float64(2.0 / 3.0) // When the precommit vote is due.
|
||||||
newHeightDelta = roundDuration0 / 3 // The time to wait between commitTime and startTime of next consensus rounds.
|
newHeightDelta = roundDuration0 / 3 // The time to wait between commitTime and startTime of next consensus rounds.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user