Nextflow: Add support for Amazon CodeCommit

Created on 30 Jul 2015  路  13Comments  路  Source: nextflow-io/nextflow

CodeCommit is a code repository hosted on Amazon AWS.

The main benefit is that it allows large files to be stored on it (up to 2GB per file).

Configuration doc is available at this link.

API documentation is available at this link.

kinfeature pinned

All 13 comments

At this time this feature is not relevant. Closing for now.

Curious if there is interest in re-opening this issue and targeting accessing AWS CodeCommit using git-remote-codecommit over HTTPS as documented here:

https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-git-remote-codecommit.html

This would allow users to run workflows in a privately hosted AWS CodeCommit repo via:

nextflow run codecommit::<region>://<repository-name> ...

This would be particularly useful for running Nextflow on "batch-squared" architecture where the master nextflow job uses temporary credentials from the host instance or job role.

Don't remember exactly which technical issue I've found adding the support for CodeCommit. Does it support HTTP/S transport?

Yes, CodeCommit supports both SSH and HTTPS transport. For HTTPS, there are a couple options:

+1! I was also just looking for this.
It would be great to have it

@pditommaso - looking through the base provider, and wanted to clarify - does Nextflow primarily use HTTP/S API calls to get repo files? Could there be an option to rely on an installed version of git?

NF uses the provider REST API to fetch the clone URL and read the pipeline config file(s) remotely i.e. without cloning it.

Once it fetched the clone url, it pulls the project using the embedded Git client:

https://github.com/nextflow-io/nextflow/blob/55be0762950184114877519fdb810afc199478f4/modules/nextflow/src/main/groovy/nextflow/scm/AssetManager.groovy#L571

Therefore don't think an installed version of git would help a lot. Not sure CodeCommit has a REST API to fetch repository metadata. If I remember well this was the problem I met when trying to implement the support for it.

While you can you use a REST API with CodeCommit, you would need to handle the Sigv4 signing process to access it. These actions are encapsulated by the AWS SDK. So actions to get file contents and read branches would be SDK calls.

Therefore it needs to be authenticated via the AWS SDK for Java, that looks feasible.

Is there somewhere else besides scm/ProviderConfig.groovy that needs to have the provider registered? I've got the AWS CodeCommit provider coded up, but the build doesn't recognize it. Instead, I get the following:

Unknown repository provider: `codecommit`'. Did you mean?
  github
  gitlab
  gitea
  bitbucket

In scm/ProviderConfig.groovy I have the following:

    static private void addDefaults(List<ProviderConfig> result) {
        if( !result.find{ it.name == 'github' })
            result << new ProviderConfig('github')

        if( !result.find{ it.name == 'gitlab' })
            result << new ProviderConfig('gitlab')

        if( !result.find{ it.name == 'gitea' })
            result << new ProviderConfig('gitea')

        if( !result.find{ it.name == 'bitbucket' })
            result << new ProviderConfig('bitbucket')

        if( !result.find{ it.name == 'codecommit' })
            result << new ProviderConfig('codecommit')
    }

And in scm/RepositoryProvider.groovy I have the following:

    static RepositoryProvider create( ProviderConfig config, String project ) {
        switch(config.platform) {
            case 'github':
                return new GithubRepositoryProvider(project, config)

            case 'bitbucket':
                return new BitbucketRepositoryProvider(project, config)

            case 'bitbucketserver':
                return new BitbucketServerRepositoryProvider(project, config)

            case 'gitlab':
                return new GitlabRepositoryProvider(project, config)

            case 'gitea':
                return new GiteaRepositoryProvider(project, config)

            case 'codecommit':
                return new AwsCodeCommitRepositoryProvider(project, config)

            case 'file':
                // remove the 'local' prefix for the file provider
                def localName = project.tokenize('/').last()
                return new LocalRepositoryProvider(localName, config)
        }

        throw new AbortOperationException("Unkwnon project repository platform: ${config.platform}")
    }

I figured it out - didn't see the instructions to run launch.sh after make compile.

Was this page helpful?
0 / 5 - 0 ratings