Module: Bosh::Deployer::InfrastructureDefaults

Defined in:
lib/bosh/deployer/infrastructure_defaults.rb,
lib/bosh/deployer/infrastructure_defaults/aws.rb,
lib/bosh/deployer/infrastructure_defaults/vcloud.rb,
lib/bosh/deployer/infrastructure_defaults/vsphere.rb,
lib/bosh/deployer/infrastructure_defaults/openstack.rb

Constant Summary collapse

AWS =
{
  'name' => nil,
  'logging' => {
    'level' => 'INFO'
  },
  'dir' => nil,
  'network' => {
    'type' => 'dynamic',
    'cloud_properties' => {}
  },
  'env' => {
    'bosh' => {
      'password' => nil
    }
  },
  'resources' => {
    'persistent_disk' => 4096,
    'cloud_properties' => {
      'instance_type' => 'm1.small',
      'availability_zone' => nil
    }
  },
  'cloud' => {
    'plugin' => 'aws',
    'properties' => {
      'aws' => {
        'access_key_id' => nil,
        'secret_access_key' => nil,
        'ec2_endpoint' => nil,
        'max_retries' => 2,
        'http_read_timeout' => 60,
        'http_wire_trace' => false,
        'default_key_name' => nil,
        'default_security_groups' => [],
        'ssh_user' => 'vcap'
      },
      'registry' => {
        'endpoint' => 'http://admin:admin@localhost:25888',
        'user' => 'admin',
        'password' => 'admin'
      },
      'stemcell' => {
        'kernel_id' => nil,
        'disk' => 4096
      },
      'agent' => {
        'ntp' => [],
        'blobstore' => {
          'provider' => 'local',
          'options' => {
            'blobstore_path' => '/var/vcap/micro_bosh/data/cache'
          }
        },
        'mbus' => nil
      }
    }
  },
  'apply_spec' => {
    'properties' => {},
    'agent' => {
      'blobstore' => {},
      'nats' => {}
    }
  }
}
VCLOUD =
{
  'name' => nil,
  'logging' => {
    'level' => 'INFO'
  },
  'dir' => nil,
  'network' => {
    'dns' => [],
    'cloud_properties' => {
      'name' => nil
    }
  },
  'env' => {
    'bosh' => {
      'password' => nil
    }
  },
  'resources' => {
    'persistent_disk' => 4096,
    'cloud_properties' => {
      'ram' => 1024,
      'disk' => 4096,
      'cpu' => 1
    }
  },
  'cloud' => {
    'plugin' => 'vcloud',
    'properties' => {
      'agent' => {
        'ntp' => [],
        'blobstore' => {
          'provider' => 'local',
          'options' => {
            'blobstore_path' => '/var/vcap/micro_bosh/data/cache'
          }
        },
        'mbus' => nil
      },
      'vcds' => []
    }
  },
  'apply_spec' => {
    'properties' => {},
    'agent' => {
      'blobstore' => {},
      'nats' => {}
    }
  }
}
VSPHERE =
{
  'name' => nil,
  'logging' => {
    'level' => 'INFO'
  },
  'dir' => nil,
  'network' => {
    'ip' => nil,
    'netmask' => nil,
    'gateway' => nil,
    'dns' => [],
    'cloud_properties' => {
      'name' => nil
    }
  },
  'env' => {
    'bosh' => {
      'password' => nil
    }
  },
  'resources' => {
    'persistent_disk' => 4096,
    'cloud_properties' => {
      'ram' => 1024,
      'disk' => 4096,
      'cpu' => 1
    }
  },
  'cloud' => {
    'plugin' => 'vsphere',
    'properties' => {
      'agent' => {
        'ntp' => [],
        'blobstore' => {
          'provider' => 'local',
          'options' => {
            'blobstore_path' => '/var/vcap/micro_bosh/data/cache'
          }
        },
        'mbus' => nil
      },
      'vcenters' => []
    }
  },
  'apply_spec' => {
    'properties' => {},
    'agent' => {
      'blobstore' => {},
      'nats' => {}
    }
  }
}
OPENSTACK =
{
  'name' => nil,
  'logging' => {
    'level' => 'INFO'
  },
  'dir' => nil,
  'network' => {
    'type' => 'dynamic',
    'cloud_properties' => {}
  },
  'env' => {
    'bosh' => {
      'password' => nil
    }
  },
  'resources' => {
    'persistent_disk' => 4096,
    'cloud_properties' => {
      'instance_type' => 'm1.small',
      'availability_zone' => nil
    }
  },
  'cloud' => {
    'plugin' => 'openstack',
    'properties' => {
      'openstack' => {
        'auth_url' => nil,
        'username' => nil,
        'api_key' => nil,
        'tenant' => nil,
        'region' => nil,
        'endpoint_type' => 'publicURL',
        'default_key_name' => nil,
        'wait_resource_poll_interval' => 5,
        'default_security_groups' => [],
        'ssh_user' => 'vcap',
        'config_drive' => nil
      },
      'registry' => {
        'endpoint' => 'http://admin:admin@localhost:25889',
        'user' => 'admin',
        'password' => 'admin'
      },
      'agent' => {
        'ntp' => [],
        'blobstore' => {
          'provider' => 'local',
          'options' => {
            'blobstore_path' => '/var/vcap/micro_bosh/data/cache'
          }
        },
        'mbus' => nil
      }
    }
  },
  'apply_spec' => {
    'properties' => {},
    'agent' => {
      'blobstore' => {},
      'nats' => {}
    }
  }
}

Class Method Summary collapse

Class Method Details

.merge_for(plugin, config) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/bosh/deployer/infrastructure_defaults.rb', line 7

def self.merge_for(plugin, config)
  case plugin
    when 'aws'
      defaults = AWS
    when 'openstack'
      defaults = OPENSTACK
    when 'vcloud'
      defaults = VCLOUD
    when 'vsphere'
      defaults = VSPHERE
    else
      raise "Infrastructure '#{plugin}' not found"
  end
  deep_merge(defaults, config)
end