Archiving version artifacts to Amazon S3

You can archive version artifacts to Amazon S3 to manage and prevent the accumulation of unwanted versions.

About this task

Configuring archiving to Amazon S3 involves adding S3 properties to the devops-deploy\server\conf\server\installed.properties file. After archiving is configured, the archived versions are stored in an Amazon S3 bucket in the specified region.
Note: Codestation artifacts and archived versions must use a different S3 bucket. If you configure them to use the same bucket name, the archiving does not work.

You can restore archived artifacts by navigating to Components > selected component > Versions > selected version and clicking Restore from Backup in the Artifacts table.

Procedure

  1. Configure the server to use Amazon S3 by adding or modifying the properties below:
    # Example config
    versionArchive.s3.bucket=yourS3bucketname
    versionArchive.s3.url=S3Url
    versionArchive.s3.accessKey=api_key
    versionArchive.s3.secretKey=api_secret
    
    # Alternative options
    versionArchive.s3.region=S3regionName
    versionArchive.s3.enablePathStyleAccess=trueORfalse
    versionArchive.s3.signerOverride=SigV2
    
    # Force on/off
    versionArchive.s3.enabled=trueORfalse
    Note:
    • Replace all user-provided values such as yourS3bucketname with values according to your S3 configuration.
    • Set versionArchive.s3.enabled to true to allow the server to check for the required configurations. If any configurations are missing, the server generates an error message. If set to false, missing configurations are ignored and S3 archiving is disabled.

    If you have pre-configured Codestation S3 properties, you can reuse them by mapping them to the new version archive properties as follows:

    # Codestation S3 config that can be reused
    # Codestation Property (Source)       => Version Archive Property (Target)
    codestation.s3.url                    => versionArchive.s3.url
    codestation.s3.region                 => versionArchive.s3.region
    codestation.s3.user                   => versionArchive.s3.accessKey
    codestation.s3.password               => versionArchive.s3.secretKey
    codestation.s3.enablePathStyleAccess  => versionArchive.s3.enablePathStyleAccess
    codestation.s3.signerOverride         => versionArchive.s3.signerOverride

    Optional: If you are using a RustFS container, you must configure the properties by specifying the following parameters:

    # RustFS container config
    # - enablePathStyleAccess=true is critical
    # - do not put bucket name in url
    versionArchive.s3.bucket=yourS3bucketname
    versionArchive.s3.url=S3Url
    versionArchive.s3.enablePathStyleAccess=true
    versionArchive.s3.accessKey=api_key
    versionArchive.s3.secretKey=api_secret
    Note: You must enable the Path-Style Access, and the URL must not include the bucket name.
  2. Save and restart the server.

Results

The archived artifacts are now zipped and moved to the specified S3 bucket.