|
| 1 | +Upload logs to S3 |
| 2 | + |
| 3 | +Before using this role, create at least one bucket and set up |
| 4 | +appropriate access controls or lifecycle events. This role will not |
| 5 | +automatically create buckets. |
| 6 | + |
| 7 | +This role requires the ``boto3`` Python package to be |
| 8 | +installed in the Ansible environment on the Zuul executor. |
| 9 | + |
| 10 | +**Role Variables** |
| 11 | + |
| 12 | +.. zuul:rolevar:: zuul_site_upload_logs |
| 13 | + :default: true |
| 14 | + |
| 15 | + Controls when logs are uploaded. true, the default, means always |
| 16 | + upload logs. false means never upload logs. 'failure' means to only |
| 17 | + upload logs when the job has failed. |
| 18 | + |
| 19 | + .. note:: Intended to be set by admins via site-variables. |
| 20 | + |
| 21 | +.. zuul:rolevar:: zuul_log_partition |
| 22 | + :default: false |
| 23 | + |
| 24 | + If set to true, then the first component of the log path will be |
| 25 | + removed from the object name and added to the bucket name, so that |
| 26 | + logs for different changes are distributed across a large number of |
| 27 | + buckets. |
| 28 | + |
| 29 | +.. zuul:rolevar:: zuul_log_bucket |
| 30 | +
|
| 31 | + This role *will not* create buckets which do not already exist. If |
| 32 | + partitioning is not enabled, this is the name of the bucket which |
| 33 | + will be used. If partitioning is enabled, then this will be used |
| 34 | + as the prefix for the bucket name which will be separated from the |
| 35 | + partition name by an underscore. For example, "logs_42" would be |
| 36 | + the bucket name for partition 42. |
| 37 | + |
| 38 | + Note that you will want to set this to a value that uniquely |
| 39 | + identifies your Zuul installation. |
| 40 | + |
| 41 | +.. zuul:rolevar:: zuul_log_bucket_public |
| 42 | + :default: true |
| 43 | + |
| 44 | + Set to false to make logs private. |
| 45 | + |
| 46 | +.. zuul:rolevar:: zuul_log_path |
| 47 | + :default: Generated by the role `set-zuul-log-path-fact` |
| 48 | + |
| 49 | + Prepend this path to the object names when uploading. |
| 50 | + |
| 51 | +.. zuul:rolevar:: zuul_log_create_indexes |
| 52 | + :default: true |
| 53 | + |
| 54 | + Whether to create `index.html` files with directory indexes. |
| 55 | + |
| 56 | +.. zuul:rolevar:: zuul_log_aws_access_key |
| 57 | +
|
| 58 | + AWS access key to use. |
| 59 | + |
| 60 | +.. zuul:rolevar:: zuul_log_aws_secret_key |
| 61 | +
|
| 62 | + AWS secret key for the AWS access key. |
| 63 | + |
| 64 | +.. zuul:rolevar:: upload_logs_s3_endpoint |
| 65 | +
|
| 66 | + The endpoint to use when uploading logs to an s3 compatible service. |
| 67 | + By default this will be automatically constructed by boto but should be set when working with non-aws hosted s3 service. |
0 commit comments