cdk-gitlab-runner 2.2.375__py3-none-any.whl → 2.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cdk_gitlab_runner/__init__.py +111 -20
- cdk_gitlab_runner/_jsii/__init__.py +1 -4
- cdk_gitlab_runner/_jsii/cdk-gitlab-runner@2.3.0.jsii.tgz +0 -0
- {cdk_gitlab_runner-2.2.375.dist-info → cdk_gitlab_runner-2.3.0.dist-info}/METADATA +13 -3
- cdk_gitlab_runner-2.3.0.dist-info/RECORD +9 -0
- cdk_gitlab_runner/_jsii/cdk-gitlab-runner@2.2.375.jsii.tgz +0 -0
- cdk_gitlab_runner-2.2.375.dist-info/RECORD +0 -9
- {cdk_gitlab_runner-2.2.375.dist-info → cdk_gitlab_runner-2.3.0.dist-info}/LICENSE +0 -0
- {cdk_gitlab_runner-2.2.375.dist-info → cdk_gitlab_runner-2.3.0.dist-info}/WHEEL +0 -0
- {cdk_gitlab_runner-2.2.375.dist-info → cdk_gitlab_runner-2.3.0.dist-info}/top_level.txt +0 -0
cdk_gitlab_runner/__init__.py
CHANGED
@@ -238,15 +238,25 @@ runner.runnerRole.addManagedPolicy(
|
|
238
238
|
|
239
239
|
### Custom Gitlab Runner EBS szie
|
240
240
|
|
241
|
-
>
|
241
|
+
> 2025/01/03 , you can change you want ebs size.
|
242
242
|
|
243
243
|
```python
|
244
244
|
import { GitlabContainerRunner } from 'cdk-gitlab-runner';
|
245
|
+
// on-demand instance
|
246
|
+
new GitlabContainerRunner(stack, 'testing', {
|
247
|
+
gitlabtoken: 'glrt-GITLABTOKEN',
|
248
|
+
gitlabRunnerVersion: '15.10',
|
249
|
+
onDemandEbsConfig: BlockDeviceVolume.ebs(60),
|
250
|
+
});
|
245
251
|
|
252
|
+
// spotfleet instance
|
246
253
|
new GitlabContainerRunner(stack, 'testing', {
|
247
254
|
gitlabtoken: 'glrt-GITLABTOKEN',
|
248
255
|
gitlabRunnerVersion: '15.10',
|
249
|
-
|
256
|
+
spotFleet: true,
|
257
|
+
spotEbsConfig: {
|
258
|
+
volumeSize: 50,
|
259
|
+
},
|
250
260
|
});
|
251
261
|
```
|
252
262
|
|
@@ -498,8 +508,10 @@ class GitlabContainerRunner(
|
|
498
508
|
gitlaburl: typing.Optional[builtins.str] = None,
|
499
509
|
instance_interruption_behavior: typing.Optional["InstanceInterruptionBehavior"] = None,
|
500
510
|
key_name: typing.Optional[builtins.str] = None,
|
511
|
+
on_demand_ebs_config: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.BlockDeviceVolume] = None,
|
501
512
|
runner_description: typing.Optional[builtins.str] = None,
|
502
513
|
selfvpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
514
|
+
spot_ebs_config: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
503
515
|
spot_fleet: typing.Optional[builtins.bool] = None,
|
504
516
|
tags: typing.Optional[typing.Sequence[builtins.str]] = None,
|
505
517
|
valid_until: typing.Optional[builtins.str] = None,
|
@@ -512,7 +524,7 @@ class GitlabContainerRunner(
|
|
512
524
|
:param gitlabtoken: (experimental) Gitlab token for the Register Runner . Default: - You must to give the token !!!
|
513
525
|
:param concurrent_jobs: (experimental) Gitlab Runner concurrent job configuration. Default: - concurrentJobs=1
|
514
526
|
:param docker_volumes: (experimental) add another Gitlab Container Runner Docker Volumes Path at job runner runtime. more detail see https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersdocker-section Default: - already mount "/var/run/docker.sock:/var/run/docker.sock"
|
515
|
-
:param ebs_size: (
|
527
|
+
:param ebs_size: (deprecated) Gitlab Runner instance EBS size .
|
516
528
|
:param ec2iamrole: (experimental) IAM role for the Gitlab Runner Instance . Default: - new Role for Gitlab Runner Instance , attach AmazonSSMManagedInstanceCore Policy .
|
517
529
|
:param ec2type: (experimental) Runner default EC2 instance type. Default: - t3.micro
|
518
530
|
:param enabled_imd_sv2: (experimental) Enabled IMDSv2. more detail see https://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html Default: - false
|
@@ -520,8 +532,10 @@ class GitlabContainerRunner(
|
|
520
532
|
:param gitlaburl: (experimental) Gitlab Runner register url . Default: - gitlaburl='https://gitlab.com/' , please use https://yourgitlab.com/ do not use https://yourgitlab.com
|
521
533
|
:param instance_interruption_behavior: (experimental) The behavior when a Spot Runner Instance is interrupted. Default: - InstanceInterruptionBehavior.TERMINATE , !!! only support spotfleet runner !!! .
|
522
534
|
:param key_name: (experimental) SSH key name. Default: - no ssh key will be assigned , !!! only support spotfleet runner !!! .
|
535
|
+
:param on_demand_ebs_config: (experimental) Gitlab Runner instance EBS config. Default: - onDemandEbsConfig=BlockDeviceVolume.ebs(60)
|
523
536
|
:param runner_description: (experimental) Gitlab Runner description. Default: - runnerDescription='Docker Runner'
|
524
537
|
:param selfvpc: (experimental) VPC for the Gitlab Runner . Default: - new VPC will be created , 1 Vpc , 2 Public Subnet .
|
538
|
+
:param spot_ebs_config: (experimental) Gitlab Runner instance EBS config. Default: - spotEbsConfig={ volumeSize: 60}
|
525
539
|
:param spot_fleet: (experimental) Gitlab Runner instance Use Spot Fleet or not ?!. Default: - spotFleet=false
|
526
540
|
:param tags: (experimental) tags for the runner Unsupported Gitlab Runner 15.10 and later. Default: - ['runner', 'gitlab', 'awscdk']
|
527
541
|
:param valid_until: (experimental) the time when the spot fleet allocation expires. Default: - no expiration , !!! only support spotfleet runner !!! .
|
@@ -546,8 +560,10 @@ class GitlabContainerRunner(
|
|
546
560
|
gitlaburl=gitlaburl,
|
547
561
|
instance_interruption_behavior=instance_interruption_behavior,
|
548
562
|
key_name=key_name,
|
563
|
+
on_demand_ebs_config=on_demand_ebs_config,
|
549
564
|
runner_description=runner_description,
|
550
565
|
selfvpc=selfvpc,
|
566
|
+
spot_ebs_config=spot_ebs_config,
|
551
567
|
spot_fleet=spot_fleet,
|
552
568
|
tags=tags,
|
553
569
|
valid_until=valid_until,
|
@@ -660,8 +676,10 @@ class GitlabContainerRunner(
|
|
660
676
|
"gitlaburl": "gitlaburl",
|
661
677
|
"instance_interruption_behavior": "instanceInterruptionBehavior",
|
662
678
|
"key_name": "keyName",
|
679
|
+
"on_demand_ebs_config": "onDemandEbsConfig",
|
663
680
|
"runner_description": "runnerDescription",
|
664
681
|
"selfvpc": "selfvpc",
|
682
|
+
"spot_ebs_config": "spotEbsConfig",
|
665
683
|
"spot_fleet": "spotFleet",
|
666
684
|
"tags": "tags",
|
667
685
|
"valid_until": "validUntil",
|
@@ -684,8 +702,10 @@ class GitlabContainerRunnerProps:
|
|
684
702
|
gitlaburl: typing.Optional[builtins.str] = None,
|
685
703
|
instance_interruption_behavior: typing.Optional["InstanceInterruptionBehavior"] = None,
|
686
704
|
key_name: typing.Optional[builtins.str] = None,
|
705
|
+
on_demand_ebs_config: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.BlockDeviceVolume] = None,
|
687
706
|
runner_description: typing.Optional[builtins.str] = None,
|
688
707
|
selfvpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
708
|
+
spot_ebs_config: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
689
709
|
spot_fleet: typing.Optional[builtins.bool] = None,
|
690
710
|
tags: typing.Optional[typing.Sequence[builtins.str]] = None,
|
691
711
|
valid_until: typing.Optional[builtins.str] = None,
|
@@ -697,7 +717,7 @@ class GitlabContainerRunnerProps:
|
|
697
717
|
:param gitlabtoken: (experimental) Gitlab token for the Register Runner . Default: - You must to give the token !!!
|
698
718
|
:param concurrent_jobs: (experimental) Gitlab Runner concurrent job configuration. Default: - concurrentJobs=1
|
699
719
|
:param docker_volumes: (experimental) add another Gitlab Container Runner Docker Volumes Path at job runner runtime. more detail see https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersdocker-section Default: - already mount "/var/run/docker.sock:/var/run/docker.sock"
|
700
|
-
:param ebs_size: (
|
720
|
+
:param ebs_size: (deprecated) Gitlab Runner instance EBS size .
|
701
721
|
:param ec2iamrole: (experimental) IAM role for the Gitlab Runner Instance . Default: - new Role for Gitlab Runner Instance , attach AmazonSSMManagedInstanceCore Policy .
|
702
722
|
:param ec2type: (experimental) Runner default EC2 instance type. Default: - t3.micro
|
703
723
|
:param enabled_imd_sv2: (experimental) Enabled IMDSv2. more detail see https://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html Default: - false
|
@@ -705,8 +725,10 @@ class GitlabContainerRunnerProps:
|
|
705
725
|
:param gitlaburl: (experimental) Gitlab Runner register url . Default: - gitlaburl='https://gitlab.com/' , please use https://yourgitlab.com/ do not use https://yourgitlab.com
|
706
726
|
:param instance_interruption_behavior: (experimental) The behavior when a Spot Runner Instance is interrupted. Default: - InstanceInterruptionBehavior.TERMINATE , !!! only support spotfleet runner !!! .
|
707
727
|
:param key_name: (experimental) SSH key name. Default: - no ssh key will be assigned , !!! only support spotfleet runner !!! .
|
728
|
+
:param on_demand_ebs_config: (experimental) Gitlab Runner instance EBS config. Default: - onDemandEbsConfig=BlockDeviceVolume.ebs(60)
|
708
729
|
:param runner_description: (experimental) Gitlab Runner description. Default: - runnerDescription='Docker Runner'
|
709
730
|
:param selfvpc: (experimental) VPC for the Gitlab Runner . Default: - new VPC will be created , 1 Vpc , 2 Public Subnet .
|
731
|
+
:param spot_ebs_config: (experimental) Gitlab Runner instance EBS config. Default: - spotEbsConfig={ volumeSize: 60}
|
710
732
|
:param spot_fleet: (experimental) Gitlab Runner instance Use Spot Fleet or not ?!. Default: - spotFleet=false
|
711
733
|
:param tags: (experimental) tags for the runner Unsupported Gitlab Runner 15.10 and later. Default: - ['runner', 'gitlab', 'awscdk']
|
712
734
|
:param valid_until: (experimental) the time when the spot fleet allocation expires. Default: - no expiration , !!! only support spotfleet runner !!! .
|
@@ -714,6 +736,8 @@ class GitlabContainerRunnerProps:
|
|
714
736
|
|
715
737
|
:stability: experimental
|
716
738
|
'''
|
739
|
+
if isinstance(spot_ebs_config, dict):
|
740
|
+
spot_ebs_config = _aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty(**spot_ebs_config)
|
717
741
|
if isinstance(vpc_subnet, dict):
|
718
742
|
vpc_subnet = _aws_cdk_aws_ec2_ceddda9d.SubnetSelection(**vpc_subnet)
|
719
743
|
if __debug__:
|
@@ -730,8 +754,10 @@ class GitlabContainerRunnerProps:
|
|
730
754
|
check_type(argname="argument gitlaburl", value=gitlaburl, expected_type=type_hints["gitlaburl"])
|
731
755
|
check_type(argname="argument instance_interruption_behavior", value=instance_interruption_behavior, expected_type=type_hints["instance_interruption_behavior"])
|
732
756
|
check_type(argname="argument key_name", value=key_name, expected_type=type_hints["key_name"])
|
757
|
+
check_type(argname="argument on_demand_ebs_config", value=on_demand_ebs_config, expected_type=type_hints["on_demand_ebs_config"])
|
733
758
|
check_type(argname="argument runner_description", value=runner_description, expected_type=type_hints["runner_description"])
|
734
759
|
check_type(argname="argument selfvpc", value=selfvpc, expected_type=type_hints["selfvpc"])
|
760
|
+
check_type(argname="argument spot_ebs_config", value=spot_ebs_config, expected_type=type_hints["spot_ebs_config"])
|
735
761
|
check_type(argname="argument spot_fleet", value=spot_fleet, expected_type=type_hints["spot_fleet"])
|
736
762
|
check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
|
737
763
|
check_type(argname="argument valid_until", value=valid_until, expected_type=type_hints["valid_until"])
|
@@ -760,10 +786,14 @@ class GitlabContainerRunnerProps:
|
|
760
786
|
self._values["instance_interruption_behavior"] = instance_interruption_behavior
|
761
787
|
if key_name is not None:
|
762
788
|
self._values["key_name"] = key_name
|
789
|
+
if on_demand_ebs_config is not None:
|
790
|
+
self._values["on_demand_ebs_config"] = on_demand_ebs_config
|
763
791
|
if runner_description is not None:
|
764
792
|
self._values["runner_description"] = runner_description
|
765
793
|
if selfvpc is not None:
|
766
794
|
self._values["selfvpc"] = selfvpc
|
795
|
+
if spot_ebs_config is not None:
|
796
|
+
self._values["spot_ebs_config"] = spot_ebs_config
|
767
797
|
if spot_fleet is not None:
|
768
798
|
self._values["spot_fleet"] = spot_fleet
|
769
799
|
if tags is not None:
|
@@ -838,15 +868,11 @@ class GitlabContainerRunnerProps:
|
|
838
868
|
|
839
869
|
@builtins.property
|
840
870
|
def ebs_size(self) -> typing.Optional[jsii.Number]:
|
841
|
-
'''(
|
871
|
+
'''(deprecated) Gitlab Runner instance EBS size .
|
842
872
|
|
843
|
-
:
|
873
|
+
:deprecated: , use ebsConfig
|
844
874
|
|
845
|
-
:stability:
|
846
|
-
|
847
|
-
Example::
|
848
|
-
|
849
|
-
const runner = new GitlabContainerRunner(stack, 'runner', { gitlabtoken: 'GITLAB_TOKEN',ebsSize: 100});
|
875
|
+
:stability: deprecated
|
850
876
|
'''
|
851
877
|
result = self._values.get("ebs_size")
|
852
878
|
return typing.cast(typing.Optional[jsii.Number], result)
|
@@ -954,6 +980,23 @@ class GitlabContainerRunnerProps:
|
|
954
980
|
result = self._values.get("key_name")
|
955
981
|
return typing.cast(typing.Optional[builtins.str], result)
|
956
982
|
|
983
|
+
@builtins.property
|
984
|
+
def on_demand_ebs_config(
|
985
|
+
self,
|
986
|
+
) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.BlockDeviceVolume]:
|
987
|
+
'''(experimental) Gitlab Runner instance EBS config.
|
988
|
+
|
989
|
+
:default: - onDemandEbsConfig=BlockDeviceVolume.ebs(60)
|
990
|
+
|
991
|
+
:stability: experimental
|
992
|
+
|
993
|
+
Example::
|
994
|
+
|
995
|
+
const runner = new GitlabContainerRunner(stack, 'runner', { gitlabToken: 'GITLAB_TOKEN', onDemandEbsConfig: BlockDeviceVolume.ebs(60)});
|
996
|
+
'''
|
997
|
+
result = self._values.get("on_demand_ebs_config")
|
998
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.BlockDeviceVolume], result)
|
999
|
+
|
957
1000
|
@builtins.property
|
958
1001
|
def runner_description(self) -> typing.Optional[builtins.str]:
|
959
1002
|
'''(experimental) Gitlab Runner description.
|
@@ -995,6 +1038,23 @@ class GitlabContainerRunnerProps:
|
|
995
1038
|
result = self._values.get("selfvpc")
|
996
1039
|
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], result)
|
997
1040
|
|
1041
|
+
@builtins.property
|
1042
|
+
def spot_ebs_config(
|
1043
|
+
self,
|
1044
|
+
) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty]:
|
1045
|
+
'''(experimental) Gitlab Runner instance EBS config.
|
1046
|
+
|
1047
|
+
:default: - spotEbsConfig={ volumeSize: 60}
|
1048
|
+
|
1049
|
+
:stability: experimental
|
1050
|
+
|
1051
|
+
Example::
|
1052
|
+
|
1053
|
+
const runner = new GitlabContainerRunner(stack, 'runner', { gitlabToken: 'GITLAB_TOKEN', ebsConfig: { volumeSize: 60}});
|
1054
|
+
'''
|
1055
|
+
result = self._values.get("spot_ebs_config")
|
1056
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty], result)
|
1057
|
+
|
998
1058
|
@builtins.property
|
999
1059
|
def spot_fleet(self) -> typing.Optional[builtins.bool]:
|
1000
1060
|
'''(experimental) Gitlab Runner instance Use Spot Fleet or not ?!.
|
@@ -1051,7 +1111,6 @@ class GitlabContainerRunnerProps:
|
|
1051
1111
|
gitlabtoken: 'GITLAB_TOKEN',
|
1052
1112
|
ec2type: 't3.large',
|
1053
1113
|
ec2iamrole: role,
|
1054
|
-
ebsSize: 100,
|
1055
1114
|
selfvpc: vpc,
|
1056
1115
|
vpcSubnet: {
|
1057
1116
|
subnetType: SubnetType.PUBLIC,
|
@@ -1093,6 +1152,7 @@ class GitlabRunnerAutoscaling(
|
|
1093
1152
|
alarms: typing.Optional[typing.Sequence[typing.Mapping[typing.Any, typing.Any]]] = None,
|
1094
1153
|
desired_capacity: typing.Optional[jsii.Number] = None,
|
1095
1154
|
docker_volumes: typing.Optional[typing.Sequence[typing.Union[DockerVolumes, typing.Dict[builtins.str, typing.Any]]]] = None,
|
1155
|
+
ebs_config: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
1096
1156
|
ebs_size: typing.Optional[jsii.Number] = None,
|
1097
1157
|
gitlab_runner_image: typing.Optional[builtins.str] = None,
|
1098
1158
|
gitlab_url: typing.Optional[builtins.str] = None,
|
@@ -1113,7 +1173,8 @@ class GitlabRunnerAutoscaling(
|
|
1113
1173
|
:param alarms: (experimental) Parameters of put_metric_alarm function. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudwatch.html#CloudWatch.Client.put_metric_alarm Default: - [{ AlarmName: 'GitlabRunnerDiskUsage', MetricName: 'disk_used_percent', }]
|
1114
1174
|
:param desired_capacity: (experimental) Desired capacity limit for autoscaling group. Default: - minCapacity, and leave unchanged during deployment
|
1115
1175
|
:param docker_volumes: (experimental) add another Gitlab Container Runner Docker Volumes Path at job runner runtime. more detail see https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersdocker-section Default: - already mount "/var/run/docker.sock:/var/run/docker.sock"
|
1116
|
-
:param
|
1176
|
+
:param ebs_config: (experimental) Gitlab Runner instance EBS config. Default: - ebsConfig={ volumeSize: 60}
|
1177
|
+
:param ebs_size: (deprecated) Gitlab Runner instance EBS size .
|
1117
1178
|
:param gitlab_runner_image: (experimental) Image URL of Gitlab Runner. Default: public.ecr.aws/gitlab/gitlab-runner:latest
|
1118
1179
|
:param gitlab_url: (experimental) Gitlab Runner register url . Default: - https://gitlab.com/ , The trailing slash is mandatory.
|
1119
1180
|
:param instance_role: (experimental) IAM role for the Gitlab Runner Instance . Default: - new Role for Gitlab Runner Instance , attach AmazonSSMManagedInstanceCore Policy .
|
@@ -1137,6 +1198,7 @@ class GitlabRunnerAutoscaling(
|
|
1137
1198
|
alarms=alarms,
|
1138
1199
|
desired_capacity=desired_capacity,
|
1139
1200
|
docker_volumes=docker_volumes,
|
1201
|
+
ebs_config=ebs_config,
|
1140
1202
|
ebs_size=ebs_size,
|
1141
1203
|
gitlab_runner_image=gitlab_runner_image,
|
1142
1204
|
gitlab_url=gitlab_url,
|
@@ -1161,6 +1223,7 @@ class GitlabRunnerAutoscaling(
|
|
1161
1223
|
alarms: typing.Optional[typing.Sequence[typing.Mapping[typing.Any, typing.Any]]] = None,
|
1162
1224
|
desired_capacity: typing.Optional[jsii.Number] = None,
|
1163
1225
|
docker_volumes: typing.Optional[typing.Sequence[typing.Union[DockerVolumes, typing.Dict[builtins.str, typing.Any]]]] = None,
|
1226
|
+
ebs_config: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
1164
1227
|
ebs_size: typing.Optional[jsii.Number] = None,
|
1165
1228
|
gitlab_runner_image: typing.Optional[builtins.str] = None,
|
1166
1229
|
gitlab_url: typing.Optional[builtins.str] = None,
|
@@ -1179,7 +1242,8 @@ class GitlabRunnerAutoscaling(
|
|
1179
1242
|
:param alarms: (experimental) Parameters of put_metric_alarm function. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudwatch.html#CloudWatch.Client.put_metric_alarm Default: - [{ AlarmName: 'GitlabRunnerDiskUsage', MetricName: 'disk_used_percent', }]
|
1180
1243
|
:param desired_capacity: (experimental) Desired capacity limit for autoscaling group. Default: - minCapacity, and leave unchanged during deployment
|
1181
1244
|
:param docker_volumes: (experimental) add another Gitlab Container Runner Docker Volumes Path at job runner runtime. more detail see https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersdocker-section Default: - already mount "/var/run/docker.sock:/var/run/docker.sock"
|
1182
|
-
:param
|
1245
|
+
:param ebs_config: (experimental) Gitlab Runner instance EBS config. Default: - ebsConfig={ volumeSize: 60}
|
1246
|
+
:param ebs_size: (deprecated) Gitlab Runner instance EBS size .
|
1183
1247
|
:param gitlab_runner_image: (experimental) Image URL of Gitlab Runner. Default: public.ecr.aws/gitlab/gitlab-runner:latest
|
1184
1248
|
:param gitlab_url: (experimental) Gitlab Runner register url . Default: - https://gitlab.com/ , The trailing slash is mandatory.
|
1185
1249
|
:param instance_role: (experimental) IAM role for the Gitlab Runner Instance . Default: - new Role for Gitlab Runner Instance , attach AmazonSSMManagedInstanceCore Policy .
|
@@ -1201,6 +1265,7 @@ class GitlabRunnerAutoscaling(
|
|
1201
1265
|
alarms=alarms,
|
1202
1266
|
desired_capacity=desired_capacity,
|
1203
1267
|
docker_volumes=docker_volumes,
|
1268
|
+
ebs_config=ebs_config,
|
1204
1269
|
ebs_size=ebs_size,
|
1205
1270
|
gitlab_runner_image=gitlab_runner_image,
|
1206
1271
|
gitlab_url=gitlab_url,
|
@@ -1271,6 +1336,7 @@ class GitlabRunnerAutoscaling(
|
|
1271
1336
|
"alarms": "alarms",
|
1272
1337
|
"desired_capacity": "desiredCapacity",
|
1273
1338
|
"docker_volumes": "dockerVolumes",
|
1339
|
+
"ebs_config": "ebsConfig",
|
1274
1340
|
"ebs_size": "ebsSize",
|
1275
1341
|
"gitlab_runner_image": "gitlabRunnerImage",
|
1276
1342
|
"gitlab_url": "gitlabUrl",
|
@@ -1293,6 +1359,7 @@ class GitlabRunnerAutoscalingProps:
|
|
1293
1359
|
alarms: typing.Optional[typing.Sequence[typing.Mapping[typing.Any, typing.Any]]] = None,
|
1294
1360
|
desired_capacity: typing.Optional[jsii.Number] = None,
|
1295
1361
|
docker_volumes: typing.Optional[typing.Sequence[typing.Union[DockerVolumes, typing.Dict[builtins.str, typing.Any]]]] = None,
|
1362
|
+
ebs_config: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
1296
1363
|
ebs_size: typing.Optional[jsii.Number] = None,
|
1297
1364
|
gitlab_runner_image: typing.Optional[builtins.str] = None,
|
1298
1365
|
gitlab_url: typing.Optional[builtins.str] = None,
|
@@ -1312,7 +1379,8 @@ class GitlabRunnerAutoscalingProps:
|
|
1312
1379
|
:param alarms: (experimental) Parameters of put_metric_alarm function. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudwatch.html#CloudWatch.Client.put_metric_alarm Default: - [{ AlarmName: 'GitlabRunnerDiskUsage', MetricName: 'disk_used_percent', }]
|
1313
1380
|
:param desired_capacity: (experimental) Desired capacity limit for autoscaling group. Default: - minCapacity, and leave unchanged during deployment
|
1314
1381
|
:param docker_volumes: (experimental) add another Gitlab Container Runner Docker Volumes Path at job runner runtime. more detail see https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersdocker-section Default: - already mount "/var/run/docker.sock:/var/run/docker.sock"
|
1315
|
-
:param
|
1382
|
+
:param ebs_config: (experimental) Gitlab Runner instance EBS config. Default: - ebsConfig={ volumeSize: 60}
|
1383
|
+
:param ebs_size: (deprecated) Gitlab Runner instance EBS size .
|
1316
1384
|
:param gitlab_runner_image: (experimental) Image URL of Gitlab Runner. Default: public.ecr.aws/gitlab/gitlab-runner:latest
|
1317
1385
|
:param gitlab_url: (experimental) Gitlab Runner register url . Default: - https://gitlab.com/ , The trailing slash is mandatory.
|
1318
1386
|
:param instance_role: (experimental) IAM role for the Gitlab Runner Instance . Default: - new Role for Gitlab Runner Instance , attach AmazonSSMManagedInstanceCore Policy .
|
@@ -1326,6 +1394,8 @@ class GitlabRunnerAutoscalingProps:
|
|
1326
1394
|
|
1327
1395
|
:stability: experimental
|
1328
1396
|
'''
|
1397
|
+
if isinstance(ebs_config, dict):
|
1398
|
+
ebs_config = _aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty(**ebs_config)
|
1329
1399
|
if isinstance(vpc_subnet, dict):
|
1330
1400
|
vpc_subnet = _aws_cdk_aws_ec2_ceddda9d.SubnetSelection(**vpc_subnet)
|
1331
1401
|
if __debug__:
|
@@ -1335,6 +1405,7 @@ class GitlabRunnerAutoscalingProps:
|
|
1335
1405
|
check_type(argname="argument alarms", value=alarms, expected_type=type_hints["alarms"])
|
1336
1406
|
check_type(argname="argument desired_capacity", value=desired_capacity, expected_type=type_hints["desired_capacity"])
|
1337
1407
|
check_type(argname="argument docker_volumes", value=docker_volumes, expected_type=type_hints["docker_volumes"])
|
1408
|
+
check_type(argname="argument ebs_config", value=ebs_config, expected_type=type_hints["ebs_config"])
|
1338
1409
|
check_type(argname="argument ebs_size", value=ebs_size, expected_type=type_hints["ebs_size"])
|
1339
1410
|
check_type(argname="argument gitlab_runner_image", value=gitlab_runner_image, expected_type=type_hints["gitlab_runner_image"])
|
1340
1411
|
check_type(argname="argument gitlab_url", value=gitlab_url, expected_type=type_hints["gitlab_url"])
|
@@ -1356,6 +1427,8 @@ class GitlabRunnerAutoscalingProps:
|
|
1356
1427
|
self._values["desired_capacity"] = desired_capacity
|
1357
1428
|
if docker_volumes is not None:
|
1358
1429
|
self._values["docker_volumes"] = docker_volumes
|
1430
|
+
if ebs_config is not None:
|
1431
|
+
self._values["ebs_config"] = ebs_config
|
1359
1432
|
if ebs_size is not None:
|
1360
1433
|
self._values["ebs_size"] = ebs_size
|
1361
1434
|
if gitlab_runner_image is not None:
|
@@ -1461,16 +1534,29 @@ class GitlabRunnerAutoscalingProps:
|
|
1461
1534
|
return typing.cast(typing.Optional[typing.List[DockerVolumes]], result)
|
1462
1535
|
|
1463
1536
|
@builtins.property
|
1464
|
-
def
|
1465
|
-
|
1537
|
+
def ebs_config(
|
1538
|
+
self,
|
1539
|
+
) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty]:
|
1540
|
+
'''(experimental) Gitlab Runner instance EBS config.
|
1466
1541
|
|
1467
|
-
:default: -
|
1542
|
+
:default: - ebsConfig={ volumeSize: 60}
|
1468
1543
|
|
1469
1544
|
:stability: experimental
|
1470
1545
|
|
1471
1546
|
Example::
|
1472
1547
|
|
1473
|
-
const runner = new GitlabRunnerAutoscaling(stack, 'runner', { gitlabToken: 'GITLAB_TOKEN',
|
1548
|
+
const runner = new GitlabRunnerAutoscaling(stack, 'runner', { gitlabToken: 'GITLAB_TOKEN', ebsConfig: { volumeSize: 60}});
|
1549
|
+
'''
|
1550
|
+
result = self._values.get("ebs_config")
|
1551
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty], result)
|
1552
|
+
|
1553
|
+
@builtins.property
|
1554
|
+
def ebs_size(self) -> typing.Optional[jsii.Number]:
|
1555
|
+
'''(deprecated) Gitlab Runner instance EBS size .
|
1556
|
+
|
1557
|
+
:deprecated: , use ebsConfig
|
1558
|
+
|
1559
|
+
:stability: deprecated
|
1474
1560
|
'''
|
1475
1561
|
result = self._values.get("ebs_size")
|
1476
1562
|
return typing.cast(typing.Optional[jsii.Number], result)
|
@@ -1637,7 +1723,6 @@ class GitlabRunnerAutoscalingProps:
|
|
1637
1723
|
gitlabToken: 'GITLAB_TOKEN',
|
1638
1724
|
instanceType: 't3.large',
|
1639
1725
|
instanceRole: role,
|
1640
|
-
ebsSize: 100,
|
1641
1726
|
vpc: vpc,
|
1642
1727
|
vpcSubnet: {
|
1643
1728
|
subnetType: SubnetType.PUBLIC,
|
@@ -1718,8 +1803,10 @@ def _typecheckingstub__3569128cd1ccb4f615528e61f1622fdbd79cb2ae3e5d8a3297d682bf4
|
|
1718
1803
|
gitlaburl: typing.Optional[builtins.str] = None,
|
1719
1804
|
instance_interruption_behavior: typing.Optional[InstanceInterruptionBehavior] = None,
|
1720
1805
|
key_name: typing.Optional[builtins.str] = None,
|
1806
|
+
on_demand_ebs_config: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.BlockDeviceVolume] = None,
|
1721
1807
|
runner_description: typing.Optional[builtins.str] = None,
|
1722
1808
|
selfvpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
1809
|
+
spot_ebs_config: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
1723
1810
|
spot_fleet: typing.Optional[builtins.bool] = None,
|
1724
1811
|
tags: typing.Optional[typing.Sequence[builtins.str]] = None,
|
1725
1812
|
valid_until: typing.Optional[builtins.str] = None,
|
@@ -1755,8 +1842,10 @@ def _typecheckingstub__0026c0e7fdafbb0c3cfac95f254acf8fbd8eb0fb39b8b1e9cd3089655
|
|
1755
1842
|
gitlaburl: typing.Optional[builtins.str] = None,
|
1756
1843
|
instance_interruption_behavior: typing.Optional[InstanceInterruptionBehavior] = None,
|
1757
1844
|
key_name: typing.Optional[builtins.str] = None,
|
1845
|
+
on_demand_ebs_config: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.BlockDeviceVolume] = None,
|
1758
1846
|
runner_description: typing.Optional[builtins.str] = None,
|
1759
1847
|
selfvpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
1848
|
+
spot_ebs_config: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
1760
1849
|
spot_fleet: typing.Optional[builtins.bool] = None,
|
1761
1850
|
tags: typing.Optional[typing.Sequence[builtins.str]] = None,
|
1762
1851
|
valid_until: typing.Optional[builtins.str] = None,
|
@@ -1774,6 +1863,7 @@ def _typecheckingstub__e1346a7c57bd8e3d5b6fd96e74f7310063137cbf2338091d3cb96f36a
|
|
1774
1863
|
alarms: typing.Optional[typing.Sequence[typing.Mapping[typing.Any, typing.Any]]] = None,
|
1775
1864
|
desired_capacity: typing.Optional[jsii.Number] = None,
|
1776
1865
|
docker_volumes: typing.Optional[typing.Sequence[typing.Union[DockerVolumes, typing.Dict[builtins.str, typing.Any]]]] = None,
|
1866
|
+
ebs_config: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
1777
1867
|
ebs_size: typing.Optional[jsii.Number] = None,
|
1778
1868
|
gitlab_runner_image: typing.Optional[builtins.str] = None,
|
1779
1869
|
gitlab_url: typing.Optional[builtins.str] = None,
|
@@ -1796,6 +1886,7 @@ def _typecheckingstub__456bc54665e983cecf5d286556d3b391003886fdd1d6f537def246750
|
|
1796
1886
|
alarms: typing.Optional[typing.Sequence[typing.Mapping[typing.Any, typing.Any]]] = None,
|
1797
1887
|
desired_capacity: typing.Optional[jsii.Number] = None,
|
1798
1888
|
docker_volumes: typing.Optional[typing.Sequence[typing.Union[DockerVolumes, typing.Dict[builtins.str, typing.Any]]]] = None,
|
1889
|
+
ebs_config: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.CfnLaunchTemplate.EbsProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
1799
1890
|
ebs_size: typing.Optional[jsii.Number] = None,
|
1800
1891
|
gitlab_runner_image: typing.Optional[builtins.str] = None,
|
1801
1892
|
gitlab_url: typing.Optional[builtins.str] = None,
|
@@ -32,10 +32,7 @@ import aws_cdk._jsii
|
|
32
32
|
import constructs._jsii
|
33
33
|
|
34
34
|
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
35
|
-
"cdk-gitlab-runner",
|
36
|
-
"2.2.375",
|
37
|
-
__name__[0:-6],
|
38
|
-
"cdk-gitlab-runner@2.2.375.jsii.tgz",
|
35
|
+
"cdk-gitlab-runner", "2.3.0", __name__[0:-6], "cdk-gitlab-runner@2.3.0.jsii.tgz"
|
39
36
|
)
|
40
37
|
|
41
38
|
__all__ = [
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: cdk-gitlab-runner
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.3.0
|
4
4
|
Summary: Use AWS CDK to create a gitlab runner, and use gitlab runner to help you execute your Gitlab pipeline job.
|
5
5
|
Home-page: https://github.com/neilkuan/cdk-gitlab-runner.git
|
6
6
|
Author: Neil Kuan<guan840912@gmail.com>
|
@@ -265,15 +265,25 @@ runner.runnerRole.addManagedPolicy(
|
|
265
265
|
|
266
266
|
### Custom Gitlab Runner EBS szie
|
267
267
|
|
268
|
-
>
|
268
|
+
> 2025/01/03 , you can change you want ebs size.
|
269
269
|
|
270
270
|
```python
|
271
271
|
import { GitlabContainerRunner } from 'cdk-gitlab-runner';
|
272
|
+
// on-demand instance
|
273
|
+
new GitlabContainerRunner(stack, 'testing', {
|
274
|
+
gitlabtoken: 'glrt-GITLABTOKEN',
|
275
|
+
gitlabRunnerVersion: '15.10',
|
276
|
+
onDemandEbsConfig: BlockDeviceVolume.ebs(60),
|
277
|
+
});
|
272
278
|
|
279
|
+
// spotfleet instance
|
273
280
|
new GitlabContainerRunner(stack, 'testing', {
|
274
281
|
gitlabtoken: 'glrt-GITLABTOKEN',
|
275
282
|
gitlabRunnerVersion: '15.10',
|
276
|
-
|
283
|
+
spotFleet: true,
|
284
|
+
spotEbsConfig: {
|
285
|
+
volumeSize: 50,
|
286
|
+
},
|
277
287
|
});
|
278
288
|
```
|
279
289
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
cdk_gitlab_runner/__init__.py,sha256=cKDSRZwoos8Ud6qtFTVompGffl114SMYn2M61BFPvYE,85576
|
2
|
+
cdk_gitlab_runner/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
+
cdk_gitlab_runner/_jsii/__init__.py,sha256=IRNxKokcl3a1WorcWhaViyd3ZrJ8XjrH-0tcz0r9hsI,1445
|
4
|
+
cdk_gitlab_runner/_jsii/cdk-gitlab-runner@2.3.0.jsii.tgz,sha256=ZEzuUiyazzpfit_ofQEAwTEy-lkRYR3LTTFmw7-FNbQ,86504
|
5
|
+
cdk_gitlab_runner-2.3.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
6
|
+
cdk_gitlab_runner-2.3.0.dist-info/METADATA,sha256=H6LexfHHpWnPSMvk1HUKSAzYwLOAo8WO6xjztIExbj0,13294
|
7
|
+
cdk_gitlab_runner-2.3.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
8
|
+
cdk_gitlab_runner-2.3.0.dist-info/top_level.txt,sha256=hFmVS7RB4_q_A9K26xlyXAQufFEMaEhdAuArTcB_Bto,18
|
9
|
+
cdk_gitlab_runner-2.3.0.dist-info/RECORD,,
|
Binary file
|
@@ -1,9 +0,0 @@
|
|
1
|
-
cdk_gitlab_runner/__init__.py,sha256=8LxtwvM1PxmaSZV5SABMHFRWfRI1pl2jAmrcBIKwicU,79965
|
2
|
-
cdk_gitlab_runner/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
-
cdk_gitlab_runner/_jsii/__init__.py,sha256=I5mSm25DAaG8I__CambV9qWzFovPuVxGTbz-JpgJl-o,1462
|
4
|
-
cdk_gitlab_runner/_jsii/cdk-gitlab-runner@2.2.375.jsii.tgz,sha256=uVTD02OqFpi5KCqn0XubvsS0BOD--GIiGILX_yWX7bY,85451
|
5
|
-
cdk_gitlab_runner-2.2.375.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
6
|
-
cdk_gitlab_runner-2.2.375.dist-info/METADATA,sha256=kOMCeEXDxw4zIDSWE4NjhWab2r-vGOv8jXamtHM5FV4,13039
|
7
|
-
cdk_gitlab_runner-2.2.375.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
8
|
-
cdk_gitlab_runner-2.2.375.dist-info/top_level.txt,sha256=hFmVS7RB4_q_A9K26xlyXAQufFEMaEhdAuArTcB_Bto,18
|
9
|
-
cdk_gitlab_runner-2.2.375.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|