Browse Source

A few changes:

Updating ssl_generation path
Adding var for rabbitmq service name
Rename redis service to 'redis' on Ubuntu
Update uchiwa deb check to use sha256
Added deployment of Uchiwa config for Ubuntu
Commented out some stuff for the moment
cmacrae 10 years ago
parent
commit
ae9e3e196b

+ 6 - 5
defaults/main.yml

@@ -7,6 +7,7 @@ rabbitmq_host: "{{ groups['rabbitmq_servers'][0] }}"
 rabbitmq_port: 5671
 rabbitmq_port: 5671
 rabbitmq_pkg_state: present
 rabbitmq_pkg_state: present
 rabbitmq_server: false
 rabbitmq_server: false
+rabbitmq_service_name: rabbitmq-server
 rabbitmq_sensu_user_name: sensu
 rabbitmq_sensu_user_name: sensu
 rabbitmq_sensu_password: sensu
 rabbitmq_sensu_password: sensu
 rabbitmq_sensu_vhost: /sensu
 rabbitmq_sensu_vhost: /sensu
@@ -39,11 +40,11 @@ sensu_user_name: sensu
 
 
 # Sensu/RabbitMQ SSL certificate properties
 # Sensu/RabbitMQ SSL certificate properties
 sensu_ssl_gen_certs: true
 sensu_ssl_gen_certs: true
-sensu_ssl_client_cert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/ssl_certs/client/cert.pem"
-sensu_ssl_client_key: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/ssl_certs/client/key.pem"
-sensu_ssl_server_cacert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/ssl_certs/sensu_ca/cacert.pem"
-sensu_ssl_server_cert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/ssl_certs/server/cert.pem"
-sensu_ssl_server_key: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/ssl_certs/server/key.pem"
+sensu_ssl_client_cert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/client/cert.pem"
+sensu_ssl_client_key: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/client/key.pem"
+sensu_ssl_server_cacert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/sensu_ca/cacert.pem"
+sensu_ssl_server_cert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/server/cert.pem"
+sensu_ssl_server_key: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/server/key.pem"
   
   
 # Uchiwa properties
 # Uchiwa properties
 uchiwa_dc_name: ~
 uchiwa_dc_name: ~

+ 2 - 2
docs/dynamic_data.md

@@ -54,7 +54,7 @@ As you can see, it resembles the file tree from the node it fetched the data fro
 Next up is this rather unsightly play (still from the `tasks/ssl.yml` playbook):
 Next up is this rather unsightly play (still from the `tasks/ssl.yml` playbook):
 ``` yaml
 ``` yaml
   - name: Deploy the Sensu client SSL cert/key
   - name: Deploy the Sensu client SSL cert/key
