Migrating Codestation from filesystem repositories to S3 repositories

Migrate your Codestation artifacts from filesystem to S3 using the S3 migrator tool.

About this task

You can migrate Codestation from filesystem into S3 repositories.
Table 1. Command line argument descriptions
Parameters Description
bucketName The name of the bucket in S3.
s3url The URL of the S3 provider.

Not required if using Amazon Web Services (AWS).

s3region The region of the S3 provider.

You must specify either s3url or s3region, but not both.

s3user The S3 username.

Optional, depending on the S3 provider and system configuration. AWS uses APIKEY.

password The S3 password.

Optional. The value depends on the S3 provider and system configuration. AWS uses secret key.

signer Optional. Consult S3 provider documentation for value. Not necessary for AWS.
enablePathStyleAccess Optional. Consult S3 provider for documentation if this is necessary. Not necessary for AWS.
repositoryLocation The location of Codestation repository.

The default location in server is appdata/var/repository.

verify Use this parameter to specify whether or not to enable verify mode.

If you specify true, files are not uploaded to S3. Instead, the tool verifies that all expected files currently in Codestation on the filesystem are in S3.

Migrate Codestation from filesystem repositories to S3 repositories as follows:


  1. Download S3 Migrator Jar file from the Tools page on machine that can access both current Codestation and S3 URLs.
  2. Run the S3 Migrator tool.
    java -jar s3migrator.jar -repo repositoryLocation -bucket bucketName [-url s3url] [-user s3user] [-password password] [-s3signerOverride signer] [-enablePathStyleAccess true|false(default false)] [-verify true|false(default false)]
    Example usage:
    java -jar s3migrator.jar -repo /opt/devops-deploy/server/appdata/var/repository -bucket deployCodestation
    Note: The migrate tool will upload the files which are in Codestation into S3. This can be ran on a server other than the HCL DevOps Deploy (Deploy) server. It can also be ran while the Deploy server is up and handling requests. You can run the tool multiple times. Depending on the size of the Codestation repo, the process may take awhile. The tool will only upload files not currently in S3. This will allow the tool to be ran over and over until the time to run it takes is short enough that the server can be shutdown for the last upload to ensure all artifacts are uploaded successfully.
  3. Configure server to use S3 by setting the below properties based on the values you specified when you set up your S3 bucket.
    codestation.s3.region=S3regionName or codestation.s3.url=S3customUrl 
      #optional / setup dependent   
    Note: Replace all user-provided values like yourS3bucketname with values as per your S3 configuration.
  4. Restart the server.
  5. Optional: If you need to roll back S3 migration to Codestation, run the migrator tool with updated properties.