@axway/axway-central-cli 3.7.0-rc.3 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -355,19 +355,28 @@ const binarySuccessMsg = (isNewDosa, isDaEnabled, isTaEnabled) => {
355
355
  }
356
356
  };
357
357
  const helmSuccessMsg = (namespace, isDaEnabled, isTaEnabled) => {
358
- let finishUp = 'helm repo update\n';
358
+ const imagePullOverrides = `--set image.pullSecret=<image-pull-secret-name>`;
359
+ let agentHelmInfo = new Set();
359
360
  if (isDaEnabled) {
360
361
  console.log(_cliKit.chalk.white(`Discovery Agent override file has been placed at ${process.cwd()}/${ConfigFiles.DAHelmOverride}`));
361
- finishUp += `helm upgrade --install --namespace ${namespace} v7-discovery axway/v7-discovery -f ${ConfigFiles.DAHelmOverride}\n`;
362
+ agentHelmInfo.add({
363
+ helmReleaseName: 'v7-discovery',
364
+ helmChartName: 'axway/v7-discovery',
365
+ overrideFileName: ConfigFiles.DAHelmOverride,
366
+ imageSecretOverrides: imagePullOverrides
367
+ });
362
368
  }
363
369
  if (isTaEnabled) {
364
370
  console.log(_cliKit.chalk.white(`Traceability Agent override file has been placed at ${process.cwd()}/${ConfigFiles.TAHelmOverride}`));
365
- finishUp += `helm upgrade --install --namespace ${namespace} v7-traceability axway/v7-traceability -f ${ConfigFiles.TAHelmOverride}`;
371
+ agentHelmInfo.add({
372
+ helmReleaseName: 'v7-traceability',
373
+ helmChartName: 'axway/v7-traceability',
374
+ overrideFileName: ConfigFiles.TAHelmOverride,
375
+ imageSecretOverrides: imagePullOverrides
376
+ });
366
377
  }
367
- console.log(_cliKit.chalk.white('\nTo deploy the Agents run the following commands\n'));
368
- console.log(_cliKit.chalk.cyan('helm repo add axway https://helm.repository.axway.com --username=<client_id> --password=<client_secret>'));
369
- console.log(_cliKit.chalk.cyan(finishUp));
370
- console.log(_cliKit.chalk.white(`\n* client_id - service account id for your Amplify Platform organization`), _cliKit.chalk.white(`\n* client_secret - service account secret for your Amplify Platform organization`));
378
+ helpers.helmImageSecretInfo(namespace);
379
+ helpers.helmInstallInfo('Edge', namespace, agentHelmInfo);
371
380
  };
