Dedicated node role for Contrail Analytics added
Change-Id: Ica6a275ea8fdb81cb4c82d054a3ecf03e71cbcff Related-bug: #1599156
This commit is contained in:
parent
88c7f364ef
commit
df30e67b52
|
@ -0,0 +1,18 @@
|
|||
# Copyright 2015 Mirantis, 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.
|
||||
|
||||
notice('MODULAR: contrail/contrail-analytics-provision.pp')
|
||||
|
||||
include contrail
|
||||
class { 'contrail::provision::analytics': }
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright 2015 Mirantis, 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.
|
||||
|
||||
notice('MODULAR: contrail/contrail-analytics.pp')
|
||||
|
||||
include contrail
|
||||
class { 'contrail::analytics': }
|
|
@ -16,5 +16,4 @@ notice('MODULAR: contrail/contrail-config.pp')
|
|||
|
||||
include contrail
|
||||
class { 'contrail::config': }
|
||||
class { 'contrail::analytics': }
|
||||
class { 'contrail::webui': }
|
||||
|
|
|
@ -105,7 +105,7 @@ class contrail::analytics {
|
|||
|
||||
# Cron job for transfer contrail-logs to Fuel master
|
||||
# Runs on primary analytics node
|
||||
if $contrail::node_role == 'primary-contrail-config' {
|
||||
if $contrail::node_role == 'primary-contrail-analytics' {
|
||||
file { 'contrailsyslog.sh':
|
||||
ensure => 'present',
|
||||
path => '/usr/local/sbin/contrailsyslog.sh',
|
||||
|
|
|
@ -77,10 +77,6 @@ class contrail::config {
|
|||
content => template('contrail/basicauthusers.properties.erb'),
|
||||
}
|
||||
|
||||
file { '/etc/contrail/vnc_api_lib.ini':
|
||||
content => template('contrail/vnc_api_lib.ini.erb')
|
||||
}
|
||||
|
||||
file { '/etc/contrail/contrail-api.conf':
|
||||
content => template('contrail/contrail-api.conf.erb'),
|
||||
}
|
||||
|
|
|
@ -40,10 +40,6 @@ class contrail::control {
|
|||
package { 'contrail-openstack-control': }
|
||||
|
||||
# Contrail control config files
|
||||
file { '/etc/contrail/vnc_api_lib.ini':
|
||||
content => template('contrail/vnc_api_lib.ini.erb')
|
||||
}
|
||||
|
||||
file { '/etc/contrail/contrail-control.conf':
|
||||
content => template('contrail/contrail-control.conf.erb'),
|
||||
}
|
||||
|
|
|
@ -30,11 +30,6 @@ class contrail::database {
|
|||
package { 'cassandra': } ->
|
||||
package { 'contrail-openstack-database': }
|
||||
|
||||
# VNC API
|
||||
file { '/etc/contrail/vnc_api_lib.ini':
|
||||
content => template('contrail/vnc_api_lib.ini.erb')
|
||||
}
|
||||
|
||||
# Zookeeper
|
||||
file { '/etc/zookeeper/conf/myid':
|
||||
content => $contrail::uid,
|
||||
|
|
|
@ -167,4 +167,8 @@ class contrail {
|
|||
# Contrail Config nodes Private IP list
|
||||
$contrail_config_nodes_hash = get_nodes_hash_by_roles($network_metadata, ['primary-contrail-config', 'contrail-config'])
|
||||
$contrail_config_ips = sort(values(get_node_to_ipaddr_map_by_network_role($contrail_config_nodes_hash, 'neutron/mesh')))
|
||||
|
||||
# Contrail Analytics nodes Private IP list
|
||||
$contrail_analytics_nodes_hash = get_nodes_hash_by_roles($network_metadata, ['primary-contrail-analytics', 'contrail-analytics'])
|
||||
$contrail_analytics_ips = sort(values(get_node_to_ipaddr_map_by_network_role($contrail_analytics_nodes_hash, 'neutron/mesh')))
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
# Copyright 2015 Mirantis, 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 contrail::provision::analytics {
|
||||
|
||||
Exec {
|
||||
provider => 'shell',
|
||||
path => '/usr/bin:/bin:/sbin',
|
||||
}
|
||||
|
||||
notify {'Waiting for contrail API':} ->
|
||||
|
||||
exec {'wait_for_api':
|
||||
command => "if [ `curl --silent --output /dev/null --write-out \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082` -lt 401 ];\
|
||||
then exit 1; fi",
|
||||
tries => 10,
|
||||
try_sleep => 10,
|
||||
} ->
|
||||
|
||||
exec { 'prov_analytics_node':
|
||||
command => "python /opt/contrail/utils/provision_analytics_node.py \
|
||||
--api_server_ip ${contrail::contrail_mgmt_vip} --api_server_port 8082 \
|
||||
--oper add --host_name ${::fqdn} --host_ip ${contrail::address} \
|
||||
--admin_user '${contrail::neutron_user}' --admin_tenant_name '${contrail::service_tenant}' --admin_password '${contrail::service_token}' \
|
||||
&& touch /opt/contrail/prov_analytics_node-DONE",
|
||||
creates => '/opt/contrail/prov_analytics_node-DONE',
|
||||
}
|
||||
|
||||
}
|
|
@ -35,15 +35,6 @@ then exit 1; fi",
|
|||
--admin_user '${contrail::neutron_user}' --admin_tenant_name '${contrail::service_tenant}' --admin_password '${contrail::service_token}' \
|
||||
&& touch /opt/contrail/prov_config_node-DONE",
|
||||
creates => '/opt/contrail/prov_config_node-DONE',
|
||||
} ->
|
||||
|
||||
exec { 'prov_analytics_node':
|
||||
command => "python /opt/contrail/utils/provision_analytics_node.py \
|
||||
--api_server_ip ${contrail::contrail_mgmt_vip} --api_server_port 8082 \
|
||||
--oper add --host_name ${::fqdn} --host_ip ${contrail::address} \
|
||||
--admin_user '${contrail::neutron_user}' --admin_tenant_name '${contrail::service_tenant}' --admin_password '${contrail::service_token}' \
|
||||
&& touch /opt/contrail/prov_analytics_node-DONE",
|
||||
creates => '/opt/contrail/prov_analytics_node-DONE',
|
||||
}
|
||||
|
||||
if $contrail::node_role == 'primary-contrail-config' {
|
||||
|
|
|
@ -56,6 +56,10 @@ class contrail::utils {
|
|||
class { 'contrail::package':
|
||||
install => $pkgs,
|
||||
pip_install => $pip_pkgs,
|
||||
} ->
|
||||
|
||||
file { '/etc/contrail/vnc_api_lib.ini':
|
||||
content => template('contrail/vnc_api_lib.ini.erb')
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@ class contrail::vip {
|
|||
order => '200',
|
||||
listen_port => 8081,
|
||||
balancermember_port => 9081,
|
||||
server_names => $contrail::contrail_config_ips,
|
||||
ipaddresses => $contrail::contrail_config_ips,
|
||||
server_names => $contrail::contrail_analytics_ips,
|
||||
ipaddresses => $contrail::contrail_analytics_ips,
|
||||
public => true,
|
||||
internal => true,
|
||||
public_ssl => $contrail::public_ssl,
|
||||
|
|
|
@ -41,6 +41,27 @@
|
|||
strategy:
|
||||
type: parallel
|
||||
#
|
||||
# Contrail - Analytics
|
||||
- id: primary-contrail-analytics
|
||||
type: group
|
||||
role: [primary-contrail-analytics]
|
||||
tasks: [hiera, globals, tools, logging, netconfig, hosts, deploy_start]
|
||||
required_for: [deploy_end]
|
||||
requires: [deploy_start, contrail-db, primary-contrail-config]
|
||||
parameters:
|
||||
strategy:
|
||||
type: one_by_one
|
||||
|
||||
- id: contrail-analytics
|
||||
type: group
|
||||
role: [contrail-analytics]
|
||||
tasks: [hiera, globals, tools, logging, netconfig, hosts, deploy_start]
|
||||
required_for: [deploy_end]
|
||||
requires: [deploy_start, contrail-db, primary-contrail-analytics]
|
||||
parameters:
|
||||
strategy:
|
||||
type: parallel
|
||||
#
|
||||
# Contrail - Control
|
||||
- id: primary-contrail-control
|
||||
type: group
|
||||
|
@ -88,6 +109,7 @@
|
|||
type: group
|
||||
role: [primary-contrail-db, contrail-db,
|
||||
primary-contrail-config,contrail-config,
|
||||
primary-contrail-analytics,contrail-analytics,
|
||||
primary-contrail-control,contrail-control]
|
||||
tasks: [configure_default_route, dns-client, ntp-client]
|
||||
required_for: [post_deployment_end]
|
||||
|
@ -126,6 +148,7 @@
|
|||
type: puppet
|
||||
groups: [primary-contrail-db, contrail-db,
|
||||
primary-contrail-config,contrail-config,
|
||||
primary-contrail-analytics,contrail-analytics,
|
||||
primary-contrail-control,contrail-control]
|
||||
required_for: [deploy_end]
|
||||
requires: [deploy_start, hosts]
|
||||
|
@ -201,6 +224,28 @@
|
|||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 1440
|
||||
|
||||
# Install and configure Contrail Analytics Node
|
||||
- id: contrail-analytics-all
|
||||
type: puppet
|
||||
groups: [primary-contrail-analytics,contrail-analytics]
|
||||
required_for: [deploy_end]
|
||||
requires: [contrail-utils]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/contrail-analytics.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 1440
|
||||
|
||||
# Provision Control analytics
|
||||
- id: contrail-analytics-provision
|
||||
type: puppet
|
||||
groups: [primary-contrail-analytics,contrail-analytics]
|
||||
required_for: [deploy_end]
|
||||
requires: [contrail-analytics-all]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/contrail-analytics-provision.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 1440
|
||||
|
||||
# Install and configure Contrail Control Node
|
||||
- id: contrail-control-primary
|
||||
type: puppet
|
||||
|
|
|
@ -24,6 +24,19 @@ contrail-config:
|
|||
- ceph-osd
|
||||
- cinder
|
||||
|
||||
contrail-analytics:
|
||||
name: Contrail - Analytics
|
||||
description: >
|
||||
Contrail analytics role. Provides Collector, Analytics API, Query engine and Topology services.
|
||||
has_primary: true
|
||||
public_ip_required: false
|
||||
weight: 100
|
||||
conflicts:
|
||||
- controller
|
||||
- compute
|
||||
- ceph-osd
|
||||
- cinder
|
||||
|
||||
contrail-control:
|
||||
name: Contrail - Control
|
||||
description: >
|
||||
|
|
Loading…
Reference in New Issue