From: Thanh Ha Date: Tue, 24 Jul 2018 21:18:51 +0000 (-0400) Subject: Document Scheduled Tasks to configure in Nexus X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=b31bcc8c2add58687063c114e2dd65a3c8edbcd8;p=releng%2Fdocs.git Document Scheduled Tasks to configure in Nexus Document the Scheduled Tasks that should be configured in Nexus for a new Project. Issue: RELENG-1048 Change-Id: I0327afbc15be72e5fe6ff6508aba56100283f239 Signed-off-by: Thanh Ha --- diff --git a/docs/infra/bootstrap.rst b/docs/infra/bootstrap.rst index 32950be..6c4f7b8 100644 --- a/docs/infra/bootstrap.rst +++ b/docs/infra/bootstrap.rst @@ -683,3 +683,4 @@ Nexus ----- * :ref:`Setup Log server ` +* :ref:`Setup Scheduled Tasks ` diff --git a/docs/infra/nexus-purge-3-week-old-snapshots.example b/docs/infra/nexus-purge-3-week-old-snapshots.example new file mode 100644 index 0000000..3f0d0d9 --- /dev/null +++ b/docs/infra/nexus-purge-3-week-old-snapshots.example @@ -0,0 +1,9 @@ +Name: LF Purge 3 week old SNAPSHOTs +Task Type: Remove Snapshots From Repository +Repository/Group: Snapshots (Repo) +Minimum snapshot count: 0 +Snapshot retention (days): 21 +Remove if released: True +Grace period after release (days): 21 +Delete immediately: True +Recurrence: Daily diff --git a/docs/infra/nexus-purge-old-snapshots.example b/docs/infra/nexus-purge-old-snapshots.example new file mode 100644 index 0000000..5bac3c6 --- /dev/null +++ b/docs/infra/nexus-purge-old-snapshots.example @@ -0,0 +1,9 @@ +Name: LF Purge week old SNAPSHOTs +Task Type: Remove Snapshots From Repository +Repository/Group: Snapshots (Repo) +Minimum snapshot count: 1 +Snapshot retention (days): 7 +Remove if released: True +Grace period after release (days): 21 +Delete immediately: True +Recurrence: Daily diff --git a/docs/infra/nexus-purge-old-staging.example b/docs/infra/nexus-purge-old-staging.example new file mode 100644 index 0000000..da3fcf6 --- /dev/null +++ b/docs/infra/nexus-purge-old-staging.example @@ -0,0 +1,8 @@ +Name: LF Purge old staging +Task Type: Drop Inactive Staging Repositories +Inactivity duration (days): 30 +Scan open repositories: True +Scan closed repositories: True +Scan promoted repositories: True +Scan released repositories: True +Recurrence: Daily diff --git a/docs/infra/nexus-purge-trash.example b/docs/infra/nexus-purge-trash.example new file mode 100644 index 0000000..455d753 --- /dev/null +++ b/docs/infra/nexus-purge-trash.example @@ -0,0 +1,4 @@ +Name: LF Purge trash +Task Type: Empty Trash +Repository/Group: All Repositories +Recurrence: Daily diff --git a/docs/infra/nexus-rebuild-metadata.example b/docs/infra/nexus-rebuild-metadata.example new file mode 100644 index 0000000..a63a0af --- /dev/null +++ b/docs/infra/nexus-rebuild-metadata.example @@ -0,0 +1,4 @@ +Name: LF Rebuild metadata +Task Type: Rebuild Maven Metadata Files +Repository/Group: All Repositories +Recurrence: Daily diff --git a/docs/infra/nexus.rst b/docs/infra/nexus.rst index 699bfe9..37b9d4d 100644 --- a/docs/infra/nexus.rst +++ b/docs/infra/nexus.rst @@ -25,6 +25,52 @@ of inodes such as XFS for the logs storage. OpenDaylight ran out of inodes before due to logs. Issue documented in Jira https://jira.linuxfoundation.org/browse/RELENG-773 +.. _nexus-scheduled-tasks: + +Scheduled Tasks +=============== + +We recommend configuring Nexus to clear out old SNAPSHOT artifacts as well as +old Staging repositories. Some projects may have specific policies set by the +TSC on how long artifacts need to stick around but below make a good starting +point. + +Purge old SNAPSHOTs +------------------- + +For purging SNAPSHOTs we should setup 2 jobs. + +The first job to purge week old artifacts but keep 1 SNAPSHOT around in +case the project has a broken merge job. + +The second job to purge all 3 week old artifacts. This is necessary is to +ensure that if a project removes a module from their build that downstream +projects will notice by fact of their builds failing to find this artifact. + +1. LF: Purge week old SNAPSHOTs + + .. literalinclude:: nexus-purge-old-snapshots.example + +2. LF: Purge 3 week old SNAPSHOTs + + .. literalinclude:: nexus-purge-3-week-old-snapshots.example + + +Purge old staging +----------------- + +.. literalinclude:: nexus-purge-old-staging.example + +Purge trash +----------- + +.. literalinclude:: nexus-purge-trash.example + +Rebuild metadata +---------------- + +.. literalinclude:: nexus-rebuild-metadata.example + .. _nexus-log-server: Use Nexus as a log server