@rio-cloud/cdk-v2-constructs 6.2.1 → 6.3.0

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.
package/.jsii CHANGED
@@ -6128,6 +6128,302 @@
6128
6128
  "name": "Framework",
6129
6129
  "symbolId": "src/fargate/rio-fargate-service:Framework"
6130
6130
  },
6131
+ "@rio-cloud/cdk-v2-constructs.GitLabRunnerProps": {
6132
+ "assembly": "@rio-cloud/cdk-v2-constructs",
6133
+ "datatype": true,
6134
+ "docs": {
6135
+ "remarks": "By default, a T3 Micro instance will be used.\nFor larger workloads and very active teams it is recommended to use T3 Small for the manager instead.",
6136
+ "stability": "stable",
6137
+ "summary": "The GitLabRunnerProps require the VPC ID, a defined environment of account and region, optional runner configuration and optionally the GitLab Runner Manager instance type."
6138
+ },
6139
+ "fqn": "@rio-cloud/cdk-v2-constructs.GitLabRunnerProps",
6140
+ "kind": "interface",
6141
+ "locationInModule": {
6142
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6143
+ "line": 20
6144
+ },
6145
+ "name": "GitLabRunnerProps",
6146
+ "properties": [
6147
+ {
6148
+ "abstract": true,
6149
+ "docs": {
6150
+ "stability": "stable"
6151
+ },
6152
+ "immutable": true,
6153
+ "locationInModule": {
6154
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6155
+ "line": 24
6156
+ },
6157
+ "name": "cache",
6158
+ "type": {
6159
+ "fqn": "aws-cdk-lib.aws_s3.IBucket"
6160
+ }
6161
+ },
6162
+ {
6163
+ "abstract": true,
6164
+ "docs": {
6165
+ "stability": "stable"
6166
+ },
6167
+ "immutable": true,
6168
+ "locationInModule": {
6169
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6170
+ "line": 21
6171
+ },
6172
+ "name": "env",
6173
+ "type": {
6174
+ "fqn": "aws-cdk-lib.Environment"
6175
+ }
6176
+ },
6177
+ {
6178
+ "abstract": true,
6179
+ "docs": {
6180
+ "stability": "stable"
6181
+ },
6182
+ "immutable": true,
6183
+ "locationInModule": {
6184
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6185
+ "line": 23
6186
+ },
6187
+ "name": "managerInstanceType",
6188
+ "optional": true,
6189
+ "type": {
6190
+ "fqn": "aws-cdk-lib.aws_ec2.InstanceType"
6191
+ }
6192
+ },
6193
+ {
6194
+ "abstract": true,
6195
+ "docs": {
6196
+ "stability": "stable"
6197
+ },
6198
+ "immutable": true,
6199
+ "locationInModule": {
6200
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6201
+ "line": 22
6202
+ },
6203
+ "name": "runnersWorkerProps",
6204
+ "optional": true,
6205
+ "type": {
6206
+ "fqn": "@rio-cloud/cdk-v2-constructs.GitlabRunnerWorkerProps"
6207
+ }
6208
+ }
6209
+ ],
6210
+ "symbolId": "src/contributions/smart-route/gitlab-runner/autoscaling-runner:GitLabRunnerProps"
6211
+ },
6212
+ "@rio-cloud/cdk-v2-constructs.GitlabRunner": {
6213
+ "assembly": "@rio-cloud/cdk-v2-constructs",
6214
+ "base": "constructs.Construct",
6215
+ "docs": {
6216
+ "remarks": "By default, the construct will create a Runner with a manager T3 Micro instance which will be enabled to spawn T3 Large Runner\nworker spot instance. The default runner Role has only the permissions to upload and download from the S3 runner cache.\n\nminimal configuration with runner spot instance:\n```ts\nnew SpotServiceLinkedRole(stack, 'SpotLinkedRole');\nconst myBucket = new Bucket(stack, 'MyShareRunnerCache', {\n enforceSSL: true,\n publicReadAccess: false,\n encryption: BucketEncryption.S3_MANAGED,\n lifecycleRules: [\n {\n enabled: true,\n expiration: Duration.days(30),\n },\n ],\n });\nnew GitlabRunner(stack, 'GitLabRunner', {\n env: {account: '123456789012', region: 'eu-west-1'},\n cache: myBucket // use a S3 bucket without public access and a retention defined, use one cache bucket for all you runners\n});\n```\nrecommended:\n```ts\nnew SpotServiceLinkedRole(stack, 'SpotLinkedRole');\nconst runnerRoles = new RunnerRoles(stack, 'RunnerRoles', {env: {account: '123456789012', region: 'eu-west-1'}});\nconst myBucket = new Bucket(stack, 'MyShareRunnerCache', {\n enforceSSL: true,\n publicReadAccess: false,\n encryption: BucketEncryption.S3_MANAGED,\n lifecycleRules: [\n {\n enabled: true,\n expiration: Duration.days(30),\n },\n ],\n });\nnew GitlabRunner(stack, 'GitLabRunner', {\n env: {account: '123456789012', region: 'eu-west-1'},\n cache: myBucket // // use a S3 bucket without public access and a retention defined, use one cache bucket for all you runners\n runnersWorkerProps: {\n token: myTokenForTaggedRunner1, // with this runner we only want to run jobs that require more power\n gitInstanceUrl: 'https://gitlab.cicd.man', // or the Traton GitLab\n instanceType: InstanceType.of(InstanceClass.M7I_FLEX, InstanceSize.XLARGE), // exemplary larger runner\n spotPrice: 0.2, // exemplary spot price\n requestSpotPrice: true,\n defaultWorkerRole: runnerRoles.runnerBaseRole, // use the base role\n },\n});\n```",
6217
+ "stability": "stable",
6218
+ "summary": "The construct create the GitLabRunner Manager instance which will autoscale Runner instances based on the configuration."
6219
+ },
6220
+ "fqn": "@rio-cloud/cdk-v2-constructs.GitlabRunner",
6221
+ "initializer": {
6222
+ "docs": {
6223
+ "stability": "stable"
6224
+ },
6225
+ "locationInModule": {
6226
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6227
+ "line": 116
6228
+ },
6229
+ "parameters": [
6230
+ {
6231
+ "name": "scope",
6232
+ "type": {
6233
+ "fqn": "aws-cdk-lib.Stack"
6234
+ }
6235
+ },
6236
+ {
6237
+ "name": "id",
6238
+ "type": {
6239
+ "primitive": "string"
6240
+ }
6241
+ },
6242
+ {
6243
+ "name": "props",
6244
+ "type": {
6245
+ "fqn": "@rio-cloud/cdk-v2-constructs.GitLabRunnerProps"
6246
+ }
6247
+ }
6248
+ ]
6249
+ },
6250
+ "kind": "class",
6251
+ "locationInModule": {
6252
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6253
+ "line": 111
6254
+ },
6255
+ "name": "GitlabRunner",
6256
+ "symbolId": "src/contributions/smart-route/gitlab-runner/autoscaling-runner:GitlabRunner"
6257
+ },
6258
+ "@rio-cloud/cdk-v2-constructs.GitlabRunnerWorkerProps": {
6259
+ "assembly": "@rio-cloud/cdk-v2-constructs",
6260
+ "datatype": true,
6261
+ "docs": {
6262
+ "remarks": "It is recommended to use the RunnerRoles construct, and it's exposed default runner role.",
6263
+ "stability": "stable",
6264
+ "summary": "The GitlabRunnerWorkerProps interface provides a simplified GitLab Runner worker configuration requiring a token as an SSM parameter, one of the valid gitlab URLs, instance of you choice, the desired max spot price, whether to use spot instance or not and a default role."
6265
+ },
6266
+ "fqn": "@rio-cloud/cdk-v2-constructs.GitlabRunnerWorkerProps",
6267
+ "kind": "interface",
6268
+ "locationInModule": {
6269
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6270
+ "line": 33
6271
+ },
6272
+ "name": "GitlabRunnerWorkerProps",
6273
+ "properties": [
6274
+ {
6275
+ "abstract": true,
6276
+ "docs": {
6277
+ "stability": "stable",
6278
+ "summary": "The default role for the runner worker when spawned."
6279
+ },
6280
+ "immutable": true,
6281
+ "locationInModule": {
6282
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6283
+ "line": 45
6284
+ },
6285
+ "name": "defaultWorkerRole",
6286
+ "type": {
6287
+ "fqn": "aws-cdk-lib.aws_iam.IRole"
6288
+ }
6289
+ },
6290
+ {
6291
+ "abstract": true,
6292
+ "docs": {
6293
+ "stability": "stable",
6294
+ "summary": "The GitLab instance URL, either https://gitlab.cicd.man or https://gitlab.collaborationlayer-traton.com."
6295
+ },
6296
+ "immutable": true,
6297
+ "locationInModule": {
6298
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6299
+ "line": 37
6300
+ },
6301
+ "name": "gitInstanceUrl",
6302
+ "type": {
6303
+ "primitive": "string"
6304
+ }
6305
+ },
6306
+ {
6307
+ "abstract": true,
6308
+ "docs": {
6309
+ "stability": "stable",
6310
+ "summary": "The instance type for the runner worker."
6311
+ },
6312
+ "immutable": true,
6313
+ "locationInModule": {
6314
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6315
+ "line": 39
6316
+ },
6317
+ "name": "instanceType",
6318
+ "type": {
6319
+ "fqn": "aws-cdk-lib.aws_ec2.InstanceType"
6320
+ }
6321
+ },
6322
+ {
6323
+ "abstract": true,
6324
+ "docs": {
6325
+ "stability": "stable",
6326
+ "summary": "Whether to use spot instance or not, Requires ServiceLinked Role for EC2 Spot to be deployed in the account."
6327
+ },
6328
+ "immutable": true,
6329
+ "locationInModule": {
6330
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6331
+ "line": 43
6332
+ },
6333
+ "name": "requestSpotPrice",
6334
+ "type": {
6335
+ "primitive": "boolean"
6336
+ }
6337
+ },
6338
+ {
6339
+ "abstract": true,
6340
+ "docs": {
6341
+ "stability": "stable",
6342
+ "summary": "The desired max spot price."
6343
+ },
6344
+ "immutable": true,
6345
+ "locationInModule": {
6346
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6347
+ "line": 41
6348
+ },
6349
+ "name": "spotPrice",
6350
+ "type": {
6351
+ "primitive": "number"
6352
+ }
6353
+ },
6354
+ {
6355
+ "abstract": true,
6356
+ "docs": {
6357
+ "stability": "stable",
6358
+ "summary": "The SSM StringParameter with the registered runner token."
6359
+ },
6360
+ "immutable": true,
6361
+ "locationInModule": {
6362
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6363
+ "line": 35
6364
+ },
6365
+ "name": "token",
6366
+ "type": {
6367
+ "fqn": "aws-cdk-lib.aws_ssm.IStringParameter"
6368
+ }
6369
+ },
6370
+ {
6371
+ "abstract": true,
6372
+ "docs": {
6373
+ "remarks": "Default 10",
6374
+ "stability": "stable",
6375
+ "summary": "The maximum number of builds for an instance before it has to be decommissioned."
6376
+ },
6377
+ "immutable": true,
6378
+ "locationInModule": {
6379
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6380
+ "line": 47
6381
+ },
6382
+ "name": "maxBuilds",
6383
+ "optional": true,
6384
+ "type": {
6385
+ "primitive": "number"
6386
+ }
6387
+ },
6388
+ {
6389
+ "abstract": true,
6390
+ "docs": {
6391
+ "remarks": "Default 5",
6392
+ "stability": "stable",
6393
+ "summary": "The maximum number of instances to keep idle for new incoming jobs."
6394
+ },
6395
+ "immutable": true,
6396
+ "locationInModule": {
6397
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6398
+ "line": 49
6399
+ },
6400
+ "name": "maxIdleInstance",
6401
+ "optional": true,
6402
+ "type": {
6403
+ "primitive": "number"
6404
+ }
6405
+ },
6406
+ {
6407
+ "abstract": true,
6408
+ "docs": {
6409
+ "remarks": "Default 900 seconds",
6410
+ "stability": "stable",
6411
+ "summary": "The maximum idle time seconds for an instance."
6412
+ },
6413
+ "immutable": true,
6414
+ "locationInModule": {
6415
+ "filename": "src/contributions/smart-route/gitlab-runner/autoscaling-runner.ts",
6416
+ "line": 51
6417
+ },
6418
+ "name": "maxIdleTime",
6419
+ "optional": true,
6420
+ "type": {
6421
+ "primitive": "number"
6422
+ }
6423
+ }
6424
+ ],
6425
+ "symbolId": "src/contributions/smart-route/gitlab-runner/autoscaling-runner:GitlabRunnerWorkerProps"
6426
+ },
6131
6427
  "@rio-cloud/cdk-v2-constructs.IAppStackFactory": {
6132
6428
  "assembly": "@rio-cloud/cdk-v2-constructs",
6133
6429
  "docs": {
@@ -9498,6 +9794,100 @@
9498
9794
  ],
9499
9795
  "symbolId": "src/pipeline/rio-backup-secrets-restore-stage:RioSecretsDeployStepProps"
9500
9796
  },
