Skip to content
Snippets Groups Projects
glance.pp 3.04 KiB
Newer Older
  • Learn to ignore specific revisions
  •   $public_interface = hiera('iaas::public_interface', undef),
      $admin_interface = hiera('iaas::admin_interface', undef),
    
    
      $region = hiera('iaas::region', undef),
      $endpoint = hiera('iaas::role::endpoint::main_address', undef),
    
    #Costa - added $rhosts
      $rhosts = hiera('iaas::profile::rabbitmq::rhosts', undef),
    
      $rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
      $rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
    ) {
    
    
    #Costa
    #  include iaas::resources::connectors
    
    #Costa
    
      class { 'ceph::profile::client': } ->
      class { 'ceph::keys': } ->
    
      class { '::glance::api':
    
        bind_host => $::facts["ipaddress_${admin_interface}"],
    
        auth_uri => "http://${endpoint}:5000/v2.0",
        identity_uri => "http://${endpoint}:35357",
    
        keystone_tenant => 'services',
        keystone_user => 'glance',
        database_connection => $iaas::resources::connectors::glance,
    
    #Costa - registry_host ???
    #    registry_host => 'localhost',
        registry_host => $endpoint,
    
        known_stores => ['glance.store.filesystem.Store', 'glance.store.http.Store', 'glance.store.rbd.Store', 'glance.store.cinder.Store'], #  'glance.store.sheepdog.Store', 'glance.store.vmware_datastore.Store', 'glance.store.s3.Store', 'glance.store.swift.Store'
    
        show_image_direct_url => true,
        pipeline => 'keystone',
    
      class { '::glance::backend::rbd':
        rbd_store_user => 'glance',
        rbd_store_ceph_conf => '/etc/ceph/ceph.conf',
        rbd_store_pool => 'images',
      }
    
      class { '::glance::registry':
    
        database_connection => $iaas::resources::connectors::glance,
    
        auth_uri => "http://${endpoint}:5000/v2.0",
        identity_uri => "http://${endpoint}:35357",
    
        keystone_tenant => 'services',
        keystone_user => 'glance',
        mysql_module => '2.3',
    
        database_idle_timeout => 3600,
        bind_host => $::facts["ipaddress_${admin_interface}"],
    
      }
    
      class { '::glance::notify::rabbitmq':
        rabbit_userid => $rabbitmq_user,
        rabbit_password => $rabbitmq_password,
    
    #Costa - added rabbit_hosts
    #    rabbit_host => $endpoint,
        rabbit_hosts => $rhosts,
    
    #Costa
    #  iaas::resources::database { 'glance': }
    
    
      class  { '::glance::keystone::auth':
    
        public_address => $endpoint,
        admin_address => $endpoint,
        internal_address => $endpoint,
    
    #Costa
    #  @@haproxy::balancermember { "glance_registry_${::fqdn}":
    #    listening_service => 'glance_registry_cluster',
    #    server_names => $::hostname,
    #    ipaddresses => $::facts["ipaddress_${admin_interface}"],
    #    ports => '9191',
    #    options => 'check inter 2000 rise 2 fall 5',
    #  }
    #  @@haproxy::balancermember { "glance_api_${::fqdn}":
    #    listening_service => 'glance_api_cluster',
    #    server_names => $::hostname,
    #    ipaddresses => $::facts["ipaddress_${public_interface}"],
    #    ports => '9292',
    #    options => 'check inter 2000 rise 2 fall 5',
    #  }