browserstack-node-sdk 1.22.0 → 1.23.1
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/ats/src/CFTemplates/aws-eks-cluster-dep.yaml +202 -0
- package/ats/src/CFTemplates/s3-create.yaml +20 -0
- package/ats/src/CFTemplates/subnet-create.yaml +85 -0
- package/ats/src/CFTemplates/subnet-import.yaml +15 -0
- package/ats/src/CFTemplates/vpc-create.yaml +27 -0
- package/ats/src/CFTemplates/vpc-import.yaml +5 -0
- package/ats/src/commands/configure.js +1 -0
- package/ats/src/commands/connect.js +1 -0
- package/ats/src/commands/connect_commands/grid.js +1 -0
- package/ats/src/commands/create.js +1 -0
- package/ats/src/commands/create_commands/grid.js +1 -0
- package/ats/src/commands/delete.js +1 -0
- package/ats/src/commands/delete_commands/grid.js +1 -0
- package/ats/src/commands/init.js +1 -0
- package/ats/src/commands/list.js +1 -0
- package/ats/src/commands/list_commands/grid_profiles.js +1 -0
- package/ats/src/commands/list_commands/grids.js +1 -0
- package/ats/src/config/constants.js +1 -0
- package/ats/src/config/instanceTypes.json +554 -0
- package/ats/src/config/logger.js +1 -0
- package/ats/src/index.js +2 -0
- package/ats/src/templates/KubeConfigTemplate.yaml +33 -0
- package/ats/src/templates/autoscaler/cluster-role-binding.yaml +15 -0
- package/ats/src/templates/autoscaler/clusterrole.yaml +56 -0
- package/ats/src/templates/autoscaler/deployment.yaml +66 -0
- package/ats/src/templates/autoscaler/role-binding.yaml +16 -0
- package/ats/src/templates/autoscaler/role.yaml +17 -0
- package/ats/src/templates/autoscaler/sa.yaml +10 -0
- package/ats/src/templates/autoscaler-role-creation.yaml +185 -0
- package/ats/src/templates/aws-auth-cm.yaml +13 -0
- package/ats/src/templates/cluster-role-binding.yaml +12 -0
- package/ats/src/templates/hub-deployment.yaml +76 -0
- package/ats/src/templates/hub-service.yaml +26 -0
- package/ats/src/utils/AWSUtils.js +1 -0
- package/ats/src/utils/createAutoscalerStack.js +1 -0
- package/ats/src/utils/createClusterStack.js +1 -0
- package/ats/src/utils/createk8sClient.js +1 -0
- package/ats/src/utils/deleteStack.js +1 -0
- package/ats/src/utils/gridComponents.js +1 -0
- package/ats/src/utils/hstUtils.js +1 -0
- package/ats/src/utils/instrumentationUtils.js +1 -0
- package/ats/src/utils/userInput.js +1 -0
- package/ats/src/utils/utilityMethods.js +1 -0
- package/ats/src/utils/webSocketUtils.js +1 -0
- package/package.json +1 -1
- package/src/bin/codeceptjs/BrowserStackPlugin.js +1 -1
- package/src/bin/codeceptjs/command.js +1 -1
- package/src/bin/cucumber-js/command.js +1 -1
- package/src/bin/cucumber-js/formatter/custom_formatter.js +1 -1
- package/src/bin/cucumber-js/formatter/custom_formatter_old_versions.js +1 -1
- package/src/bin/cucumber-js/test.setup.js +1 -1
- package/src/bin/cucumber-js/test_old.setup.js +1 -1
- package/src/bin/cucumber-js/timeout.setup.js +1 -1
- package/src/bin/jest/command.js +1 -1
- package/src/bin/jest/customEnvironment.js +1 -1
- package/src/bin/jest/customTestRunnerTemplate.js +1 -1
- package/src/bin/jest/jest.setup.js +1 -1
- package/src/bin/jest/test_before.setup.js +1 -1
- package/src/bin/launcher/launcher.js +1 -1
- package/src/bin/mocha/bstack-reporter/customReporter.js +1 -1
- package/src/bin/mocha/command.js +1 -1
- package/src/bin/mocha/test-observability/builderPatch.js +1 -1
- package/src/bin/mocha/test-observability/data-hooks.js +1 -1
- package/src/bin/mocha/test-observability/mochaUtils.js +1 -1
- package/src/bin/mocha/test.setup.js +1 -1
- package/src/bin/nightwatch/command.js +1 -1
- package/src/bin/playwright/command.js +1 -1
- package/src/bin/playwright/globalSetup.js +1 -1
- package/src/bin/playwright/mock-process.js +1 -1
- package/src/bin/playwright/reporter/pwUtils.js +1 -1
- package/src/bin/playwright/reporter/reporter.js +1 -1
- package/src/bin/playwright/reporter/test-details.js +1 -1
- package/src/bin/runner.js +1 -1
- package/src/bin/setup.js +1 -1
- package/src/bin/test-runner/index.js +1 -1
- package/src/bin/test-runner/runTest.js +1 -1
- package/src/bin/test-runner/testWorker.js +1 -1
- package/src/bin/utils/constants.js +1 -1
- package/src/bin/utils/log4jsAppender.js +1 -1
- package/src/bin/utils/logPatcher.js +1 -1
- package/src/bin/utils/logReportingAPI.js +1 -1
- package/src/bin/vanilla-js/command.js +1 -1
- package/src/helpers/BrowserStackSetup.js +1 -1
- package/src/helpers/capsMapping.js +1 -1
- package/src/helpers/helper.js +1 -1
- package/src/helpers/logger.js +1 -1
- package/src/helpers/patchHelpers.js +1 -1
- package/src/helpers/request-spy.js +1 -1
- package/src/helpers/setKeepAlive.js +1 -1
- package/src/helpers/test-observability/constants.js +1 -1
- package/src/helpers/test-observability/error-handler.js +1 -1
- package/src/helpers/test-observability/performance-tester.js +1 -1
- package/src/helpers/test-observability/requestQueueHandler.js +1 -1
- package/src/helpers/test-observability/sessionHandler.js +1 -1
- package/src/helpers/test-observability/utils.js +1 -1
- package/src/helpers/w3cMapping.js +1 -1
- package/src/hubAllocationMethods.js +1 -1
- package/src/index.js +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
2
|
+
kind: ClusterRoleBinding
|
|
3
|
+
metadata:
|
|
4
|
+
name: cluster-autoscaler
|
|
5
|
+
labels:
|
|
6
|
+
k8s-addon: cluster-autoscaler.addons.k8s.io
|
|
7
|
+
k8s-app: cluster-autoscaler
|
|
8
|
+
roleRef:
|
|
9
|
+
apiGroup: rbac.authorization.k8s.io
|
|
10
|
+
kind: ClusterRole
|
|
11
|
+
name: cluster-autoscaler
|
|
12
|
+
subjects:
|
|
13
|
+
- kind: ServiceAccount
|
|
14
|
+
name: cluster-autoscaler
|
|
15
|
+
namespace: kube-system
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
2
|
+
kind: ClusterRole
|
|
3
|
+
metadata:
|
|
4
|
+
name: cluster-autoscaler
|
|
5
|
+
labels:
|
|
6
|
+
k8s-addon: cluster-autoscaler.addons.k8s.io
|
|
7
|
+
k8s-app: cluster-autoscaler
|
|
8
|
+
rules:
|
|
9
|
+
- apiGroups: [""]
|
|
10
|
+
resources: ["events", "endpoints"]
|
|
11
|
+
verbs: ["create", "patch"]
|
|
12
|
+
- apiGroups: [""]
|
|
13
|
+
resources: ["pods/eviction"]
|
|
14
|
+
verbs: ["create"]
|
|
15
|
+
- apiGroups: [""]
|
|
16
|
+
resources: ["pods/status"]
|
|
17
|
+
verbs: ["update"]
|
|
18
|
+
- apiGroups: [""]
|
|
19
|
+
resources: ["endpoints"]
|
|
20
|
+
resourceNames: ["cluster-autoscaler"]
|
|
21
|
+
verbs: ["get", "update"]
|
|
22
|
+
- apiGroups: [""]
|
|
23
|
+
resources: ["nodes"]
|
|
24
|
+
verbs: ["watch", "list", "get", "update"]
|
|
25
|
+
- apiGroups: [""]
|
|
26
|
+
resources:
|
|
27
|
+
- "namespaces"
|
|
28
|
+
- "pods"
|
|
29
|
+
- "services"
|
|
30
|
+
- "replicationcontrollers"
|
|
31
|
+
- "persistentvolumeclaims"
|
|
32
|
+
- "persistentvolumes"
|
|
33
|
+
verbs: ["watch", "list", "get"]
|
|
34
|
+
- apiGroups: ["extensions"]
|
|
35
|
+
resources: ["replicasets", "daemonsets"]
|
|
36
|
+
verbs: ["watch", "list", "get"]
|
|
37
|
+
- apiGroups: ["policy"]
|
|
38
|
+
resources: ["poddisruptionbudgets"]
|
|
39
|
+
verbs: ["watch", "list"]
|
|
40
|
+
- apiGroups: ["apps"]
|
|
41
|
+
resources: ["statefulsets", "replicasets", "daemonsets"]
|
|
42
|
+
verbs: ["watch", "list", "get"]
|
|
43
|
+
- apiGroups: ["storage.k8s.io"]
|
|
44
|
+
resources:
|
|
45
|
+
["storageclasses", "csinodes", "csidrivers", "csistoragecapacities"]
|
|
46
|
+
verbs: ["watch", "list", "get"]
|
|
47
|
+
- apiGroups: ["batch", "extensions"]
|
|
48
|
+
resources: ["jobs"]
|
|
49
|
+
verbs: ["get", "list", "watch", "patch"]
|
|
50
|
+
- apiGroups: ["coordination.k8s.io"]
|
|
51
|
+
resources: ["leases"]
|
|
52
|
+
verbs: ["create"]
|
|
53
|
+
- apiGroups: ["coordination.k8s.io"]
|
|
54
|
+
resourceNames: ["cluster-autoscaler"]
|
|
55
|
+
resources: ["leases"]
|
|
56
|
+
verbs: ["get", "update"]
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: Deployment
|
|
3
|
+
metadata:
|
|
4
|
+
name: cluster-autoscaler
|
|
5
|
+
namespace: kube-system
|
|
6
|
+
labels:
|
|
7
|
+
app: cluster-autoscaler
|
|
8
|
+
spec:
|
|
9
|
+
replicas: 1
|
|
10
|
+
selector:
|
|
11
|
+
matchLabels:
|
|
12
|
+
app: cluster-autoscaler
|
|
13
|
+
template:
|
|
14
|
+
metadata:
|
|
15
|
+
labels:
|
|
16
|
+
app: cluster-autoscaler
|
|
17
|
+
annotations:
|
|
18
|
+
prometheus.io/scrape: "true"
|
|
19
|
+
prometheus.io/port: "8085"
|
|
20
|
+
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
|
|
21
|
+
cluster-autoscaler.kubernetes.io/scale-down-unneeded-time: "300s"
|
|
22
|
+
spec:
|
|
23
|
+
priorityClassName: system-cluster-critical
|
|
24
|
+
securityContext:
|
|
25
|
+
runAsNonRoot: true
|
|
26
|
+
runAsUser: 65534
|
|
27
|
+
fsGroup: 65534
|
|
28
|
+
seccompProfile:
|
|
29
|
+
type: RuntimeDefault
|
|
30
|
+
serviceAccountName: cluster-autoscaler
|
|
31
|
+
containers:
|
|
32
|
+
- image: registry.k8s.io/autoscaling/cluster-autoscaler:v1.26.2
|
|
33
|
+
name: cluster-autoscaler
|
|
34
|
+
resources:
|
|
35
|
+
limits:
|
|
36
|
+
cpu: 100m
|
|
37
|
+
memory: 600Mi
|
|
38
|
+
requests:
|
|
39
|
+
cpu: 100m
|
|
40
|
+
memory: 600Mi
|
|
41
|
+
command:
|
|
42
|
+
- ./cluster-autoscaler
|
|
43
|
+
- --v=4
|
|
44
|
+
- --stderrthreshold=info
|
|
45
|
+
- --cloud-provider=aws
|
|
46
|
+
- --skip-nodes-with-local-storage=false
|
|
47
|
+
- --expander=least-waste
|
|
48
|
+
- --node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/<ClusterName>
|
|
49
|
+
- --balance-similar-node-groups
|
|
50
|
+
- --skip-nodes-with-system-pods=false
|
|
51
|
+
- --scale-down-unneeded-time=5m
|
|
52
|
+
volumeMounts:
|
|
53
|
+
- name: ssl-certs
|
|
54
|
+
mountPath: /etc/ssl/certs/ca-certificates.crt #/etc/ssl/certs/ca-bundle.crt for Amazon Linux Worker Nodes
|
|
55
|
+
readOnly: true
|
|
56
|
+
imagePullPolicy: "Always"
|
|
57
|
+
securityContext:
|
|
58
|
+
allowPrivilegeEscalation: false
|
|
59
|
+
capabilities:
|
|
60
|
+
drop:
|
|
61
|
+
- ALL
|
|
62
|
+
readOnlyRootFilesystem: true
|
|
63
|
+
volumes:
|
|
64
|
+
- name: ssl-certs
|
|
65
|
+
hostPath:
|
|
66
|
+
path: "/etc/ssl/certs/ca-bundle.crt"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
2
|
+
kind: RoleBinding
|
|
3
|
+
metadata:
|
|
4
|
+
name: cluster-autoscaler
|
|
5
|
+
namespace: kube-system
|
|
6
|
+
labels:
|
|
7
|
+
k8s-addon: cluster-autoscaler.addons.k8s.io
|
|
8
|
+
k8s-app: cluster-autoscaler
|
|
9
|
+
roleRef:
|
|
10
|
+
apiGroup: rbac.authorization.k8s.io
|
|
11
|
+
kind: Role
|
|
12
|
+
name: cluster-autoscaler
|
|
13
|
+
subjects:
|
|
14
|
+
- kind: ServiceAccount
|
|
15
|
+
name: cluster-autoscaler
|
|
16
|
+
namespace: kube-system
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
2
|
+
kind: Role
|
|
3
|
+
metadata:
|
|
4
|
+
name: cluster-autoscaler
|
|
5
|
+
namespace: kube-system
|
|
6
|
+
labels:
|
|
7
|
+
k8s-addon: cluster-autoscaler.addons.k8s.io
|
|
8
|
+
k8s-app: cluster-autoscaler
|
|
9
|
+
rules:
|
|
10
|
+
- apiGroups: [""]
|
|
11
|
+
resources: ["configmaps"]
|
|
12
|
+
verbs: ["create", "list", "watch"]
|
|
13
|
+
- apiGroups: [""]
|
|
14
|
+
resources: ["configmaps"]
|
|
15
|
+
resourceNames:
|
|
16
|
+
["cluster-autoscaler-status", "cluster-autoscaler-priority-expander"]
|
|
17
|
+
verbs: ["delete", "get", "update", "watch"]
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
AWSTemplateFormatVersion: "2010-09-09"
|
|
3
|
+
Description: "CloudFormation template to configure an EKS cluster with an OpenID Connect provider to use IAM backed service accounts"
|
|
4
|
+
|
|
5
|
+
Parameters:
|
|
6
|
+
ClusterName:
|
|
7
|
+
Type: String
|
|
8
|
+
Description: Name for EKS Cluster
|
|
9
|
+
|
|
10
|
+
Resources:
|
|
11
|
+
ClusterOIDCURL:
|
|
12
|
+
Type: Custom::ClusterOIDCURL
|
|
13
|
+
Properties:
|
|
14
|
+
ServiceToken: !GetAtt ClusterOIDCURLFunction.Arn
|
|
15
|
+
ClusterName: !Ref ClusterName
|
|
16
|
+
Tags: []
|
|
17
|
+
|
|
18
|
+
# We need to use the API to get the OpenID Connect URL from the cluster, so a Lambda does that for us here
|
|
19
|
+
ClusterOIDCURLFunction:
|
|
20
|
+
Type: AWS::Lambda::Function
|
|
21
|
+
Properties:
|
|
22
|
+
Runtime: python3.7
|
|
23
|
+
Handler: index.lambda_handler
|
|
24
|
+
MemorySize: 128
|
|
25
|
+
Role: !GetAtt ClusterOIDCLambdaExecutionRole.Arn
|
|
26
|
+
Timeout: 30
|
|
27
|
+
Code:
|
|
28
|
+
ZipFile: |
|
|
29
|
+
import boto3
|
|
30
|
+
import json
|
|
31
|
+
import cfnresponse
|
|
32
|
+
eks = boto3.client("eks")
|
|
33
|
+
def lambda_handler(event, context):
|
|
34
|
+
responseData = {}
|
|
35
|
+
if event['RequestType'] == 'Delete':
|
|
36
|
+
responseData['Reason'] = "Success"
|
|
37
|
+
cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData, "")
|
|
38
|
+
else:
|
|
39
|
+
try:
|
|
40
|
+
cluster_name = event['ResourceProperties']['ClusterName']
|
|
41
|
+
response = eks.describe_cluster(name=cluster_name)
|
|
42
|
+
cluster_oidc_url = response['cluster']['identity']['oidc']['issuer']
|
|
43
|
+
# We need the url for the roles without the protocol when creating roles, so remove
|
|
44
|
+
# it here to make this easier to use in CF templates.
|
|
45
|
+
without_protocol = cluster_oidc_url.replace('https://', '')
|
|
46
|
+
responseData['Reason'] = "Success"
|
|
47
|
+
responseData['Url'] = without_protocol
|
|
48
|
+
cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData, without_protocol)
|
|
49
|
+
except Exception as e:
|
|
50
|
+
responseData['Reason'] = str(e)
|
|
51
|
+
cfnresponse.send(event, context, cfnresponse.FAILED, responseData, "")
|
|
52
|
+
|
|
53
|
+
ClusterOIDCProvider:
|
|
54
|
+
Type: Custom::ClusterOIDCProvider
|
|
55
|
+
Properties:
|
|
56
|
+
ServiceToken: !GetAtt ClusterOIDCProviderFunction.Arn
|
|
57
|
+
ClusterOIDCURL: !Ref ClusterOIDCURL
|
|
58
|
+
Tags: []
|
|
59
|
+
|
|
60
|
+
# This defines the lambda that will run the setup (and teardown) code for the OIDC provider
|
|
61
|
+
ClusterOIDCProviderFunction:
|
|
62
|
+
Type: AWS::Lambda::Function
|
|
63
|
+
Properties:
|
|
64
|
+
Runtime: python3.7
|
|
65
|
+
Handler: index.lambda_handler
|
|
66
|
+
MemorySize: 128
|
|
67
|
+
Role: !GetAtt ClusterOIDCLambdaExecutionRole.Arn
|
|
68
|
+
Timeout: 30
|
|
69
|
+
Code:
|
|
70
|
+
ZipFile: |
|
|
71
|
+
import boto3
|
|
72
|
+
from botocore.exceptions import ClientError
|
|
73
|
+
import json
|
|
74
|
+
import cfnresponse
|
|
75
|
+
iam = boto3.client("iam")
|
|
76
|
+
def lambda_handler(event, context):
|
|
77
|
+
data = {}
|
|
78
|
+
try:
|
|
79
|
+
cluster_oidc_url = event['ResourceProperties']['ClusterOIDCURL']
|
|
80
|
+
if event['RequestType'] == 'Create':
|
|
81
|
+
with_protocol = "https://" + cluster_oidc_url
|
|
82
|
+
# This is the ca thumbprint of AWS's issuer
|
|
83
|
+
issuer_thumbprint = '9e99a48a9960b14926bb7f3b02e22da2b0ab7280'
|
|
84
|
+
resp = iam.create_open_id_connect_provider(Url=with_protocol,ClientIDList=['sts.amazonaws.com'],ThumbprintList=[issuer_thumbprint])
|
|
85
|
+
provider_arn = resp['OpenIDConnectProviderArn']
|
|
86
|
+
data["Reason"] = "Provider with ARN " + provider_arn + " created"
|
|
87
|
+
cfnresponse.send(event, context, cfnresponse.SUCCESS, data, provider_arn)
|
|
88
|
+
elif event['RequestType'] == 'Delete':
|
|
89
|
+
provider_arn = event["PhysicalResourceId"]
|
|
90
|
+
if provider_arn is None:
|
|
91
|
+
data["Reason"] = "Provider not present"
|
|
92
|
+
cfnresponse.send(event, context, cfnresponse.SUCCESS, data, provider_arn)
|
|
93
|
+
else:
|
|
94
|
+
resp = iam.delete_open_id_connect_provider(OpenIDConnectProviderArn=provider_arn)
|
|
95
|
+
data["Reason"] = "Provider with ARN " + provider_arn + " deleted"
|
|
96
|
+
cfnresponse.send(event, context, cfnresponse.SUCCESS, data, provider_arn)
|
|
97
|
+
else:
|
|
98
|
+
data["Reason"] = "Unknown operation: " + event['RequestType']
|
|
99
|
+
cfnresponse.send(event, context, cfnresponse.FAILED, data, "")
|
|
100
|
+
except iam.exceptions.EntityAlreadyExistsException as e:
|
|
101
|
+
open_id_providers = iam.list_open_id_connect_providers()
|
|
102
|
+
for provider in open_id_providers['OpenIDConnectProviderList']:
|
|
103
|
+
if cluster_oidc_url in provider['Arn'] :
|
|
104
|
+
data["Reason"] = "Provider with ARN " + provider['Arn'] + " already exists"
|
|
105
|
+
cfnresponse.send(event, context, cfnresponse.SUCCESS, data, provider['Arn'])
|
|
106
|
+
except Exception as e:
|
|
107
|
+
data["Reason"] = "Cannot " + event['RequestType'] + " Provider" + str(e)
|
|
108
|
+
cfnresponse.send(event, context, cfnresponse.FAILED, data, "")
|
|
109
|
+
|
|
110
|
+
# This the role that gives the stack sufficient permissions to create the OIDC provider. It is only
|
|
111
|
+
# used during lifecycle operations of this stack
|
|
112
|
+
ClusterOIDCLambdaExecutionRole:
|
|
113
|
+
Type: AWS::IAM::Role
|
|
114
|
+
Properties:
|
|
115
|
+
Path: /
|
|
116
|
+
AssumeRolePolicyDocument:
|
|
117
|
+
Version: "2012-10-17"
|
|
118
|
+
Statement:
|
|
119
|
+
- Effect: Allow
|
|
120
|
+
Principal:
|
|
121
|
+
Service:
|
|
122
|
+
- lambda.amazonaws.com
|
|
123
|
+
Action:
|
|
124
|
+
- sts:AssumeRole
|
|
125
|
+
Policies:
|
|
126
|
+
- PolicyName: root
|
|
127
|
+
PolicyDocument:
|
|
128
|
+
Version: "2012-10-17"
|
|
129
|
+
Statement:
|
|
130
|
+
- Effect: Allow
|
|
131
|
+
Action:
|
|
132
|
+
- eks:DescribeCluster
|
|
133
|
+
Resource: !Sub "arn:aws:eks:${AWS::Region}:${AWS::AccountId}:cluster/${ClusterName}"
|
|
134
|
+
- Effect: Allow
|
|
135
|
+
Action:
|
|
136
|
+
- iam:*OpenIDConnectProvider*
|
|
137
|
+
Resource: "*"
|
|
138
|
+
- Effect: Allow
|
|
139
|
+
Action:
|
|
140
|
+
- logs:CreateLogGroup
|
|
141
|
+
- logs:CreateLogStream
|
|
142
|
+
- logs:PutLogEvents
|
|
143
|
+
Resource: "*"
|
|
144
|
+
Tags: []
|
|
145
|
+
|
|
146
|
+
ClusterAutoscalerRole:
|
|
147
|
+
Type: AWS::IAM::Role
|
|
148
|
+
DependsOn: ClusterOIDCProvider
|
|
149
|
+
Properties:
|
|
150
|
+
AssumeRolePolicyDocument: !Sub
|
|
151
|
+
- |
|
|
152
|
+
{
|
|
153
|
+
"Version": "2012-10-17",
|
|
154
|
+
"Statement": [
|
|
155
|
+
{
|
|
156
|
+
"Effect": "Allow",
|
|
157
|
+
"Principal": {
|
|
158
|
+
"Federated": "arn:aws:iam::${AWS::AccountId}:oidc-provider/${ClusterOIDCURL}"
|
|
159
|
+
},
|
|
160
|
+
"Action": "sts:AssumeRoleWithWebIdentity",
|
|
161
|
+
"Condition": {
|
|
162
|
+
"StringEquals": {
|
|
163
|
+
"${ClusterOIDCURL}:sub": "system:serviceaccount:kube-system:cluster-autoscaler",
|
|
164
|
+
"${ClusterOIDCURL}:aud": "sts.amazonaws.com"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
- { "ClusterOIDCURL": !Ref ClusterOIDCURL }
|
|
171
|
+
ManagedPolicyArns:
|
|
172
|
+
- arn:aws:iam::aws:policy/AutoScalingFullAccess
|
|
173
|
+
Path: "/"
|
|
174
|
+
Tags: []
|
|
175
|
+
|
|
176
|
+
Outputs:
|
|
177
|
+
ClusterOIDCURL:
|
|
178
|
+
Description: The OpenID Connect URL (without protocol)
|
|
179
|
+
Value: !Ref ClusterOIDCURL
|
|
180
|
+
ClusterOIDCProvider:
|
|
181
|
+
Description: The ARN of the OIDCProvider
|
|
182
|
+
Value: !Ref ClusterOIDCProvider
|
|
183
|
+
ClusterRoleArn:
|
|
184
|
+
Description: The arn of the Autoscaler role
|
|
185
|
+
Value: !GetAtt ClusterAutoscalerRole.Arn
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
2
|
+
kind: ClusterRoleBinding
|
|
3
|
+
metadata:
|
|
4
|
+
name: deployer-srvacct-binding-<GridNamespace>
|
|
5
|
+
subjects:
|
|
6
|
+
- kind: ServiceAccount
|
|
7
|
+
namespace: <GridNamespace>
|
|
8
|
+
name: default
|
|
9
|
+
roleRef:
|
|
10
|
+
kind: ClusterRole
|
|
11
|
+
name: cluster-admin
|
|
12
|
+
apiGroup: rbac.authorization.k8s.io
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Source: selenium-grid/templates/hub-deployment.yaml
|
|
3
|
+
apiVersion: apps/v1
|
|
4
|
+
kind: Deployment
|
|
5
|
+
metadata:
|
|
6
|
+
name: browserstack-turboscale-grid
|
|
7
|
+
namespace: <GridNamespace>
|
|
8
|
+
labels:
|
|
9
|
+
name: browserstack-turboscale-grid
|
|
10
|
+
spec:
|
|
11
|
+
replicas: 1
|
|
12
|
+
selector:
|
|
13
|
+
matchLabels:
|
|
14
|
+
name: browserstack-turboscale-grid
|
|
15
|
+
template:
|
|
16
|
+
metadata:
|
|
17
|
+
labels:
|
|
18
|
+
name: browserstack-turboscale-grid
|
|
19
|
+
spec:
|
|
20
|
+
containers:
|
|
21
|
+
- name: browserstack-turboscale-grid
|
|
22
|
+
image: public.ecr.aws/v4a1k5d3/browserstack/selenium-hub:0.1.1
|
|
23
|
+
imagePullPolicy: Always
|
|
24
|
+
env:
|
|
25
|
+
- name: CLUSTER_NAME
|
|
26
|
+
value: "<ClusterName>"
|
|
27
|
+
- name: ENABLE_K8S
|
|
28
|
+
value: "true"
|
|
29
|
+
- name: BSTACK_URL
|
|
30
|
+
value: "<BstackURL>"
|
|
31
|
+
- name: K8S_NAMESPACE
|
|
32
|
+
value: "<GridNamespace>"
|
|
33
|
+
- name: BSTACK_USERNAME
|
|
34
|
+
value: "<BstackUsername>"
|
|
35
|
+
- name: BSTACK_ACCESSKEY
|
|
36
|
+
value: "<BstackAccessKey>"
|
|
37
|
+
- name: GRID_NAME
|
|
38
|
+
value: "<GridName>"
|
|
39
|
+
- name: GRID_PROFILE
|
|
40
|
+
value: "<GridProfileID>"
|
|
41
|
+
- name: REGION
|
|
42
|
+
value: "<Region>"
|
|
43
|
+
- name: CLOUD_PROVIDER
|
|
44
|
+
value: "<CloudProvider>"
|
|
45
|
+
ports:
|
|
46
|
+
- containerPort: 4444
|
|
47
|
+
protocol: TCP
|
|
48
|
+
- containerPort: 4442
|
|
49
|
+
protocol: TCP
|
|
50
|
+
- containerPort: 4443
|
|
51
|
+
protocol: TCP
|
|
52
|
+
livenessProbe:
|
|
53
|
+
httpGet:
|
|
54
|
+
path: /readyz
|
|
55
|
+
port: 4444
|
|
56
|
+
initialDelaySeconds: 10
|
|
57
|
+
periodSeconds: 10
|
|
58
|
+
timeoutSeconds: 10
|
|
59
|
+
successThreshold: 1
|
|
60
|
+
failureThreshold: 10
|
|
61
|
+
readinessProbe:
|
|
62
|
+
httpGet:
|
|
63
|
+
path: /readyz
|
|
64
|
+
port: 4444
|
|
65
|
+
initialDelaySeconds: 12
|
|
66
|
+
periodSeconds: 10
|
|
67
|
+
timeoutSeconds: 10
|
|
68
|
+
successThreshold: 1
|
|
69
|
+
failureThreshold: 10
|
|
70
|
+
resources:
|
|
71
|
+
limits:
|
|
72
|
+
cpu: "0.5"
|
|
73
|
+
memory: 1Gi
|
|
74
|
+
requests:
|
|
75
|
+
cpu: "0.5"
|
|
76
|
+
memory: 1Gi
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Source: selenium-grid/templates/hub-service.yaml
|
|
3
|
+
apiVersion: v1
|
|
4
|
+
kind: Service
|
|
5
|
+
metadata:
|
|
6
|
+
name: browserstack-turboscale-grid-service
|
|
7
|
+
namespace: <GridNamespace>
|
|
8
|
+
labels:
|
|
9
|
+
app: browserstack-turboscale-grid-service
|
|
10
|
+
spec:
|
|
11
|
+
selector:
|
|
12
|
+
name: browserstack-turboscale-grid
|
|
13
|
+
type: LoadBalancer
|
|
14
|
+
ports:
|
|
15
|
+
- name: http-hub
|
|
16
|
+
protocol: TCP
|
|
17
|
+
port: 4444
|
|
18
|
+
targetPort: 4444
|
|
19
|
+
- name: tcp-hub-pub
|
|
20
|
+
protocol: TCP
|
|
21
|
+
port: 4442
|
|
22
|
+
targetPort: 4442
|
|
23
|
+
- name: tcp-hub-sub
|
|
24
|
+
protocol: TCP
|
|
25
|
+
port: 4443
|
|
26
|
+
targetPort: 4443
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a14_0x33e3b2=a14_0x41b7;(function(_0x19d354,_0x5a84f9){const _0x3dbe13=a14_0x41b7,_0x386a58=_0x19d354();while(!![]){try{const _0x34b5fd=parseInt(_0x3dbe13(0x12e))/0x1*(parseInt(_0x3dbe13(0x15a))/0x2)+parseInt(_0x3dbe13(0x145))/0x3+parseInt(_0x3dbe13(0x103))/0x4+parseInt(_0x3dbe13(0x125))/0x5*(-parseInt(_0x3dbe13(0x144))/0x6)+parseInt(_0x3dbe13(0x189))/0x7*(-parseInt(_0x3dbe13(0x19d))/0x8)+-parseInt(_0x3dbe13(0xdd))/0x9*(-parseInt(_0x3dbe13(0x109))/0xa)+-parseInt(_0x3dbe13(0x137))/0xb;if(_0x34b5fd===_0x5a84f9)break;else _0x386a58['push'](_0x386a58['shift']());}catch(_0x2c0d3b){_0x386a58['push'](_0x386a58['shift']());}}}(a14_0x358a,0x52884));const fs=require('fs'),yaml=require(a14_0x33e3b2(0x1a2)),path=require('path'),awsSDK=require(a14_0x33e3b2(0x14b)),{AWS,global_registry}=require('../config/constants'),{logger}=require('../config/logger');exports['configureAWSIfNotConfigured']=()=>{const _0x17b2d8=a14_0x33e3b2,_0xd6564d={'XQjjA':function(_0x2e61d6,_0xb670a7){return _0x2e61d6(_0xb670a7);},'pBkiA':function(_0x4dac7b,_0x28bcf7){return _0x4dac7b!==_0x28bcf7;},'TyauL':_0x17b2d8(0x130),'pJDfl':_0x17b2d8(0x176)};!this['isAWSConfigured']()&&(_0xd6564d[_0x17b2d8(0x16f)](_0xd6564d['TyauL'],_0xd6564d['pJDfl'])?this['setAWSConfig']():(_0x3f2482[_0x17b2d8(0xe7)](_0x17b2d8(0x18d)+_0x16b195),_0xd6564d['XQjjA'](_0x2565e9,_0x41a257)));},exports[a14_0x33e3b2(0xe3)]=async(_0x1a1360,_0x1ca5f4)=>{const _0x3108bc=a14_0x33e3b2,_0x5d9e5c={'RADtC':function(_0x58f450,_0x3a80eb){return _0x58f450===_0x3a80eb;},'nOxGj':function(_0x28a98a,_0x2bc5d2){return _0x28a98a(_0x2bc5d2);},'tURWK':function(_0x6527c1,_0x3eca2a){return _0x6527c1!==_0x3eca2a;},'lQMUl':_0x3108bc(0x115),'FBKDf':_0x3108bc(0x146)};if(_0x5d9e5c[_0x3108bc(0xd3)](isAWS,_0x1a1360)){if(_0x5d9e5c[_0x3108bc(0x167)](_0x5d9e5c[_0x3108bc(0x153)],_0x5d9e5c[_0x3108bc(0x122)]))return this[_0x3108bc(0x100)](),_0x5d9e5c[_0x3108bc(0xd3)](checkAWSClusterCreated,_0x1ca5f4);else{if(_0x5d9e5c[_0x3108bc(0x135)](_0x2830fd,_0x5eb566))return!![];return![];}}},exports[a14_0x33e3b2(0x129)]=async _0x43b45a=>{const _0x50c71e=a14_0x33e3b2,_0x218790={};_0x218790['pmBYm']=_0x50c71e(0xd8);const _0x43eff0=_0x218790,_0x53b28f={};_0x53b28f[_0x50c71e(0xdb)]=_0x43eff0[_0x50c71e(0x128)];const _0x21b365=new awsSDK[(_0x50c71e(0x190))](_0x53b28f),_0xcf5d24={};return _0xcf5d24[_0x50c71e(0xcf)]=_0x43b45a,_0x21b365[_0x50c71e(0xef)](_0xcf5d24)[_0x50c71e(0xdf)]();},exports['createAuthConfigMap']=async _0x60a483=>{const _0x4f9adb=a14_0x33e3b2,_0x17c15f={};_0x17c15f['ggVga']='templates',_0x17c15f['vCjiP']='aws-auth-cm.yaml',_0x17c15f[_0x4f9adb(0xd0)]='utf-8',_0x17c15f[_0x4f9adb(0x1d1)]='<ARN>';const _0x450f0c=_0x17c15f,_0x9d33f0=await fs[_0x4f9adb(0xd6)](path['join'](__dirname,'..',_0x450f0c['ggVga'],_0x450f0c[_0x4f9adb(0x10e)]),_0x450f0c[_0x4f9adb(0xd0)]),_0x2c6256=yaml[_0x4f9adb(0xed)](_0x9d33f0);return _0x2c6256[_0x4f9adb(0x127)]['mapRoles']=_0x2c6256[_0x4f9adb(0x127)]['mapRoles'][_0x4f9adb(0x1ce)](_0x450f0c[_0x4f9adb(0x1d1)],_0x60a483),_0x2c6256;},exports[a14_0x33e3b2(0xf4)]=async(_0x2e3b6e,_0x12dba3)=>{const _0x100beb=a14_0x33e3b2,_0x54837c={};_0x54837c[_0x100beb(0x1ca)]=_0x100beb(0xd8);const _0x2f5df3=_0x54837c,_0x651329={};_0x651329['apiVersion']=_0x2f5df3[_0x100beb(0x1ca)];const _0x364922=new awsSDK[(_0x100beb(0x190))](_0x651329),_0x56b6e0={};return _0x56b6e0[_0x100beb(0x171)]=_0x2e3b6e,_0x56b6e0[_0x100beb(0xf6)]=_0x12dba3,_0x364922['describeNodegroup'](_0x56b6e0)[_0x100beb(0xdf)]();};function a14_0x41b7(_0x76785c,_0x33e1d1){const _0x358a86=a14_0x358a();return a14_0x41b7=function(_0x41b7ed,_0x466e89){_0x41b7ed=_0x41b7ed-0xcf;let _0x5eb9b5=_0x358a86[_0x41b7ed];return _0x5eb9b5;},a14_0x41b7(_0x76785c,_0x33e1d1);}const isAWS=_0x478c29=>{const _0x1f5a30=a14_0x33e3b2,_0x85e752={'RhqAa':function(_0x4c993a,_0x299610){return _0x4c993a(_0x299610);},'KOhvK':function(_0x3d8e95,_0x50b414){return _0x3d8e95===_0x50b414;},'prrtj':_0x1f5a30(0x147)};if(_0x85e752[_0x1f5a30(0x160)](_0x478c29,AWS)){if(_0x85e752[_0x1f5a30(0x160)](_0x85e752[_0x1f5a30(0x163)],_0x85e752[_0x1f5a30(0x163)]))return!![];else _0x85e752['RhqAa'](_0x320e25,_0x3ac06e);}return![];},checkAWSClusterCreated=_0x3c2e37=>{const _0x22e4c2=a14_0x33e3b2,_0x3c5679={'vUrfM':function(_0x5bb263,_0xbcb288){return _0x5bb263(_0xbcb288);},'RaaCz':function(_0x42aa14,_0x3d3042){return _0x42aa14===_0x3d3042;},'MvYWw':_0x22e4c2(0x1a1),'GnSqt':_0x22e4c2(0x111),'TxmeQ':function(_0x167237,_0x2d1097){return _0x167237!==_0x2d1097;},'auHJQ':_0x22e4c2(0x1bf),'XqJdp':_0x22e4c2(0x10f),'nMFdE':function(_0x238b88,_0x505d60){return _0x238b88(_0x505d60);},'aIzmn':function(_0x40c6c6,_0x571a9f){return _0x40c6c6===_0x571a9f;},'zpolz':_0x22e4c2(0xf1),'XNJrc':function(_0x37d914,_0x37b634){return _0x37d914===_0x37b634;},'KdoeF':'OTbpO','IxoVG':_0x22e4c2(0xd8)};return new Promise((_0x1f61f4,_0x1d1cfa)=>{const _0x3a34f8=_0x22e4c2,_0x5d6c9b={'QDevu':function(_0x577b4a,_0x1a897a){const _0x52be76=a14_0x41b7;return _0x3c5679[_0x52be76(0x1ab)](_0x577b4a,_0x1a897a);}};if(_0x3c5679[_0x3a34f8(0x18b)](_0x3c5679[_0x3a34f8(0x11a)],_0x3c5679[_0x3a34f8(0x11a)])){const _0x4cc7d2={};_0x4cc7d2[_0x3a34f8(0xdb)]=_0x3c5679[_0x3a34f8(0xfb)];const _0x77aae4=new awsSDK[(_0x3a34f8(0x190))](_0x4cc7d2);_0x77aae4[_0x3a34f8(0x113)]()[_0x3a34f8(0xdf)]()['then'](_0x3fed93=>{const _0x4e4eaf=_0x3a34f8,_0x33e0d4={'apZlV':function(_0x4305c7,_0xd9cab4){const _0x4084fb=a14_0x41b7;return _0x3c5679[_0x4084fb(0x13b)](_0x4305c7,_0xd9cab4);},'KLtAL':function(_0x1e6683,_0x46aee6){const _0x490f6a=a14_0x41b7;return _0x3c5679[_0x490f6a(0x13b)](_0x1e6683,_0x46aee6);}};if(_0x3c5679[_0x4e4eaf(0x11b)](_0x3c5679[_0x4e4eaf(0x121)],_0x3c5679[_0x4e4eaf(0x1a4)])){if(_0x33e0d4['apZlV'](_0x5d993c,_0x5f38fc))return this[_0x4e4eaf(0x100)](),_0x33e0d4[_0x4e4eaf(0xd9)](_0x145411,_0x5b970f);}else _0x3fed93['clusters']['includes'](_0x3c2e37)&&(_0x3c5679['TxmeQ'](_0x3c5679[_0x4e4eaf(0x133)],_0x3c5679[_0x4e4eaf(0x12a)])?_0x3c5679[_0x4e4eaf(0x13b)](_0x1f61f4,!![]):(_0xc5bf22[_0x4e4eaf(0xe7)](_0x4e4eaf(0xe5)+_0x27e1d9),_0x33e0d4[_0x4e4eaf(0x174)](_0x4408de,_0x192df9))),_0x3c5679[_0x4e4eaf(0x1ab)](_0x1f61f4,![]);})[_0x3a34f8(0x123)](_0x5ca490=>{const _0x1658fe=_0x3a34f8;_0x3c5679[_0x1658fe(0x1bc)](_0x3c5679[_0x1658fe(0xf5)],_0x3c5679[_0x1658fe(0xf5)])?(logger[_0x1658fe(0xe7)](_0x5ca490),_0x3c5679[_0x1658fe(0x1ab)](_0x1d1cfa,_0x5ca490)):_0x45ac5e[_0x1658fe(0xde)](_0x568b9c[_0x1658fe(0x13e)]);});}else _0x5713da['error'](_0x3a34f8(0xe9)+_0x127c90),_0x5d6c9b[_0x3a34f8(0xf8)](_0x4e7ec9,_0x4f7cd1);});};function a14_0x358a(){const _0x442c46=['VEqBT','bezYZ','wwZll','YIBGm','jrZVO','aIzmn','dTMTC','JinVv','VOYea','cjpDk','zHAwI','WHREg','RIbfv','nwaKR','IyAEh','PvMxQ','HBvZu','DaKfP','AGyKW','HpaSe','2016-11-15','XUuNg','\x20already\x20exists.\x20Skipping\x20Bucket\x20creation','replace','BUgiu','mENxK','FAigB','nlfJO','name','NZDQQ','ldUvJ','DsbxD','nOxGj','DWGwG','ASKhZ','readFileAsync','Filters','2017-11-01','KLtAL','qQWqb','apiVersion','.\x20Please\x20Check\x20and\x20try\x20again','720SFYhxy','push','promise','AwaIQ','eFGsS','tTwVs','isClusterPresent','.\x20Error:\x20','Failed\x20to\x20fetch\x20VPCs\x20due\x20to\x20error:\x20','BqBlK','error','scekw','Failed\x20to\x20fetch\x20AWS\x20Regions\x20due\x20to\x20error:\x20','cloudProviderAccessKey','XaLMZ','pVeXr','load','ExNDZ','describeCluster','QJkCG','jlIRx','EC2','xFkLC','getNodeGroupInfo','zpolz','nodegroupName','fetchVPCs','QDevu','inqKC','ayujS','IxoVG','\x20in\x20region\x20','qgOgd','forEach','isAWSConfigured','configureAWSIfNotConfigured','adNFi','isVPCPresent','162572ZTztCe','Svuab','region','awsConfigSet','MPzGE','JFVgx','75150RkRNVe','xLrAg','aHKjI','rbNsf','nTGWD','vCjiP','hzhug','vpc-id','tEhHx','setAWSConfig','listClusters','Name','wAbcU','then','GAONp','xMIUK','kMxOe','KdoeF','RaaCz','config','info','XlwTP','XcLzg','sUmZM','MvYWw','FBKDf','catch','mWmmu','5aTxuvk','OaVRF','data','pmBYm','getClusterInfo','XqJdp','vXSnG','NZoeB','clusterRegion','1OdHWlz','JkCab','knwRg','xeXwx','KdWVd','auHJQ','fetchSubnets','RADtC','ikBAg','7065498gLwtiU','mCutz','getAWSRegions','IpIYf','vUrfM','ChUUA','XIrUJ','SubnetId','lchFw','ZBVsS','includes','dBekW','describeRegions','2822298aQmJof','1897785kUkrSJ','JgVLF','lGCqx','oAjMx','aUUdu','gDCMC','aws-sdk','CqkJh','QYosf','BhBtI','nxUgx','eScRd','PoGtl','WtXNQ','lQMUl','ZUXeR','vhTtB','TmYQT','PjmaZ','dsCmY','DOrFb','1135140bHQfSd','bwxPc','VMpGK','ERIap','VpcIds','Values','KOhvK','AtsQi','MtAKN','prrtj','GtAhp','sUVmM','IyNwA','tURWK','pNDal','eWRej','qZxYk','VVYST','fUoQp','Bucket','oWQed','pBkiA','secretAccessKey','clusterName','clusters','qzFGT','apZlV','Conzm','CRrrY','nOSCb','FGchR','Bucket:\x20','BtSpS','every','JtQeU','\x20does\x20not\x20exist.\x20Adding\x20it\x20to\x20CloudFormation\x20to\x20create\x20the\x20bucket','aGrsC','describeSecurityGroups','describeVpcs','oYuDR','AAzmY','pMdPO','UcopG','osYwa','warn','xnPno','NvqQM','32221rgdYVd','mFJHV','XNJrc','HSeZE','Failed\x20to\x20fetch\x20subnets\x20due\x20to\x20error:\x20','accessKeyId','AZfDY','EKS','PHOYx','awsObj','Cannot\x20find\x20VPC\x20','UtJrk','kYwBA','kpGAr','SVGVF','describeSubnets','YcKKQ','mZgUV','Cannot\x20find\x20subnets\x20','bWhOC','680EDMRGr','vHDal','Regions','isSubnetsValid','SqGUv','js-yaml','OXpgC','GnSqt','Oerdz','mEskX','YCAJC','jnSlc','oygmx','aAFSI','nMFdE','cloudProviderSecretKey','bIBlv','SXLCG','MMSyE','headBucket','ahUVY','kJetv','Failed\x20to\x20fetch\x20Security\x20Groups\x20due\x20to\x20error:\x20','xgeQM','update','isBucketPresent'];a14_0x358a=function(){return _0x442c46;};return a14_0x358a();}exports[a14_0x33e3b2(0xf7)]=_0x23bbdb=>{const _0x54ac42=a14_0x33e3b2,_0x15df50={'inqKC':function(_0x572c90,_0xa493c5){return _0x572c90(_0xa493c5);},'dsCmY':function(_0x48c5d7,_0x332514){return _0x48c5d7===_0x332514;},'aGrsC':'FIaHg','FGchR':_0x54ac42(0x1cb),'pVeXr':function(_0x28d7cc,_0x1da7ad){return _0x28d7cc!==_0x1da7ad;},'JkCab':'IiuqD','QYosf':'Ticwb'};return new Promise((_0x36e182,_0x49b6c3)=>{const _0x1c8c57=_0x54ac42;if(_0x15df50[_0x1c8c57(0x158)](_0x15df50[_0x1c8c57(0x14d)],_0x15df50[_0x1c8c57(0x14d)])){const _0x13fb65={};_0x13fb65[_0x1c8c57(0xdb)]=_0x15df50[_0x1c8c57(0x178)],_0x13fb65[_0x1c8c57(0x105)]=_0x23bbdb;const _0x44215a=new awsSDK[(_0x1c8c57(0xf2))](_0x13fb65);_0x44215a[_0x1c8c57(0x180)]()[_0x1c8c57(0xdf)]()[_0x1c8c57(0x116)](_0x89d121=>{const _0x41a943=_0x1c8c57,_0x3b1655={'aGIHV':function(_0x2034fb,_0x1b7c0c){const _0x2d5e1b=a14_0x41b7;return _0x15df50[_0x2d5e1b(0xf9)](_0x2034fb,_0x1b7c0c);}};_0x15df50[_0x41a943(0x158)](_0x15df50['aGrsC'],_0x15df50[_0x41a943(0x17e)])?_0x15df50[_0x41a943(0xf9)](_0x36e182,_0x89d121):_0x3b1655['aGIHV'](_0x3c2fa8,_0x10171b);})[_0x1c8c57(0x123)](_0x59b37c=>{const _0x5d675b=_0x1c8c57,_0x50b23a={'BUgiu':function(_0x4c554b,_0x34d582){return _0x15df50['inqKC'](_0x4c554b,_0x34d582);},'cjpDk':_0x15df50['FGchR']};if(_0x15df50[_0x5d675b(0xec)](_0x15df50[_0x5d675b(0x12f)],_0x15df50[_0x5d675b(0x12f)])){const _0xda564d={};_0xda564d[_0x5d675b(0xdb)]=_0x50b23a[_0x5d675b(0x1c0)],_0xda564d['region']=_0xb24487;const _0x5436c3=new _0x2fcb86[(_0x5d675b(0xf2))](_0xda564d);_0x5436c3[_0x5d675b(0x17f)]()['promise']()['then'](_0x2714b4=>{const _0x3cf46e=_0x5d675b;_0x50b23a[_0x3cf46e(0x1cf)](_0x37a772,_0x2714b4);})[_0x5d675b(0x123)](_0x3db431=>{const _0x10494e=_0x5d675b;_0xd2d0f0[_0x10494e(0xe7)](_0x10494e(0x1b3)+_0x3db431),_0x50b23a['BUgiu'](_0x572277,_0x3db431);});}else logger[_0x5d675b(0xe7)](_0x5d675b(0xe5)+_0x59b37c),_0x15df50[_0x5d675b(0xf9)](_0x49b6c3,_0x59b37c);});}else _0x156bbc[_0x1c8c57(0x172)][_0x1c8c57(0x141)](_0x26624a)&&_0x15df50['inqKC'](_0x259e7d,!![]),_0x15df50[_0x1c8c57(0xf9)](_0x49ba01,![]);});},exports[a14_0x33e3b2(0x102)]=(_0x5d5b62,_0x24a1fd)=>{const _0x47f7e7=a14_0x33e3b2,_0x109c00={'CqkJh':function(_0x62ba56,_0x4e8363){return _0x62ba56(_0x4e8363);},'kMxOe':function(_0x549b0a,_0x9cb0cf){return _0x549b0a===_0x9cb0cf;},'zuqYY':_0x47f7e7(0x1b1),'WtXNQ':_0x47f7e7(0x101),'TmYQT':function(_0x494f41,_0x1f2142){return _0x494f41!==_0x1f2142;},'mFJHV':_0x47f7e7(0x19e),'PvMxQ':'WzVQp','jnSlc':'cqHcx','DNAVF':_0x47f7e7(0x1a3),'mEskX':_0x47f7e7(0x1cb)},_0x3cd7d0={};_0x3cd7d0[_0x47f7e7(0x15e)]=[_0x5d5b62];let _0x8f8e0=_0x3cd7d0;return new Promise((_0x305d77,_0x188de1)=>{const _0x3f77be=_0x47f7e7,_0x6f7b9d={'PHOYx':function(_0x42b15d,_0x4ea85d){const _0xf59077=a14_0x41b7;return _0x109c00[_0xf59077(0x14c)](_0x42b15d,_0x4ea85d);},'sUmZM':function(_0xc2caf2,_0x59864f){return _0x109c00['kMxOe'](_0xc2caf2,_0x59864f);},'iRwOx':_0x109c00['zuqYY'],'wwZll':_0x109c00[_0x3f77be(0x152)],'TBdhC':function(_0x1de212,_0x120e70){const _0x3437d8=_0x3f77be;return _0x109c00[_0x3437d8(0x14c)](_0x1de212,_0x120e70);},'rbNsf':function(_0x3769b4,_0x4dad96){const _0x3148ab=_0x3f77be;return _0x109c00[_0x3148ab(0x156)](_0x3769b4,_0x4dad96);},'nTGWD':_0x109c00[_0x3f77be(0x18a)],'VMpGK':_0x109c00[_0x3f77be(0x1c6)],'kPSNg':function(_0xb5b8d4,_0x26c6d1){const _0x99ca6f=_0x3f77be;return _0x109c00[_0x99ca6f(0x14c)](_0xb5b8d4,_0x26c6d1);}};if(_0x109c00[_0x3f77be(0x119)](_0x109c00[_0x3f77be(0x1a8)],_0x109c00['DNAVF']))return!![];else{const _0x3fd05a={};_0x3fd05a['apiVersion']=_0x109c00[_0x3f77be(0x1a6)],_0x3fd05a[_0x3f77be(0x105)]=_0x24a1fd;const _0x57c242=new awsSDK[(_0x3f77be(0xf2))](_0x3fd05a);_0x57c242[_0x3f77be(0x180)](_0x8f8e0)['promise']()[_0x3f77be(0x116)](_0x40b2da=>{const _0x33de83=_0x3f77be,_0x57d373={'KdWVd':function(_0x299850,_0x7b86d5){const _0xc92c1f=a14_0x41b7;return _0x6f7b9d[_0xc92c1f(0x191)](_0x299850,_0x7b86d5);}};if(_0x6f7b9d[_0x33de83(0x120)](_0x6f7b9d['iRwOx'],_0x6f7b9d[_0x33de83(0x1b9)])){const _0x9d764c=new _0x4b1014['S3']();return new _0x83af80((_0xfd5350,_0x4ff98b)=>{const _0x2970bc=_0x33de83,_0x24e163={'DAalv':function(_0x39ecee,_0x36f6bd){const _0x1f50c5=a14_0x41b7;return _0x57d373[_0x1f50c5(0x132)](_0x39ecee,_0x36f6bd);}},_0x382afc={};_0x382afc[_0x2970bc(0x16d)]=_0x4589fa,_0x9d764c[_0x2970bc(0x1b0)](_0x382afc)[_0x2970bc(0xdf)]()['then'](_0xad028f=>{const _0x4b04d5=_0x2970bc;_0xf83fb7['warn'](_0x4b04d5(0x179)+_0x12f889+'\x20already\x20exists.\x20Skipping\x20Bucket\x20creation'),_0x24e163['DAalv'](_0xfd5350,!![]);})['catch'](()=>{const _0x2138ac=_0x2970bc;_0x5e91cb[_0x2138ac(0x11d)](_0x2138ac(0x179)+_0xd5ee74+_0x2138ac(0x17d)),_0x24e163['DAalv'](_0xfd5350,![]);});});}else _0x6f7b9d['TBdhC'](_0x305d77,!![]);})[_0x3f77be(0x123)](_0x324555=>{const _0x3efa07=_0x3f77be,_0x3443ef={'dBekW':function(_0x102b05,_0xba5968){return _0x6f7b9d['PHOYx'](_0x102b05,_0xba5968);}};if(_0x6f7b9d[_0x3efa07(0x10c)](_0x6f7b9d[_0x3efa07(0x10d)],_0x6f7b9d[_0x3efa07(0x15c)]))logger[_0x3efa07(0xe7)](_0x3efa07(0x193)+_0x5d5b62+'\x20in\x20region\x20'+_0x24a1fd+'.\x20Please\x20Check\x20and\x20try\x20again'),_0x6f7b9d['kPSNg'](_0x305d77,![]);else return this[_0x3efa07(0x100)](),_0x3443ef[_0x3efa07(0x142)](_0x5084d0,_0x1e5912);});}});},exports[a14_0x33e3b2(0x1a0)]=(_0x42a852,_0x1cee96,_0x353574)=>{const _0x3c141d=a14_0x33e3b2,_0x5c56d6={'kJetv':function(_0x48c08c,_0x2dcdcb){return _0x48c08c(_0x2dcdcb);},'oygmx':_0x3c141d(0x1cb),'nwaKR':function(_0x89c68f,_0x4f2fd9){return _0x89c68f===_0x4f2fd9;},'mZgUV':_0x3c141d(0x15d),'Conzm':function(_0x42a533,_0x32c834){return _0x42a533!==_0x32c834;},'pnwjw':_0x3c141d(0xd5),'QJkCG':_0x3c141d(0x194),'GsWbc':'csSpb','nxUgx':'pafjj','GtAhp':_0x3c141d(0x10a),'bwxPc':_0x3c141d(0x1c5),'osYwa':function(_0x4ed955,_0x11d58d){return _0x4ed955===_0x11d58d;},'DWGwG':_0x3c141d(0x13a),'AGyKW':function(_0x109125,_0x4d88ee){return _0x109125(_0x4d88ee);},'qzFGT':'fILdv','kpGAr':function(_0x46204b,_0x3ebe4e){return _0x46204b(_0x3ebe4e);},'AZfDY':_0x3c141d(0x148),'nOSCb':_0x3c141d(0x110)},_0x11fbc5={};_0x11fbc5[_0x3c141d(0x114)]=_0x5c56d6[_0x3c141d(0x177)],_0x11fbc5[_0x3c141d(0x15f)]=[_0x1cee96];const _0x5e91db={};_0x5e91db[_0x3c141d(0xd7)]=[_0x11fbc5];let _0x481850=_0x5e91db;return new Promise((_0x5d6eff,_0x58a94e)=>{const _0xa6c02d=_0x3c141d,_0x4d39b1={'qQWqb':function(_0x5e043c,_0x351f06){const _0x370096=a14_0x41b7;return _0x5c56d6[_0x370096(0x196)](_0x5e043c,_0x351f06);}};if(_0x5c56d6[_0xa6c02d(0x185)](_0x5c56d6[_0xa6c02d(0x18f)],_0x5c56d6[_0xa6c02d(0x18f)])){const _0x220043={};_0x220043[_0xa6c02d(0xdb)]=_0x5c56d6['oygmx'],_0x220043['region']=_0x353574;const _0x39877f=new awsSDK[(_0xa6c02d(0xf2))](_0x220043);_0x39877f[_0xa6c02d(0x198)](_0x481850)[_0xa6c02d(0xdf)]()[_0xa6c02d(0x116)](_0x51e690=>{const _0x3f2926=_0xa6c02d,_0x375d09={'ayujS':function(_0x4fb4cd,_0x147a3a){const _0x2c785a=a14_0x41b7;return _0x5c56d6[_0x2c785a(0x1b2)](_0x4fb4cd,_0x147a3a);},'OaVRF':_0x5c56d6['oygmx'],'VVYST':function(_0x37a917,_0xd30444){const _0x3d496a=a14_0x41b7;return _0x5c56d6[_0x3d496a(0x1c4)](_0x37a917,_0xd30444);},'DOrFb':_0x5c56d6[_0x3f2926(0x19a)],'MMSyE':function(_0x116201,_0xe39aa7){const _0x507f4d=_0x3f2926;return _0x5c56d6[_0x507f4d(0x175)](_0x116201,_0xe39aa7);},'XUuNg':_0x5c56d6['pnwjw'],'BhBtI':_0x5c56d6[_0x3f2926(0xf0)],'YcKKQ':function(_0x706fe8,_0x1b5c04){const _0x3d245b=_0x3f2926;return _0x5c56d6[_0x3d245b(0x1c4)](_0x706fe8,_0x1b5c04);},'Oerdz':_0x5c56d6['GsWbc'],'XIrUJ':_0x5c56d6[_0x3f2926(0x14f)],'lchFw':_0x5c56d6[_0x3f2926(0x164)],'CYKTT':_0x5c56d6[_0x3f2926(0x15b)]};if(_0x5c56d6[_0x3f2926(0x185)](_0x5c56d6[_0x3f2926(0xd4)],_0x5c56d6[_0x3f2926(0xd4)])){const _0x140822=[],_0x4fda63=[];_0x51e690['Subnets'][_0x3f2926(0xfe)](_0x20e934=>{const _0x3b033c=_0x3f2926;if(_0x375d09[_0x3b033c(0x16b)](_0x375d09[_0x3b033c(0x159)],_0x375d09[_0x3b033c(0x159)]))_0x140822['push'](_0x20e934[_0x3b033c(0x13e)]);else{const _0x1ddcdb={'vXSnG':function(_0x588bca,_0x3de3bd){const _0x348baf=_0x3b033c;return _0x375d09[_0x348baf(0xfa)](_0x588bca,_0x3de3bd);}},_0x1d0c41={};_0x1d0c41[_0x3b033c(0xdb)]=_0x375d09[_0x3b033c(0x126)],_0x1d0c41[_0x3b033c(0x105)]=_0x1f741f;const _0x30e47f=new _0x169585[(_0x3b033c(0xf2))](_0x1d0c41);_0x30e47f[_0x3b033c(0x180)]()[_0x3b033c(0xdf)]()['then'](_0x434097=>{const _0xc97ec5=_0x3b033c;_0x1ddcdb[_0xc97ec5(0x12b)](_0x1d977c,_0x434097);})[_0x3b033c(0x123)](_0x3f2b4f=>{const _0x4a4210=_0x3b033c;_0x56db52[_0x4a4210(0xe7)](_0x4a4210(0xe5)+_0x3f2b4f),_0x1ddcdb['vXSnG'](_0x230a81,_0x3f2b4f);});}});const _0x1f5f2f=_0x42a852[_0x3f2926(0x17b)](_0x148bc7=>{const _0x517d05=_0x3f2926,_0x414b34={'JinVv':function(_0x2f80d0,_0x4e209b){const _0x3b161e=a14_0x41b7;return _0x375d09[_0x3b161e(0xfa)](_0x2f80d0,_0x4e209b);},'XaLMZ':_0x375d09['OaVRF'],'pNDal':function(_0x5a0407,_0x4e2ca3){return _0x375d09['ayujS'](_0x5a0407,_0x4e2ca3);}};if(_0x375d09[_0x517d05(0x1af)](_0x375d09[_0x517d05(0x1cc)],_0x375d09[_0x517d05(0x14e)])){if(_0x140822[_0x517d05(0x141)](_0x148bc7)){if(_0x375d09[_0x517d05(0x199)](_0x375d09[_0x517d05(0x1a5)],_0x375d09[_0x517d05(0x13d)])){const _0x51b7cd={'UDLTI':function(_0x132dd9,_0x408d50){const _0x1fdcf4=_0x517d05;return _0x414b34[_0x1fdcf4(0x168)](_0x132dd9,_0x408d50);}};return new _0x47519a((_0x32d5c1,_0x10d88f)=>{const _0x19b2b4=_0x517d05,_0x14326b={'YCAJC':function(_0xb241c0,_0x533225){const _0x4fc092=a14_0x41b7;return _0x414b34[_0x4fc092(0x1be)](_0xb241c0,_0x533225);}},_0x164833={};_0x164833[_0x19b2b4(0xdb)]=_0x414b34[_0x19b2b4(0xeb)],_0x164833[_0x19b2b4(0x105)]=_0x5914e9;const _0x38efd8=new _0xf26db0[(_0x19b2b4(0xf2))](_0x164833);_0x38efd8['describeVpcs']()[_0x19b2b4(0xdf)]()[_0x19b2b4(0x116)](_0x19341c=>{_0x51b7cd['UDLTI'](_0x32d5c1,_0x19341c);})[_0x19b2b4(0x123)](_0xf4368f=>{const _0x45ef07=_0x19b2b4;_0x54da10[_0x45ef07(0xe7)](_0x45ef07(0xe5)+_0xf4368f),_0x14326b[_0x45ef07(0x1a7)](_0x10d88f,_0xf4368f);});});}else return!![];}else{if(_0x375d09['YcKKQ'](_0x375d09[_0x517d05(0x13f)],_0x375d09['CYKTT']))_0x375d09['ayujS'](_0x451456,_0x10b8f5);else return _0x4fda63[_0x517d05(0xde)](_0x148bc7),![];}}else _0x414b34[_0x517d05(0x168)](_0x5e6fca,!![]);});_0x5c56d6['AGyKW'](_0x5d6eff,[_0x1f5f2f,_0x4fda63]);}else _0x49ae5a['warn'](_0x3f2926(0x179)+_0x495a12+_0x3f2926(0x1cd)),_0x4d39b1['qQWqb'](_0x10690e,!![]);})[_0xa6c02d(0x123)](_0x359f7c=>{const _0x4d4ab1=_0xa6c02d,_0x4a2ae3={'xeXwx':function(_0x28c13c,_0x5ca74b){const _0x45bb5e=a14_0x41b7;return _0x5c56d6[_0x45bb5e(0x1b2)](_0x28c13c,_0x5ca74b);}};_0x5c56d6[_0x4d4ab1(0x1c4)](_0x5c56d6[_0x4d4ab1(0x173)],_0x5c56d6[_0x4d4ab1(0x173)])?(logger['error'](_0x4d4ab1(0x19b)+_0x1cee96+_0x4d4ab1(0xfc)+_0x353574+_0x4d4ab1(0xe4)+_0x359f7c),_0x5c56d6[_0x4d4ab1(0x1c9)](_0x5d6eff,[![],[]])):_0x4a2ae3[_0x4d4ab1(0x131)](_0x526c38,_0x17f68d[_0x4d4ab1(0x19f)]);});}else{const _0x29fa36={'qoCRO':function(_0x401e3e,_0x10b42e){return _0x5c56d6['AGyKW'](_0x401e3e,_0x10b42e);}},_0x2ad413={};_0x2ad413['apiVersion']=_0x5c56d6[_0xa6c02d(0x1a9)],_0x2ad413['region']=_0x58dd9b;const _0x125b80=new _0x4bab87[(_0xa6c02d(0xf2))](_0x2ad413);_0x125b80[_0xa6c02d(0x198)]()[_0xa6c02d(0xdf)]()[_0xa6c02d(0x116)](_0x3b4918=>{const _0x5dbeea=_0xa6c02d;_0x4d39b1[_0x5dbeea(0xda)](_0x4595e5,_0x3b4918);})[_0xa6c02d(0x123)](_0x4fc1b4=>{const _0x12fbe4=_0xa6c02d;_0x2ad62b[_0x12fbe4(0xe7)](_0x12fbe4(0x18d)+_0x4fc1b4),_0x29fa36['qoCRO'](_0x47723c,_0x4fc1b4);});}});},exports[a14_0x33e3b2(0x1b6)]=_0x4f86a7=>{const _0x534365=a14_0x33e3b2,_0x15d016={'rfVJU':function(_0x33af4e,_0x41ad3b){return _0x33af4e===_0x41ad3b;},'ExNDZ':_0x534365(0x124),'BqBlK':function(_0x6a60f7,_0x2451d7){return _0x6a60f7(_0x2451d7);},'gaJSt':function(_0x51acba,_0x29dd61){return _0x51acba!==_0x29dd61;},'WHREg':'QeDQo','ZBVsS':function(_0x525d44,_0x11954a){return _0x525d44!==_0x11954a;},'saTxc':_0x534365(0x181)},_0x1630ac=new awsSDK['S3']();return new Promise((_0x3b27c4,_0x553877)=>{const _0x2aa13e=_0x534365,_0x9ac845={'JtQeU':function(_0x42519a,_0x202fac){const _0x2a913a=a14_0x41b7;return _0x15d016[_0x2a913a(0xe6)](_0x42519a,_0x202fac);},'JHNPb':function(_0x246c07,_0x286738){return _0x15d016['gaJSt'](_0x246c07,_0x286738);},'aUUdu':_0x15d016[_0x2aa13e(0x1c2)]};if(_0x15d016[_0x2aa13e(0x140)](_0x15d016['saTxc'],_0x15d016['saTxc']))_0x451288['error'](_0x2aa13e(0x1b3)+_0x5a8ea2),_0x9ac845[_0x2aa13e(0x17c)](_0x33454c,_0x3b418c);else{const _0x1e41db={};_0x1e41db[_0x2aa13e(0x16d)]=_0x4f86a7,_0x1630ac[_0x2aa13e(0x1b0)](_0x1e41db)[_0x2aa13e(0xdf)]()[_0x2aa13e(0x116)](_0x3ee0d9=>{const _0x5743e6=_0x2aa13e,_0x1f58a4={'tTwVs':function(_0x7df1eb,_0x5ac4b6){const _0x3c2d79=a14_0x41b7;return _0x9ac845[_0x3c2d79(0x17c)](_0x7df1eb,_0x5ac4b6);}};if(_0x9ac845['JHNPb'](_0x9ac845[_0x5743e6(0x149)],_0x9ac845[_0x5743e6(0x149)])){const _0x1bcaf7={};_0x1bcaf7[_0x5743e6(0x16d)]=_0x1e1fe4,_0x54f2ac[_0x5743e6(0x1b0)](_0x1bcaf7)[_0x5743e6(0xdf)]()['then'](_0x4c3b4a=>{const _0x5a3963=_0x5743e6;_0xc0b341[_0x5a3963(0x186)](_0x5a3963(0x179)+_0x59f1ea+'\x20already\x20exists.\x20Skipping\x20Bucket\x20creation'),_0x1f58a4[_0x5a3963(0xe2)](_0x42b71b,!![]);})['catch'](()=>{const _0x1b1127=_0x5743e6;_0xca49c8[_0x1b1127(0x11d)](_0x1b1127(0x179)+_0x2f3e86+'\x20does\x20not\x20exist.\x20Adding\x20it\x20to\x20CloudFormation\x20to\x20create\x20the\x20bucket'),_0x1f58a4[_0x1b1127(0xe2)](_0xb05e10,![]);});}else logger[_0x5743e6(0x186)]('Bucket:\x20'+_0x4f86a7+_0x5743e6(0x1cd)),_0x9ac845[_0x5743e6(0x17c)](_0x3b27c4,!![]);})[_0x2aa13e(0x123)](()=>{const _0x1a22a8=_0x2aa13e;if(_0x15d016['rfVJU'](_0x15d016[_0x1a22a8(0xee)],_0x15d016[_0x1a22a8(0xee)]))logger[_0x1a22a8(0x11d)](_0x1a22a8(0x179)+_0x4f86a7+'\x20does\x20not\x20exist.\x20Adding\x20it\x20to\x20CloudFormation\x20to\x20create\x20the\x20bucket'),_0x15d016[_0x1a22a8(0xe6)](_0x3b27c4,![]);else return _0x43c32d[_0x1a22a8(0xde)](_0x4f8f05),![];});}});},exports[a14_0x33e3b2(0x134)]=_0x1087ea=>{const _0x487fa9=a14_0x33e3b2,_0x5c2bee={'vhTtB':function(_0x404187,_0x5eace7){return _0x404187!==_0x5eace7;},'nBtNM':_0x487fa9(0x1c3),'ldUvJ':_0x487fa9(0xe1),'dTMTC':function(_0x24228f,_0x23ff25){return _0x24228f(_0x23ff25);},'fTRZd':function(_0x3602c2,_0x5186b0){return _0x3602c2(_0x5186b0);},'qgOgd':_0x487fa9(0x1cb),'jVzRb':function(_0xb416c6,_0x396f9a){return _0xb416c6===_0x396f9a;},'BtSpS':_0x487fa9(0x157),'NZoeB':function(_0x153fa2,_0x574f9f){return _0x153fa2!==_0x574f9f;},'ChUUA':_0x487fa9(0x188),'VEqBT':_0x487fa9(0x165)};return new Promise((_0x512f2d,_0x2d0222)=>{const _0x34155d=_0x487fa9,_0x2d7eff={'ZUXeR':function(_0x1e981e,_0x430c6c){return _0x5c2bee['fTRZd'](_0x1e981e,_0x430c6c);},'aAFSI':_0x5c2bee[_0x34155d(0xfd)],'kYwBA':function(_0x56a474,_0x40ff89){return _0x5c2bee['jVzRb'](_0x56a474,_0x40ff89);},'tVZyk':_0x5c2bee[_0x34155d(0x17a)]};if(_0x5c2bee[_0x34155d(0x12c)](_0x5c2bee[_0x34155d(0x13c)],_0x5c2bee[_0x34155d(0x1b7)])){const _0x8edd62={};_0x8edd62[_0x34155d(0xdb)]=_0x5c2bee[_0x34155d(0xfd)],_0x8edd62[_0x34155d(0x105)]=_0x1087ea;const _0x5d768f=new awsSDK['EC2'](_0x8edd62);_0x5d768f[_0x34155d(0x198)]()[_0x34155d(0xdf)]()[_0x34155d(0x116)](_0x14ebf2=>{const _0x2eee50=_0x34155d,_0x5ac544={'zHAwI':function(_0x2956cb,_0x5c4d1e){const _0x49b5e9=a14_0x41b7;return _0x2d7eff[_0x49b5e9(0x154)](_0x2956cb,_0x5c4d1e);},'SXLCG':_0x2d7eff[_0x2eee50(0x1aa)]};if(_0x2d7eff[_0x2eee50(0x195)](_0x2d7eff['tVZyk'],_0x2d7eff['tVZyk']))_0x2d7eff[_0x2eee50(0x154)](_0x512f2d,_0x14ebf2);else{const _0x9ba47={'oWQed':function(_0x339819,_0x3d284c){const _0x59bc7c=_0x2eee50;return _0x5ac544[_0x59bc7c(0x1c1)](_0x339819,_0x3d284c);},'AwaIQ':_0x5ac544[_0x2eee50(0x1ae)]};return new _0x5bf452((_0x3d2095,_0x96a5de)=>{const _0x4e95e4=_0x2eee50,_0x30165f={'xMIUK':function(_0x450a60,_0x17557b){const _0x4c497c=a14_0x41b7;return _0x9ba47[_0x4c497c(0x16e)](_0x450a60,_0x17557b);}},_0x2343e0={};_0x2343e0[_0x4e95e4(0xdb)]=_0x9ba47[_0x4e95e4(0xe0)],_0x2343e0[_0x4e95e4(0x105)]=_0x31e8ee;const _0xbd721d=new _0x22b386[(_0x4e95e4(0xf2))](_0x2343e0);_0xbd721d[_0x4e95e4(0x198)]()[_0x4e95e4(0xdf)]()[_0x4e95e4(0x116)](_0x4729b5=>{const _0x25598a=_0x4e95e4;_0x30165f[_0x25598a(0x118)](_0x3d2095,_0x4729b5);})[_0x4e95e4(0x123)](_0x46ffa4=>{const _0x4ed8ed=_0x4e95e4;_0x60e81a[_0x4ed8ed(0xe7)](_0x4ed8ed(0x18d)+_0x46ffa4),_0x9ba47[_0x4ed8ed(0x16e)](_0x96a5de,_0x46ffa4);});});}})[_0x34155d(0x123)](_0x48e56b=>{const _0x4c8274=_0x34155d;_0x5c2bee[_0x4c8274(0x155)](_0x5c2bee['nBtNM'],_0x5c2bee[_0x4c8274(0xd1)])?(logger['error'](_0x4c8274(0x18d)+_0x48e56b),_0x5c2bee[_0x4c8274(0x1bd)](_0x2d0222,_0x48e56b)):(_0x245d13[_0x4c8274(0xe7)](_0x232acd),_0x2d7eff[_0x4c8274(0x154)](_0x274150,_0xe47897));});}else _0x33796b[_0x34155d(0xe7)]('Cannot\x20find\x20VPC\x20'+_0xea6cd2+_0x34155d(0xfc)+_0x3fdb1f+_0x34155d(0xdc)),_0x2d7eff[_0x34155d(0x154)](_0x31884d,![]);});},exports['fetchSecurityGroups']=_0x1d2326=>{const _0x1ed2eb=a14_0x33e3b2,_0x210e42={'MPzGE':function(_0x149393,_0x5df331){return _0x149393!==_0x5df331;},'tNwfw':_0x1ed2eb(0x166),'scekw':'Keeoi','AAzmY':function(_0x1453ba,_0x2087be){return _0x1453ba(_0x2087be);},'aegTg':function(_0x4c7a0f,_0x34ff92){return _0x4c7a0f!==_0x34ff92;},'aHKjI':'BqDxf','JAUnq':'ZGmqD','pMdPO':function(_0x3ca046,_0xb8101f){return _0x3ca046!==_0xb8101f;},'gDCMC':function(_0x4553ff,_0x5a71a9){return _0x4553ff(_0x5a71a9);},'xFkLC':function(_0x288482,_0x38a156){return _0x288482===_0x38a156;},'UcopG':_0x1ed2eb(0x117),'UcnAs':_0x1ed2eb(0x1cb)};return new Promise((_0xae1565,_0x33421f)=>{const _0x2c8c1b=_0x1ed2eb;if(_0x210e42[_0x2c8c1b(0xf3)](_0x210e42['UcopG'],_0x210e42[_0x2c8c1b(0x184)])){const _0x306504={};_0x306504[_0x2c8c1b(0xdb)]=_0x210e42['UcnAs'],_0x306504['region']=_0x1d2326;const _0x59c8db=new awsSDK[(_0x2c8c1b(0xf2))](_0x306504);_0x59c8db[_0x2c8c1b(0x17f)]()['promise']()['then'](_0x2aeebf=>{const _0x13a0c6=_0x2c8c1b;_0x210e42['MPzGE'](_0x210e42['tNwfw'],_0x210e42[_0x13a0c6(0xe8)])?_0x210e42[_0x13a0c6(0x182)](_0xae1565,_0x2aeebf):this['setAWSConfig']();})[_0x2c8c1b(0x123)](_0x58d7a5=>{const _0x4248f3=_0x2c8c1b;if(_0x210e42['aegTg'](_0x210e42[_0x4248f3(0x10b)],_0x210e42['JAUnq']))logger[_0x4248f3(0xe7)]('Failed\x20to\x20fetch\x20Security\x20Groups\x20due\x20to\x20error:\x20'+_0x58d7a5),_0x210e42[_0x4248f3(0x182)](_0x33421f,_0x58d7a5);else{const _0x3d57cf={};_0x3d57cf['region']=_0x3dd070[_0x4248f3(0x12d)],_0x3d57cf[_0x4248f3(0x18e)]=_0x5c48ba[_0x4248f3(0xea)],_0x3d57cf[_0x4248f3(0x170)]=_0x3e71fb['cloudProviderSecretKey'],_0x5f27cb[_0x4248f3(0x11c)][_0x4248f3(0x1b5)](_0x3d57cf),_0x588856[_0x4248f3(0x106)]=!![];}});}else _0x210e42[_0x2c8c1b(0x107)](_0x555580,_0x25b4ec)&&_0x210e42[_0x2c8c1b(0x183)](_0x5d7a5a['Regions'],_0x55c145)?_0x210e42[_0x2c8c1b(0x182)](_0x578d98,_0x322641['Regions']):_0x210e42[_0x2c8c1b(0x14a)](_0x2014e2,{});});},exports[a14_0x33e3b2(0x139)]=()=>{const _0x4b679a=a14_0x33e3b2,_0x4348dc={'bIBlv':function(_0x5a952f,_0x5aef36){return _0x5a952f(_0x5aef36);},'HBvZu':function(_0x14d255,_0xe35751){return _0x14d255(_0xe35751);},'xODDT':_0x4b679a(0xd8),'YIBGm':_0x4b679a(0x1cb),'XlwTP':function(_0x11c94b,_0xf5abe){return _0x11c94b(_0xf5abe);},'qZxYk':function(_0xb2db4c,_0x58ffe9){return _0xb2db4c===_0x58ffe9;},'eScRd':_0x4b679a(0x162),'AkZzi':_0x4b679a(0x1d2),'SVGVF':function(_0x2a97d8,_0x5b34f7){return _0x2a97d8!==_0x5b34f7;},'eWRej':function(_0x281c83,_0x39b56c){return _0x281c83===_0x39b56c;},'fUoQp':_0x4b679a(0xd2),'mCutz':_0x4b679a(0x1bb),'bezYZ':'JJUez','epvrc':'iVvDv','AtsQi':_0x4b679a(0x187),'DaKfP':_0x4b679a(0x136)};return new Promise((_0xaece77,_0x100be2)=>{const _0x14b449=_0x4b679a,_0x487dd0={'HSeZE':function(_0x44b8e4,_0x10b7c7){const _0x475718=a14_0x41b7;return _0x4348dc[_0x475718(0x11e)](_0x44b8e4,_0x10b7c7);},'JFVgx':function(_0x474b5d,_0x399e8a){const _0x1ca86d=a14_0x41b7;return _0x4348dc[_0x1ca86d(0x197)](_0x474b5d,_0x399e8a);},'PoGtl':_0x4348dc[_0x14b449(0x161)]};if(_0x4348dc[_0x14b449(0x169)](_0x4348dc[_0x14b449(0x1c8)],_0x4348dc[_0x14b449(0x1c8)])){const _0x43a55c={};_0x43a55c[_0x14b449(0xdb)]=_0x4348dc['YIBGm'];const _0x2cac6c=new awsSDK['EC2'](_0x43a55c);_0x2cac6c[_0x14b449(0x143)]()[_0x14b449(0xdf)]()['then']((_0x22587a,_0x5d024b)=>{const _0x498d23=_0x14b449,_0x16cc44={'ImjpH':function(_0x3e1af2,_0x326116){const _0x274548=a14_0x41b7;return _0x4348dc[_0x274548(0x1ad)](_0x3e1af2,_0x326116);},'Svuab':function(_0x16ce52,_0x358909){const _0x1370e7=a14_0x41b7;return _0x4348dc[_0x1370e7(0x1c7)](_0x16ce52,_0x358909);},'vMmMZ':_0x4348dc['xODDT'],'xgeQM':_0x4348dc[_0x498d23(0x1ba)],'mENxK':function(_0x120c00,_0x12724e){const _0x246df8=_0x498d23;return _0x4348dc[_0x246df8(0x11e)](_0x120c00,_0x12724e);}};if(_0x4348dc[_0x498d23(0x16a)](_0x4348dc[_0x498d23(0x150)],_0x4348dc['AkZzi'])){const _0x3af9f9={};_0x3af9f9[_0x498d23(0xdb)]=_0x16cc44['vMmMZ'];const _0x1d53f8=new _0x2089a1[(_0x498d23(0x190))](_0x3af9f9);_0x1d53f8[_0x498d23(0x113)]()['promise']()[_0x498d23(0x116)](_0x5eb8eb=>{const _0x5d3a93=_0x498d23;_0x5eb8eb[_0x5d3a93(0x172)][_0x5d3a93(0x141)](_0x101c52)&&_0x16cc44['ImjpH'](_0x3832f6,!![]),_0x16cc44[_0x5d3a93(0x104)](_0x3cc74d,![]);})['catch'](_0x435a19=>{const _0x494fc9=_0x498d23;_0x5234b7[_0x494fc9(0xe7)](_0x435a19),_0x16cc44[_0x494fc9(0x104)](_0x235597,_0x435a19);});}else{if(_0x4348dc['SVGVF'](_0x22587a,undefined)&&_0x4348dc[_0x498d23(0x197)](_0x22587a[_0x498d23(0x19f)],undefined)){if(_0x4348dc[_0x498d23(0x169)](_0x4348dc[_0x498d23(0x16c)],_0x4348dc[_0x498d23(0x138)]))return!![];else _0x4348dc[_0x498d23(0x1c7)](_0xaece77,_0x22587a['Regions']);}else{if(_0x4348dc[_0x498d23(0x197)](_0x4348dc[_0x498d23(0x1b8)],_0x4348dc['epvrc']))_0x4348dc[_0x498d23(0x1c7)](_0xaece77,{});else{const _0x55cfbc={'XcLzg':function(_0x30d17a,_0x2ad7b0){const _0x1adebc=_0x498d23;return _0x16cc44[_0x1adebc(0x1d0)](_0x30d17a,_0x2ad7b0);}},_0x33de9a={};_0x33de9a['VpcIds']=[_0x25bcce];let _0x5059ae=_0x33de9a;return new _0x57a9b5((_0x2bda1e,_0x506461)=>{const _0x4bdf45=_0x498d23,_0x441afc={'nWePo':function(_0x2725a8,_0x53fce6){return _0x16cc44['Svuab'](_0x2725a8,_0x53fce6);}},_0x5c3322={};_0x5c3322[_0x4bdf45(0xdb)]=_0x16cc44[_0x4bdf45(0x1b4)],_0x5c3322['region']=_0x364eac;const _0x20cd31=new _0x2f1bb8[(_0x4bdf45(0xf2))](_0x5c3322);_0x20cd31['describeVpcs'](_0x5059ae)['promise']()[_0x4bdf45(0x116)](_0x27f555=>{_0x441afc['nWePo'](_0x2bda1e,!![]);})[_0x4bdf45(0x123)](_0xba6f39=>{const _0x5cc71d=_0x4bdf45;_0x2e80bb[_0x5cc71d(0xe7)](_0x5cc71d(0x193)+_0x48456b+_0x5cc71d(0xfc)+_0x63dff6+_0x5cc71d(0xdc)),_0x55cfbc[_0x5cc71d(0x11f)](_0x2bda1e,![]);});});}}}})['catch'](_0x5ce200=>{const _0x23f09e=_0x14b449,_0x47d664={'sKLeb':function(_0x28f74e,_0x50ce10){return _0x487dd0['HSeZE'](_0x28f74e,_0x50ce10);}};_0x487dd0[_0x23f09e(0x108)](_0x487dd0[_0x23f09e(0x151)],_0x487dd0['PoGtl'])?(_0x35b8b2[_0x23f09e(0x11d)](_0x23f09e(0x179)+_0x2d598b+'\x20does\x20not\x20exist.\x20Adding\x20it\x20to\x20CloudFormation\x20to\x20create\x20the\x20bucket'),_0x47d664['sKLeb'](_0x35f391,![])):(logger['error'](_0x23f09e(0xe9)+_0x5ce200),_0x487dd0[_0x23f09e(0x18c)](_0x100be2,_0x5ce200));});}else _0x4348dc[_0x14b449(0x1ad)](_0x131cf0,{});});},exports[a14_0x33e3b2(0xff)]=()=>{const _0x5ebba2=a14_0x33e3b2,_0x3dc54a={};_0x3dc54a[_0x5ebba2(0x19c)]=function(_0x48d960,_0x53c841){return _0x48d960===_0x53c841;};const _0x5c6e9d=_0x3dc54a;return _0x5c6e9d[_0x5ebba2(0x19c)](global_registry[_0x5ebba2(0x106)],!![]);},exports[a14_0x33e3b2(0x112)]=()=>{const _0x541335=a14_0x33e3b2,_0x5678eb={};_0x5678eb['region']=global_registry[_0x541335(0x12d)],_0x5678eb[_0x541335(0x18e)]=global_registry['cloudProviderAccessKey'],_0x5678eb[_0x541335(0x170)]=global_registry[_0x541335(0x1ac)],awsSDK[_0x541335(0x11c)][_0x541335(0x1b5)](_0x5678eb),global_registry['awsConfigSet']=!![];},exports[a14_0x33e3b2(0x192)]=awsSDK;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a15_0x5845(){const _0xe28e87=['readFileAsync','TemplateBody','Tags','WKHtZ','CloudFormation','push','2010-05-15','schema','4905858UbiJvG','autoscaler-role-creation.yaml','hxVpN','StackName','16302MuXdff','4gdhztb','Waiting\x20for\x20CloudFormation\x20stack\x20to\x20complete','55GyIxZf','stringify','1089oAPiiO','7qDOTxw','71MDmXkK','ndQfN','stackCreateComplete','rPKhQ','load','2192060mzVBaD','debug','4207152QxKspy','promise','10940580jehjTe','CAPABILITY_NAMED_IAM','toString','createStack','awsObj','SbJJL','TfeDe','Properties','apiVersion','65690oyRZsl','Parameters','valueOf','templates','Resources','utf-8','Capabilities','JDCJm','join','iQBDN','StackId','2481486xpXcdr','YuWtJ','browserstack:creationDate','js-yaml-cloudformation-schema','./AWSUtils','Cbmwg','path'];a15_0x5845=function(){return _0xe28e87;};return a15_0x5845();}function a15_0x3596(_0x1c6124,_0x1f0f84){const _0x5845a4=a15_0x5845();return a15_0x3596=function(_0x359661,_0x43e5e5){_0x359661=_0x359661-0x1ed;let _0x2bec38=_0x5845a4[_0x359661];return _0x2bec38;},a15_0x3596(_0x1c6124,_0x1f0f84);}const a15_0x2b9874=a15_0x3596;(function(_0x275ab2,_0x32cf3a){const _0x16faee=a15_0x3596,_0x95e81a=_0x275ab2();while(!![]){try{const _0x313be3=-parseInt(_0x16faee(0x222))/0x1*(parseInt(_0x16faee(0x21b))/0x2)+parseInt(_0x16faee(0x208))/0x3*(-parseInt(_0x16faee(0x21c))/0x4)+-parseInt(_0x16faee(0x1f0))/0x5+-parseInt(_0x16faee(0x217))/0x6+-parseInt(_0x16faee(0x221))/0x7*(parseInt(_0x16faee(0x1f2))/0x8)+parseInt(_0x16faee(0x220))/0x9*(-parseInt(_0x16faee(0x1fd))/0xa)+parseInt(_0x16faee(0x21e))/0xb*(parseInt(_0x16faee(0x1f4))/0xc);if(_0x313be3===_0x32cf3a)break;else _0x95e81a['push'](_0x95e81a['shift']());}catch(_0x44d2d5){_0x95e81a['push'](_0x95e81a['shift']());}}}(a15_0x5845,0x8c996));const fs=require('fs'),path=require(a15_0x2b9874(0x20e)),yaml=require('js-yaml'),{CLOUDFORMATION_SCHEMA}=require(a15_0x2b9874(0x20b)),Promise=require('bluebird'),AWS=require(a15_0x2b9874(0x20c))[a15_0x2b9874(0x1f8)],{CLUSTER_AUTOSCALER_STACK_NAME,COMMON_HST_TAGS}=require('../config/constants'),{logger}=require('../config/logger');Promise['promisifyAll'](fs),addAutoscalerTags=async(_0x531d14,_0x213374,_0x5e2e2e)=>{const _0x546c8d=a15_0x2b9874;for(let _0x15e17e in _0x531d14[_0x546c8d(0x201)]){_0x531d14[_0x546c8d(0x201)][_0x15e17e]['Properties']&&_0x531d14[_0x546c8d(0x201)][_0x15e17e][_0x546c8d(0x1fb)][_0x546c8d(0x211)]&&_0x531d14[_0x546c8d(0x201)][_0x15e17e]['Properties']['Tags'][_0x546c8d(0x214)](..._0x5e2e2e);}},exports['createAutoscalerStack']=async _0x31cc39=>{const _0xfb23da=a15_0x2b9874,_0x2da4bd={'hxVpN':'browserstack:cluster','WKHtZ':_0xfb23da(0x20a),'TfeDe':_0xfb23da(0x215),'JDCJm':_0xfb23da(0x200),'SbJJL':_0xfb23da(0x218),'rPKhQ':_0xfb23da(0x202),'ndQfN':function(_0x40da62,_0x5111ad,_0x1ee598,_0x2a48af){return _0x40da62(_0x5111ad,_0x1ee598,_0x2a48af);},'Cbmwg':'DELETE','iQBDN':'ClusterName','aZodW':_0xfb23da(0x1f5),'YuWtJ':_0xfb23da(0x1ed)},_0x2b6b32=COMMON_HST_TAGS,_0x21456f={};_0x21456f['Key']=_0x2da4bd[_0xfb23da(0x219)],_0x21456f['Value']=_0x31cc39,_0x2b6b32[_0xfb23da(0x214)](_0x21456f),_0x2b6b32['push']({'Key':_0x2da4bd[_0xfb23da(0x212)],'Value':new Date()[_0xfb23da(0x1ff)]()[_0xfb23da(0x1f6)]()});const _0x41a16d={};_0x41a16d[_0xfb23da(0x1fc)]=_0x2da4bd[_0xfb23da(0x1fa)];const _0x1d20e7=new AWS[(_0xfb23da(0x213))](_0x41a16d),_0x20299e=await fs[_0xfb23da(0x20f)](path[_0xfb23da(0x205)](__dirname,'..',_0x2da4bd[_0xfb23da(0x204)],_0x2da4bd[_0xfb23da(0x1f9)]),_0x2da4bd[_0xfb23da(0x1ee)]),_0x422684={};_0x422684[_0xfb23da(0x216)]=CLOUDFORMATION_SCHEMA;const _0x476f35=yaml[_0xfb23da(0x1ef)](_0x20299e,_0x422684);_0x2da4bd[_0xfb23da(0x223)](addAutoscalerTags,_0x476f35,_0x31cc39,_0x2b6b32);const _0x1083d2=JSON[_0xfb23da(0x21f)](_0x476f35),_0x3c0339={};_0x3c0339['StackName']=CLUSTER_AUTOSCALER_STACK_NAME,_0x3c0339['OnFailure']=_0x2da4bd[_0xfb23da(0x20d)],_0x3c0339[_0xfb23da(0x210)]=_0x1083d2,_0x3c0339[_0xfb23da(0x1fe)]=[{'ParameterKey':_0x2da4bd[_0xfb23da(0x206)],'ParameterValue':_0x31cc39}],_0x3c0339[_0xfb23da(0x203)]=[_0x2da4bd['aZodW']],_0x3c0339[_0xfb23da(0x211)]=_0x2b6b32;const _0x25ae08=_0x3c0339,_0x3c225d=await _0x1d20e7[_0xfb23da(0x1f7)](_0x25ae08)['promise']();logger[_0xfb23da(0x1f1)](_0xfb23da(0x21d));const _0x3a0c41={};return _0x3a0c41[_0xfb23da(0x21a)]=_0x3c225d[_0xfb23da(0x207)],_0x1d20e7['waitFor'](_0x2da4bd[_0xfb23da(0x209)],_0x3a0c41)[_0xfb23da(0x1f3)]();};
|