9797
+ "@rio-cloud/cdk-v2-constructs.RunnerRoleProps": {
9798
+ "assembly": "@rio-cloud/cdk-v2-constructs",
9799
+ "datatype": true,
9800
+ "docs": {
9801
+ "stability": "stable"
9802
+ },
9803
+ "fqn": "@rio-cloud/cdk-v2-constructs.RunnerRoleProps",
9804
+ "kind": "interface",
9805
+ "locationInModule": {
9806
+ "filename": "src/contributions/smart-route/gitlab-runner/runner-roles.ts",
9807
+ "line": 16
9808
+ },
9809
+ "name": "RunnerRoleProps",
9810
+ "properties": [
9811
+ {
9812
+ "abstract": true,
9813
+ "docs": {
9814
+ "stability": "stable"
9815
+ },
9816
+ "immutable": true,
9817
+ "locationInModule": {
9818
+ "filename": "src/contributions/smart-route/gitlab-runner/runner-roles.ts",
9819
+ "line": 17
9820
+ },
9821
+ "name": "env",
9822
+ "type": {
9823
+ "fqn": "aws-cdk-lib.Environment"
9824
+ }
9825
+ }
9826
+ ],
9827
+ "symbolId": "src/contributions/smart-route/gitlab-runner/runner-roles:RunnerRoleProps"
9828
+ },
9829
+ "@rio-cloud/cdk-v2-constructs.RunnerRoles": {
9830
+ "assembly": "@rio-cloud/cdk-v2-constructs",
9831
+ "base": "constructs.Construct",
9832
+ "docs": {
9833
+ "remarks": "The roles need to be assumed during job runtime to perform more permissive actions, such as creating certificates to\nauthenticate towards the RIO MSK, pushing docker images to ECR, performing a secrets backup, deploying stacks,\nor to publish an SPA to a S3 bucket. Do not assume the deployment role unless needed.\nThe base role can be the default role attached to GitLab runners.\nThe role allows to read various basic parameters such as the NIST data mirror, the OSS license bucket, DataDog keys\nand to pull ECR images form public Gallery or the specified account in the environment.\nThe Role ARNs are export using CFNOutputs. Use the outputs to configure environment variables in your GitLab group.",
9834
+ "stability": "stable",
9835
+ "summary": "This construct provides a set of base roles for gitlab runners in order to build, test, validate and deploy applications on RIO."
9836
+ },
9837
+ "fqn": "@rio-cloud/cdk-v2-constructs.RunnerRoles",
9838
+ "initializer": {
9839
+ "docs": {
9840
+ "stability": "stable"
9841
+ },
9842
+ "locationInModule": {
9843
+ "filename": "src/contributions/smart-route/gitlab-runner/runner-roles.ts",
9844
+ "line": 32
9845
+ },
9846
+ "parameters": [
9847
+ {
9848
+ "name": "scope",
9849
+ "type": {
9850
+ "fqn": "aws-cdk-lib.Stack"
9851
+ }
9852
+ },
9853
+ {
9854
+ "name": "id",
9855
+ "type": {
9856
+ "primitive": "string"
9857
+ }
9858
+ },
9859
+ {
9860
+ "name": "props",
9861
+ "type": {
9862
+ "fqn": "@rio-cloud/cdk-v2-constructs.RunnerRoleProps"
9863
+ }
9864
+ }
9865
+ ]
9866
+ },
9867
+ "kind": "class",
9868
+ "locationInModule": {
9869
+ "filename": "src/contributions/smart-route/gitlab-runner/runner-roles.ts",
9870
+ "line": 30
9871
+ },
9872
+ "name": "RunnerRoles",
9873
+ "properties": [
9874
+ {
9875
+ "docs": {
9876
+ "stability": "stable"
9877
+ },
9878
+ "immutable": true,
9879
+ "locationInModule": {
9880
+ "filename": "src/contributions/smart-route/gitlab-runner/runner-roles.ts",
9881
+ "line": 31
9882
+ },
9883
+ "name": "runnerBaseRole",
9884
+ "type": {
9885
+ "fqn": "aws-cdk-lib.aws_iam.Role"
9886
+ }
9887
+ }
9888
+ ],
9889
+ "symbolId": "src/contributions/smart-route/gitlab-runner/runner-roles:RunnerRoles"
9890
+ },
9501
9891
  "@rio-cloud/cdk-v2-constructs.ShouldOverrideThresholdProps": {
9502
9892
  "assembly": "@rio-cloud/cdk-v2-constructs",
9503
9893
  "datatype": true,
@@ -9593,6 +9983,45 @@
9593
9983
  ],
