]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
teuthology: Serve logs over http 148/head
authorZack Cerza <zack@redhat.com>
Fri, 2 Oct 2015 22:35:20 +0000 (16:35 -0600)
committerZack Cerza <zack@redhat.com>
Fri, 2 Oct 2015 22:35:20 +0000 (16:35 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
roles/teuthology/tasks/main.yml
roles/teuthology/tasks/setup_log_access.yml [new file with mode: 0644]
roles/teuthology/tasks/setup_users.yml
roles/teuthology/templates/nginx.conf [new file with mode: 0644]
roles/teuthology/templates/teuthology.yaml [new file with mode: 0644]
roles/teuthology/vars/apt_systems.yml

index a4bc92a5773c9dce84ebfae2184cc60c01ceb13c..08a121db06532de550a2aac8d424e551d09af57b 100644 (file)
@@ -8,3 +8,12 @@
 
 # Set up the different users that teuthology uses
 - include: setup_users.yml
+
+- name: Ship /etc/teuthology.yaml
+  template:
+    src: teuthology.yaml
+    dest: /etc/teuthology.yaml
+    mode: 0755
+
+# Serve logs over HTTP
+- include: setup_log_access.yml
diff --git a/roles/teuthology/tasks/setup_log_access.yml b/roles/teuthology/tasks/setup_log_access.yml
new file mode 100644 (file)
index 0000000..af84f79
--- /dev/null
@@ -0,0 +1,29 @@
+---
+- name: Disable default nginx config
+  file:
+    name: /etc/nginx/sites-enabled/default
+    state: absent
+
+- name: Ship nginx config
+  template:
+    src: nginx.conf
+    dest: /etc/nginx/sites-available/test_logs
+
+- name: Enable nginx config
+  file:
+    src: /etc/nginx/sites-available/test_logs
+    dest: /etc/nginx/sites-enabled/test_logs
+    state: link
+
+- name: Disable apache httpd
+  service:
+    name: "{{ apache_service }}"
+    enabled: no
+    state: stopped
+
+- name: Enable nginx
+  service:
+    name: nginx
+    enabled: yes
+    state: reloaded
+  changed_when: false
index 620a3062dc5e9a7a2fc4e7424de9234295cd65e0..f1b39d12b54b3615da6b5b8946b69c1fa337f788 100644 (file)
@@ -25,6 +25,8 @@
   with_items: "{{ teuthology_users }}"
   register: bootstrap
   changed_when: bootstrap.stdout_lines[-1]|length > 60
+  tags:
+    - repos
   
 - name: Add teuthology scripts to PATH
   lineinfile:
diff --git a/roles/teuthology/templates/nginx.conf b/roles/teuthology/templates/nginx.conf
new file mode 100644 (file)
index 0000000..ce7a6db
--- /dev/null
@@ -0,0 +1,8 @@
+# {{ ansible_managed }}
+server {
+        allow all;
+        autoindex on;
+        server_name {{ inventory_hostname }};
+        root /home/teuthworker/archive;
+        default_type text/plain;
+}
diff --git a/roles/teuthology/templates/teuthology.yaml b/roles/teuthology/templates/teuthology.yaml
new file mode 100644 (file)
index 0000000..e562146
--- /dev/null
@@ -0,0 +1,16 @@
+# {{ ansible_managed }}
+lock_server: {{ paddles_address }}
+results_server: {{ paddles_address }}
+results_ui_server: {{ pulpito_address }}
+results_email: {{ teuthology_results_email|default('null') }}
+results_sending_email: {{ teuthology_results_sending_email|default('null') }}
+lab_domain: {{ lab_domain }}
+default_machine_type: {{ teuthology_default_machine_type|default('null') }}
+# Not yet configurable via ansible
+archive_server: http://{{ inventory_hostname }}/
+archive_base: /home/teuthworker/archive
+ceph_git_base_url: git://git.ceph.com/
+gitbuilder_host: gitbuilder.ceph.redhat.com
+max_job_time: 129600
+queue_host: localhost
+queue_port: 11300
index 5711d6fa3ca7acc022a484642b56b8346ed142ee..b5874e1909cf4b3f58aa32d919d7ab8675b63c1d 100644 (file)
@@ -13,3 +13,7 @@ teuthology_extra_packages:
   - libffi-dev
   - libssl-dev
   - libyaml-dev
+  # The following are requirements for serving teuthology logs
+  - nginx
+
+apache_service: apache2