-    copy: src={{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/ssl_certs/client/{{ item }}
+    copy: src={{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/client/{{ item }}
           owner={{ sensu_user_name }} group={{ sensu_group_name }}
           owner={{ sensu_user_name }} group={{ sensu_group_name }}
           dest={{ sensu_config_path }}/ssl
           dest={{ sensu_config_path }}/ssl
     with_items:
     with_items:
@@ -69,7 +69,7 @@ The same method is used for node communication with RabbitMQ:
 `tasks/rabbitmq.yml`
 `tasks/rabbitmq.yml`
 ``` yaml
 ``` yaml
   - name: Ensure RabbitMQ SSL certs/keys are in place
   - name: Ensure RabbitMQ SSL certs/keys are in place
-    copy: src={{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/ssl_certs/{{ item }}
+    copy: src={{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/{{ item }}
           dest={{ rabbitmq_config_path }}/ssl
           dest={{ rabbitmq_config_path }}/ssl
     with_items:
     with_items:
       - sensu_ca/cacert.pem
       - sensu_ca/cacert.pem

+ 5 - 1
tasks/Ubuntu/dashboard.yml

@@ -7,7 +7,11 @@
   - name: Retrieve the Uchiwa deb package
   - name: Retrieve the Uchiwa deb package
     get_url: url={{ uchiwa_pkg_download_url }}
     get_url: url={{ uchiwa_pkg_download_url }}
              dest={{ uchiwa_pkg_download_path }}
              dest={{ uchiwa_pkg_download_path }}
-             checksum=md5:{{ uchiwa_pkg_download_md5 }}
+             sha256sum={{ uchiwa_pkg_download_sha256sum }}
 
 
   - name: Install Uchiwa from the retrieved deb package
   - name: Install Uchiwa from the retrieved deb package
     apt: deb={{ uchiwa_pkg_download_path }} 
     apt: deb={{ uchiwa_pkg_download_path }} 
+
+  - name: Deploy Uchiwa config
+    template: src=../../templates/uchiwa_config.json.j2 dest={{ sensu_config_path }}/uchiwa.json
+    notify: restart uchiwa service

+ 1 - 1
tasks/Ubuntu/rabbit.yml

@@ -13,5 +13,5 @@
                     state=present update_cache=yes
                     state=present update_cache=yes
 
 
   - name: Ensure RabbitMQ is installed
   - name: Ensure RabbitMQ is installed
-    apt: name=rabbitmq state={{ rabbitmq_pkg_state }}
+    apt: name=rabbitmq-server state={{ rabbitmq_pkg_state }}
          update_cache=yes
          update_cache=yes

+ 2 - 2
tasks/Ubuntu/redis.yml

@@ -13,5 +13,5 @@
          update_cache=yes
          update_cache=yes
 
 
   - name: Deploy Redis systemd service manifest
   - name: Deploy Redis systemd service manifest
-    copy: src=ubuntu_redis_systemd.service
-          dest=/etc/systemd/system/redis-server.service
+    copy: src=../../files/ubuntu_redis_systemd.service
+          dest=/etc/systemd/system/redis.service

+ 11 - 11
tasks/plugins.yml

@@ -29,14 +29,14 @@
           owner={{ sensu_user_name }} group={{ sensu_group_name }}
           owner={{ sensu_user_name }} group={{ sensu_group_name }}
     notify: restart sensu-client service
     notify: restart sensu-client service
 
 
-  - name: Deploy filter plugins
-    copy: src={{ static_data_store }}/sensu/filters/
-          dest={{ sensu_config_path }}/plugins/ mode=755
-          owner={{ sensu_user_name }} group={{ sensu_group_name }}
-    notify: restart sensu-client service
-
-  - name: Deploy mutator plugins
-    copy: src={{ static_data_store }}/sensu/mutators/
-          dest={{ sensu_config_path }}/plugins/ mode=755
-          owner={{ sensu_user_name }} group={{ sensu_group_name }}
-    notify: restart sensu-client service
+#  - name: Deploy filter plugins
+#    copy: src={{ static_data_store }}/sensu/filters/
+#          dest={{ sensu_config_path }}/plugins/ mode=755
+#          owner={{ sensu_user_name }} group={{ sensu_group_name }}
+#    notify: restart sensu-client service
+#
+#  - name: Deploy mutator plugins
+#    copy: src={{ static_data_store }}/sensu/mutators/
+#          dest={{ sensu_config_path }}/plugins/ mode=755
+#          owner={{ sensu_user_name }} group={{ sensu_group_name }}
+#    notify: restart sensu-client service

+ 1 - 1
tasks/rabbit.yml

@@ -32,7 +32,7 @@
     service: name={{ item }} state=started enabled=true
     service: name={{ item }} state=started enabled=true
     with_items:
     with_items:
       - epmd
       - epmd
-      - rabbitmq
+      - "{{ rabbitmq_service_name }}"
 
 
   - name: Wait for RabbitMQ to be up and running before asking to create a vhost
   - name: Wait for RabbitMQ to be up and running before asking to create a vhost
     pause: seconds=3
     pause: seconds=3

+ 5 - 5
tasks/ssl_generate.yml

@@ -17,7 +17,7 @@
 
 
   - name: Fetch the ssl_certs tarball from sensuapp.org
   - name: Fetch the ssl_certs tarball from sensuapp.org
     get_url: url=http://sensuapp.org/docs/0.20/files/sensu_ssl_tool.tar
     get_url: url=http://sensuapp.org/docs/0.20/files/sensu_ssl_tool.tar
-             dest={{ sensu_config_path }}/ssl_generation/ssl_certs.tar
+             dest={{ sensu_config_path }}/ssl_generation/sensu_ssl_tool.tar
     when: sensu_master
     when: sensu_master
     sudo: yes
     sudo: yes
     sudo_user: "{{ sensu_user_name }}"
     sudo_user: "{{ sensu_user_name }}"
@@ -25,21 +25,21 @@
   - name: Untar the ssl_certs tarball from sensuapp.org
   - name: Untar the ssl_certs tarball from sensuapp.org
     shell: tar xf ssl_certs.tar chdir={{ sensu_config_path }}/ssl_generation
     shell: tar xf ssl_certs.tar chdir={{ sensu_config_path }}/ssl_generation
     args:
     args:
-      creates: "{{ sensu_config_path }}/ssl_generation/ssl_certs"
+      creates: "{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool"
     when: sensu_master
     when: sensu_master
     sudo: yes
     sudo: yes
     sudo_user: "{{ sensu_user_name }}"
     sudo_user: "{{ sensu_user_name }}"
 
 
   - name: Generate SSL certs
   - name: Generate SSL certs
-    shell: ./ssl_certs.sh generate chdir={{ sensu_config_path }}/ssl_generation/ssl_certs
+    shell: ./ssl_certs.sh generate chdir={{ sensu_config_path }}/ssl_generation/sensu_ssl_tool
     args:
     args:
-      creates: "{{ sensu_config_path }}/ssl_generation/ssl_certs/server"
+      creates: "{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/server"
     when: sensu_master
     when: sensu_master
     sudo: yes
     sudo: yes
     sudo_user: "{{ sensu_user_name }}"
     sudo_user: "{{ sensu_user_name }}"
 
 
   - name: Stash the Sensu SSL certs/keys
   - name: Stash the Sensu SSL certs/keys
-    fetch: src={{ sensu_config_path }}/ssl_generation/ssl_certs/{{ item }}
+    fetch: src={{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/{{ item }}
            dest={{ dynamic_data_store }}
            dest={{ dynamic_data_store }}
     when: sensu_master
     when: sensu_master
     with_items:
     with_items:

+ 1 - 0
vars/SmartOS.yml

@@ -3,6 +3,7 @@
 # Defaults are defined in vars/default.yml
 # Defaults are defined in vars/default.yml
 
 
 # RabbitMQ server properties
 # RabbitMQ server properties
+rabbitmq_service_name: rabbitmq
 rabbitmq_config_path: /opt/local/etc/rabbitmq
 rabbitmq_config_path: /opt/local/etc/rabbitmq
 
 
 # Sensu/Uchiwa user/group/service properties
 # Sensu/Uchiwa user/group/service properties

+ 1 - 1
vars/Ubuntu.yml

@@ -8,6 +8,6 @@ redis_pkg_repo: 'ppa:rwky/redis'
 # Sensu/Uchiwa user/group/service properties
 # Sensu/Uchiwa user/group/service properties
 sensu_user_name: root
 sensu_user_name: root
 sensu_group_name: root
 sensu_group_name: root
-uchiwa_pkg_download_md5: e8f2c4f12cf47e4e587947a2535c2458
+uchiwa_pkg_download_sha256sum: b21e30d9ed1393185667feaff457fe5684ad8c866906fefd7a2b7a69cdd729cd
 uchiwa_pkg_download_path: /root/uchiwa_latest.deb
 uchiwa_pkg_download_path: /root/uchiwa_latest.deb
 uchiwa_pkg_download_url: http://dl.bintray.com/palourde/uchiwa/uchiwa_0.12.1-1_amd64.deb
 uchiwa_pkg_download_url: http://dl.bintray.com/palourde/uchiwa/uchiwa_0.12.1-1_amd64.deb