cdk-gitlab


Namecdk-gitlab JSON
Version 2.0.96 PyPI version JSON
download
home_pagehttps://github.com/pahud/cdk-gitlab.git
SummaryHigh level CDK construct to provision GitLab integrations with AWS
upload_time2022-07-03 00:34:53
maintainer
docs_urlNone
authorPahud Hsieh<pahudnet@gmail.com>
requires_python~=3.7
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![NPM version](https://badge.fury.io/js/cdk-gitlab.svg)](https://badge.fury.io/js/cdk-gitlab)
[![PyPI version](https://badge.fury.io/py/cdk-gitlab.svg)](https://badge.fury.io/py/cdk-gitlab)
[![release](https://github.com/pahud/cdk-gitlab/actions/workflows/release.yml/badge.svg)](https://github.com/pahud/cdk-gitlab/actions/workflows/release.yml)

# cdk-gitlab

High level CDK construct to provision GitLab integrations with AWS

# Install

Use the npm dist tag to opt in CDKv1 or CDKv2:

```sh
// for CDKv2
npm install cdk-gitlab
or
npm install cdk-gitlab@latest

// for CDKv1
npm install cdk-gitlab@cdkv1
```

# Sample

```python
import { Provider, FargateJobExecutor, FargateRunner, JobExecutorImage } from 'cdk-gitlab';

const provider = new Provider(stack, 'GitlabProvider', { vpc });

// create a Amazon EKS cluster
provider.createFargateEksCluster(stack, 'GitlabEksCluster', {
  clusterOptions: {
    vpc,
    version: eks.KubernetesVersion.V1_19,
  },
});

// create a default fargate runner with its job executor
provider.createFargateRunner();

// alternatively, create the runner and the executor indivicually.
// first, create the executor
const executor = new FargateJobExecutor(stack, 'JobExecutor', {
  image: JobExecutorImage.DEBIAN,
});

// second, create the runner with the task definition of the executor
new FargateRunner(stack, 'FargateRunner', {
  vpc,
  executor,
});

// TBD - create Amazon EC2 runner for the GitLab
provider.createEc2Runner(...);

});
```

# Fargate Runner with Amazon ECS

On deployment with `createFargateRunner()`, the **Fargate Runner** will be provisioned in Amazon ECS with AWS Fargate and [Amazon ECS Capacity Providers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html). By default, the `FARGATE` and `FARGATE_SPOT` capacity providers are available for the Amazon ECS cluster and the runner and job executor will run on `FARGATE_SPOT`. You can specify your custom `clusterDefaultCapacityProviderStrategy` and `serviceDefaultCapacityProviderStrategy` properties from the `FargateRunner` construct for different capacity provider strategies.

# Deploy

```sh
cdk deploy -c GITLAB_REGISTRATION_TOKEN=<TOKEN>
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pahud/cdk-gitlab.git",
    "name": "cdk-gitlab",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "~=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Pahud Hsieh<pahudnet@gmail.com>",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/88/39/e9c90d5ef906027119eb2b78f5d9f2d6daeb8731d646dfd75eb4e996c06a/cdk-gitlab-2.0.96.tar.gz",
    "platform": null,
    "description": "[![NPM version](https://badge.fury.io/js/cdk-gitlab.svg)](https://badge.fury.io/js/cdk-gitlab)\n[![PyPI version](https://badge.fury.io/py/cdk-gitlab.svg)](https://badge.fury.io/py/cdk-gitlab)\n[![release](https://github.com/pahud/cdk-gitlab/actions/workflows/release.yml/badge.svg)](https://github.com/pahud/cdk-gitlab/actions/workflows/release.yml)\n\n# cdk-gitlab\n\nHigh level CDK construct to provision GitLab integrations with AWS\n\n# Install\n\nUse the npm dist tag to opt in CDKv1 or CDKv2:\n\n```sh\n// for CDKv2\nnpm install cdk-gitlab\nor\nnpm install cdk-gitlab@latest\n\n// for CDKv1\nnpm install cdk-gitlab@cdkv1\n```\n\n# Sample\n\n```python\nimport { Provider, FargateJobExecutor, FargateRunner, JobExecutorImage } from 'cdk-gitlab';\n\nconst provider = new Provider(stack, 'GitlabProvider', { vpc });\n\n// create a Amazon EKS cluster\nprovider.createFargateEksCluster(stack, 'GitlabEksCluster', {\n  clusterOptions: {\n    vpc,\n    version: eks.KubernetesVersion.V1_19,\n  },\n});\n\n// create a default fargate runner with its job executor\nprovider.createFargateRunner();\n\n// alternatively, create the runner and the executor indivicually.\n// first, create the executor\nconst executor = new FargateJobExecutor(stack, 'JobExecutor', {\n  image: JobExecutorImage.DEBIAN,\n});\n\n// second, create the runner with the task definition of the executor\nnew FargateRunner(stack, 'FargateRunner', {\n  vpc,\n  executor,\n});\n\n// TBD - create Amazon EC2 runner for the GitLab\nprovider.createEc2Runner(...);\n\n});\n```\n\n# Fargate Runner with Amazon ECS\n\nOn deployment with `createFargateRunner()`, the **Fargate Runner** will be provisioned in Amazon ECS with AWS Fargate and [Amazon ECS Capacity Providers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html). By default, the `FARGATE` and `FARGATE_SPOT` capacity providers are available for the Amazon ECS cluster and the runner and job executor will run on `FARGATE_SPOT`. You can specify your custom `clusterDefaultCapacityProviderStrategy` and `serviceDefaultCapacityProviderStrategy` properties from the `FargateRunner` construct for different capacity provider strategies.\n\n# Deploy\n\n```sh\ncdk deploy -c GITLAB_REGISTRATION_TOKEN=<TOKEN>\n```\n\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "High level CDK construct to provision GitLab integrations with AWS",
    "version": "2.0.96",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "6f9671e683326e13d79729f60f49977a",
                "sha256": "275faa6a6f207a29f4d0f98938cb020248f36327dc452bbbc3dfefa66921a477"
            },
            "downloads": -1,
            "filename": "cdk_gitlab-2.0.96-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f9671e683326e13d79729f60f49977a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.7",
            "size": 2528386,
            "upload_time": "2022-07-03T00:34:50",
            "upload_time_iso_8601": "2022-07-03T00:34:50.876805Z",
            "url": "https://files.pythonhosted.org/packages/af/3e/ad1c8bd6b8b816bb701bb9a050be9f7c100dc5f6b2d8be2a5d54a60e3e5a/cdk_gitlab-2.0.96-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "1c5dbe539eefc126ff3951815d910020",
                "sha256": "3a456d3d18d6b5fa83155ff0ba83b2e7a156007fe3258bd2c147a854ba51c3da"
            },
            "downloads": -1,
            "filename": "cdk-gitlab-2.0.96.tar.gz",
            "has_sig": false,
            "md5_digest": "1c5dbe539eefc126ff3951815d910020",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.7",
            "size": 2530277,
            "upload_time": "2022-07-03T00:34:53",
            "upload_time_iso_8601": "2022-07-03T00:34:53.965420Z",
            "url": "https://files.pythonhosted.org/packages/88/39/e9c90d5ef906027119eb2b78f5d9f2d6daeb8731d646dfd75eb4e996c06a/cdk-gitlab-2.0.96.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-07-03 00:34:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "pahud",
    "github_project": "cdk-gitlab.git",
    "lcname": "cdk-gitlab"
}
        
Elapsed time: 0.46654s