372
381
  const edgeAgentNameMap = {
373
382
  [_types.AgentTypes.da]: _types.AgentNames.EDGE_DA,
@@ -81,10 +81,17 @@ const gatewayConnectivity = async _installConfig => {
81
81
  return graylogAgentValues;
82
82
  };
83
83
  exports.gatewayConnectivity = gatewayConnectivity;
84
- const generateSuccessHelpMsg = graylogAgentValues => {
84
+ const generateSuccessHelpMsg = namespace => {
85
85
  console.log(`Graylog Agent override file has been placed at ${process.cwd()}/${ConfigFiles.helmOverride}`);
86
- const installCmd = `helm upgrade --install --namespace ${graylogAgentValues.namespace.name} graylog-agent axway/graylog-agent -f ${ConfigFiles.helmOverride}`;
87
- console.log('To complete the Graylog Agent installation run the following commands:', _chalk.default.cyan('\n helm repo add axway https://helm.repository.axway.com --username=<client_id> --password=<client_secret>'), _chalk.default.cyan(`\n helm repo update\n ${installCmd}`), _chalk.default.cyan(`\n`), _chalk.default.white(`\n* client_id - service account id for your Amplify Platform organization`), _chalk.default.white(`\n* client_secret - service account secret for your Amplify Platform organization`));
86
+ helpers.helmImageSecretInfo(namespace);
87
+ let agentHelmInfo = new Set();
88
+ agentHelmInfo.add({
89
+ helmReleaseName: 'graylog-agent',
90
+ helmChartName: 'axway/graylog-agent',
91
+ overrideFileName: ConfigFiles.helmOverride,
92
+ imageSecretOverrides: `--set image.pullSecret=<image-pull-secret-name>`
93
+ });
94
+ helpers.helmInstallInfo('Graylog', namespace, agentHelmInfo);
88
95
  console.log('Configuration file(s) have been successfully created.\n');
89
96
  console.log(_chalk.default.gray(`\nAdditional information about agent features can be found here:\n${helpers.agentsDocsUrl.GRAYLOG}`));
90
97
  };
@@ -110,7 +117,7 @@ const completeInstall = async installConfig => {
110
117
  graylogAgentValues.traceabilityConfig = installConfig.traceabilityConfig;
111
118
  console.log('Generating the configuration file(s)...');
112
119
  (0, _utils.writeTemplates)(ConfigFiles.helmOverride, graylogAgentValues, helpers.graylogHelmOverrideTemplate);
113
- generateSuccessHelpMsg(graylogAgentValues);
120
+ generateSuccessHelpMsg(graylogAgentValues.namespace.name);
114
121
  };
115
122
  exports.completeInstall = completeInstall;
116
123
  const createGraylogCredsSecret = async (namespace, secretName, user, password) => {
@@ -200,6 +200,18 @@ Object.keys(_traceableTemplates).forEach(function (key) {
200
200
  }
201
201
  });
202
202
  });
203
+ var _util2 = require("./util");
204
+ Object.keys(_util2).forEach(function (key) {
205
+ if (key === "default" || key === "__esModule") return;
206
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
207
+ if (key in exports && exports[key] === _util2[key]) return;
208
+ Object.defineProperty(exports, key, {
209
+ enumerable: true,
210
+ get: function () {
211
+ return _util2[key];
212
+ }
213
+ });
214
+ });
203
215
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
204
216
  const streamPipeline = exports.streamPipeline = _util.default.promisify(_stream.default.pipeline);
