High level CDK construct to provision GitLab integrations with AWS
Project description
cdk-gitlab
High level CDK construct to provision GitLab integrations with AWS
Sample
# Example automatically generated from non-compiling source. May contain errors.
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. 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
cdk deploy -c GITLAB_REGISTRATION_TOKEN=<TOKEN>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cdk_gitlab-0.1.256-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e654c1797bf4d4d8cf6e545f0e702a4a4369a12f9c6130356135248f563f5a3 |
|
MD5 | 95fec307151ca428620e803f5fcb96b9 |
|
BLAKE2b-256 | 130e8b3741c91df50afb4d69b5fbbaa800ab9b5909ab3d43844ea9bff2cf4094 |