diff --git a/prometheus/README.rst b/prometheus/README.rst new file mode 100644 index 00000000..f2c34c1b --- /dev/null +++ b/prometheus/README.rst @@ -0,0 +1,36 @@ +Install Prometheus +################## +:tags: openstack, ansible + +About this repository +--------------------- + +This set of playbooks will deploy Prometheus. If this is being deployed as part of +an OpenStack all of the inventory needs will be provided for. + +**These playbooks require Ansible 2.4+.** + +Deployment Process +------------------ + +Clone the repo + +.. code-block:: bash + + cd /opt + git clone https://github.com/openstack/openstack-ansible-ops + +Downloading role dependencies + +.. code-block:: bash + + cd /opt/openstack-ansible-ops/prometheus + ansible-galaxy install -r ansible-role-requirements.yml + + +Install node_exporter + +.. code-block:: bash + + cd /opt/openstack-ansible-ops/prometheus + openstack-ansible installNodeExporter.yml diff --git a/prometheus/ansible-role-requirements.yml b/prometheus/ansible-role-requirements.yml new file mode 100644 index 00000000..68f9b8c4 --- /dev/null +++ b/prometheus/ansible-role-requirements.yml @@ -0,0 +1,5 @@ +--- +- name: node-exporter + scm: git + src: https://github.com/cloudalchemy/ansible-node-exporter + version: master diff --git a/prometheus/installNodeExporter.yml b/prometheus/installNodeExporter.yml new file mode 100644 index 00000000..e840f5ca --- /dev/null +++ b/prometheus/installNodeExporter.yml @@ -0,0 +1,20 @@ +--- +# 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. + +- name: node_exporter + hosts: hosts + vars_files: + - vars/variables.yml + roles: + - role: node-exporter diff --git a/prometheus/vars/variables.yml b/prometheus/vars/variables.yml new file mode 100644 index 00000000..42f6a661 --- /dev/null +++ b/prometheus/vars/variables.yml @@ -0,0 +1 @@ +node_exporter_web_listen_address: "{{ ansible_host }}:9100"