9594
9984
  "symbolId": "src/watchful/watchful:ShouldOverrideThresholdReturnProps"
9595
9985
  },
9986
+ "@rio-cloud/cdk-v2-constructs.SpotServiceLinkedRole": {
9987
+ "assembly": "@rio-cloud/cdk-v2-constructs",
9988
+ "base": "constructs.Construct",
9989
+ "docs": {
9990
+ "stability": "stable",
9991
+ "summary": "The construct creates a service linked role required to run GitLab Runners using Spot EC2 instances."
9992
+ },
9993
+ "fqn": "@rio-cloud/cdk-v2-constructs.SpotServiceLinkedRole",
9994
+ "initializer": {
9995
+ "docs": {
9996
+ "stability": "stable"
9997
+ },
9998
+ "locationInModule": {
9999
+ "filename": "src/contributions/smart-route/gitlab-runner/spot-role.ts",
10000
+ "line": 9
10001
+ },
10002
+ "parameters": [
10003
+ {
10004
+ "name": "scope",
10005
+ "type": {
10006
+ "fqn": "constructs.Construct"
10007
+ }
10008
+ },
10009
+ {
10010
+ "name": "id",
10011
+ "type": {
10012
+ "primitive": "string"
10013
+ }
10014
+ }
10015
+ ]
10016
+ },
10017
+ "kind": "class",
10018
+ "locationInModule": {
10019
+ "filename": "src/contributions/smart-route/gitlab-runner/spot-role.ts",
10020
+ "line": 8
10021
+ },
10022
+ "name": "SpotServiceLinkedRole",
10023
+ "symbolId": "src/contributions/smart-route/gitlab-runner/spot-role:SpotServiceLinkedRole"
10024
+ },
9596
10025
  "@rio-cloud/cdk-v2-constructs.TriggerKey": {
9597
10026
  "assembly": "@rio-cloud/cdk-v2-constructs",
9598
10027
  "docs": {
@@ -16309,5 +16738,5 @@
16309
16738
  }
16310
16739
  },
16311
16740
  "version": "0.0.0",
16312
- "fingerprint": "vpDlySGr5n//8kkjLy5zFrJZUFzANznNblVJs8b3bl0="
16741
+ "fingerprint": "vkv0ByaY8bMTd8OsR9NHooh1ytKdvwQivH2W8ggVLS4="
16313
16742
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [6.3.0](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv6.2.2&sourceBranch=refs%2Ftags%2Fv6.3.0) (2024-07-23)
6
+
7
+
8
+ ### Features
9
+
10
+ * adjust gitlab runner construct to handle new registration process and change worker props since now one manager can only handle one runner group ([f744213](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/commits/f74421342e21729a4b8732e4913ad31d93f0d818))
11
+
12
+ ## [6.2.2](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv6.2.1&sourceBranch=refs%2Ftags%2Fv6.2.2) (2024-07-19)
13
+
5
14
  ## [6.2.1](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv6.2.0&sourceBranch=refs%2Ftags%2Fv6.2.1) (2024-07-19)
6
15
 
7
16