205
217
  const unzip = async filePath => {
@@ -31,9 +31,7 @@ const envMessages = exports.envMessages = {
31
31
  selectTeam: 'Select a team'
32
32
  };
33
33
  const k8sClusterMessages = exports.k8sClusterMessages = {
34
- enterK8sClusterName: 'Enter a unique k8s cluster name',
35
- getK8sClustersError: 'Get k8sCluster error.',
36
- k8sClusterAlreadyExists: 'k8sCluster already exists. Please enter a new name.'
34
+ enterK8sClusterName: 'Enter a unique k8s cluster name'
37
35
  };
38
36
  const agentMessages = exports.agentMessages = {
39
37
  enterDiscoveryAgentName: 'Enter a new discovery agent name',
@@ -311,20 +309,11 @@ const askReferencedEnvironments = async (client, defsManager, envInfo) => {
311
309
  return selectedRefEnv;
312
310
  };
313
311
  exports.askReferencedEnvironments = askReferencedEnvironments;
314
- const askK8sClusterName = async (client, defsManager) => {
315
- const {
316
- data: k8sCluster
317
- } = await (0, _getters.getListByResource)({
318
- client,
319
- defsManager,
320
- resourceType: 'K8SCluster',
321
- resourceShortName: 'k8sc'
322
- });
323
- if (!k8sCluster) throw Error(k8sClusterMessages.getK8sClustersError);
312
+ const askK8sClusterName = async () => {
324
313
  const name = await (0, _basicPrompts.askInput)({
325
314
  msg: k8sClusterMessages.enterK8sClusterName,
326
315
  defaultValue: cliNowString,
327
- validate: (0, _basicPrompts.runValidations)((0, _basicPrompts.validateInputIsNew)(k8sCluster.map(k8sCluster => k8sCluster.name), k8sClusterMessages.k8sClusterAlreadyExists), (0, _basicPrompts.validateRegex)(_regex.resourceRegex, (0, _regex.invalidResourceMsg)('K8sCluster')))
316
+ validate: (0, _basicPrompts.runValidations)((0, _basicPrompts.validateRegex)(_regex.resourceRegex, (0, _regex.invalidResourceMsg)('K8sCluster')))
328
317
  });
329
318
  return name;
330
319
  };
@@ -136,11 +136,16 @@ exports.v7TAEnvVarTemplate = v7TAEnvVarTemplate;
136
136
  const v7TAHelmOverrideTemplate = () => {
137
137
  return `---
138
138
  replicaCount: 1
139
- image:
140
- repository: axway.jfrog.io/ampc-public-docker-release/agent/v7-traceability-agent
141
- pullPolicy: Always
142
- # Overrides the image tag whose default is the chart appVersion.
143
- tag: "{{taVersion}}"
139
+
140
+ # Traceability Agent image overrides
141
+ # image:
142
+ # fullPath:
143
+ # registry: docker.repository.axway.com
144
+ # repository: ampc-beano-docker-prod/1.2
145
+ # name: v7-traceability-agent
146
+ # tag: "{{taVersion}}"
147
+ # pullPolicy: IfNotPresent
148
+ # pullSecret:
144
149
 
145
150
  imagePullSecrets: []
146
151
  nameOverride: ""
@@ -284,13 +289,16 @@ const v7DAHelmOverrideTemplate = () => {
284
289
  return `---
285
290
  replicaCount: 1
286
291
 
287
- image:
288
- repository: axway.jfrog.io/ampc-public-docker-release/agent/v7-discovery-agent
289
- pullPolicy: Always
290
- # Overrides the image tag whose default is the chart appVersion.
291
- tag: "{{daVersion}}"
292
+ # Discovery Agent image overrides
293
+ # image:
294
+ # fullPath:
295
+ # registry: docker.repository.axway.com
296
+ # repository: ampc-beano-docker-prod/1.2
297
+ # name: v7-discovery-agent
298
+ # tag: "{{daVersion}}"
299
+ # pullPolicy: IfNotPresent
300
+ # pullSecret:
292
301
 
293
- imagePullSecrets: []
294
302
  nameOverride: ""
295
303
  fullnameOverride: ""
296
304
 
@@ -43,6 +43,16 @@ class GraylogAgentValues {
43
43
  exports.GraylogAgentValues = GraylogAgentValues;
44
44
  const graylogHelmOverrideTemplate = () => {
45
45
  return `---
46
+ # Graylog Agent image overrides
47
+ # image:
48
+ # fullPath:
49
+ # registry: docker.repository.axway.com
50
+ # repository: ampc-beano-docker-prod/1.1
51
+ # name: graylog-agent
52
+ # tag:
53
+ # pullPolicy: IfNotPresent
54
+ # pullSecret:
55
+
46
56
  graylog:
47
57
  url: {{url}}
48
58
  basePathSegmentLen: {{basePathSegmentLen}}
@@ -54,7 +64,7 @@ secrets:
54
64
  name: {{agentKeysSecret}}
55
65
 
56
66
  env:
57
- CENTRAL_REGION={{centralConfig.region}}
67
+ CENTRAL_REGION: {{centralConfig.region}}
58
68
  CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
59
69
  CENTRAL_TEAM: {{centralConfig.ampcTeamName}}
60
70
  CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
@@ -30,97 +30,113 @@ class IstioValues {
30
30
  exports.IstioValues = IstioValues;
31
31
  const istioAgentsTemplate = () => {
32
32
  return `---
33
- global:
34
- # Amplify Central config
35
- central:
36
- url: {{centralConfig.scheme}}://{{centralConfig.host}}
37
- clientTimeout: 10s
38
- envID: {{centralConfig.environmentId}}
39
- envName: "{{centralConfig.environment}}"
40
- tenantID: "{{centralConfig.orgId}}"
41
- auth:
42
- baseUrl: "{{centralConfig.authUrl}}"
43
- clientTimeout: 10s
44
-
45
- # Config for creating the K8S Secret that holds the Amplify Platform service account details as part of the helm chart deployment
46
- secret:
47
- # Set to true, and provide the following values to enable the creation of the K8S Secret
48
- create: false
49
- name: ""
50
- password: ""
51
- publicKey: ""
52
- privateKey: ""
53
-
54
- # Traceability agent config
55
- als:
56
- enabled: {{istioAgentValues.alsEnabled}}
57
- # Header publishing mode. Set to default or verbose.
58
- mode: {{istioAgentValues.alsMode}}
59
- # Name of the k8scluster
60
- clusterName: {{istioAgentValues.clusterName}}
61
- # Name of the traceability agent resource
62
- agentName: {{centralConfig.taAgentName}}
63
- # Amplify Central Deployment (prod, prod-eu)
64
- apicDeployment: {{centralConfig.deployment}}
65
- # Amplify Platform service account client ID
66
- clientID: {{centralConfig.dosaAccount.clientId}}
67
- # Amplify ingestion service endpoint
68
- condorUrl: {{traceabilityConfig.host}}
69
- condorSslVerification: full
70
- # Sampling config
71
- sampling:
72
- percentage: {{traceabilityConfig.samplingPercentage}}
73
- per_api: true
74
- # Name of the secret containing the public & private keys used by the provided service account client ID
75
- keysSecretName: {{istioAgentValues.keysSecretName}}
76
- publishHeaders: true
77
- # List of namespaces where the ALS Envoy filters should be applied
78
- envoyFilterNamespaces:
79
- - {{istioAgentValues.envoyFilterNamespace}}
80
-
81
- # Discovery agent config
82
- da:
83
- enabled: {{istioAgentValues.discoveryEnabled}}
84
- # Name of the discovery agent resource
85
- agentName: {{centralConfig.daAgentName}}
86
- # Amplify Platform service account client ID
87
- clientID: {{centralConfig.dosaAccount.clientId}}
88
- # Name of the secret containing the public & private keys used by the provided service account client ID
89
- keysSecretName: {{istioAgentValues.keysSecretName}}
90
- # Name of the K8SCluster the agent is connected to
91
- clusterName: {{istioAgentValues.clusterName}}
92
- # Polling interval for K8S events
93
- pollInterval: "60s"
94
- # Resource discovery config
95
- discovery:
96
- # List of http endpoints to discover api specs from
97
- specEndpoints:
98
- - /apidoc/swagger.json
99
- - /swagger.json
100
- - /api/v1/docs
101
- - /apis/docs
102
- virtualService:
103
- # List of namespaces that will be used by agent to discover VirtualService resources
104
- namespaces:
105
- {{#each istioAgentValues.discoveryNamespaces}}
106
- - {{this}}
107
- {{/each}}
108
- # List of labels that will be used by agent to filter VirtualService resources
109
- labels: []
110
- requestAuth:
111
- # List of namespaces that will be used by agent to discover RequestAuthentication resources
112
- namespaces:
113
- {{#each istioAgentValues.discoveryNamespaces}}
114
- - {{this}}
115
- {{/each}}
116
- # List of labels that will be used by agent to filter RequestAuthentication resources
117
- labels: []
118
- # IDP Provider config
119
- idpProviders:
120
-
121
- # Deploy the chart with an optional demo service
122
- list:
123
- enabled: {{istioAgentValues.demoSvcEnabled}}`;
33
+ # Config for creating the K8S Secret that holds the Amplify Platform service account details as part of the helm chart deployment
34
+ secret:
35
+ # Set to true, and provide the following values to enable the creation of the K8S Secret
36
+ create: false
37
+ name: ""
38
+ password: ""
39
+ publicKey: ""
40
+ privateKey: ""
41
+
42
+ # Traceability agent config
43
+ als:
44
+ enabled: {{istioAgentValues.alsEnabled}}
45
+
46
+ # # Traceability Agent image overrides
47
+ # image:
48
+ # fullPath:
49
+ # registry: docker.repository.axway.com
50
+ # repository: ampc-beano-docker-prod/2.1
51
+ # name: als-traceability-agent
52
+ # tag:
53
+ # pullPolicy: IfNotPresent
54
+ # pullSecret:
55
+
56
+ # Header publishing mode. Set to default or verbose.
57
+ mode: {{istioAgentValues.alsMode}}
58
+
59
+ # Name of the k8scluster
60
+ clusterName: {{istioAgentValues.clusterName}}
61
+
62
+ # Name of the secret containing the public & private keys used by the provided service account client ID
63
+ keysSecretName: {{istioAgentValues.keysSecretName}}
64
+
65
+
66
+ # List of namespaces where the ALS Envoy filters should be applied
67
+ envoyFilterNamespaces:
68
+ - {{istioAgentValues.envoyFilterNamespace}}
69
+ publishHeaders: true
70
+
71
+ # Amplify config overrides
72
+ env:
73
+ LOG_LEVEL: info
74
+ CENTRAL_DEPLOYMENT: {{centralConfig.deployment}}
75
+ CENTRAL_REGION: {{centralConfig.region}}
76
+ CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
77
+ CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
78
+ CENTRAL_AGENTNAME: {{centralConfig.taAgentName}}
79
+ CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
80
+ CENTRAL_TEAM: "{{centralConfig.ampcTeamName}}"
81
+ TRACEABILITY_PROTOCOL: {{traceabilityConfig.protocol}}
82
+ TRACEABILITY_SAMPLING_PERCENTAGE: {{traceabilityConfig.samplingPercentage}}
83
+
84
+ # Discovery agent config
85
+ da:
86
+ enabled: {{istioAgentValues.discoveryEnabled}}
87
+
88
+ # # Discovery Agent image overrides
89
+ # image:
90
+ # fullPath:
91
+ # registry: docker.repository.axway.com
92
+ # repository: ampc-beano-docker-prod/1.1
93
+ # name: istio-discovery-agent
94
+ # tag:
95
+ # pullPolicy: IfNotPresent
96
+ # pullSecret:
97
+
98
+ # Name of the secret containing the public & private keys used by the provided service account client ID
99
+ keysSecretName: {{istioAgentValues.keysSecretName}}
100
+
101
+ # Name of the K8SCluster the agent is connected to
102
+ clusterName: {{istioAgentValues.clusterName}}
103
+
104
+ # Resource discovery config
105
+ discovery:
106
+ # List of http endpoints to discover api specs from
107
+ virtualService:
108
+ # List of namespaces that will be used by agent to discover VirtualService resources
109
+ namespaces:
110
+ {{#each istioAgentValues.discoveryNamespaces}}
111
+ - {{this}}
112
+ {{/each}}
113
+ # List of labels that will be used by agent to filter VirtualService resources
114
+ labels: []
115
+ requestAuth:
116
+ # List of namespaces that will be used by agent to discover RequestAuthentication resources
117
+ namespaces:
118
+ {{#each istioAgentValues.discoveryNamespaces}}
119
+ - {{this}}
120
+ {{/each}}
121
+ # List of labels that will be used by agent to filter RequestAuthentication resources
122
+ labels: []
123
+
124
+ # IDP Provider config
125
+ idpProviders:
126
+
127
+ # Amplify config overrides
128
+ env:
129
+ LOG_LEVEL: info
130
+ CENTRAL_AGENTNAME: {{centralConfig.daAgentName}}
131
+ CENTRAL_REGION: {{centralConfig.region}}
132
+ CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
133
+ CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
134
+ CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
135
+ CENTRAL_TEAM: "{{centralConfig.ampcTeamName}}"
136
+
137
+ # Deploy the chart with an optional demo service
138
+ list:
139
+ enabled: {{istioAgentValues.demoSvcEnabled}}`;
124
140
  };
125
141
 
126
142
  /**
@@ -21,6 +21,8 @@ class TraceableAgentValues {
21
21
  _defineProperty(this, "basePathSegmentLen", void 0);
22
22
  _defineProperty(this, "centralConfig", void 0);
23
23
  _defineProperty(this, "traceabilityConfig", void 0);
24
+ _defineProperty(this, "traceableSecret", void 0);
25
+ _defineProperty(this, "agentKeysSecret", void 0);
24
26
  this.namespace = {
25
27
  name: '',
26
28
  isNew: false
@@ -32,6 +34,8 @@ class TraceableAgentValues {
32
34
  this.basePathSegmentLen = 2;
33
35
  this.centralConfig = new _types.CentralAgentConfig();
34
36
  this.traceabilityConfig = new _types.TraceabilityConfig();
37
+ this.traceableSecret = '';
38
+ this.agentKeysSecret = '';
35
39
  }
36
40
  }
37
41
 
@@ -41,6 +45,22 @@ class TraceableAgentValues {
41
45
  exports.TraceableAgentValues = TraceableAgentValues;
42
46
  const traceableHelmOverrideTemplate = () => {
43
47
  return `---
48
+ # Traceable Agent image overrides
49
+ # image:
50
+ # fullPath:
51
+ # registry: docker.repository.axway.com
52
+ # repository: ampc-beano-docker-prod/1.1
53
+ # name: graylog-agent
54
+ # tag:
55
+ # pullPolicy: IfNotPresent
56
+ # pullSecret:
57
+
58
+ secrets:
59
+ traceable:
60
+ name: {{traceableSecret}}
61
+ agent:
62
+ name: {{agentKeysSecret}}
63
+
44
64
  traceable:
45
65
  token: {{traceableToken}}
46
66
  {{#compare . environments.length 0 operator="!=" }}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.helmInstallInfo = exports.helmImageSecretInfo = void 0;
7
+ var _chalk = _interopRequireDefault(require("chalk"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const helmImageSecretInfo = async namespace => {
10
+ let dockerSecretCmd = `kubectl create secret docker-registry <image-pull-secret-name> --namespace ${namespace} \\`;
11
+ dockerSecretCmd += `\n --docker-server=docker.repository.axway.com \\`;
12
+ dockerSecretCmd += `\n --docker-username=<client_id> \\`;
13
+ dockerSecretCmd += `\n --docker-password=<client_secret>`;
14
+ console.log('\nTo setup docker image secret for the pulling the agent docker images, run the following command:', _chalk.default.cyan(`\n${dockerSecretCmd}`), _chalk.default.cyan(`\n`), _chalk.default.white(`\n* client_id - service account id for your Amplify Platform organization`), _chalk.default.white(`\n* client_secret - service account secret for your Amplify Platform organization`), _chalk.default.white(`\n* image-pull-secret - Kubernetes secret name with docker config to pull images`));
15
+ };
16
+ exports.helmImageSecretInfo = helmImageSecretInfo;
17
+ const helmInstallInfo = async (agentType, namespace, agentInfo) => {
18
+ let helmInstallCmd = "";
19
+ agentInfo.forEach(function (entry) {
20
+ helmInstallCmd += `helm upgrade --install --namespace ${namespace} ${entry.helmReleaseName} ${entry.helmChartName} \\`;
21
+ helmInstallCmd += `\n -f ${entry.overrideFileName} \\`;
22
+ helmInstallCmd += `\n ${entry.imageSecretOverrides}\n`;
23
+ });
24
+ console.log(`\nTo complete the ${agentType} Agent installation run the following commands:`, _chalk.default.cyan('\nhelm repo add axway https://helm.repository.axway.com --username=<client_id> --password=<client_secret>'), _chalk.default.cyan(`\nhelm repo update\n${helmInstallCmd}`), _chalk.default.white(`\n* client_id - service account id for your Amplify Platform organization`), _chalk.default.white(`\n* client_secret - service account secret for your Amplify Platform organization`), _chalk.default.white(`\n* image-pull-secret - Kubernetes secret name with docker config to pull images`));
25
+ };
26
+ exports.helmInstallInfo = helmInstallInfo;
@@ -65,7 +65,7 @@ const askConfigType = async () => {
65
65
  return _types.AgentConfigTypes.DOCKERIZED;
66
66
  };
67
67
  exports.askConfigType = askConfigType;
68
- const gatewayConnectivity = async (installConfig, apiServerClient, defsManager) => {
68
+ const gatewayConnectivity = async installConfig => {
69
69
  let istioValues = new _istioTemplates.IstioValues();
70
70
  console.log('\nCONNECTING A KUBERNETES CLUSTER TO AMPLIFY CENTRAL\n');
71
71
  console.log(_chalk.default.gray(`The Amplify Istio Discovery Agent needs to be deployed to your Kubernetes cluster to discover APIs for publishing to Amplify Central and/or the Amplify Marketplace.
@@ -86,7 +86,7 @@ https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/m
86
86
  // Set up the following values from installConfig to be used in setupKubernetes
87
87
  istioValues.istioAgentValues.alsEnabled = installConfig.switches.isTaEnabled;
88
88
  istioValues.istioAgentValues.discoveryEnabled = installConfig.switches.isDaEnabled;
89
- const hybridOverrides = await setupKubernetes(istioValues, apiServerClient, defsManager);
89
+ const hybridOverrides = await setupKubernetes(istioValues);
90
90
  hybridOverrides.envoyFilterNamespace = istioOverrides.envoyFilterNamespace;
91
91
  istioOverrides.alsNamespace = hybridOverrides.namespace.name;
92
92
  istioOverrides.enableAls = hybridOverrides.alsMode === AlsMode.Verbose;
@@ -215,7 +215,7 @@ const askEnableDemoSvc = async () => {
215
215
  };
216
216
 
217
217
  //Setup Overrides
218
- const setupKubernetes = async (istioValues, apiServerClient, defsManager) => {
218
+ const setupKubernetes = async istioValues => {
219
219
  let istioAgentValues = istioValues.istioAgentValues;
220
220
  console.log(_chalk.default.gray(`\nThere are several steps to prepare a Kubernetes cluster for the Amplify Istio Agents.\nThe following questions collect the namespace and secret to use for the Istio gateway.\n`));
221
221
  if (istioAgentValues.alsEnabled) {
@@ -234,7 +234,7 @@ const setupKubernetes = async (istioValues, apiServerClient, defsManager) => {
234
234
 
235
235
  // set keySecretName
236
236
  istioAgentValues.keysSecretName = helpers.amplifyAgentsKeysSecret;
237
- istioAgentValues.clusterName = await (0, _helpers.askK8sClusterName)(apiServerClient, defsManager);
237
+ istioAgentValues.clusterName = await (0, _helpers.askK8sClusterName)();
238
238
  return istioAgentValues;
239
239
  };
240
240
  exports.setupKubernetes = setupKubernetes;
@@ -316,8 +316,15 @@ const createHybridOverride = overrides => {
316
316
  const overrideFileName = ConfigFiles.HybridOverrideFile;
317
317
  (0, _utils.writeTemplates)(overrideFileName, overrides, helpers.istioAgentsTemplate);
318
318
  console.log(`Istio agent override file has been placed at ${process.cwd()}/${overrideFileName}`);
319
- const installCmd = `helm upgrade --install --namespace ${overrides.istioAgentValues.namespace.name} ampc-hybrid axway/ampc-hybrid -f ${overrideFileName}`;
320
- console.log('To complete the Istio agent installation run the following commands:', _chalk.default.cyan('\n helm repo add axway https://helm.repository.axway.com --username=<client_id> --password=<client_secret>'), _chalk.default.cyan(`\n helm repo update\n ${installCmd}`), _chalk.default.cyan(`\n`), _chalk.default.white(`\n* client_id - service account id for your Amplify Platform organization`), _chalk.default.white(`\n* client_secret - service account secret for your Amplify Platform organization`));
319
+ helpers.helmImageSecretInfo(overrides.istioAgentValues.namespace.name);
320
+ let agentHelmInfo = new Set();
321
+ agentHelmInfo.add({
322
+ helmReleaseName: 'ampc-hybrid',
323
+ helmChartName: 'axway/ampc-hybrid',
324
+ overrideFileName: overrideFileName,
325
+ imageSecretOverrides: `--set da.image.pullSecret=<image-pull-secret-name> --set als.image.pullSecret=<image-pull-secret-name>`
326
+ });
327
+ helpers.helmInstallInfo('Istio', overrides.istioAgentValues.namespace.name, agentHelmInfo);
321
328
  };
322
329
  exports.createHybridOverride = createHybridOverride;
323
330
  const installPreprocess = async installConfig => {
@@ -331,7 +338,7 @@ const installPreprocess = async installConfig => {
331
338
  return installConfig;
332
339
  };
333
340
  exports.installPreprocess = installPreprocess;
334
- const completeInstall = async (installConfig, apiServerClient, defsManager) => {
341
+ const completeInstall = async installConfig => {
335
342
  // Contents of completeKubernetes moved here.
336
343
 
337
344
  const istioValues = installConfig.gatewayConfig;
@@ -349,9 +356,6 @@ const completeInstall = async (installConfig, apiServerClient, defsManager) => {
349
356
  }
350
357
  await helpers.createAmplifyAgentKeysSecret(istioValues.istioAgentValues.namespace.name, helpers.amplifyAgentsKeysSecret, 'publicKey', istioValues.centralConfig.dosaAccount.publicKey, 'privateKey', istioValues.centralConfig.dosaAccount.privateKey);
351
358
  });
352
- if (installConfig.switches.isDaEnabled) {
353
- await createEnvResources(apiServerClient, defsManager, istioValues.istioAgentValues.clusterName);
354
- }
355
359
  console.log('Generating the configuration file(s)...');
356
360
  createIstioOverride(istioValues);
357
361
  createHybridOverride(istioValues);
@@ -148,8 +148,15 @@ const dockerSuccessMsg = installConfig => {
148
148
  };
149
149
  const helmSuccessMsg = namespace => {
150
150
  console.log(`Traceable Agent override file has been placed at ${process.cwd()}/${ConfigFiles.helmOverride}`);
151
- const installCmd = `helm upgrade --install --namespace ${namespace} Traceable-agent axway/Traceable-agent -f ${ConfigFiles.helmOverride}`;
152
- console.log('To complete the Traceable Agent installation run the following commands:', _chalk.default.cyan('\n helm repo add axway https://helm.repository.axway.com --username=<client_id> --password=<client_secret>'), _chalk.default.cyan(`\n helm repo update\n ${installCmd}`), _chalk.default.cyan(`\n`), _chalk.default.white(`\n* client_id - service account id for your Amplify Platform organization`), _chalk.default.white(`\n* client_secret - service account secret for your Amplify Platform organization`));
151
+ helpers.helmImageSecretInfo(namespace);
152
+ let agentHelmInfo = new Set();
153
+ agentHelmInfo.add({
154
+ helmReleaseName: 'traceable-agent',
155
+ helmChartName: ' axway/traceable-agent',
156
+ overrideFileName: ConfigFiles.helmOverride,
157
+ imageSecretOverrides: `--set image.pullSecret=<image-pull-secret-name>`
158
+ });
159
+ helpers.helmInstallInfo('Traceable', namespace, agentHelmInfo);
153
160
  };
154
161
  const generateSuccessHelpMsg = installConfig => {
155
162
  const traceableAgentValues = installConfig.gatewayConfig;
@@ -171,6 +178,8 @@ const completeInstall = async installConfig => {
171
178
  traceableAgentValues.centralConfig = installConfig.centralConfig;
172
179
  traceableAgentValues.traceabilityConfig = installConfig.traceabilityConfig;
173
180
  if (installConfig.switches.isHelmInstall) {
181
+ traceableAgentValues.traceableSecret = helpers.amplifyAgentsCredsSecret;
182
+ traceableAgentValues.agentKeysSecret = helpers.amplifyAgentsKeysSecret;
174
183
  if (traceableAgentValues.namespace.isNew) {
175
184
  await helpers.createNamespace(traceableAgentValues.namespace.name);
176
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "3.7.0-rc.3",
3
+ "version": "3.7.0",
4
4
  "description": "Manage APIs, services and publish to the Amplify Marketplace",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {