[](https://badge.fury.io/js/cdk-gitlab)
[](https://badge.fury.io/py/cdk-gitlab)

# cdk-gitlab
High level CDK construct to provision GitLab integrations with AWS
# Sample
```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from cdk_gitlab import Provider, FargateJobExecutor, FargateRunner, JobExecutorImage
provider = Provider(stack, "GitlabProvider", vpc=vpc)
# create a Amazon EKS cluster
provider.create_fargate_eks_cluster(stack, "GitlabEksCluster",
cluster_options={
"vpc": vpc,
"version": eks.KubernetesVersion.V1_18
}
)
# create a default fargate runner with its job executor
provider.create_fargate_runner()
# alternatively, create the runner and the executor indivicually.
# first, create the executor
executor = FargateJobExecutor(stack, "JobExecutor",
image=JobExecutorImage.DEBIAN
)
# second, create the runner with the task definition of the executor
FargateRunner(stack, "FargateRunner",
vpc=vpc,
executor=executor
)
# TBD - create Amazon EC2 runner for the GitLab
provider.create_ec2_runner(...)
```
# Fargate Runner with Aamzon 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.6",
"maintainer_email": "",
"keywords": "",
"author": "Pahud Hsieh<pahudnet@gmail.com>",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/e3/92/00a16d51c32d97e168c90a4c9fc3cd6f3760348638b40a1a58ad2be829e3/cdk-gitlab-0.1.30.tar.gz",
"platform": "",
"description": "[](https://badge.fury.io/js/cdk-gitlab)\n[](https://badge.fury.io/py/cdk-gitlab)\n\n\n# cdk-gitlab\n\nHigh level CDK construct to provision GitLab integrations with AWS\n\n# Sample\n\n```python\n# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826\nfrom cdk_gitlab import Provider, FargateJobExecutor, FargateRunner, JobExecutorImage\n\nprovider = Provider(stack, \"GitlabProvider\", vpc=vpc)\n\n# create a Amazon EKS cluster\nprovider.create_fargate_eks_cluster(stack, \"GitlabEksCluster\",\n cluster_options={\n \"vpc\": vpc,\n \"version\": eks.KubernetesVersion.V1_18\n }\n)\n\n# create a default fargate runner with its job executor\nprovider.create_fargate_runner()\n\n# alternatively, create the runner and the executor indivicually.\n# first, create the executor\nexecutor = FargateJobExecutor(stack, \"JobExecutor\",\n image=JobExecutorImage.DEBIAN\n)\n\n# second, create the runner with the task definition of the executor\nFargateRunner(stack, \"FargateRunner\",\n vpc=vpc,\n executor=executor\n)\n\n# TBD - create Amazon EC2 runner for the GitLab\nprovider.create_ec2_runner(...)\n```\n\n# Fargate Runner with Aamzon 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": "0.1.30",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "395c1b5ebed391af2bf3a215ab34d7ca",
"sha256": "9672a3cbaa48b95cbf665f50dac0c7c5470585d20457ed2d098b862a2be3cd8d"
},
"downloads": -1,
"filename": "cdk_gitlab-0.1.30-py3-none-any.whl",
"has_sig": false,
"md5_digest": "395c1b5ebed391af2bf3a215ab34d7ca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 40964,
"upload_time": "2021-01-16T02:06:11",
"upload_time_iso_8601": "2021-01-16T02:06:11.958945Z",
"url": "https://files.pythonhosted.org/packages/eb/d8/9233601556b728a24994fcb92520494cf5ec3a1ec26960813887b4d7c9c2/cdk_gitlab-0.1.30-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "bbea08f43ef16f08ae78851fd5823ec6",
"sha256": "8e271c55d6ffce360eb4fc2ddc630fa60f308a521aefc2298ad98f1b41e5baf0"
},
"downloads": -1,
"filename": "cdk-gitlab-0.1.30.tar.gz",
"has_sig": false,
"md5_digest": "bbea08f43ef16f08ae78851fd5823ec6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 42574,
"upload_time": "2021-01-16T02:06:13",
"upload_time_iso_8601": "2021-01-16T02:06:13.109721Z",
"url": "https://files.pythonhosted.org/packages/e3/92/00a16d51c32d97e168c90a4c9fc3cd6f3760348638b40a1a58ad2be829e3/cdk-gitlab-0.1.30.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2021-01-16 02:06:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": null,
"github_project": "pahud",
"error": "Could not fetch GitHub repository",
"lcname": "cdk-gitlab"
}