[![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/ae/11/e0ee7c01b1296309004f1dda9442fe32c0453659b90ddb17a92bd2368dfd/cdk-gitlab-2.0.241.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.241",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "2fc7a42f055807f90dabd001060a7859",
"sha256": "0e6990781fa591bc0b2f6f1b51848cad3161f2b8a92dce536695c39d99e647ee"
},
"downloads": -1,
"filename": "cdk_gitlab-2.0.241-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2fc7a42f055807f90dabd001060a7859",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.7",
"size": 2656745,
"upload_time": "2022-12-05T00:32:24",
"upload_time_iso_8601": "2022-12-05T00:32:24.169938Z",
"url": "https://files.pythonhosted.org/packages/ff/36/29ed8659c5e504e2fb500459c362950306537e1e25452a702f88c2c38cc8/cdk_gitlab-2.0.241-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "a9aee1eaff5901ddac224e2abbfb2b62",
"sha256": "d5f500631cf067aeeab9a225faf0a7ad2efdaf88bbed3ed538f2f641381de344"
},
"downloads": -1,
"filename": "cdk-gitlab-2.0.241.tar.gz",
"has_sig": false,
"md5_digest": "a9aee1eaff5901ddac224e2abbfb2b62",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.7",
"size": 2658724,
"upload_time": "2022-12-05T00:32:27",
"upload_time_iso_8601": "2022-12-05T00:32:27.203889Z",
"url": "https://files.pythonhosted.org/packages/ae/11/e0ee7c01b1296309004f1dda9442fe32c0453659b90ddb17a92bd2368dfd/cdk-gitlab-2.0.241.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-05 00:32:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "pahud",
"github_project": "cdk-gitlab.git",
"lcname": "cdk-gitlab"
}