@axway/axway-central-cli 2.12.3 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -148,16 +148,20 @@ CONFIG COMMANDS:
148
148
 
149
149
  ### Region configuration
150
150
 
151
- Region configuration identifies the Amplify Central instance whose servers you want to send your requests to. Possible values are `US` or `EU` (`US` is used by default):
151
+ Region configuration identifies the Amplify Central instance to whose servers you want to send your requests. Your current authenticated account's org setting is used by default (i.e., if your org belongs to the APAC region, it is going to be used automatically).
152
+
153
+ You can always override the current region setting by configuring CLI with the following command (possible values are `US`, `EU` or `AP`):
152
154
 
153
155
  ```bash
154
156
  # to point CLI to EU region:
155
157
  axway central config set --region=EU
156
158
  # to point CLI to US region:
157
159
  axway central config set --region=US
160
+ # to point CLI to APAC region:
161
+ axway central config set --region=AP
158
162
  ```
159
163
 
160
- You can always override current region setting in every command by adding optional `--region=<value>` flag:
164
+ Or by adding optional `--region=<value>` flag with any command:
161
165
 
162
166
  ```bash
163
167
  axway central get environments --region=EU
@@ -82,7 +82,7 @@ const action = async ({
82
82
  log(`Writing ${_types.ConfigTypes.APIC_DEPLOYMENT}`);
83
83
 
84
84
  if (!Object.values(_types.APICDeployments).includes(argv.apicDeployment)) {
85
- throw Error('"--apic-deployment" value is not correct, please provide one of: prod, staging, prod-eu, staging-eu, qa, or teams. For example: "axway central config set --apic-deployment=staging"');
85
+ throw Error('"--apic-deployment" value is not correct, please provide one of: prod, staging, prod-ap, prod-eu, staging-eu, qa, or teams. For example: "axway central config set --apic-deployment=staging"');
86
86
  }
87
87
 
88
88
  config[_types.ConfigTypes.APIC_DEPLOYMENT] = argv.apicDeployment;
@@ -321,6 +321,8 @@ const completeInstall = async installConfig => {
321
321
  v7AgentValues.centralConfig = installConfig.centralConfig;
322
322
  v7AgentValues.traceabilityConfig = installConfig.traceabilityConfig;
323
323
  v7AgentValues.isGatewayOnly = installConfig.switches.isGatewayOnly;
324
+ v7AgentValues.daVersion = installConfig.daVersion;
325
+ v7AgentValues.taVersion = installConfig.taVersion;
324
326
 
325
327
  if (installConfig.switches.isHelmInstall) {
326
328
  if (v7AgentValues.namespace.isNew) {
@@ -86,6 +86,14 @@ const getIngestionHost = (region, env, apicDeployment, protocol = _types.Ingesti
86
86
  [_types.Platforms.staging]: {
87
87
  [_types.APICDeployments.EUStaging]: _types.IngestionHosts.EUStaging
88
88
  }
89
+ },
90
+ [_types.Regions.AP]: {
91
+ [_types.Platforms.prod]: {
92
+ [_types.APICDeployments.AP]: _types.IngestionHosts.AP
93
+ },
94
+ [_types.Platforms.staging]: {
95
+ [_types.APICDeployments.APStaging]: _types.IngestionHosts.APStaging
96
+ }
89
97
  }
90
98
  },
91
99
  [_types.IngestionProtocol.HTTPS]: {
@@ -104,6 +112,14 @@ const getIngestionHost = (region, env, apicDeployment, protocol = _types.Ingesti
104
112
  [_types.Platforms.staging]: {
105
113
  [_types.APICDeployments.EU]: _types.IngestionHTTPHosts.EUStaging
106
114
  }
115
+ },
116
+ [_types.Regions.AP]: {
117
+ [_types.Platforms.prod]: {
118
+ [_types.APICDeployments.AP]: _types.IngestionHTTPHosts.AP
119
+ },
120
+ [_types.Platforms.staging]: {
121
+ [_types.APICDeployments.AP]: _types.IngestionHTTPHosts.APStaging
122
+ }
107
123
  }
108
124
  }
109
125
  };
@@ -50,6 +50,10 @@ class V7AgentValues {
50
50
 
51
51
  _defineProperty(this, "traceabilityConfig", void 0);
52
52
 
53
+ _defineProperty(this, "daVersion", void 0);
54
+
55
+ _defineProperty(this, "taVersion", void 0);
56
+
53
57
  this.amplifyAgentCreds = _.amplifyAgentsCredsSecret;
54
58
  this.amplifyAgentKeys = _.amplifyAgentsKeysSecret;
55
59
  this.apiGatewayAuthPass = '';
@@ -70,6 +74,8 @@ class V7AgentValues {
70
74
  };
71
75
  this.centralConfig = new _types.CentralAgentConfig();
72
76
  this.traceabilityConfig = new _types.TraceabilityConfig();
77
+ this.daVersion = '';
78
+ this.taVersion = '';
73
79
  }
74
80
 
75
81
  }
@@ -167,7 +173,7 @@ image:
167
173
  repository: axway.jfrog.io/ampc-public-docker-release/agent/v7-traceability-agent
168
174
  pullPolicy: Always
169
175
  # Overrides the image tag whose default is the chart appVersion.
170
- tag: "latest"
176
+ tag: "{{taVersion}}"
171
177
 
172
178
  imagePullSecrets: []
173
179
  nameOverride: ""
@@ -180,39 +186,66 @@ statusPort: 8990
180
186
  # https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/agent-variables/index.html#common-variables-to-both-agents
181
187
  # https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/agent-variables/index.html#specific-variables-for-traceability-agent
182
188
  env:
183
- APIGATEWAY_HEALTHCHECKPORT: 8090
184
- APIGATEWAY_HEALTHCHECKPROTOCOL: "https"
185
- APIGATEWAY_HEALTHCHECKURI: login
186
- APIGATEWAY_HOST: {{apiGatewayHost}}
187
- APIGATEWAY_PORT: {{apiGatewayPort}}
188
- APIMANAGER_HOST: {{apiManagerHost}}
189
- APIMANAGER_PORT: {{apiManagerPort}}
189
+ LOG_LEVEL: info
190
190
  CENTRAL_AGENTNAME: {{centralConfig.taAgentName}}
191
- CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
191
+ CENTRAL_URL: {{centralConfig.url}}
192
192
  CENTRAL_AUTH_URL: {{centralConfig.authUrl}}
193
+ CENTRAL_SINGLEURL: {{centralConfig.singleEntryPointUrl}}
193
194
  CENTRAL_DEPLOYMENT: {{centralConfig.deployment}}
194
- CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
195
+ CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
195
196
  CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
196
- {{#compare . centralConfig.ampcTeamName "" operator="!=" }}
197
- CENTRAL_TEAM: {{centralConfig.ampcTeamName}}
198
- {{/compare}}
199
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
200
- CENTRAL_URL: {{centralConfig.url}}
201
- EVENT_LOG_FILE_PATHS: /events/*.log
202
- LOG_LEVEL: info
203
- LOG_FILE_PATH_INSTANCE: "axwayDemo"
197
+ CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
198
+ CENTRAL_TEAM: "{{centralConfig.ampcTeamName}}"
199
+ {{#if isOpenTraffic}}
200
+ # API Gateway open traffic logs
201
+ EVENT_LOG_INPUT: false
202
+ OPENTRAFFIC_LOG_INPUT: true
203
+ OPENTRAFFIC_LOG_PATHS: /events/*.log
204
+ {{else}}
205
+ # API Gateway event logs
206
+ EVENT_LOG_PATHS: /events/*.log
207
+ {{/if}}
204
208
  TRACEABILITY_HOST: {{traceabilityConfig.host}}
205
209
  TRACEABILITY_PROTOCOL: {{traceabilityConfig.protocol}}
206
210
  TRACEABILITY_SAMPLING_PERCENTAGE: {{traceabilityConfig.samplingPercentage}}
207
211
  TRACEABILITY_SAMPLING_REPORTALLERRORS: {{traceabilityConfig.samplingReportAllErrors}}
212
+
213
+ {{#if isGatewayOnly}}
214
+ APIGATEWAY_ONLY: {{isGatewayOnly}}
215
+ {{else}}
216
+ APIMANAGER_HOST: {{apiManagerHost}}
217
+ APIMANAGER_PORT: {{apiManagerPort}}
218
+ # flip to true if API manager is using a self signed certificate
219
+ APIMANAGER_SSL_INSECURESKIPVERIFY: false
220
+ {{/if}}
221
+ {{#if isOpenTraffic}}
222
+ {{else}}
223
+ APIGATEWAY_HOST: {{apiGatewayHost}}
224
+ APIGATEWAY_PORT: {{apiGatewayPort}}
225
+ # flip to true if API manager is using a self signed certificate
226
+ APIGATEWAY_SSL_INSECURESKIPVERIFY: false
227
+ APIGATEWAY_HEALTHCHECKPORT: 8090
228
+ APIGATEWAY_HEALTHCHECKPROTOCOL: "https"
229
+ APIGATEWAY_HEALTHCHECKURI: login
230
+ {{/if}}
208
231
 
209
232
  # The below secret are a pre-requisite. Please refer to the readme file for more info on it.
210
233
  secrets:
211
234
  credentials: {{amplifyAgentCreds}}
212
235
  keys: {{amplifyAgentKeys}}
213
236
 
237
+ podAnnotations:
238
+
239
+ podSecurityContext:
240
+ supplementalGroups: [ 2500 ]
241
+ fsGroupChangePolicy: "OnRootMismatch"
242
+
214
243
  securityContext:
215
244
 
245
+ tolerations:
246
+
247
+ affinity:
248
+
216
249
  nodeSelector: {}
217
250
 
218
251
  # Add additional labels to the agent deployment which may be required based on your configuration
@@ -243,6 +276,7 @@ persistentVolumeClaimConfig:
243
276
  storageClass: gp2-csi
244
277
  name: data-claim
245
278
  events:
279
+ # update this value to match the name of the volume claim that is used for the event logs
246
280
  name: events-claim
247
281
  `;
