aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile')
-rw-r--r--manifests/profile/base/cinder.pp1
-rw-r--r--manifests/profile/base/cinder/api.pp1
-rw-r--r--manifests/profile/base/database/mysql.pp3
-rw-r--r--manifests/profile/base/etcd.pp66
-rw-r--r--manifests/profile/base/keystone.pp4
-rw-r--r--manifests/profile/base/nova.pp1
-rw-r--r--manifests/profile/base/nova/ec2api.pp35
-rw-r--r--manifests/profile/base/nova/placement.pp2
-rw-r--r--manifests/profile/base/octavia.pp57
-rw-r--r--manifests/profile/base/octavia/api.pp (renamed from manifests/profile/base/glance/registry.pp)38
-rw-r--r--manifests/profile/base/time/ntp.pp28
-rw-r--r--manifests/profile/pacemaker/ceph/rbdmirror.pp77
12 files changed, 292 insertions, 21 deletions
diff --git a/manifests/profile/base/cinder.pp b/manifests/profile/base/cinder.pp
index 6a821f3..6e8fbb2 100644
--- a/manifests/profile/base/cinder.pp
+++ b/manifests/profile/base/cinder.pp
@@ -57,6 +57,7 @@ class tripleo::profile::base::cinder (
rabbit_hosts => $rabbit_endpoints,
}
include ::cinder::config
+ include ::cinder::glance
}
if $step >= 5 {
diff --git a/manifests/profile/base/cinder/api.pp b/manifests/profile/base/cinder/api.pp
index 5ea2058..450a8e6 100644
--- a/manifests/profile/base/cinder/api.pp
+++ b/manifests/profile/base/cinder/api.pp
@@ -94,7 +94,6 @@ class tripleo::profile::base::cinder::api (
ssl_key => $tls_keyfile,
}
include ::cinder::ceilometer
- include ::cinder::glance
}
}
diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp
index 1692108..5154464 100644
--- a/manifests/profile/base/database/mysql.pp
+++ b/manifests/profile/base/database/mysql.pp
@@ -191,6 +191,9 @@ class tripleo::profile::base::database::mysql (
if hiera('panko_api_enabled', false) {
include ::panko::db::mysql
}
+ if hiera('ec2_api_enabled', false) {
+ include ::ec2api::db::mysql
+ }
}
}
diff --git a/manifests/profile/base/etcd.pp b/manifests/profile/base/etcd.pp
new file mode 100644
index 0000000..505e29f
--- /dev/null
+++ b/manifests/profile/base/etcd.pp
@@ -0,0 +1,66 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::etcd
+#
+# etcd profile for tripleo
+#
+# === Parameters
+#
+# [*bind_ip*]
+# (optional) IP to bind etcd service to.
+# Defaults to '127.0.0.1'.
+#
+# [*client_port*]
+# (optional) etcd client listening port.
+# Defaults to '2379'.
+#
+# [*peer_port*]
+# (optional) etcd peer listening port.
+# Defaults to '2380'.
+#
+# [*nodes*]
+# (Optional) Array of host(s) for etcd nodes.
+# Defaults to hiera('etcd_node_ips', []).
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::etcd (
+ $bind_ip = '127.0.0.1',
+ $client_port = '2379',
+ $peer_port = '2380',
+ $nodes = hiera('etcd_node_names', []),
+ $step = hiera('step'),
+) {
+ if $step >= 1 {
+ if count($nodes) > 1 {
+ $cluster_enabled = true
+ } else {
+ $cluster_enabled = false
+ }
+
+ class {'::etcd':
+ listen_client_urls => "http://${bind_ip}:${client_port}",
+ advertise_client_urls => "http://${bind_ip}:${client_port}",
+ listen_peer_urls => "http://${bind_ip}:${peer_port}",
+ initial_advertise_peer_urls => "http://${bind_ip}:${peer_port}",
+ initial_cluster => regsubst($nodes, '.+', "\\0=http://\\0:${peer_port}"),
+ cluster_enabled => $cluster_enabled,
+ proxy => 'off',
+ }
+ }
+}
diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp
index a388def..a3a39e9 100644
--- a/manifests/profile/base/keystone.pp
+++ b/manifests/profile/base/keystone.pp
@@ -255,6 +255,8 @@ class tripleo::profile::base::keystone (
include ::zaqar::keystone::auth
include ::zaqar::keystone::auth_websocket
}
+ if hiera('ec2_api_enabled', false) {
+ include ::ec2api::keystone::auth
+ }
}
}
-
diff --git a/manifests/profile/base/nova.pp b/manifests/profile/base/nova.pp
index dae627c..fe1e6a6 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -110,6 +110,7 @@ class tripleo::profile::base::nova (
}
if $step >= 4 {
+ include ::nova::placement
if $manage_migration {
class { '::nova::migration::libvirt':
configure_libvirt => $libvirt_enabled,
diff --git a/manifests/profile/base/nova/ec2api.pp b/manifests/profile/base/nova/ec2api.pp
new file mode 100644
index 0000000..f34b071
--- /dev/null
+++ b/manifests/profile/base/nova/ec2api.pp
@@ -0,0 +1,35 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::nova::ec2api
+#
+# EC2-compatible Nova API profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::nova::ec2api (
+ $step = hiera('step')
+) {
+ if $step >= 4 {
+ include ::ec2api
+ include ::ec2api::api
+ include ::ec2api::db::sync
+ include ::ec2api::metadata
+ }
+}
diff --git a/manifests/profile/base/nova/placement.pp b/manifests/profile/base/nova/placement.pp
index 7edd4e8..aa8c3c7 100644
--- a/manifests/profile/base/nova/placement.pp
+++ b/manifests/profile/base/nova/placement.pp
@@ -86,8 +86,6 @@ class tripleo::profile::base::nova::placement (
}
if $step >= 4 {
- include ::nova::placement
-
class { '::nova::wsgi::apache_placement':
ssl_cert => $tls_certfile,
ssl_key => $tls_keyfile,
diff --git a/manifests/profile/base/octavia.pp b/manifests/profile/base/octavia.pp
new file mode 100644
index 0000000..46ca009
--- /dev/null
+++ b/manifests/profile/base/octavia.pp
@@ -0,0 +1,57 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::octavia
+#
+# Octavia server profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+# [*rabbit_user*]
+# [*rabbit_password*]
+# (Optional) RabbitMQ user details
+# Defaults to undef
+#
+# [*rabbit_hosts*]
+# list of the rabbbit host fqdns
+# Defaults to hiera('rabbitmq_node_names')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to 5672.
+#
+class tripleo::profile::base::octavia (
+ $step = hiera('step'),
+ $rabbit_user = undef,
+ $rabbit_password = undef,
+ $rabbit_hosts = hiera('rabbitmq_node_names', undef),
+ $rabbit_port = '5672'
+) {
+ if $step >= 3 {
+ class { '::octavia' :
+ default_transport_url => os_transport_url({
+ 'transport' => 'rabbit',
+ 'hosts' => $rabbit_hosts,
+ 'port' => sprintf('%s', $rabbit_port),
+ 'username' => $rabbit_user,
+ 'password' => $rabbit_password
+ })
+ }
+ include ::octavia::config
+ }
+}
diff --git a/manifests/profile/base/glance/registry.pp b/manifests/profile/base/octavia/api.pp
index cd40aeb..d457478 100644
--- a/manifests/profile/base/glance/registry.pp
+++ b/manifests/profile/base/octavia/api.pp
@@ -12,39 +12,43 @@
# License for the specific language governing permissions and limitations
# under the License.
#
-# == Class: tripleo::profile::base::glance::registry
+# == Class: tripleo::profile::base::octavia::api
#
-# Glance Registry profile for tripleo
+# Octavia API server profile for tripleo
#
# === Parameters
#
# [*bootstrap_node*]
-# DEPRECATED
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
-# [*glance_backend*]
-# (Optional) Glance backend(s) to use.
-# Defaults to downcase(hiera('glance_backend', 'swift'))
-#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
-class tripleo::profile::base::glance::registry (
- $bootstrap_node = undef,
- $glance_backend = downcase(hiera('glance_backend', 'swift')),
+class tripleo::profile::base::octavia::api (
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
- if $step >= 4 {
- # TODO: notifications, scrubber, etc.
- include ::glance
- include ::glance::config
- include ::glance::registry
- include ::glance::notify::rabbitmq
- include join(['::glance::backend::', $glance_backend])
+ include ::tripleo::profile::base::octavia
+
+ if $step >= 3 and $sync_db {
+ include ::octavia::db::mysql
}
+ # We start the Octavia API server on the bootstrap node first, because
+ # it will try to populate tables and we need to make sure this happens
+ # before it starts on other nodes
+ if ($step >= 4 and $sync_db) or ($step >= 5 and !$sync_db) {
+ class { '::octavia::api':
+ sync_db => $sync_db,
+ }
+ }
}
diff --git a/manifests/profile/base/time/ntp.pp b/manifests/profile/base/time/ntp.pp
new file mode 100644
index 0000000..c6ce309
--- /dev/null
+++ b/manifests/profile/base/time/ntp.pp
@@ -0,0 +1,28 @@
+# Copyright 2017 Red Hat, Inc.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::ntp
+#
+# Enable NTP via composable services.
+#
+
+class tripleo::profile::base::time::ntp {
+ # if installed, we don't want chrony to conflict with ntp.
+ package { 'chrony':
+ ensure => 'purged',
+ before => Service['ntp'],
+ }
+ include ::ntp
+}
diff --git a/manifests/profile/pacemaker/ceph/rbdmirror.pp b/manifests/profile/pacemaker/ceph/rbdmirror.pp
new file mode 100644
index 0000000..8e2ff77
--- /dev/null
+++ b/manifests/profile/pacemaker/ceph/rbdmirror.pp
@@ -0,0 +1,77 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::pacemaker::ceph::rbdmirror
+#
+# Ceph RBD mirror Pacemaker profile for tripleo
+#
+# === Parameters
+#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('ceph_rbdmirror_bootstrap_short_node_name')
+#
+# [*client_name*]
+# (Optional) Name assigned to the RBD mirror client
+# Defaults to 'rbd-mirror'
+#
+# [*stack_action*]
+# (Optional) Action executed on the stack. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('stack_action')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::pacemaker::ceph::rbdmirror (
+ $bootstrap_node = hiera('ceph_rbdmirror_bootstrap_short_node_name'),
+ $client_name = 'openstack',
+ $stack_action = hiera('stack_action'),
+ $step = hiera('step'),
+) {
+ Service <| tag == 'ceph-rbd-mirror' |> {
+ hasrestart => true,
+ restart => '/bin/true',
+ start => '/bin/true',
+ stop => '/bin/true',
+ }
+
+ if $::hostname == downcase($bootstrap_node) {
+ $pacemaker_master = true
+ } else {
+ $pacemaker_master = false
+ }
+
+ include ::tripleo::profile::base::ceph
+
+ if $step >= 3 {
+ ceph::mirror { $client_name:
+ rbd_mirror_enable => false,
+ rbd_mirror_ensure => 'stopped',
+ } ->
+ pacemaker::resource::service { "ceph-rbd-mirror_${client_name}":
+ # NOTE(gfidente): systemd uses the @ sign but it is an invalid
+ # character in a pcmk resource name, so we need to use it only
+ # for the name of the service
+ service_name => "ceph-rbd-mirror@${client_name}"
+ }
+ }
+
+ if $step >= 3 and $pacemaker_master and $stack_action == 'UPDATE' {
+ Ceph_config<||> ~> Tripleo::Pacemaker::Resource_restart_flag["ceph-rbd-mirror@${client_name}"]
+ tripleo::pacemaker::resource_restart_flag { "ceph-rbd-mirror@${client_name}": }
+ }
+}