Skip to main content

High level CDK construct to provision GitLab integrations with AWS

Project description

NPM version PyPI version release

cdk-gitlab

High level CDK construct to provision GitLab integrations with AWS

Install

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

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

// for CDKv1
npm install cdk-gitlab@cdkv1

Sample

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

cdk-gitlab-2.0.113.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdk_gitlab-2.0.113-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file cdk-gitlab-2.0.113.tar.gz.

File metadata

  • Download URL: cdk-gitlab-2.0.113.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for cdk-gitlab-2.0.113.tar.gz
Algorithm Hash digest
SHA256 12038fae201041f465397d81c5866e2ebd723132f1d5435f25744b56f1a12d9a
MD5 392b935c20eae94bbbb5e9d58571272c
BLAKE2b-256 bbb1e0902e2bed7100c9935e4eb5056584d4608777f9eae1c8abcc776bcd69d0

See more details on using hashes here.

File details

Details for the file cdk_gitlab-2.0.113-py3-none-any.whl.

File metadata

  • Download URL: cdk_gitlab-2.0.113-py3-none-any.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for cdk_gitlab-2.0.113-py3-none-any.whl
Algorithm Hash digest
SHA256 67d51784a592c907f821ff14e19e99b8fafbe3c39d6f2c919c4131ddea72cb32
MD5 2b87b82623a56f29b3e33fbad7cbb3ba
BLAKE2b-256 4a4a85adbe030add1facdf9ab7095a68c1d938e82bd763d9b4f8a82c19b3fdb6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page