Sha256: a510974097ec89f51ea7da3cfa23e29e3a6d88345d902f8c3979ef853dca17a6

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 KB

Contents

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

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'dcmgr/rubygems'
require 'dcmgr'
require 'isono'

include Isono::Runner::RpcServer

manifest = DEFAULT_MANIFEST.dup
manifest.instance_eval do
  node_name 'hva'
  node_instance_id "#{Isono::Util.default_gw_ipaddr}"

  config do |c|
    c.vm_data_dir = '/var/lib/vm'
    c.edge_networking = 'netfilter'
    c.enable_ebtables = true
    c.enable_iptables = true
    c.hv_ifindex      = 2 # ex. /sys/class/net/eth0/ifindex => 2
    c.bridge_novlan   = 'br0'
    c.verbose_netfilter = false
    c.packet_drop_log   = false
    c.debug_iptables    = false
  end

  load_config File.expand_path('config/hva.conf', app_root)

  load_module Isono::NodeModules::NodeHeartbeat
  load_module Dcmgr::NodeModules::InstanceMonitor
  case config.edge_networking
  when 'openflow'
    load_module Dcmgr::NodeModules::ServiceOpenFlow
  when 'off'
    # Don't load openflow nor netfilter
  when 'netfilter', 'legacy_netfilter'
    load_module Dcmgr::NodeModules::ServiceNetfilter
  else
    raise "Configuration error: '#{config.edge_networking}' is not a valid option for edge_networking. Valid options are 'openflow', 'netfilter', 'legacy_netfilter' and 'off'"
  end
end

start(manifest) do
  endpoint "hva-handle.#{@node.node_id}", Dcmgr::Rpc::HvaHandler
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wakame-vdc-agents-11.12.0 bin/hva