#12259 Add versioning/lifecycle config to prod FCOS S3 bucket
Closed: Fixed with Explanation a month ago by kevin. Opened a month ago by gursewak.

Describe what you would like us to do:

We are initiating garbage collection for FCOS builds, which will update or delete contents in the production S3 bucket (/s3/buckets/fcos-builds). Currently, versioning and lifecycle configuration are not set up. Let us

  • Enable versioning for this bucket.
  • Add lifecycle configuration rules to remove old object versions 14 days after they become non-current. Also, make sure to delete delete markers when no object versions remain, helping to maintain a tidy bucket.

We have created a quick doc that one can refer and implement to the respective bucket
https://github.com/coreos/fedora-coreos-pipeline/blob/main/docs/s3-bucket-versioning.md

When do you need this to be done by?

2024/11/01
No hard deadline though but sooner so we can enable the GC to the FCOS builds:)


Note the name of the bucket we want this done for is fcos-builds.

Metadata Update from @phsmoura:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: medium-gain, medium-trouble, ops

a month ago

Metadata Update from @kevin:
- Issue assigned to kevin

a month ago

Done.

➜  ~ export BUCKET_NAME=fcos-builds                                                             
➜  ~ aws s3api put-bucket-versioning \                                                          
--bucket $BUCKET_NAME \                                                                         
--versioning-configuration Status=Enabled                                                       
➜  ~ aws s3api get-bucket-versioning --bucket fcos-builds
-----------------------
| GetBucketVersioning |
+---------+-----------+
|  Status |  Enabled  |
+---------+-----------+
➜  ~ aws s3api put-bucket-lifecycle-configuration \
--bucket $BUCKET_NAME \
--lifecycle-configuration file://lifecycle.json
--------------------------------------------------------------------
|                  PutBucketLifecycleConfiguration                 |
+-------------------------------------+----------------------------+
|  TransitionDefaultMinimumObjectSize |  all_storage_classes_128K  |
+-------------------------------------+----------------------------+
➜  ~ aws s3api get-bucket-lifecycle-configuration --bucket $BUCKET_NAME
--------------------------------------------------------------------
|                  GetBucketLifecycleConfiguration                 |
+-------------------------------------+----------------------------+
|  TransitionDefaultMinimumObjectSize |  all_storage_classes_128K  |
+-------------------------------------+----------------------------+
||                              Rules                             ||
|+-----------------------------------------+----------------------+|
||                   ID                    |       Status         ||
|+-----------------------------------------+----------------------+|
||  DeleteOldVersions                      |  Enabled             ||
|+-----------------------------------------+----------------------+|
|||                          Expiration                          |||
||+------------------------------------------------+-------------+||
|||  ExpiredObjectDeleteMarker                     |  True       |||
||+------------------------------------------------+-------------+||
|||                  NoncurrentVersionExpiration                 |||
||+----------------------------------------------+---------------+||
|||  NoncurrentDays                              |  14           |||
||+----------------------------------------------+---------------+||

Let us know if you need anything else.

Metadata Update from @kevin:
- Issue close_status updated to: Fixed with Explanation
- Issue status updated to: Closed (was: Open)

a month ago

Log in to comment on this ticket.

Metadata
Boards 1
ops Status: Backlog