Document Scheduled Tasks to configure in Nexus 72/11972/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 24 Jul 2018 21:18:51 +0000 (17:18 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 24 Jul 2018 21:50:25 +0000 (17:50 -0400)
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 <thanh.ha@linuxfoundation.org>
docs/infra/bootstrap.rst
docs/infra/nexus-purge-3-week-old-snapshots.example [new file with mode: 0644]
docs/infra/nexus-purge-old-snapshots.example [new file with mode: 0644]
docs/infra/nexus-purge-old-staging.example [new file with mode: 0644]
docs/infra/nexus-purge-trash.example [new file with mode: 0644]
docs/infra/nexus-rebuild-metadata.example [new file with mode: 0644]
docs/infra/nexus.rst

index 32950be..6c4f7b8 100644 (file)
@@ -683,3 +683,4 @@ Nexus
 -----
 
 * :ref:`Setup Log server <nexus-log-server>`
+* :ref:`Setup Scheduled Tasks <nexus-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 (file)
index 0000000..3f0d0d9
--- /dev/null
@@ -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 (file)
index 0000000..5bac3c6
--- /dev/null
@@ -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 (file)
index 0000000..da3fcf6
--- /dev/null
@@ -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 (file)
index 0000000..455d753
--- /dev/null
@@ -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 (file)
index 0000000..a63a0af
--- /dev/null
@@ -0,0 +1,4 @@
+Name: LF Rebuild metadata
+Task Type: Rebuild Maven Metadata Files
+Repository/Group: All Repositories
+Recurrence: Daily
index 699bfe9..37b9d4d 100644 (file)
@@ -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