Sha256: 96b2620bfcd374ec268d974a816bc6cc4e30726cd6d8a34938f9c844ca6b2acd

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-

begin
  require 'rubygems'
  require 'bundler'
  Bundler.setup(:default, :collector)
rescue ::Exception => e
end

require File.expand_path('../../config/path_resolver', __FILE__)

def load_conf
  require 'ostruct'
  conf = OpenStruct.new
  
  load_ctx = Object.new
  load_ctx.instance_eval {
    @conf = conf
    def method_missing(m, *args)
      @conf.send("#{m}=", *args)
    end
  }
  
  load_ctx.instance_eval(File.read(File.expand_path('../../config/dcmgr.conf', __FILE__)))
  conf
end

manifest = Isono::Runner::RpcServer::DEFAULT_MANIFEST.dup
manifest.instance_eval do
  node_name 'collector'
  node_instance_id 'master'

  load_module Isono::NodeModules::DataStore
  load_module Dcmgr::NodeModules::StaCollector
  load_module Isono::NodeModules::NodeCollector
  load_module Isono::NodeModules::JobCollector
  load_module Dcmgr::NodeModules::HvaCollector
  load_module Dcmgr::NodeModules::InstanceHA

  config do |c|
    conf = load_conf()
    c.data_store.database_dsn = conf.database_url
  end
end

Isono::Runner::RpcServer.start(manifest)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wakame-vdc-dcmgr-10.12.0 bin/collector