248
282
  };
@@ -299,7 +333,7 @@ image:
299
333
  repository: axway.jfrog.io/ampc-public-docker-release/agent/v7-discovery-agent
300
334
  pullPolicy: Always
301
335
  # Overrides the image tag whose default is the chart appVersion.
302
- tag: "latest"
336
+ tag: "{{daVersion}}"
303
337
 
304
338
  imagePullSecrets: []
305
339
  nameOverride: ""
@@ -312,27 +346,37 @@ statusPort: 8989
312
346
  # https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/agent-variables/index.html#common-variables-to-both-agents
313
347
  # https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/agent-variables/index.html#specific-variables-for-discovery-agent
314
348
  env:
315
- APIMANAGER_HOST: {{apiManagerHost}}
316
- APIMANAGER_PORT: {{apiManagerPort}}
349
+ LOG_LEVEL: info
317
350
  CENTRAL_AGENTNAME: {{centralConfig.daAgentName}}
318
- CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
351
+ CENTRAL_URL: {{centralConfig.url}}
319
352
  CENTRAL_AUTH_URL: {{centralConfig.authUrl}}
320
- CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
353
+ CENTRAL_SINGLEURL: {{centralConfig.singleEntryPointUrl}}
354
+ CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
321
355
  CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
322
- {{#compare . centralConfig.ampcTeamName "" operator="!=" }}
323
- CENTRAL_TEAM: {{centralConfig.ampcTeamName}}
324
- {{/compare}}
325
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
326
- CENTRAL_URL: {{centralConfig.url}}
327
- LOG_LEVEL: info
356
+ CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
357
+ CENTRAL_TEAM: "{{centralConfig.ampcTeamName}}"
358
+ APIMANAGER_HOST: {{apiManagerHost}}
359
+ APIMANAGER_PORT: {{apiManagerPort}}
360
+ # flip to true if API manager is using a self signed certificate
361
+ APIMANAGER_SSL_INSECURESKIPVERIFY: false
328
362
 
329
363
  # The below secret are a pre-requisite. Please refer to the readme file for more info on it.
330
364
  secrets:
331
365
  credentials: {{amplifyAgentCreds}}
332
366
  keys: {{amplifyAgentKeys}}
333
367
 
368
+ podAnnotations:
369
+
370
+ podSecurityContext:
371
+ supplementalGroups: [ 2500 ]
372
+ fsGroupChangePolicy: "OnRootMismatch"
373
+
334
374
  securityContext:
335
375
 
376
+ tolerations:
377
+
378
+ affinity:
379
+
336
380
  nodeSelector: {}
337
381
 
338
382
  # Add additional labels to the agent deployment which may be required based on your configuration
@@ -343,6 +343,14 @@ const getCondorHost = (region, env, apicDeployment) => {
343
343
  [_types.Platforms.staging]: {
344
344
  [_types.APICDeployments.EUStaging]: _types.IngestionHosts.EUStaging
345
345
  }
346
+ },
347
+ [_types.Regions.AP]: {
348
+ [_types.Platforms.prod]: {
349
+ [_types.APICDeployments.AP]: _types.IngestionHosts.AP
350
+ },
351
+ [_types.Platforms.staging]: {
352
+ [_types.APICDeployments.APStaging]: _types.IngestionHosts.APStaging
353
+ }
346
354
  }
347
355
  };
348
356
  return ((_hosts$region = hosts[region]) === null || _hosts$region === void 0 ? void 0 : (_hosts$region$env = _hosts$region[env]) === null || _hosts$region$env === void 0 ? void 0 : _hosts$region$env[apicDeployment]) || _types.IngestionHosts.US;
@@ -179,6 +179,10 @@ const getApicDeployment = (region, env) => {
179
179
  [_types.Regions.EU]: {
180
180
  [_types.Platforms.prod]: _types.APICDeployments.EU,
181
181
  [_types.Platforms.staging]: _types.APICDeployments.EUStaging
182
+ },
183
+ [_types.Regions.AP]: {
184
+ [_types.Platforms.prod]: _types.APICDeployments.AP,
185
+ [_types.Platforms.staging]: _types.APICDeployments.APStaging
182
186
  }
183
187
  };
184
188
  const savedDeployment = new _CliConfigManager.CliConfigManager().getAll()['apic-deployment'];
@@ -73,7 +73,7 @@ class CoreConfigController {
73
73
  const baseUrl = process.env.AXWAY_CENTRAL_BASE_URL || configCtrl.get(_CliConfigManager.CliConfigKeys.BASE_URL); // environment defined by using central cli "base-url" or axway "env" configs if set,
74
74
  // otherwise its undefined (equals to prod)
75
75
 
76
- const environment = !baseUrl || baseUrl === _types.ProdBaseUrls.US || baseUrl === _types.ProdBaseUrls.EU ? config.get('env') : 'staging';
76
+ const environment = !baseUrl || baseUrl === _types.ProdBaseUrls.US || baseUrl === _types.ProdBaseUrls.EU || baseUrl === _types.ProdBaseUrls.AP ? config.get('env') : 'staging';
77
77
  log(`getAuthInfo, baseUrl = ${baseUrl}, environment = ${environment}`);
78
78
  const {
79
79
  sdk
@@ -88,7 +88,8 @@ exports.AuthUrls = AuthUrls;
88
88
 
89
89
  const SingleEntryPointUrls = {
90
90
  US: 'https://ingestion.platform.axway.com',
91
- EU: 'https://ingestion-eu.platform.axway.com'
91
+ EU: 'https://ingestion-eu.platform.axway.com',
92
+ AP: 'https://ingestion-ap-sg.platform.axway.com'
92
93
  };
93
94
  exports.SingleEntryPointUrls = SingleEntryPointUrls;
94
95
  let Regions;
@@ -97,6 +98,7 @@ exports.Regions = Regions;
97
98
  (function (Regions) {
98
99
  Regions["US"] = "US";
99
100
  Regions["EU"] = "EU";
101
+ Regions["AP"] = "AP";
100
102
  })(Regions || (exports.Regions = Regions = {}));
101
103
 
102
104
  let Platforms;
@@ -109,8 +111,8 @@ exports.Platforms = Platforms;
109
111
 
110
112
  const ProdBaseUrls = {
111
113
  US: 'https://apicentral.axway.com',
112
- // change me after some time: https://central.us.axway.com
113
- EU: 'https://central.eu-fr.axway.com'
114
+ EU: 'https://central.eu-fr.axway.com',
115
+ AP: 'https://central.ap-sg.axway.com'
114
116
  };
115
117
  exports.ProdBaseUrls = ProdBaseUrls;
116
118
  let IngestionProtocol;
@@ -126,19 +128,24 @@ const IngestionHosts = {
126
128
  EUStaging: 'ingestion.visibility.eu-fr.axwaypreprod.net:5044',
127
129
  QA: 'ingestion.condor.staging.axwaytest.net:5044',
128
130
  US: 'ingestion.datasearch.axway.com:5044',
129
- USStaging: 'ingestion.search.axwaytest.net:5044'
131
+ USStaging: 'ingestion.search.axwaytest.net:5044',
132
+ AP: 'ingestion.visibility.ap-sg.axway.com:5044',
133
+ APStaging: 'ingestion.visibility.ap-sg.axwaypreprod.net:5044'
130
134
  };
131
135
  exports.IngestionHosts = IngestionHosts;
132
136
  const IngestionHTTPHosts = {
133
137
  US: 'ingestion.datasearch.axway.com:443',
134
138
  USStaging: 'ingestion.search.axwaytest.net:443',
135
139
  EU: 'ingestion.visibility.eu-fr.axway.com:443',
136
- EUStaging: 'ingestion.visibility.eu-fr.axwaypreprod.net:443'
140
+ EUStaging: 'ingestion.visibility.eu-fr.axwaypreprod.net:443',
141
+ AP: 'ingestion.visibility.ap-sg.axway.com:443',
142
+ APStaging: 'ingestion.visibility.ap-sg.axwaypreprod.net:443'
137
143
  };
138
144
  exports.IngestionHTTPHosts = IngestionHTTPHosts;
139
145
  const IngestionHostsHTTP = {
140
146
  US: 'ingestion.datasearch.axway.com:443',
141
- EU: 'ingestion.visibility.eu-fr.axway.com:443'
147
+ EU: 'ingestion.visibility.eu-fr.axway.com:443',
148
+ AP: 'ingestion.visibility.ap-sg.axway.com:443'
142
149
  };
143
150
  exports.IngestionHostsHTTP = IngestionHostsHTTP;
144
151
  const IngestionProtocolToHosts = {
@@ -152,7 +159,9 @@ const APICDeployments = {
152
159
  QA: 'qa',
153
160
  US: 'prod',
154
161
  USStaging: 'staging',
155
- TEAMS: 'teams'
162
+ TEAMS: 'teams',
163
+ AP: 'prod-ap',
164
+ APStaging: 'preprod'
156
165
  };
157
166
  exports.APICDeployments = APICDeployments;
158
167
  const commonCmdArgsDescription = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "2.12.3",
3
+ "version": "2.13.0",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {