@axway/axway-central-cli 4.13.0-rc.0 → 4.13.0-rc.2
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/dist/commands/install/agents.js +2 -0
- package/dist/commands/install/akamaiAgents.js +6 -3
- package/dist/commands/install/apigeexAgents.js +3 -2
- package/dist/commands/install/awsAgents.js +19 -330
- package/dist/commands/install/azureAgents.js +3 -2
- package/dist/commands/install/backstageAgents.js +2 -1
- package/dist/commands/install/edgeAgents.js +3 -2
- package/dist/commands/install/gitLabAgents.js +2 -1
- package/dist/commands/install/helpers/templates/awsTemplates.js +3 -15
- package/dist/commands/install/helpers/util.js +13 -1
- package/dist/commands/install/ibmAPIConnectAgents.js +3 -2
- package/dist/commands/install/kafkaAgents.js +3 -2
- package/dist/commands/install/platform.js +1 -2
- package/dist/commands/install/sapApiPortalAgents.js +3 -2
- package/dist/commands/install/sensediaAgents.js +3 -2
- package/dist/commands/install/softwareAGWebMethodsAgents.js +3 -2
- package/dist/commands/install/traceableAgents.js +5 -2
- package/dist/commands/install/wso2Agents.js +3 -2
- package/dist/common/types.js +7 -5
- package/package.json +1 -1
|
@@ -254,9 +254,11 @@ const agents = exports.agents = {
|
|
|
254
254
|
async function getAgentVersions(agentInstallFlow, installConfig, apiServerClient) {
|
|
255
255
|
if (agentInstallFlow.AgentNameMap && !installConfig.switches.isHostedInstall && installConfig.switches.isDaEnabled) {
|
|
256
256
|
installConfig.daVersion = await helpers.getLatestAgentVersion(apiServerClient, agentInstallFlow.AgentNameMap[_types.AgentTypes.da]);
|
|
257
|
+
installConfig.dockerRepoVersion = installConfig.daVersion.split('.').slice(0, 2).join('.');
|
|
257
258
|
}
|
|
258
259
|
if (agentInstallFlow.AgentNameMap && !installConfig.switches.isHostedInstall && installConfig.switches.isTaEnabled) {
|
|
259
260
|
installConfig.taVersion = await helpers.getLatestAgentVersion(apiServerClient, agentInstallFlow.AgentNameMap[_types.AgentTypes.ta]);
|
|
261
|
+
installConfig.dockerRepoVersion = installConfig.taVersion.split('.').slice(0, 2).join('.');
|
|
260
262
|
}
|
|
261
263
|
}
|
|
262
264
|
async function finishInstall(agentInstallFlow, installConfig, apiServerClient, platformClient, defsManager) {
|
|
@@ -20,7 +20,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
20
20
|
const {
|
|
21
21
|
log
|
|
22
22
|
} = (0, _snooplogg.default)('central: install: agents: Akamai');
|
|
23
|
-
const caImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.AKAMAI_CA}`;
|
|
24
23
|
const amplifyAgentsNs = exports.amplifyAgentsNs = 'amplify-agents';
|
|
25
24
|
|
|
26
25
|
// ConfigFiles - all the config file that are used in the setup
|
|
@@ -154,15 +153,19 @@ const gatewayConnectivity = async installConfig => {
|
|
|
154
153
|
return akamaiAgentValues;
|
|
155
154
|
};
|
|
156
155
|
exports.gatewayConnectivity = gatewayConnectivity;
|
|
157
|
-
const dockerSuccessMsg = installConfig => {
|
|
156
|
+
const dockerSuccessMsg = async installConfig => {
|
|
158
157
|
let dockerInfo;
|
|
159
158
|
const runAgentLinuxMsg = `docker run -it --env-file ${helpers.pwd}/${helpers.configFiles.AGENT_ENV_VARS} -v ${helpers.pwd}:/keys ${helpers.eolChar}`;
|
|
160
159
|
const runAgentWinMsg = `docker run -it --env-file ${helpers.pwdWin}/${helpers.configFiles.AGENT_ENV_VARS} -v ${helpers.pwdWin}:/keys ${helpers.eolCharWin}`;
|
|
161
160
|
const startAgentLinuxMsg = `\nStart the Akamai Agent on a Linux based machine`;
|
|
162
161
|
const startAgentWinMsg = `\nStart the Akamai Agent on a Windows machine`;
|
|
162
|
+
const caVersion = await helpers.getLatestAgentVersion(installConfig.centralConfig.apiServerClient, _types.AgentNames.AKAMAI_CA);
|
|
163
|
+
const dockerRepoVersion = caVersion.split('.').slice(0, 2).join('.');
|
|
164
|
+
const caImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${dockerRepoVersion}/${_types.AgentNames.AKAMAI_CA}`;
|
|
163
165
|
dockerInfo = `To utilize the agent, pull the latest Docker image and run it using the appropriate supplied environment file, (${helpers.configFiles.AGENT_ENV_VARS}):`;
|
|
164
166
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
165
|
-
const caImageVersion = `${caImage}:${
|
|
167
|
+
const caImageVersion = `${caImage}:${caVersion}`;
|
|
168
|
+
helpers.dockerLoginInfo();
|
|
166
169
|
console.log(_chalk.default.white('Pull the latest image of the Agent:'));
|
|
167
170
|
console.log(_chalk.default.cyan(`docker pull ${caImageVersion}`));
|
|
168
171
|
console.log(_chalk.default.white(_utils.isWindows ? startAgentWinMsg : startAgentLinuxMsg));
|
|
@@ -18,8 +18,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
18
18
|
const {
|
|
19
19
|
log
|
|
20
20
|
} = (0, _snooplogg.default)('engage: install: agents: apigeeX');
|
|
21
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.APIGEEX_DA}`;
|
|
22
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.APIGEEX_TA}`;
|
|
23
21
|
const defaultLogFiles = exports.defaultLogFiles = '/group-*_instance-*.log';
|
|
24
22
|
|
|
25
23
|
// ConfigFiles - all the config file that are used in the setup
|
|
@@ -144,6 +142,8 @@ const dockerSuccessMsg = installConfig => {
|
|
|
144
142
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
145
143
|
const startTaLinuxMsg = `\nStart the Traceability Agent on a Linux based machine`;
|
|
146
144
|
const startTaWinMsg = `\nStart the Traceability Agent on a Windows machine`;
|
|
145
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.APIGEEX_DA}`;
|
|
146
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.APIGEEX_TA}`;
|
|
147
147
|
if (installConfig.switches.isDaEnabled && installConfig.switches.isTaEnabled) {
|
|
148
148
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
149
149
|
} else if (installConfig.switches.isDaEnabled) {
|
|
@@ -152,6 +152,7 @@ const dockerSuccessMsg = installConfig => {
|
|
|
152
152
|
dockerInfo = `To utilize the traceability agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.TA_ENV_VARS}):`;
|
|
153
153
|
}
|
|
154
154
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
155
|
+
helpers.dockerLoginInfo();
|
|
155
156
|
if (installConfig.switches.isDaEnabled) {
|
|
156
157
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
157
158
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.testables = exports.gatewayConnectivity = exports.completeInstall = exports.askConfigType = exports.askBundleType = exports.
|
|
6
|
+
exports.testables = exports.gatewayConnectivity = exports.completeInstall = exports.askConfigType = exports.askBundleType = exports.ConfigFiles = exports.AWSPrompts = exports.AWSInstallMethods = void 0;
|
|
7
7
|
var _chalk = _interopRequireDefault(require("chalk"));
|
|
8
8
|
var _snooplogg = _interopRequireDefault(require("snooplogg"));
|
|
9
9
|
var _basicPrompts = require("../../common/basicPrompts");
|
|
@@ -15,27 +15,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
15
15
|
const {
|
|
16
16
|
log
|
|
17
17
|
} = (0, _snooplogg.default)('engage: install: agents: aws');
|
|
18
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.AWS_DA}`;
|
|
19
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.AWS_TA}`;
|
|
20
18
|
const STAGE_TAG_NAME_LENGTH = 127;
|
|
21
|
-
|
|
22
|
-
// DeploymentTypes - ways the agents may be deployed with an AWS APIGW setup
|
|
23
|
-
let DeploymentTypes = exports.DeploymentTypes = /*#__PURE__*/function (DeploymentTypes) {
|
|
24
|
-
DeploymentTypes["EC2"] = "EC2";
|
|
25
|
-
DeploymentTypes["ECS_FARGATE"] = "ECS Fargate";
|
|
26
|
-
DeploymentTypes["OTHER"] = "Other"; //Docker Container Only
|
|
27
|
-
return DeploymentTypes;
|
|
28
|
-
}({}); // EC2InstanceTypes - instance types allowed in cloud formation document
|
|
29
|
-
var EC2InstanceTypes = /*#__PURE__*/function (EC2InstanceTypes) {
|
|
30
|
-
EC2InstanceTypes["T3_MICRO"] = "t3.micro";
|
|
31
|
-
EC2InstanceTypes["T3_NAN0"] = "t3.nano";
|
|
32
|
-
EC2InstanceTypes["T3_SMALL"] = "t3.small";
|
|
33
|
-
EC2InstanceTypes["T3_MEDIUM"] = "t3.medium";
|
|
34
|
-
EC2InstanceTypes["T3_LARGE"] = "t3.large";
|
|
35
|
-
EC2InstanceTypes["T3_XLARGE"] = "t3.xlarge";
|
|
36
|
-
EC2InstanceTypes["T3_2XLARGE"] = "t3.2xlarge";
|
|
37
|
-
return EC2InstanceTypes;
|
|
38
|
-
}(EC2InstanceTypes || {});
|
|
39
19
|
const InvalidMsg = {
|
|
40
20
|
S3_BUCKET: `S3 Bucket Name can contain digits '0-9', lower case letters 'a-z', hyphens '-', and periods '.' with 3-63 characters. Must begin and end with number or letter`,
|
|
41
21
|
LOG_GROUP: `Log Group Name can contain digits '0-9', letters 'a-z' and 'A-Z', underscores '_', hyphens '-', forward slash '/', and periods '.' with a maximum length of 512 characters`,
|
|
@@ -45,41 +25,15 @@ const InvalidMsg = {
|
|
|
45
25
|
|
|
46
26
|
// ConfigFiles - all the config file that are used in the setup
|
|
47
27
|
const ConfigFiles = exports.ConfigFiles = {
|
|
48
|
-
DeployAllYAML: 'amplify-agents-deploy-all.yaml',
|
|
49
|
-
ResourcesYAML: 'amplify-agents-setup.yaml',
|
|
50
|
-
EC2DeployYAML: 'amplify-agents-ec2.yaml',
|
|
51
|
-
FargateDeployYAML: 'amplify-agents-ecs-fargate.yaml',
|
|
52
|
-
AgentConfigZip: 'aws_apigw_agent_config-latest.zip',
|
|
53
28
|
DAEnvVars: `${helpers.configFiles.DA_ENV_VARS}`,
|
|
54
|
-
TAEnvVars: `${helpers.configFiles.TA_ENV_VARS}
|
|
55
|
-
CFProperties: 'cloudformation_properties.json'
|
|
29
|
+
TAEnvVars: `${helpers.configFiles.TA_ENV_VARS}`
|
|
56
30
|
};
|
|
57
31
|
|
|
58
32
|
// AWSPrompts - all prompts to the user for input
|
|
59
33
|
const AWSPrompts = exports.AWSPrompts = {
|
|
60
34
|
APIGW_LOG_GROUP: 'Enter the Log Group name to track API Gateway traffic events',
|
|
61
|
-
CLUSTER_NAME: 'Enter the ECS fargate cluster name to deploy the ECS task for the agents',
|
|
62
|
-
CONFIG_BUCKET: 'Enter the S3 bucket the config service will use to track config changes',
|
|
63
|
-
CONFIG_BUCKET_EXISTS: 'Does this bucket already exist on AWS, or will you create beforehand?',
|
|
64
|
-
CONFIG_SERVICE: 'Do you want to setup config service?',
|
|
65
|
-
DA_LOG_GROUP: 'Enter the log group name the discovery agent will log to',
|
|
66
35
|
STAGE_TAG_NAME: 'Enter the name of the tag on AWS API Gateway Stage that holds mapped stage on Amplify Engage',
|
|
67
|
-
|
|
68
|
-
DEPLOYMENT: 'Select the type of deployment you wish to configure',
|
|
69
|
-
EC2_TYPE: 'Select the EC2 instance type',
|
|
70
|
-
KEY_PAIR: 'Enter the EC2 KeyPair name that will be used to connect via SSH to the EC2 instance',
|
|
71
|
-
PUBLIC_IP: 'Assign a Public IP Address to this, only change if your VPC has a NAT Gateway',
|
|
72
|
-
SECURITY_GROUP: 'Enter the Security Group for the EC2 Instance of ECS Container',
|
|
73
|
-
SETUP_APIGW_CW: 'The Amazon API Gateway service requires a role to write usage logs to Cloud Watch. Do you want to configure that?',
|
|
74
|
-
SSH_LOCATION: 'Enter the IP address range that can be used to SSH to the EC2 instances',
|
|
75
|
-
SSM_PRIVATE: 'Enter the name of the SSM Parameter holding the Private Key',
|
|
76
|
-
SSM_PUBLIC: 'Enter the name of the SSM Parameter holding the Public Key',
|
|
77
|
-
SUBNET: 'Enter the Subnet for the EC2 Instance of ECS Container',
|
|
78
|
-
S3_BUCKET: 'Enter the existing S3 bucket, within your region, where the agent resources will be uploaded',
|
|
79
|
-
TA_LOG_GROUP: 'Enter the log group name the traceability agent will log to',
|
|
80
|
-
FULL_TRANSACTION_LOGGING: 'Do you want to enable Full Transaction Logging? Please note that CloudWatch costs would increase when Full Transaction Logging is enabled',
|
|
81
|
-
TA_QUEUE: 'Enter the traceability queue name',
|
|
82
|
-
VPC_ID: 'Enter the VPC ID to deploy the EC2 instance to. Leave blank to create entire infrastructure'
|
|
36
|
+
FULL_TRANSACTION_LOGGING: 'Do you want to enable Full Transaction Logging? Please note that CloudWatch costs would increase when Full Transaction Logging is enabled'
|
|
83
37
|
};
|
|
84
38
|
const askBundleType = async () => {
|
|
85
39
|
return _types.BundleType.ALL_AGENTS;
|
|
@@ -89,190 +43,24 @@ const askConfigType = async () => {
|
|
|
89
43
|
return _types.AgentConfigTypes.DOCKERIZED;
|
|
90
44
|
};
|
|
91
45
|
|
|
92
|
-
//
|
|
93
|
-
// Complex prompts
|
|
94
|
-
//
|
|
95
|
-
exports.askConfigType = askConfigType;
|
|
96
|
-
const askDeployment = async () => {
|
|
97
|
-
return (0, _basicPrompts.askList)({
|
|
98
|
-
msg: AWSPrompts.DEPLOYMENT,
|
|
99
|
-
choices: [{
|
|
100
|
-
name: DeploymentTypes.EC2,
|
|
101
|
-
value: DeploymentTypes.EC2
|
|
102
|
-
}, {
|
|
103
|
-
name: DeploymentTypes.ECS_FARGATE,
|
|
104
|
-
value: DeploymentTypes.ECS_FARGATE
|
|
105
|
-
}, {
|
|
106
|
-
name: 'Docker Container Only',
|
|
107
|
-
value: DeploymentTypes.OTHER
|
|
108
|
-
}],
|
|
109
|
-
default: DeploymentTypes.EC2
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
// askToCreateRoleSetup - asks a Yes/No question for creating the APIGW IAM role, returns a True/False string for CloudFormation parameters
|
|
114
|
-
const askToCreateRoleSetup = async () => {
|
|
115
|
-
return (await (0, _basicPrompts.askList)({
|
|
116
|
-
msg: AWSPrompts.SETUP_APIGW_CW,
|
|
117
|
-
choices: _types.YesNoChoices,
|
|
118
|
-
default: _types.YesNo.Yes
|
|
119
|
-
})) === _types.YesNo.Yes ? _types.TrueFalse.True.toLowerCase() : _types.TrueFalse.False.toLowerCase();
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
// askToUsePublicIpAddress - asks a Yes/No question for setting a public IP address, returns a True/False string for CloudFormation parameters
|
|
123
|
-
const askToUsePublicIpAddress = async () => {
|
|
124
|
-
return (await (0, _basicPrompts.askList)({
|
|
125
|
-
msg: AWSPrompts.PUBLIC_IP,
|
|
126
|
-
choices: _types.YesNoChoices,
|
|
127
|
-
default: _types.YesNo.Yes
|
|
128
|
-
})) === _types.YesNo.Yes ? _types.TrueFalse.True.toLowerCase() : _types.TrueFalse.False.toLowerCase();
|
|
129
|
-
};
|
|
130
|
-
const askEC2InstanceType = async () => {
|
|
131
|
-
return await (0, _basicPrompts.askList)({
|
|
132
|
-
msg: AWSPrompts.EC2_TYPE,
|
|
133
|
-
choices: [{
|
|
134
|
-
name: EC2InstanceTypes.T3_MICRO,
|
|
135
|
-
value: EC2InstanceTypes.T3_MICRO
|
|
136
|
-
}, {
|
|
137
|
-
name: EC2InstanceTypes.T3_NAN0,
|
|
138
|
-
value: EC2InstanceTypes.T3_NAN0
|
|
139
|
-
}, {
|
|
140
|
-
name: EC2InstanceTypes.T3_SMALL,
|
|
141
|
-
value: EC2InstanceTypes.T3_SMALL
|
|
142
|
-
}, {
|
|
143
|
-
name: EC2InstanceTypes.T3_MEDIUM,
|
|
144
|
-
value: EC2InstanceTypes.T3_MEDIUM
|
|
145
|
-
}, {
|
|
146
|
-
name: EC2InstanceTypes.T3_LARGE,
|
|
147
|
-
value: EC2InstanceTypes.T3_LARGE
|
|
148
|
-
}, {
|
|
149
|
-
name: EC2InstanceTypes.T3_XLARGE,
|
|
150
|
-
value: EC2InstanceTypes.T3_XLARGE
|
|
151
|
-
}, {
|
|
152
|
-
name: EC2InstanceTypes.T3_2XLARGE,
|
|
153
|
-
value: EC2InstanceTypes.T3_2XLARGE
|
|
154
|
-
}],
|
|
155
|
-
default: EC2InstanceTypes.T3_MICRO
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
const askEC2VPCConfig = async awsAgentValues => {
|
|
159
|
-
awsAgentValues.cloudFormationConfig.EC2VPCID = await (0, _basicPrompts.askInput)({
|
|
160
|
-
msg: AWSPrompts.VPC_ID,
|
|
161
|
-
allowEmptyInput: true,
|
|
162
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_REGEXP_VPC_ID, helpers.invalidValueExampleErrMsg('VPC ID', 'vpc-xxxxxxxxxx'))
|
|
163
|
-
});
|
|
164
|
-
if (awsAgentValues.cloudFormationConfig.EC2VPCID !== '') {
|
|
165
|
-
// EC2 Public IP Address
|
|
166
|
-
awsAgentValues.cloudFormationConfig.EC2PublicIPAddress = await askToUsePublicIpAddress();
|
|
167
|
-
await askSecurityGroupAndSubnet(awsAgentValues);
|
|
168
|
-
}
|
|
169
|
-
return awsAgentValues;
|
|
170
|
-
};
|
|
171
|
-
const askSecurityGroupAndSubnet = async awsAgentValues => {
|
|
172
|
-
awsAgentValues.cloudFormationConfig.SecurityGroup = await (0, _basicPrompts.askInput)({
|
|
173
|
-
msg: AWSPrompts.SECURITY_GROUP,
|
|
174
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_REGEXP_SECURITY_GROUP, helpers.invalidValueExampleErrMsg('security group', 'sg-xxxxxxxxxx'))
|
|
175
|
-
});
|
|
176
|
-
awsAgentValues.cloudFormationConfig.Subnet = await (0, _basicPrompts.askInput)({
|
|
177
|
-
msg: AWSPrompts.SUBNET,
|
|
178
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_REGEXP_SUBNET, helpers.invalidValueExampleErrMsg('subnet ID', 'subnet-xxxxxxxxxx'))
|
|
179
|
-
});
|
|
180
|
-
return awsAgentValues;
|
|
181
|
-
};
|
|
182
|
-
async function configureEC2Deployment(awsAgentValues) {
|
|
183
|
-
// EC2 Instance type
|
|
184
|
-
awsAgentValues.cloudFormationConfig.EC2InstanceType = await askEC2InstanceType();
|
|
185
|
-
|
|
186
|
-
// EC2 Key Name
|
|
187
|
-
console.log(_chalk.default.gray(`A SSH key pair is required to access the EC2 instance. An example CLI command will be given at the end, if needed`));
|
|
188
|
-
awsAgentValues.cloudFormationConfig.EC2KeyName = await (0, _basicPrompts.askInput)({
|
|
189
|
-
msg: AWSPrompts.KEY_PAIR
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
// EC2 VPC Config
|
|
193
|
-
awsAgentValues = await askEC2VPCConfig(awsAgentValues);
|
|
194
|
-
awsAgentValues.cloudFormationConfig.EC2SSHLocation = await (0, _basicPrompts.askInput)({
|
|
195
|
-
msg: AWSPrompts.SSH_LOCATION,
|
|
196
|
-
defaultValue: awsAgentValues.cloudFormationConfig.EC2SSHLocation,
|
|
197
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_REGEXP_SSH_LOCATION, helpers.invalidValueExampleErrMsg('IP Range/Mask', '1.2.3.4/0'))
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
// SSMPrivateKeyParameter
|
|
201
|
-
awsAgentValues.cloudFormationConfig.SSMPrivateKeyParameter = await (0, _basicPrompts.askInput)({
|
|
202
|
-
msg: AWSPrompts.SSM_PRIVATE,
|
|
203
|
-
defaultValue: awsAgentValues.cloudFormationConfig.SSMPrivateKeyParameter
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
// SSMPublicKeyParameter
|
|
207
|
-
awsAgentValues.cloudFormationConfig.SSMPublicKeyParameter = await (0, _basicPrompts.askInput)({
|
|
208
|
-
msg: AWSPrompts.SSM_PUBLIC,
|
|
209
|
-
defaultValue: awsAgentValues.cloudFormationConfig.SSMPublicKeyParameter
|
|
210
|
-
});
|
|
211
|
-
return awsAgentValues;
|
|
212
|
-
}
|
|
213
|
-
async function configureECSDeployment(awsAgentValues) {
|
|
214
|
-
// ECS Cluster name
|
|
215
|
-
awsAgentValues.cloudFormationConfig.ECSClusterName = await (0, _basicPrompts.askInput)({
|
|
216
|
-
msg: AWSPrompts.CLUSTER_NAME,
|
|
217
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_REGEXP, InvalidMsg.CLUSTER_NAME)
|
|
218
|
-
});
|
|
219
|
-
awsAgentValues = await askSecurityGroupAndSubnet(awsAgentValues);
|
|
220
|
-
// SSMPrivateKeyParameter
|
|
221
|
-
awsAgentValues.cloudFormationConfig.SSMPrivateKeyParameter = await (0, _basicPrompts.askInput)({
|
|
222
|
-
msg: AWSPrompts.SSM_PRIVATE,
|
|
223
|
-
defaultValue: awsAgentValues.cloudFormationConfig.SSMPrivateKeyParameter
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
// SSMPublicKeyParameter
|
|
227
|
-
awsAgentValues.cloudFormationConfig.SSMPublicKeyParameter = await (0, _basicPrompts.askInput)({
|
|
228
|
-
msg: AWSPrompts.SSM_PUBLIC,
|
|
229
|
-
defaultValue: awsAgentValues.cloudFormationConfig.SSMPublicKeyParameter
|
|
230
|
-
});
|
|
231
|
-
return awsAgentValues;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
46
|
// @ts-ignore
|
|
47
|
+
exports.askConfigType = askConfigType;
|
|
235
48
|
const gatewayConnectivity = async installConfig => {
|
|
236
49
|
console.log('\nCONNECTION TO AMAZON API GATEWAY:');
|
|
237
50
|
console.log(_chalk.default.gray(`You need credentials for executing the AWS CLI commands.\n` + `The Discovery Agent needs to connect to the Amazon (AWS) API Gateway to discover API's for publishing to Amplify.\n` + `The Traceability Agent needs to connect to the AWS API Gateway for the collection of transaction headers.\n` + `These headers will be formatted and forwarded to the Business Insights.\n` + `We recommend to use two different set of credentials: one for AWS CLI and one for the agents`));
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
const deploymentType = await askDeployment();
|
|
241
|
-
let awsAgentValues = new helpers.AWSAgentValues(deploymentType);
|
|
242
|
-
awsAgentValues.cloudFormationConfig.DeploymentType = deploymentType;
|
|
243
|
-
switch (awsAgentValues.cloudFormationConfig.DeploymentType) {
|
|
244
|
-
case DeploymentTypes.ECS_FARGATE:
|
|
245
|
-
{
|
|
246
|
-
console.log(_chalk.default.gray(`To deploy the Agents to ECS Fargate you will need an ECS Cluster Name, Security Group, and Subnet. The coming questions will ask those values.\n`));
|
|
247
|
-
break;
|
|
248
|
-
}
|
|
249
|
-
case DeploymentTypes.OTHER:
|
|
250
|
-
{
|
|
251
|
-
console.log(_chalk.default.gray(`To access the AWS CLI, the AWS Access Key and AWS Secret Key credentials are required.\n`));
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
51
|
+
let awsAgentValues = new helpers.AWSAgentValues();
|
|
52
|
+
console.log(_chalk.default.gray(`To access the AWS CLI, the AWS Access Key and AWS Secret Key credentials are required.\n`));
|
|
255
53
|
|
|
256
54
|
// AWS Region
|
|
257
55
|
awsAgentValues.region = await helpers.askAWSRegion();
|
|
258
56
|
|
|
259
|
-
//
|
|
260
|
-
|
|
261
|
-
msg: AWSPrompts.S3_BUCKET,
|
|
262
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_REGEXP, InvalidMsg.S3_BUCKET)
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
// APIGWCWRoleSetup
|
|
266
|
-
awsAgentValues.cloudFormationConfig.APIGWCWRoleSetup = await askToCreateRoleSetup();
|
|
267
|
-
|
|
268
|
-
// APIGWTrafficLogGroupName
|
|
269
|
-
const apiGWTrafficLogGroupName = await (0, _basicPrompts.askInput)({
|
|
57
|
+
// LogGroupName
|
|
58
|
+
const logGroupName = await (0, _basicPrompts.askInput)({
|
|
270
59
|
msg: AWSPrompts.APIGW_LOG_GROUP,
|
|
271
|
-
defaultValue: awsAgentValues.
|
|
60
|
+
defaultValue: awsAgentValues.logGroup,
|
|
272
61
|
validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_REGEXP_LOG_GROUP_NAME, InvalidMsg.LOG_GROUP)
|
|
273
62
|
});
|
|
274
|
-
awsAgentValues.logGroup =
|
|
275
|
-
awsAgentValues.cloudFormationConfig.APIGWTrafficLogGroupName = apiGWTrafficLogGroupName;
|
|
63
|
+
awsAgentValues.logGroup = logGroupName;
|
|
276
64
|
|
|
277
65
|
// StageTagName
|
|
278
66
|
const stageTagName = await (0, _basicPrompts.askInput)({
|
|
@@ -288,74 +76,26 @@ const gatewayConnectivity = async installConfig => {
|
|
|
288
76
|
default: _types.YesNo.No
|
|
289
77
|
})) === _types.YesNo.Yes;
|
|
290
78
|
awsAgentValues.fullTransactionLogging = fullTransactionLogging;
|
|
291
|
-
|
|
292
|
-
// set agent versions
|
|
293
|
-
awsAgentValues.cloudFormationConfig.DiscoveryAgentVersion = installConfig.daVersion;
|
|
294
|
-
awsAgentValues.cloudFormationConfig.TraceabilityAgentVersion = installConfig.taVersion;
|
|
295
|
-
|
|
296
|
-
// Configure appropriate Gateway type
|
|
297
|
-
switch (awsAgentValues.cloudFormationConfig.DeploymentType) {
|
|
298
|
-
case DeploymentTypes.ECS_FARGATE:
|
|
299
|
-
{
|
|
300
|
-
awsAgentValues = await configureECSDeployment(awsAgentValues);
|
|
301
|
-
break;
|
|
302
|
-
}
|
|
303
|
-
case DeploymentTypes.EC2:
|
|
304
|
-
{
|
|
305
|
-
awsAgentValues = await configureEC2Deployment(awsAgentValues);
|
|
306
|
-
break;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// DiscoveryAgentLogGroupName
|
|
311
|
-
awsAgentValues.cloudFormationConfig.DiscoveryAgentLogGroupName = await (0, _basicPrompts.askInput)({
|
|
312
|
-
msg: AWSPrompts.DA_LOG_GROUP,
|
|
313
|
-
defaultValue: awsAgentValues.cloudFormationConfig.DiscoveryAgentLogGroupName,
|
|
314
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_REGEXP_LOG_GROUP_NAME, InvalidMsg.LOG_GROUP)
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
// TraceabilityAgentLogGroupName
|
|
318
|
-
awsAgentValues.cloudFormationConfig.TraceabilityAgentLogGroupName = await (0, _basicPrompts.askInput)({
|
|
319
|
-
msg: AWSPrompts.TA_LOG_GROUP,
|
|
320
|
-
defaultValue: awsAgentValues.cloudFormationConfig.TraceabilityAgentLogGroupName,
|
|
321
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.AWSRegexPatterns.AWS_REGEXP_LOG_GROUP_NAME, InvalidMsg.LOG_GROUP)
|
|
322
|
-
});
|
|
323
79
|
return awsAgentValues;
|
|
324
80
|
};
|
|
325
81
|
exports.gatewayConnectivity = gatewayConnectivity;
|
|
326
82
|
const generateOutput = async installConfig => {
|
|
327
83
|
const awsAgentValues = installConfig.gatewayConfig;
|
|
328
|
-
|
|
329
|
-
|
|
84
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.AWS_DA}`;
|
|
85
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.AWS_TA}`;
|
|
330
86
|
let dockerEnvConfig = '';
|
|
331
87
|
let runCommands = '';
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
case DeploymentTypes.ECS_FARGATE:
|
|
335
|
-
{
|
|
336
|
-
// DeploymentTypes.ECS_FARGATE
|
|
337
|
-
s3BaseFiles.push(ConfigFiles.FargateDeployYAML);
|
|
338
|
-
additionalSteps = ` - Create the SSM parameter:
|
|
339
|
-
${_chalk.default.cyan(` aws ssm put-parameter --type SecureString --name ${awsAgentValues.cloudFormationConfig.SSMPrivateKeyParameter} --value "file:\/\/private_key.pem"`)}
|
|
340
|
-
${_chalk.default.cyan(` aws ssm put-parameter --type SecureString --name ${awsAgentValues.cloudFormationConfig.SSMPublicKeyParameter} --value "file:\/\/public_key.pem"`)}`;
|
|
341
|
-
break;
|
|
342
|
-
}
|
|
343
|
-
case DeploymentTypes.OTHER:
|
|
344
|
-
{
|
|
345
|
-
// DeploymentTypes.OTHER for Docker Container Only
|
|
346
|
-
// These files need to be put in a resources dir on S3
|
|
347
|
-
let s3ResourcesIncludes = '';
|
|
348
|
-
[ConfigFiles.DAEnvVars, ConfigFiles.TAEnvVars].forEach(value => s3ResourcesIncludes += `--include "${value}" `);
|
|
349
|
-
const info = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
350
|
-
dockerEnvConfig = `Wait for the CloudFormation Stack to complete.
|
|
88
|
+
const info = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
89
|
+
dockerEnvConfig = `
|
|
351
90
|
- Create AWS Access and Secret Keys and copy resulting ${_chalk.default.yellow(`"AccessKeyId"`)} & ${_chalk.default.yellow(`"SecretAccessKey"`)}:
|
|
352
91
|
${_chalk.default.cyan(` aws iam create-access-key --user-name AxwayAmplifyAgentsUser-${awsAgentValues.region} ${helpers.eolChar}
|
|
353
92
|
--query "AccessKey.{"AccessKeyId":AccessKeyId,"SecretAccessKey":SecretAccessKey}"`)}
|
|
354
93
|
- Add "AccessKeyId" & "SecretAccessKey" variables to both agent .env files, ${ConfigFiles.DAEnvVars} & ${ConfigFiles.TAEnvVars}:
|
|
355
94
|
AWS_AUTH_ACCESSKEY=${_chalk.default.yellow(`Your_AccessKeyId`)}
|
|
356
95
|
AWS_AUTH_SECRETKEY=${_chalk.default.yellow(`Your_SecretAccessKey`)}`;
|
|
357
|
-
|
|
96
|
+
runCommands = `${_chalk.default.whiteBright(info)}
|
|
358
97
|
|
|
98
|
+
${helpers.dockerLoginMsg()}
|
|
359
99
|
Pull the latest image of the Discovery Agent:
|
|
360
100
|
${_chalk.default.cyan(`docker pull ${daImage}:${installConfig.daVersion}`)}
|
|
361
101
|
|
|
@@ -375,47 +115,7 @@ ${_chalk.default.cyan(`docker run --env-file ${helpers.pwdWin}/${ConfigFiles.TAE
|
|
|
375
115
|
Start the Traceability agent on Linux based machine:
|
|
376
116
|
${_chalk.default.cyan(`docker run --env-file ${helpers.pwd}/${ConfigFiles.TAEnvVars} -v ${helpers.pwd}:/keys ${helpers.eolChar}
|
|
377
117
|
-v /data ${taImage}:${installConfig.taVersion}`)}`}`;
|
|
378
|
-
break;
|
|
379
|
-
}
|
|
380
|
-
default:
|
|
381
|
-
{
|
|
382
|
-
// DeploymentTypes.EC2
|
|
383
|
-
s3BaseFiles.push(ConfigFiles.EC2DeployYAML);
|
|
384
|
-
// These files need to be put in a resources dir on S3
|
|
385
|
-
let s3ResourcesIncludes = '';
|
|
386
|
-
[ConfigFiles.DAEnvVars, ConfigFiles.TAEnvVars].forEach(value => s3ResourcesIncludes += `--include "${value}" `);
|
|
387
|
-
additionalSteps = `${_chalk.default.cyan(` aws s3 sync --exclude "*" ${s3ResourcesIncludes} ./ s3://${awsAgentValues.cloudFormationConfig.AgentResourcesBucket}/resources`)}
|
|
388
|
-
- If necessary, create EC2 KeyPair, for EC2 login:
|
|
389
|
-
${_chalk.default.cyan(` aws ec2 create-key-pair --key-name ${awsAgentValues.cloudFormationConfig.EC2KeyName} --query KeyMaterial --output text > MyKeyPair.pem`)}
|
|
390
|
-
- Create the SSM parameter:
|
|
391
|
-
${_chalk.default.cyan(` aws ssm put-parameter --type SecureString --name ${awsAgentValues.cloudFormationConfig.SSMPrivateKeyParameter} --value "file:\/\/private_key.pem"`)}
|
|
392
|
-
${_chalk.default.cyan(` aws ssm put-parameter --type SecureString --name ${awsAgentValues.cloudFormationConfig.SSMPublicKeyParameter} --value "file:\/\/public_key.pem"`)}`;
|
|
393
|
-
break;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
let s3BaseIncludes = '';
|
|
397
|
-
s3BaseFiles.forEach(value => s3BaseIncludes += `--include "${value}" `);
|
|
398
|
-
// if region is AWS default, 'us-east-1', region unnecessary in cloudformation template url
|
|
399
|
-
const s3Region = awsAgentValues.region === _types.AWSRegions.US_EAST_1 ? `s3` : `s3.${awsAgentValues.region}`;
|
|
400
118
|
return `
|
|
401
|
-
To complete the install, first download and extract the CloudFormation templates:
|
|
402
|
-
- Download the CloudFormation package:
|
|
403
|
-
${_chalk.default.cyan(` curl -O https://repository.axway.com/artifactory/ampc-public-generic-release/aws-agents/aws_apigw_agent_config/latest/${ConfigFiles.AgentConfigZip}`)}
|
|
404
|
-
- Extract the package:
|
|
405
|
-
${_chalk.default.cyan(` unzip ${ConfigFiles.AgentConfigZip}`)}
|
|
406
|
-
|
|
407
|
-
Then run the following AWS CLI commands:
|
|
408
|
-
- Create, if necessary, and upload all files to your S3 bucket
|
|
409
|
-
${_chalk.default.cyan(` aws s3api create-bucket --bucket ${awsAgentValues.cloudFormationConfig.AgentResourcesBucket} --create-bucket-configuration LocationConstraint=${awsAgentValues.region}`)}
|
|
410
|
-
${_chalk.default.cyan(` aws s3 sync --exclude "*" ${s3BaseIncludes} ./ s3://${awsAgentValues.cloudFormationConfig.AgentResourcesBucket}`)}
|
|
411
|
-
${additionalSteps}
|
|
412
|
-
- Deploy the CloudFormation Stack:
|
|
413
|
-
${_chalk.default.cyan(` aws cloudformation create-stack --stack-name AxwayAmplifyAgents ${helpers.eolChar}
|
|
414
|
-
--template-url https://${awsAgentValues.cloudFormationConfig.AgentResourcesBucket}.${s3Region}.amazonaws.com/${ConfigFiles.DeployAllYAML} ${helpers.eolChar}
|
|
415
|
-
--capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND CAPABILITY_NAMED_IAM --parameters "file:\/\/${ConfigFiles.CFProperties}"`)}
|
|
416
|
-
- Check the CloudFormation Stack:
|
|
417
|
-
${_chalk.default.cyan(` aws cloudformation describe-stacks --stack-name AxwayAmplifyAgents ${helpers.eolChar}
|
|
418
|
-
--query "Stacks[].{\"Name\":StackName,\"Status\":StackStatus}"`)}
|
|
419
119
|
${dockerEnvConfig}
|
|
420
120
|
|
|
421
121
|
${runCommands}
|
|
@@ -433,23 +133,14 @@ const completeInstall = async installConfig => {
|
|
|
433
133
|
awsAgentValues.centralConfig = installConfig.centralConfig;
|
|
434
134
|
awsAgentValues.traceabilityConfig = installConfig.traceabilityConfig;
|
|
435
135
|
console.log('\nCreating the agent environment files for AWS...');
|
|
436
|
-
|
|
437
|
-
console.log('Generating the cloud formation parameters file...');
|
|
438
|
-
let paramStrings = [];
|
|
439
|
-
awsAgentValues.updateCloudFormationConfig();
|
|
440
|
-
for (let [key, value] of Object.entries(awsAgentValues.cloudFormationConfig)) {
|
|
441
|
-
paramStrings.push(`{"ParameterKey": "${key}", "ParameterValue": "${value}"}`);
|
|
442
|
-
}
|
|
443
|
-
(0, _utils.writeToFile)(ConfigFiles.CFProperties, `[\n${paramStrings.join(',\n')}\n]`);
|
|
444
|
-
if (installConfig.switches.isDaEnabled && DeploymentTypes.ECS_FARGATE !== awsAgentValues.cloudFormationConfig.DeploymentType) {
|
|
136
|
+
if (installConfig.switches.isDaEnabled) {
|
|
445
137
|
log('GENERATING DA TEMPLATE');
|
|
446
138
|
(0, _utils.writeTemplates)(ConfigFiles.DAEnvVars, awsAgentValues, helpers.awsDAEnvVarTemplate);
|
|
447
139
|
}
|
|
448
|
-
if (installConfig.switches.isTaEnabled
|
|
140
|
+
if (installConfig.switches.isTaEnabled) {
|
|
449
141
|
log('GENERATING TA TEMPLATE');
|
|
450
142
|
(0, _utils.writeTemplates)(ConfigFiles.TAEnvVars, awsAgentValues, helpers.awsTAEnvVarTemplate);
|
|
451
143
|
}
|
|
452
|
-
console.log('Configuration file(s) have been successfully created.\n');
|
|
453
144
|
console.log(await generateOutput(installConfig));
|
|
454
145
|
};
|
|
455
146
|
exports.completeInstall = completeInstall;
|
|
@@ -458,7 +149,7 @@ const AWSInstallMethods = exports.AWSInstallMethods = {
|
|
|
458
149
|
GetDeploymentType: askConfigType,
|
|
459
150
|
AskGatewayQuestions: gatewayConnectivity,
|
|
460
151
|
FinalizeGatewayInstall: completeInstall,
|
|
461
|
-
ConfigFiles: [ConfigFiles.DAEnvVars, ConfigFiles.TAEnvVars
|
|
152
|
+
ConfigFiles: [ConfigFiles.DAEnvVars, ConfigFiles.TAEnvVars],
|
|
462
153
|
AgentNameMap: {
|
|
463
154
|
[_types.AgentTypes.da]: _types.AgentNames.AWS_DA,
|
|
464
155
|
[_types.AgentTypes.ta]: _types.AgentNames.AWS_TA
|
|
@@ -468,8 +159,6 @@ const AWSInstallMethods = exports.AWSInstallMethods = {
|
|
|
468
159
|
|
|
469
160
|
// These are the items that are not exported, but need to be for testing
|
|
470
161
|
const testables = exports.testables = {
|
|
471
|
-
DeploymentTypes,
|
|
472
162
|
AWSPrompts,
|
|
473
|
-
EC2InstanceTypes,
|
|
474
163
|
ConfigFiles
|
|
475
164
|
};
|
|
@@ -18,8 +18,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
18
18
|
const {
|
|
19
19
|
log
|
|
20
20
|
} = (0, _snooplogg.default)('engage: install: agents: azure');
|
|
21
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.AZURE_DA}`;
|
|
22
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.AZURE_TA}`;
|
|
23
21
|
const InvalidMessages = {
|
|
24
22
|
enterApiManagementServiceName: `The API Management Service Name can contain only letters, numbers and hyphens. The first character must be a letter and last character must be a letter or a number.`
|
|
25
23
|
};
|
|
@@ -147,6 +145,8 @@ const dockerSuccessMsg = installConfig => {
|
|
|
147
145
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
148
146
|
const startTaLinuxMsg = `\nStart the Traceability Agent on a Linux based machine`;
|
|
149
147
|
const startTaWinMsg = `\nStart the Traceability Agent on a Windows machine`;
|
|
148
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.AZURE_DA}`;
|
|
149
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.AZURE_TA}`;
|
|
150
150
|
if (installConfig.switches.isDaEnabled && installConfig.switches.isTaEnabled) {
|
|
151
151
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
152
152
|
} else if (installConfig.switches.isDaEnabled) {
|
|
@@ -155,6 +155,7 @@ const dockerSuccessMsg = installConfig => {
|
|
|
155
155
|
dockerInfo = `To utilize the traceability agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.TA_ENV_VARS}):`;
|
|
156
156
|
}
|
|
157
157
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
158
|
+
helpers.dockerLoginInfo();
|
|
158
159
|
if (installConfig.switches.isDaEnabled) {
|
|
159
160
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
160
161
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
|
@@ -18,7 +18,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
18
18
|
const {
|
|
19
19
|
log
|
|
20
20
|
} = (0, _snooplogg.default)('engage: install: agents: backstage');
|
|
21
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.BACKSTAGE_DA}`;
|
|
22
21
|
const defaultLogFiles = exports.defaultLogFiles = '/group-*_instance-*.log';
|
|
23
22
|
|
|
24
23
|
// ConfigFiles - all the config file that are used in the setup
|
|
@@ -104,8 +103,10 @@ const dockerSuccessMsg = installConfig => {
|
|
|
104
103
|
const runDaWinMsg = `docker run -it --env-file ${helpers.pwdWin}/${helpers.configFiles.DA_ENV_VARS} -v ${helpers.pwdWin}:/keys ${helpers.eolCharWin}`;
|
|
105
104
|
const startDaLinuxMsg = `\nStart the Discovery Agent on a Linux based machine`;
|
|
106
105
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
106
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.BACKSTAGE_DA}`;
|
|
107
107
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS}:`;
|
|
108
108
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
109
|
+
helpers.dockerLoginInfo();
|
|
109
110
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
110
111
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
|
111
112
|
console.log(_chalk.default.cyan(`docker pull ${daImageVersion}`));
|
|
@@ -25,8 +25,6 @@ const dockerPublicKey = exports.dockerPublicKey = '/keys/public_key.pem';
|
|
|
25
25
|
const {
|
|
26
26
|
log
|
|
27
27
|
} = (0, _snooplogg.default)('engage: install: agents: edge');
|
|
28
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.EDGE_DA}`;
|
|
29
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.EDGE_TA}`;
|
|
30
28
|
|
|
31
29
|
// ConfigFiles - all the config file that are used in the setup
|
|
32
30
|
const ConfigFiles = exports.ConfigFiles = {
|
|
@@ -263,6 +261,8 @@ const dockerSuccessMsg = (installConfig, eventLogPath) => {
|
|
|
263
261
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
264
262
|
const startTaLinuxMsg = `\nStart the Traceability Agent on a Linux based machine`;
|
|
265
263
|
const startTaWinMsg = `\nStart the Traceability Agent on a Windows machine`;
|
|
264
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.EDGE_DA}`;
|
|
265
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.EDGE_TA}`;
|
|
266
266
|
if (installConfig.switches.isDaEnabled && installConfig.switches.isTaEnabled) {
|
|
267
267
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
268
268
|
} else if (installConfig.switches.isDaEnabled) {
|
|
@@ -271,6 +271,7 @@ const dockerSuccessMsg = (installConfig, eventLogPath) => {
|
|
|
271
271
|
dockerInfo = `To utilize the traceability agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.TA_ENV_VARS}):`;
|
|
272
272
|
}
|
|
273
273
|
console.log(_cliKit.chalk.whiteBright(dockerInfo), '\n');
|
|
274
|
+
helpers.dockerLoginInfo();
|
|
274
275
|
if (installConfig.switches.isDaEnabled) {
|
|
275
276
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
276
277
|
console.log(_cliKit.chalk.white('Pull the latest image of the Discovery Agent:'));
|
|
@@ -17,7 +17,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
17
17
|
const {
|
|
18
18
|
log
|
|
19
19
|
} = (0, _snooplogg.default)('engage: install: agents: gitLab:');
|
|
20
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.GITLAB_DA}`;
|
|
21
20
|
|
|
22
21
|
// ConfigFiles - all the config file that are used in the setup
|
|
23
22
|
const ConfigFiles = exports.ConfigFiles = {
|
|
@@ -122,10 +121,12 @@ const dockerSuccessMsg = installConfig => {
|
|
|
122
121
|
const runDaWinMsg = `docker run -it --env-file ${helpers.pwdWin}/${helpers.configFiles.DA_ENV_VARS} -v ${helpers.pwdWin}:/keys ${helpers.eolCharWin}`;
|
|
123
122
|
const startDaLinuxMsg = `\nStart the Discovery Agent on a Linux based machine`;
|
|
124
123
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
124
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.GITLAB_DA}`;
|
|
125
125
|
if (installConfig.switches.isDaEnabled) {
|
|
126
126
|
dockerInfo = `To utilize the discovery agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.DA_ENV_VARS}):`;
|
|
127
127
|
}
|
|
128
128
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
129
|
+
helpers.dockerLoginInfo();
|
|
129
130
|
if (installConfig.switches.isDaEnabled) {
|
|
130
131
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
131
132
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
|
@@ -13,7 +13,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
class AWSAgentValues {
|
|
16
|
-
constructor(
|
|
16
|
+
constructor() {
|
|
17
17
|
_defineProperty(this, "accessKey", void 0);
|
|
18
18
|
_defineProperty(this, "secretKey", void 0);
|
|
19
19
|
_defineProperty(this, "logGroup", void 0);
|
|
@@ -23,19 +23,8 @@ class AWSAgentValues {
|
|
|
23
23
|
_defineProperty(this, "apigwAgentConfigZipFile", void 0);
|
|
24
24
|
_defineProperty(this, "centralConfig", void 0);
|
|
25
25
|
_defineProperty(this, "traceabilityConfig", void 0);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.cloudFormationConfig.ECSCentralRegion = this.centralConfig.region;
|
|
29
|
-
if (this.cloudFormationConfig.DeploymentType === 'ECS Fargate') {
|
|
30
|
-
this.cloudFormationConfig.ECSCentralOrganizationID = this.centralConfig.orgId;
|
|
31
|
-
this.cloudFormationConfig.ECSCentralEnvironmentName = this.centralConfig.environment;
|
|
32
|
-
this.cloudFormationConfig.ECSCentralClientID = this.centralConfig.dosaAccount.clientId;
|
|
33
|
-
this.cloudFormationConfig.ECSCentralDiscoveryAgentName = this.centralConfig.daAgentName;
|
|
34
|
-
this.cloudFormationConfig.ECSCentralTraceabilityAgentName = this.centralConfig.taAgentName;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
this.accessKey = awsDeployment === 'Other' ? '**Insert Access Key**' : '';
|
|
38
|
-
this.secretKey = awsDeployment === 'Other' ? '**Insert Secret Key**' : '';
|
|
26
|
+
this.accessKey = '**Insert Access Key**';
|
|
27
|
+
this.secretKey = '**Insert Secret Key**';
|
|
39
28
|
this.logGroup = '';
|
|
40
29
|
this.stageTagName = '';
|
|
41
30
|
this.fullTransactionLogging = false;
|
|
@@ -43,7 +32,6 @@ class AWSAgentValues {
|
|
|
43
32
|
this.apigwAgentConfigZipFile = '';
|
|
44
33
|
this.centralConfig = new _types.CentralAgentConfig();
|
|
45
34
|
this.traceabilityConfig = new _types.TraceabilityConfig();
|
|
46
|
-
this.cloudFormationConfig = new _types.CloudFormationConfig();
|
|
47
35
|
}
|
|
48
36
|
}
|
|
49
37
|
|
|
@@ -3,9 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.helmInstallInfo = exports.helmImageSecretInfo = void 0;
|
|
6
|
+
exports.helmInstallInfo = exports.helmImageSecretInfo = exports.dockerLoginMsg = exports.dockerLoginInfo = void 0;
|
|
7
7
|
var _chalk = _interopRequireDefault(require("chalk"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const dockerLoginMsg = () => {
|
|
10
|
+
return `${_chalk.default.white('Login to the Axway Docker repository:')}
|
|
11
|
+
${_chalk.default.cyan('docker login docker.repository.axway.com --username <client_id> --password <client_secret>')}
|
|
12
|
+
${_chalk.default.white('* client_id - service account id for your Amplify Platform organization')}
|
|
13
|
+
${_chalk.default.white('* client_secret - service account secret for your Amplify Platform organization')}
|
|
14
|
+
`;
|
|
15
|
+
};
|
|
16
|
+
exports.dockerLoginMsg = dockerLoginMsg;
|
|
17
|
+
const dockerLoginInfo = () => {
|
|
18
|
+
console.log(dockerLoginMsg());
|
|
19
|
+
};
|
|
20
|
+
exports.dockerLoginInfo = dockerLoginInfo;
|
|
9
21
|
const helmImageSecretInfo = async namespace => {
|
|
10
22
|
let dockerSecretCmd = `kubectl create secret docker-registry <image-pull-secret-name> --namespace ${namespace} \\`;
|
|
11
23
|
dockerSecretCmd += `\n --docker-server=docker.repository.axway.com \\`;
|
|
@@ -18,8 +18,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
18
18
|
const {
|
|
19
19
|
log
|
|
20
20
|
} = (0, _snooplogg.default)('engage: install: agents: ibmAPIConnect');
|
|
21
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.IBMAPICONNECT_DA}`;
|
|
22
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.IBMAPICONNECT_TA}`;
|
|
23
21
|
const defaultLogFiles = exports.defaultLogFiles = '/group-*_instance-*.log';
|
|
24
22
|
|
|
25
23
|
// ConfigFiles - all the config file that are used in the setup
|
|
@@ -124,6 +122,8 @@ const dockerSuccessMsg = installConfig => {
|
|
|
124
122
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
125
123
|
const startTaLinuxMsg = `\nStart the Traceability Agent on a Linux based machine`;
|
|
126
124
|
const startTaWinMsg = `\nStart the Traceability Agent on a Windows machine`;
|
|
125
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.IBMAPICONNECT_DA}`;
|
|
126
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.IBMAPICONNECT_TA}`;
|
|
127
127
|
if (installConfig.switches.isDaEnabled && installConfig.switches.isTaEnabled) {
|
|
128
128
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
129
129
|
} else if (installConfig.switches.isDaEnabled) {
|
|
@@ -132,6 +132,7 @@ const dockerSuccessMsg = installConfig => {
|
|
|
132
132
|
dockerInfo = `To utilize the traceability agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.TA_ENV_VARS}):`;
|
|
133
133
|
}
|
|
134
134
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
135
|
+
helpers.dockerLoginInfo();
|
|
135
136
|
if (installConfig.switches.isDaEnabled) {
|
|
136
137
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
137
138
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
|
@@ -18,8 +18,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
18
18
|
const {
|
|
19
19
|
log
|
|
20
20
|
} = (0, _snooplogg.default)('central: install: agents: kafka');
|
|
21
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.KAFKA_DA}`;
|
|
22
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.KAFKA_TA}`;
|
|
23
21
|
|
|
24
22
|
// ConfigFiles - all the config file that are used in the setup
|
|
25
23
|
const ConfigFiles = exports.ConfigFiles = {
|
|
@@ -245,6 +243,8 @@ const dockerSuccessMsg = installConfig => {
|
|
|
245
243
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
246
244
|
const startTaLinuxMsg = `\nStart the Traceability Agent on a Linux based machine`;
|
|
247
245
|
const startTaWinMsg = `\nStart the Traceability Agent on a Windows machine`;
|
|
246
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.KAFKA_DA}`;
|
|
247
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.KAFKA_TA}`;
|
|
248
248
|
if (installConfig.switches.isDaEnabled && installConfig.switches.isTaEnabled) {
|
|
249
249
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
250
250
|
} else if (installConfig.switches.isDaEnabled) {
|
|
@@ -253,6 +253,7 @@ const dockerSuccessMsg = installConfig => {
|
|
|
253
253
|
dockerInfo = `To utilize the traceability agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.TA_ENV_VARS}):`;
|
|
254
254
|
}
|
|
255
255
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
256
|
+
helpers.dockerLoginInfo();
|
|
256
257
|
if (installConfig.switches.isDaEnabled) {
|
|
257
258
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
258
259
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
|
@@ -9,7 +9,6 @@ var _basicPrompts = require("../../common/basicPrompts");
|
|
|
9
9
|
var _CliConfigManager = require("../../common/CliConfigManager");
|
|
10
10
|
var _CoreConfigController = require("../../common/CoreConfigController");
|
|
11
11
|
var _types = require("../../common/types");
|
|
12
|
-
var _awsAgents = require("./awsAgents");
|
|
13
12
|
var helpers = _interopRequireWildcard(require("./helpers"));
|
|
14
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -37,7 +36,7 @@ const askIsProductionEnvironment = async () => {
|
|
|
37
36
|
};
|
|
38
37
|
const getTraceabilityConfig = async installConfig => {
|
|
39
38
|
let traceabilityConfig = new _types.TraceabilityConfig();
|
|
40
|
-
if (installConfig.gatewayType === _types.GatewayTypes.AWS_GATEWAY
|
|
39
|
+
if (installConfig.gatewayType === _types.GatewayTypes.AWS_GATEWAY) {
|
|
41
40
|
return traceabilityConfig;
|
|
42
41
|
}
|
|
43
42
|
traceabilityConfig.usageReportingOffline = installConfig.bundleType === _types.BundleType.TRACEABILITY_OFFLINE;
|
|
@@ -18,8 +18,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
18
18
|
const {
|
|
19
19
|
log
|
|
20
20
|
} = (0, _snooplogg.default)('central: install: agents: SAP API Portal');
|
|
21
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.SAPAPIPORTAL_DA}`;
|
|
22
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.SAPAPIPORTAL_TA}`;
|
|
23
21
|
const defaultLogFiles = exports.defaultLogFiles = '/group-*_instance-*.log';
|
|
24
22
|
|
|
25
23
|
// ConfigFiles - all the config file that are used in the setup
|
|
@@ -120,6 +118,8 @@ const dockerSuccessMsg = installConfig => {
|
|
|
120
118
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
121
119
|
const startTaLinuxMsg = `\nStart the Traceability Agent on a Linux based machine`;
|
|
122
120
|
const startTaWinMsg = `\nStart the Traceability Agent on a Windows machine`;
|
|
121
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.SAPAPIPORTAL_DA}`;
|
|
122
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.SAPAPIPORTAL_TA}`;
|
|
123
123
|
if (installConfig.switches.isDaEnabled && installConfig.switches.isTaEnabled) {
|
|
124
124
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
125
125
|
} else if (installConfig.switches.isDaEnabled) {
|
|
@@ -128,6 +128,7 @@ const dockerSuccessMsg = installConfig => {
|
|
|
128
128
|
dockerInfo = `To utilize the traceability agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.TA_ENV_VARS}):`;
|
|
129
129
|
}
|
|
130
130
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
131
|
+
helpers.dockerLoginInfo();
|
|
131
132
|
if (installConfig.switches.isDaEnabled) {
|
|
132
133
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
133
134
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
|
@@ -17,8 +17,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
17
17
|
const {
|
|
18
18
|
log
|
|
19
19
|
} = (0, _snooplogg.default)('engage: install: agents: sensedia');
|
|
20
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.SENSEDIA_DA}`;
|
|
21
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.SENSEDIA_TA}`;
|
|
22
20
|
|
|
23
21
|
// ConfigFiles - all the config file that are used in the setup
|
|
24
22
|
const ConfigFiles = exports.ConfigFiles = {
|
|
@@ -141,6 +139,8 @@ const dockerSuccessMsg = installConfig => {
|
|
|
141
139
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
142
140
|
const startTaLinuxMsg = `\nStart the Traceability Agent on a Linux based machine`;
|
|
143
141
|
const startTaWinMsg = `\nStart the Traceability Agent on a Windows machine`;
|
|
142
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.SENSEDIA_DA}`;
|
|
143
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.SENSEDIA_TA}`;
|
|
144
144
|
if (installConfig.switches.isDaEnabled && installConfig.switches.isTaEnabled) {
|
|
145
145
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
146
146
|
} else if (installConfig.switches.isDaEnabled) {
|
|
@@ -149,6 +149,7 @@ const dockerSuccessMsg = installConfig => {
|
|
|
149
149
|
dockerInfo = `To utilize the traceability agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.TA_ENV_VARS}):`;
|
|
150
150
|
}
|
|
151
151
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
152
|
+
helpers.dockerLoginInfo();
|
|
152
153
|
if (installConfig.switches.isDaEnabled) {
|
|
153
154
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
154
155
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
|
@@ -18,8 +18,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
18
18
|
const {
|
|
19
19
|
log
|
|
20
20
|
} = (0, _snooplogg.default)('central: install: agents: Software AG Web Methods');
|
|
21
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.SOFTWAREAGWEBMETHODS_DA}`;
|
|
22
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.SOFTWAREAGWEBMETHODS_TA}`;
|
|
23
21
|
|
|
24
22
|
// ConfigFiles - all the config file that are used in the setup
|
|
25
23
|
const ConfigFiles = exports.ConfigFiles = {
|
|
@@ -103,6 +101,8 @@ const dockerSuccessMsg = installConfig => {
|
|
|
103
101
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
104
102
|
const startTaLinuxMsg = `\nStart the Traceability Agent on a Linux based machine`;
|
|
105
103
|
const startTaWinMsg = `\nStart the Traceability Agent on a Windows machine`;
|
|
104
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.SOFTWAREAGWEBMETHODS_DA}`;
|
|
105
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.SOFTWAREAGWEBMETHODS_TA}`;
|
|
106
106
|
if (installConfig.switches.isDaEnabled && installConfig.switches.isTaEnabled) {
|
|
107
107
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
108
108
|
} else if (installConfig.switches.isDaEnabled) {
|
|
@@ -111,6 +111,7 @@ const dockerSuccessMsg = installConfig => {
|
|
|
111
111
|
dockerInfo = `To utilize the traceability agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.TA_ENV_VARS}):`;
|
|
112
112
|
}
|
|
113
113
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
114
|
+
helpers.dockerLoginInfo();
|
|
114
115
|
if (installConfig.switches.isDaEnabled) {
|
|
115
116
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
116
117
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
|
@@ -20,7 +20,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
20
20
|
const {
|
|
21
21
|
log
|
|
22
22
|
} = (0, _snooplogg.default)('central: install: agents: Traceable');
|
|
23
|
-
const caImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.TRACEABLE_CA}`;
|
|
24
23
|
const amplifyAgentsNs = exports.amplifyAgentsNs = 'amplify-agents';
|
|
25
24
|
|
|
26
25
|
// ConfigFiles - all the config file that are used in the setup
|
|
@@ -153,15 +152,19 @@ const gatewayConnectivity = async installConfig => {
|
|
|
153
152
|
return traceableAgentValues;
|
|
154
153
|
};
|
|
155
154
|
exports.gatewayConnectivity = gatewayConnectivity;
|
|
156
|
-
const dockerSuccessMsg = installConfig => {
|
|
155
|
+
const dockerSuccessMsg = async installConfig => {
|
|
157
156
|
let dockerInfo;
|
|
158
157
|
const runAgentLinuxMsg = `docker run -it --env-file ${helpers.pwd}/${helpers.configFiles.AGENT_ENV_VARS} -v ${helpers.pwd}:/keys ${helpers.eolChar}`;
|
|
159
158
|
const runAgentWinMsg = `docker run -it --env-file ${helpers.pwdWin}/${helpers.configFiles.AGENT_ENV_VARS} -v ${helpers.pwdWin}:/keys ${helpers.eolCharWin}`;
|
|
160
159
|
const startAgentLinuxMsg = `\nStart the Traceable Agent on a Linux based machine`;
|
|
161
160
|
const startAgentWinMsg = `\nStart the Traceable Agent on a Windows machine`;
|
|
161
|
+
const caVersion = await helpers.getLatestAgentVersion(installConfig.centralConfig.apiServerClient, _types.AgentNames.TRACEABLE_CA);
|
|
162
|
+
const dockerRepoVersion = caVersion.split('.').slice(0, 2).join('.');
|
|
163
|
+
const caImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${dockerRepoVersion}/${_types.AgentNames.TRACEABLE_CA}`;
|
|
162
164
|
if (installConfig.switches.isTaEnabled) {
|
|
163
165
|
dockerInfo = `To utilize the agent, pull the latest Docker image and run it using the appropriate supplied environment file, (${helpers.configFiles.AGENT_ENV_VARS}):`;
|
|
164
166
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
167
|
+
helpers.dockerLoginInfo();
|
|
165
168
|
const caImageVersion = `${caImage}:${installConfig.taVersion}`;
|
|
166
169
|
console.log(_chalk.default.white('Pull the latest image of the Agent:'));
|
|
167
170
|
console.log(_chalk.default.cyan(`docker pull ${caImageVersion}`));
|
|
@@ -18,8 +18,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
18
18
|
const {
|
|
19
19
|
log
|
|
20
20
|
} = (0, _snooplogg.default)('central: install: agents: WSO2');
|
|
21
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.WSO2_DA}`;
|
|
22
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.WSO2_TA}`;
|
|
23
21
|
const defaultLogFiles = exports.defaultLogFiles = '/group-*_instance-*.log';
|
|
24
22
|
|
|
25
23
|
// ConfigFiles - all the config file that are used in the setup
|
|
@@ -93,6 +91,8 @@ const dockerSuccessMsg = installConfig => {
|
|
|
93
91
|
const startDaWinMsg = `\nStart the Discovery Agent on a Windows machine`;
|
|
94
92
|
const startTaLinuxMsg = `\nStart the Traceability Agent on a Linux based machine`;
|
|
95
93
|
const startTaWinMsg = `\nStart the Traceability Agent on a Windows machine`;
|
|
94
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.WSO2_DA}`;
|
|
95
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${installConfig.dockerRepoVersion}/${_types.AgentNames.WSO2_TA}`;
|
|
96
96
|
if (installConfig.switches.isDaEnabled && installConfig.switches.isTaEnabled) {
|
|
97
97
|
dockerInfo = `To utilize the agents, pull the latest Docker images and run them using the appropriate supplied environment files, (${helpers.configFiles.DA_ENV_VARS} & ${helpers.configFiles.TA_ENV_VARS}):`;
|
|
98
98
|
} else if (installConfig.switches.isDaEnabled) {
|
|
@@ -101,6 +101,7 @@ const dockerSuccessMsg = installConfig => {
|
|
|
101
101
|
dockerInfo = `To utilize the traceability agent, pull the latest Docker image and run it using the supplied environment file, (${helpers.configFiles.TA_ENV_VARS}):`;
|
|
102
102
|
}
|
|
103
103
|
console.log(_chalk.default.whiteBright(dockerInfo), '\n');
|
|
104
|
+
helpers.dockerLoginInfo();
|
|
104
105
|
if (installConfig.switches.isDaEnabled) {
|
|
105
106
|
const daImageVersion = `${daImage}:${installConfig.daVersion}`;
|
|
106
107
|
console.log(_chalk.default.white('Pull the latest image of the Discovery Agent:'));
|
package/dist/common/types.js
CHANGED
|
@@ -38,14 +38,14 @@ let Kind = exports.Kind = /*#__PURE__*/function (Kind) {
|
|
|
38
38
|
* NOTE: order of this array is used to orchestrate bulk api calls (see utils/compareDocsByKind)
|
|
39
39
|
*/
|
|
40
40
|
const KindTypes = exports.KindTypes = [Kind.Environment, Kind.APIService, Kind.APIServiceRevision, Kind.APIServiceInstance, Kind.Secret, Kind.Webhook, Kind.ConsumerSubscriptionDefinition, Kind.ConsumerInstance];
|
|
41
|
-
const PublicDockerRepoBaseUrl = exports.PublicDockerRepoBaseUrl = 'repository.axway.com
|
|
41
|
+
const PublicDockerRepoBaseUrl = exports.PublicDockerRepoBaseUrl = 'docker.repository.axway.com';
|
|
42
42
|
let BasePaths = exports.BasePaths = /*#__PURE__*/function (BasePaths) {
|
|
43
43
|
BasePaths["ApiServer"] = "/apis";
|
|
44
44
|
BasePaths["ApiCentral"] = "/api/v1";
|
|
45
45
|
BasePaths["Platform"] = "/platform/api/v1";
|
|
46
46
|
BasePaths["V7Agents"] = "/artifactory/ampc-public-generic-release/v7-agents";
|
|
47
47
|
BasePaths["AWSAgents"] = "/artifactory/ampc-public-generic-release/aws-agents";
|
|
48
|
-
BasePaths["DockerAgentPublicRepo"] = "/
|
|
48
|
+
BasePaths["DockerAgentPublicRepo"] = "/ampc-docker-prod";
|
|
49
49
|
return BasePaths;
|
|
50
50
|
}({});
|
|
51
51
|
let ConfigTypes = exports.ConfigTypes = /*#__PURE__*/function (ConfigTypes) {
|
|
@@ -206,7 +206,7 @@ let BundleType = exports.BundleType = /*#__PURE__*/function (BundleType) {
|
|
|
206
206
|
return BundleType;
|
|
207
207
|
}({});
|
|
208
208
|
let AgentNames = exports.AgentNames = /*#__PURE__*/function (AgentNames) {
|
|
209
|
-
AgentNames["AKAMAI_CA"] = "akamai-
|
|
209
|
+
AgentNames["AKAMAI_CA"] = "akamai-agent";
|
|
210
210
|
AgentNames["AWS_DA"] = "aws-apigw-discovery-agent";
|
|
211
211
|
AgentNames["AWS_TA"] = "aws-apigw-traceability-agent";
|
|
212
212
|
AgentNames["GITHUB_DA"] = "github-discovery-agent";
|
|
@@ -221,10 +221,10 @@ let AgentNames = exports.AgentNames = /*#__PURE__*/function (AgentNames) {
|
|
|
221
221
|
AgentNames["KAFKA_DA"] = "kafka-discovery-agent";
|
|
222
222
|
AgentNames["KAFKA_TA"] = "kafka-traceability-agent";
|
|
223
223
|
AgentNames["SWAGGERHUB_DA"] = "swaggerhub-discovery-agent";
|
|
224
|
-
AgentNames["GRAYLOG_CA"] = "graylog-
|
|
224
|
+
AgentNames["GRAYLOG_CA"] = "graylog-agent";
|
|
225
225
|
AgentNames["IBMAPICONNECT_DA"] = "ibm-apiconnect-discovery-agent";
|
|
226
226
|
AgentNames["IBMAPICONNECT_TA"] = "ibm-apiconnect-traceability-agent";
|
|
227
|
-
AgentNames["TRACEABLE_CA"] = "traceable-
|
|
227
|
+
AgentNames["TRACEABLE_CA"] = "traceable-agent";
|
|
228
228
|
AgentNames["SOFTWAREAGWEBMETHODS_DA"] = "software-ag-webmethods-discovery-agent";
|
|
229
229
|
AgentNames["SOFTWAREAGWEBMETHODS_TA"] = "software-ag-webmethods-traceability-agent";
|
|
230
230
|
AgentNames["BACKSTAGE_DA"] = "backstage-discovery-agent";
|
|
@@ -435,6 +435,7 @@ class AgentInstallConfig {
|
|
|
435
435
|
_defineProperty(this, "daVersion", void 0);
|
|
436
436
|
_defineProperty(this, "taVersion", void 0);
|
|
437
437
|
_defineProperty(this, "caVersion", void 0);
|
|
438
|
+
_defineProperty(this, "dockerRepoVersion", void 0);
|
|
438
439
|
_defineProperty(this, "gatewayConfig", void 0);
|
|
439
440
|
_defineProperty(this, "idpConfig", void 0);
|
|
440
441
|
_defineProperty(this, "traceabilityConfig", void 0);
|
|
@@ -448,6 +449,7 @@ class AgentInstallConfig {
|
|
|
448
449
|
this.daVersion = 'latest';
|
|
449
450
|
this.taVersion = 'latest';
|
|
450
451
|
this.caVersion = 'latest';
|
|
452
|
+
this.dockerRepoVersion = '';
|
|
451
453
|
this.switches = new AgentInstallSwitches();
|
|
452
454
|
this.traceabilityConfig = new TraceabilityConfig();
|
|
453
455
|
}
|