class GV::Valley::Etcd

Etcd Service

Constants

PORT

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/gv/valley/etcd.rb, line 20
def initialize
  super
  
  pull_image_if_does_not_exists "flynn/etcd"
  
  home = GV::Bedrock::Config.service.get("home")
  
  unless ps? 'etcd'
    cleanup
    pipe "docker run --name etcd -d -p #{self.external_ip}::#{PORT} -v #{home}/etcd:/data/db:rw flynn/etcd --name=greenvalley -data-dir=/data/db"
  end
end

Public Instance Methods

port() click to toggle source
# File lib/gv/valley/etcd.rb, line 33
def port
  container_port 'etcd', self.external_ip, PORT
end