diff --git a/etc/rpc_deploy/user_variables.yml b/etc/rpc_deploy/user_variables.yml index efb9d73295..31f2486f18 100644 --- a/etc/rpc_deploy/user_variables.yml +++ b/etc/rpc_deploy/user_variables.yml @@ -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 diff --git a/rpc_deployment/inventory/group_vars/hosts.yml b/rpc_deployment/playbooks/monitoring/raxmon-all.yml similarity index 71% rename from rpc_deployment/inventory/group_vars/hosts.yml rename to rpc_deployment/playbooks/monitoring/raxmon-all.yml index 4fdfe6cf8e..ae0800b3f3 100644 --- a/rpc_deployment/inventory/group_vars/hosts.yml +++ b/rpc_deployment/playbooks/monitoring/raxmon-all.yml @@ -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 diff --git a/rpc_deployment/playbooks/monitoring/raxmon-setup.yml b/rpc_deployment/playbooks/monitoring/raxmon_agent.yml similarity index 95% rename from rpc_deployment/playbooks/monitoring/raxmon-setup.yml rename to rpc_deployment/playbooks/monitoring/raxmon_agent.yml index 3955c3e595..11ac13de5b 100644 --- a/rpc_deployment/playbooks/monitoring/raxmon-setup.yml +++ b/rpc_deployment/playbooks/monitoring/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 diff --git a/rpc_deployment/playbooks/monitoring/raxmon_cli.yml b/rpc_deployment/playbooks/monitoring/raxmon_cli.yml new file mode 100644 index 0000000000..7f525064c0 --- /dev/null +++ b/rpc_deployment/playbooks/monitoring/raxmon_cli.yml @@ -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 diff --git a/rpc_deployment/roles/raxmon_agent_install/tasks/main.yml b/rpc_deployment/roles/raxmon_agent_install/tasks/main.yml index cf6b431cfb..57864265fb 100644 --- a/rpc_deployment/roles/raxmon_agent_install/tasks/main.yml +++ b/rpc_deployment/roles/raxmon_agent_install/tasks/main.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" diff --git a/rpc_deployment/roles/raxmon_cli/tasks/main.yml b/rpc_deployment/roles/raxmon_cli/tasks/main.yml index aaf056e8b6..47b72f0a90 100644 --- a/rpc_deployment/roles/raxmon_cli/tasks/main.yml +++ b/rpc_deployment/roles/raxmon_cli/tasks/main.yml @@ -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 diff --git a/rpc_deployment/vars/repo_packages/raxmon.yml b/rpc_deployment/vars/repo_packages/raxmon_agent.yml similarity index 82% rename from rpc_deployment/vars/repo_packages/raxmon.yml rename to rpc_deployment/vars/repo_packages/raxmon_agent.yml index dd254b2033..c6bb33043e 100644 --- a/rpc_deployment/vars/repo_packages/raxmon.yml +++ b/rpc_deployment/vars/repo_packages/raxmon_agent.yml @@ -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 diff --git a/rpc_deployment/vars/repo_packages/raxmon_cli.yml b/rpc_deployment/vars/repo_packages/raxmon_cli.yml new file mode 100644 index 0000000000..e16cc0f155 --- /dev/null +++ b/rpc_deployment/vars/repo_packages/raxmon_cli.yml @@ -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 diff --git a/scripts/cloudserver-aio.sh b/scripts/cloudserver-aio.sh index 8cb921d95a..d9ea7be561 100755 --- a/scripts/cloudserver-aio.sh +++ b/scripts/cloudserver-aio.sh @@ -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