Monitor changes
This change brings the monitoring playbooks/roles in line w/ how everything else gets deployed by leveraging pre-existing roles for repo configuration, software installation, etc. We also split out the agent and cli more so that the roles can be applied independently of one-another. Closes issue #255
This commit is contained in:
parent
046bdd32ca
commit
de8336750f
@ -115,7 +115,6 @@ maas_monitoring_zones:
|
||||
- mzord
|
||||
- mzlon
|
||||
- mzhkg
|
||||
maas_repo_version: v9.0.0
|
||||
# Specify the maas_fqdn_extension, defaults to empty string.
|
||||
# This will be appended to the inventory_name of a host for MaaS purposes.
|
||||
# The inventory name + maas_fqdn_extension must match the entity name in MaaS
|
||||
|
@ -13,8 +13,5 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
raxmon_agent_key:
|
||||
- "https://monitoring.api.rackspacecloud.com/pki/agent/linux.asc"
|
||||
|
||||
raxmon_agent_repos:
|
||||
- { repo: "deb http://stable.packages.cloudmonitoring.rackspace.com/ubuntu-14.04-x86_64 cloudmonitoring main", state: "present" }
|
||||
- include: raxmon_cli.yml
|
||||
- include: raxmon_agent.yml
|
@ -16,11 +16,13 @@
|
||||
- hosts: hosts
|
||||
user: root
|
||||
roles:
|
||||
- container_common
|
||||
- galera_client_cnf
|
||||
- raxmon_cli
|
||||
- raxmon_agent_install
|
||||
vars:
|
||||
entity_name: "{{ inventory_hostname }}{{ maas_fqdn_extension|default('') }}"
|
||||
vars_files:
|
||||
- vars/repo_packages/raxmon_agent.yml
|
||||
|
||||
- hosts: keystone[0]
|
||||
user: root
|
22
rpc_deployment/playbooks/monitoring/raxmon_cli.yml
Normal file
22
rpc_deployment/playbooks/monitoring/raxmon_cli.yml
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
# Copyright 2014, Rackspace US, 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.
|
||||
|
||||
- hosts: hosts
|
||||
user: root
|
||||
roles:
|
||||
- common
|
||||
- raxmon_cli
|
||||
vars_files:
|
||||
- vars/repo_packages/raxmon_cli.yml
|
@ -13,32 +13,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Add apt key for the raxmon agent
|
||||
apt_key:
|
||||
url: "{{ item }}"
|
||||
state: present
|
||||
with_items: raxmon_agent_key
|
||||
|
||||
- name: Configure raxmon agent repo
|
||||
apt_repository: >
|
||||
repo="{{ item.repo }}"
|
||||
state="{{ item.state }}"
|
||||
with_items: raxmon_agent_repos
|
||||
|
||||
- name: Install raxmon agent packages
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
cache_valid_time: 600
|
||||
with_items:
|
||||
- rackspace-monitoring-agent
|
||||
|
||||
- name: Clone plugins repo
|
||||
git:
|
||||
repo: https://github.com/rcbops/rpc-maas.git
|
||||
repo: "{{ git_repo }}"
|
||||
dest: /usr/lib/rackspace-monitoring-agent/plugins/
|
||||
version: "{{ maas_repo_version }}"
|
||||
version: "{{ git_install_branch }}"
|
||||
|
||||
- name: Chmod plugins
|
||||
file: path={{ item }} mode=0755
|
||||
@ -55,7 +34,7 @@
|
||||
|
||||
- name: Install python dependencies
|
||||
pip:
|
||||
requirements: /usr/lib/rackspace-monitoring-agent/plugins/requirements.txt
|
||||
requirements: "{{ pip_requirements_file }}"
|
||||
|
||||
- name: Entity {{ entity_name }} count
|
||||
shell: "raxmon-entities-list | grep ' label={{ entity_name }} provider=Rackspace Monitoring ...>$' | wc -l"
|
||||
|
@ -13,9 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Install rackspace-monitoring-cli
|
||||
pip: name=rackspace-monitoring-cli
|
||||
|
||||
- name: Drop .raxrc file
|
||||
template:
|
||||
src: raxrc.j2
|
||||
|
@ -13,12 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
repo_package_name: raxmon
|
||||
|
||||
git_repo: https://github.com/rcbops/rpc-maas
|
||||
git_install_branch: "master"
|
||||
git_dest: /usr/lib/rackspace-monitoring-agent/plugins/
|
||||
|
||||
apt_container_keys:
|
||||
- { url: "https://monitoring.api.rackspacecloud.com/pki/agent/linux.asc", state: "present" }
|
||||
|
||||
@ -28,7 +22,7 @@ apt_container_repos:
|
||||
container_packages:
|
||||
- rackspace-monitoring-agent
|
||||
|
||||
service_pip_dependencies:
|
||||
- rackspace-monitoring-cli
|
||||
|
||||
pip_requirements_file: "/usr/lib/rackspace-monitoring-agent/plugins/requirements.txt"
|
||||
|
||||
git_repo: https://github.com/rcbops/rpc-maas.git
|
||||
git_install_branch: master
|
17
rpc_deployment/vars/repo_packages/raxmon_cli.yml
Normal file
17
rpc_deployment/vars/repo_packages/raxmon_cli.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
# Copyright 2014, Rackspace US, 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.
|
||||
|
||||
service_pip_dependencies:
|
||||
- rackspace-monitoring-cli
|
@ -228,7 +228,6 @@ maas_monitoring_zones:
|
||||
- mzord
|
||||
- mzlon
|
||||
- mzhkg
|
||||
maas_repo_version: v9.0.0
|
||||
## Neutron Options
|
||||
neutron_container_mysql_password: secrete
|
||||
neutron_service_password: secrete
|
||||
|
Loading…
Reference in New Issue
Block a user