Take 'host' parameter from nova manifest into use
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_controller.pp
index 0bf5f88..53bf62c 100644 (file)
@@ -24,15 +24,6 @@ if hiera('step') >= 1 {
   create_resources(sysctl::value, hiera('sysctl_settings'), {})
   Exec <| tag == 'kmod::load' |>  -> Sysctl <| |>
 
-  $controller_node_ips = split(hiera('controller_node_ips'), ',')
-
-  if $enable_load_balancer {
-    class { '::tripleo::loadbalancer' :
-      controller_hosts => $controller_node_ips,
-      manage_vip       => true,
-    }
-  }
-
 }
 
 if hiera('step') >= 2 {
@@ -113,52 +104,19 @@ if hiera('step') >= 2 {
 
   # FIXME: this should only occur on the bootstrap host (ditto for db syncs)
   # Create all the database schemas
-  include ::keystone::db::mysql
-  include ::glance::db::mysql
   include ::nova::db::mysql
   include ::nova::db::mysql_api
   include ::neutron::db::mysql
   include ::cinder::db::mysql
-  include ::heat::db::mysql
   include ::sahara::db::mysql
+  if downcase(hiera('gnocchi_indexer_backend')) == 'mysql' {
+    include ::gnocchi::db::mysql
+  }
   if downcase(hiera('ceilometer_backend')) == 'mysql' {
     include ::ceilometer::db::mysql
     include ::aodh::db::mysql
   }
 
-  $rabbit_nodes = hiera('rabbit_node_ips')
-  if count($rabbit_nodes) > 1 {
-
-    $rabbit_ipv6 = str2bool(hiera('rabbit_ipv6', false))
-    if $rabbit_ipv6 {
-      $rabbit_env = merge(hiera('rabbitmq_environment'), {
-        'RABBITMQ_SERVER_START_ARGS' => '"-proto_dist inet6_tcp"'
-      })
-    } else {
-      $rabbit_env = hiera('rabbitmq_environment')
-    }
-
-    class { '::rabbitmq':
-      config_cluster          => true,
-      cluster_nodes           => $rabbit_nodes,
-      tcp_keepalive           => false,
-      config_kernel_variables => hiera('rabbitmq_kernel_variables'),
-      config_variables        => hiera('rabbitmq_config_variables'),
-      environment_variables   => $rabbit_env,
-    }
-    rabbitmq_policy { 'ha-all@/':
-      pattern    => '^(?!amq\.).*',
-      definition => {
-        'ha-mode' => 'all',
-      },
-    }
-  } else {
-    include ::rabbitmq
-  }
-
-  # pre-install swift here so we can build rings
-  include ::swift
-
   $enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)
 
   if $enable_ceph {
@@ -212,26 +170,6 @@ if hiera('step') >= 2 {
 
 if hiera('step') >= 4 {
 
-  $glance_backend = downcase(hiera('glance_backend', 'swift'))
-  case $glance_backend {
-      'swift': { $backend_store = 'glance.store.swift.Store' }
-      'file': { $backend_store = 'glance.store.filesystem.Store' }
-      'rbd': { $backend_store = 'glance.store.rbd.Store' }
-      default: { fail('Unrecognized glance_backend parameter.') }
-  }
-  $http_store = ['glance.store.http.Store']
-  $glance_store = concat($http_store, $backend_store)
-
-  # TODO: scrubber and other additional optional features
-  include ::glance
-  include ::glance::config
-  class { '::glance::api':
-    known_stores => $glance_store,
-  }
-  include ::glance::registry
-  include ::glance::notify::rabbitmq
-  include join(['::glance::backend::', $glance_backend])
-
   $nova_ipv6 = hiera('nova::use_ipv6', false)
   if $nova_ipv6 {
     $memcached_servers = suffix(hiera('memcache_node_ips_v6'), ':11211')
@@ -284,8 +222,8 @@ if hiera('step') >= 4 {
 
     class {'::tripleo::network::midonet::api':
       zookeeper_servers    => $zookeeper_node_ips,
-      vip                  => hiera('tripleo::loadbalancer::public_virtual_ip'),
-      keystone_ip          => hiera('tripleo::loadbalancer::public_virtual_ip'),
+      vip                  => hiera('public_virtual_ip'),
+      keystone_ip          => hiera('public_virtual_ip'),
       keystone_admin_token => hiera('keystone::admin_token'),
       # TODO: create a 'bind' hiera key for api
       bind_address         => hiera('neutron::bind_host'),
@@ -324,26 +262,15 @@ if hiera('step') >= 4 {
       metadata_proxy_shared_secret => hiera('nova::api::neutron_metadata_proxy_shared_secret'),
     }
   } else {
-    include ::neutron::agents::l3
-    include ::neutron::agents::dhcp
-    include ::neutron::agents::metadata
-
-    file { '/etc/neutron/dnsmasq-neutron.conf':
-      content => hiera('neutron_dnsmasq_options'),
-      owner   => 'neutron',
-      group   => 'neutron',
-      notify  => Service['neutron-dhcp-service'],
-      require => Package['neutron'],
-    }
 
     # If the value of core plugin is set to 'midonet',
     # skip all the ML2 configuration
     if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
 
       class {'::neutron::plugins::midonet':
-        midonet_api_ip    => hiera('tripleo::loadbalancer::public_virtual_ip'),
+        midonet_api_ip    => hiera('public_virtual_ip'),
         keystone_tenant   => hiera('neutron::server::auth_tenant'),
-        keystone_password => hiera('neutron::server::auth_password')
+        keystone_password => hiera('neutron::server::password')
       }
     } else {
 
@@ -377,23 +304,14 @@ if hiera('step') >= 4 {
         include ::neutron::plugins::ml2::bigswitch::restproxy
         include ::neutron::agents::bigswitch
       }
-      neutron_l3_agent_config {
-        'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
-      }
-      neutron_dhcp_agent_config {
-        'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
-      }
       Service['neutron-server'] -> Service['neutron-ovs-agent-service']
     }
 
-    Service['neutron-server'] -> Service['neutron-dhcp-service']
-    Service['neutron-server'] -> Service['neutron-l3']
     Service['neutron-server'] -> Service['neutron-metadata']
   }
 
   include ::cinder
   include ::cinder::config
-  include ::tripleo::ssl::cinder_config
   include ::cinder::api
   include ::cinder::glance
   include ::cinder::scheduler
@@ -432,6 +350,7 @@ if hiera('step') >= 4 {
     $cinder_rbd_backend = 'tripleo_ceph'
 
     cinder::backend::rbd { $cinder_rbd_backend :
+      backend_host    => hiera('cinder::host'),
       rbd_pool        => hiera('cinder_rbd_pool_name'),
       rbd_user        => hiera('ceph_client_user_name'),
       rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
@@ -527,20 +446,6 @@ if hiera('step') >= 4 {
     enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')),
   }
 
-  # swift proxy
-  include ::memcached
-  include ::swift::proxy
-  include ::swift::proxy::proxy_logging
-  include ::swift::proxy::healthcheck
-  include ::swift::proxy::cache
-  include ::swift::proxy::keystone
-  include ::swift::proxy::authtoken
-  include ::swift::proxy::staticweb
-  include ::swift::proxy::ratelimit
-  include ::swift::proxy::catch_errors
-  include ::swift::proxy::tempurl
-  include ::swift::proxy::formpost
-
   # swift storage
   if str2bool(hiera('enable_swift_storage', true)) {
     class { '::swift::storage::all':
@@ -577,6 +482,7 @@ if hiera('step') >= 4 {
   include ::ceilometer::expirer
   include ::ceilometer::collector
   include ::ceilometer::agent::auth
+  include ::ceilometer::dispatcher::gnocchi
   class { '::ceilometer::db' :
     database_connection => $ceilometer_database_connection,
   }
@@ -598,22 +504,13 @@ if hiera('step') >= 4 {
   include ::aodh::listener
   include ::aodh::client
 
-  # Heat
-  class { '::heat' :
-    notification_driver => 'messaging',
-  }
-  include ::heat::config
-  include ::heat::api
-  include ::heat::api_cfn
-  include ::heat::api_cloudwatch
-  include ::heat::engine
-
   # Sahara
   include ::sahara
   include ::sahara::service::api
   include ::sahara::service::engine
 
   # Horizon
+  include ::apache::mod::remoteip
   if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
     $_profile_support = 'cisco'
   } else {
@@ -633,6 +530,26 @@ if hiera('step') >= 4 {
     neutron_options => $neutron_options,
   }
 
+  # Gnocchi
+  $gnocchi_database_connection = hiera('gnocchi_mysql_conn_string')
+  class { '::gnocchi':
+    database_connection => $gnocchi_database_connection,
+  }
+  include ::gnocchi::api
+  include ::gnocchi::wsgi::apache
+  include ::gnocchi::client
+  include ::gnocchi::db::sync
+  include ::gnocchi::storage
+  include ::gnocchi::metricd
+  include ::gnocchi::statsd
+  $gnocchi_backend = downcase(hiera('gnocchi_backend', 'swift'))
+  case $gnocchi_backend {
+      'swift': { include ::gnocchi::storage::swift }
+      'file': { include ::gnocchi::storage::file }
+      'rbd': { include ::gnocchi::storage::ceph }
+      default: { fail('Unrecognized gnocchi_backend parameter.') }
+  }
+
   $snmpd_user = hiera('snmpd_readonly_user_name')
   snmp::snmpv3_user { $snmpd_user:
     authtype => 'MD5',
@@ -650,7 +567,6 @@ if hiera('step') >= 4 {
 if hiera('step') >= 5 {
   $nova_enable_db_purge = hiera('nova_enable_db_purge', true)
   $cinder_enable_db_purge = hiera('cinder_enable_db_purge', true)
-  $heat_enable_db_purge = hiera('heat_enable_db_purge', true)
 
   if $nova_enable_db_purge {
     include ::nova::cron::archive_deleted_rows
@@ -658,25 +574,6 @@ if hiera('step') >= 5 {
   if $cinder_enable_db_purge {
     include ::cinder::cron::db_purge
   }
-  if $heat_enable_db_purge {
-    include ::heat::cron::purge_deleted
-  }
-
-  if downcase(hiera('bootstrap_nodeid')) == $::hostname {
-    # Class ::heat::keystone::domain has to run on bootstrap node
-    # because it creates DB entities via API calls.
-    include ::heat::keystone::domain
-
-    Class['::keystone::roles::admin'] -> Class['::heat::keystone::domain']
-  } else {
-    # On non-bootstrap node we don't need to create Keystone resources again
-    class { '::heat::keystone::domain':
-      manage_domain => false,
-      manage_user   => false,
-      manage_role   => false,
-    }
-  }
-
 } #END STEP 5
 
 $package_manifest_name = join(['/var/lib/tripleo/installed-packages/overcloud_controller', hiera('step')])