Migrating Codestation from filesystem repositories to S3 repositories#

Starting in HCL™ Launch v.7.0.5 you can migrate Codestation from filesystem into S3 repositories.

Parameters Description
bucketName The name of the bucket in S3.
s3url The URL of the S3 provider. If using Amazon Web Services (AWS) you do not need this.
s3region The region of the S3 provider.
s3user S3 username, optional depending on the S3 provider and system configuration. AWS uses APIKEY.
password S3 password. optional depending 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. Default location in server is appdata/var/repository.
verify Whether or not to enable verify mode. If true, files will not be uploaded to S3. Instead the tool will verify that all expected files currently in Codestation on the filesystem are in S3.
  1. Download S3 Migrator Jar file from the Tools page on machine that can access both current Codestation and S3 URLs.

  2. Run S3 Migrator tool and follow usage below.

    Usage: java -jar s3migrator.jar -repo <repositoryLocation> -bucket <bucketName> [-url <s3url>] [-region <s3region>] [-user <s3user>] [-password <password>] [-s3signerOverride <signer>] [-enablePathStyleAccess <true|false(default false)>] [-verify <true|false(default false)>]

    Example: java -jar s3migrator.jar -repo /opt/ucd/server/appdata/var/repository -bucket ucdCodestation

    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 Launch server. It can also be ran while the HCL Launch 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.

    ``` #installed.properties
    #required codestation.provider=s3
    codestation.s3.bucket=<bucketname>
    codestation.s3.region=<region>

    #optional / setup dependent
    codestation.s3.user=<api key>
    codestation.s3.url=<customUrl>
    codestation.s3.signerOverride=<alg>
    codestation.s3.enablePathStyleAccess=<true/false>

    #secured-installed.properties
    codestation.s3.password=<api secret> ```

  4. Restart server.

Parent topic: Upgrading and migrating