Browse Source

Document upload-logs reliance on add-fileserver

Change-Id: I0e12756e1f2a876e4f44678d61d64010bee33311
changes/72/632572/3
James E. Blair 5 months ago
parent
commit
2ef4caed78
2 changed files with 34 additions and 2 deletions
  1. 17
    1
      roles/add-fileserver/README.rst
  2. 17
    1
      roles/upload-logs/README.rst

+ 17
- 1
roles/add-fileserver/README.rst View File

@@ -7,7 +7,23 @@ in subsequent tasks or roles.
7 7
 
8 8
    Complex argument which contains the information about the remote
9 9
    destination as well as the authentication information needed. It is
10
-   expected that this argument comes from a `Secret`.
10
+   expected that this argument comes from a `Secret
11
+   <https://zuul-ci.org/docs/zuul/user/config.html#secret>`_
12
+
13
+   Example:
14
+
15
+   .. code-block:: yaml
16
+
17
+      - secret:
18
+          name: site_logs
19
+            data:
20
+              fqdn: logs.example.org
21
+              path: /srv/static/logs
22
+              ssh_known_hosts: |
23
+                logs.example.org ssh-rsa ...
24
+              ssh_username: zuul
25
+              ssh_private_key: !encrypted/pkcs1-oaep
26
+                - ...
11 27
 
12 28
    .. zuul:rolevar:: fqdn
13 29
 

+ 17
- 1
roles/upload-logs/README.rst View File

@@ -1,6 +1,22 @@
1 1
 Upload logs to a static webserver
2 2
 
3
-This uploads logs to a static webserver using SSH.
3
+This uploads logs to a static server using SSH.  The server must have
4
+been previously added to the inventory; this can be done with the
5
+:zuul:role:`add-fileserver` role; see that role's documentation for a
6
+description of the site_logs secret in this example post-run playbook:
7
+
8
+.. code-block:: yaml
9
+
10
+   - hosts: localhost
11
+     roles:
12
+       - role: add-fileserver
13
+         fileserver: "{{ site_logs }}"
14
+
15
+   - hosts: "{{ site_logs.fqdn }}"
16
+     gather_facts: False
17
+     roles:
18
+       - role: upload-logs
19
+         zuul_log_url: "http://logs.example.org"
4 20
 
5 21
 **Role Variables**
6 22
 

Loading…
Cancel
Save