Skip to content

Commit

Permalink
add HZN_MGMT_HUB_CERT_PATH to horizon file
Browse files Browse the repository at this point in the history
  • Loading branch information
playground committed Jul 6, 2023
1 parent 76198f8 commit 8011926
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 17 deletions.
33 changes: 27 additions & 6 deletions build/common/src/env.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/common/src/env.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hzn-cli",
"version": "0.5.12",
"version": "0.5.13",
"description": "Open Horizon CLI toolkit helps streamline the process of preparing node agents and perform tasks between orgs environments",
"main": "./build/index.js",
"bin": {
Expand Down
20 changes: 11 additions & 9 deletions src/common/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,18 @@ export class Env {
});
}
setAdditionalEnv() {
let mmsContainer = pEnv.MMS_CONTAINER_NAME || pEnv.MMS_SERVICE_NAME;
let container = pEnv.SERVICE_CONTAINER_NAME || pEnv.SERVICE_NAME;
let registry = '';
if(this.getDockerRegistry() == 'quay.io') {
registry = 'quay.io/';
if(pEnv.SERVICE_CONTAINER_NAME == pEnv.SERVICE_NAME) {
let mmsContainer = pEnv.MMS_CONTAINER_NAME || pEnv.MMS_SERVICE_NAME;
let container = pEnv.SERVICE_CONTAINER_NAME || pEnv.SERVICE_NAME;
let registry = '';
if(this.getDockerRegistry() == 'quay.io') {
registry = 'quay.io/';
}
pEnv.MMS_PATTERN_NAME = `pattern-${pEnv.MMS_SERVICE_NAME}-${pEnv.ARCH}`;
pEnv.MMS_CONTAINER = `${registry}${pEnv.YOUR_DOCKERHUB_ID}/${mmsContainer}_${pEnv.ARCH}:${pEnv.MMS_SERVICE_VERSION}`.replace(/\r?\n|\r/g, '')
pEnv.PATTERN_NAME = `pattern-${pEnv.SERVICE_NAME}`;
pEnv.SERVICE_CONTAINER = `${registry}${pEnv.YOUR_DOCKERHUB_ID}/${container}_${pEnv.ARCH}:${pEnv.SERVICE_VERSION}`.replace(/\r?\n|\r/g, '')
}
pEnv.MMS_PATTERN_NAME = `pattern-${pEnv.MMS_SERVICE_NAME}-${pEnv.ARCH}`;
pEnv.MMS_CONTAINER = `${registry}${pEnv.YOUR_DOCKERHUB_ID}/${mmsContainer}_${pEnv.ARCH}:${pEnv.MMS_SERVICE_VERSION}`.replace(/\r?\n|\r/g, '')
pEnv.PATTERN_NAME = `pattern-${pEnv.SERVICE_NAME}`;
pEnv.SERVICE_CONTAINER = `${registry}${pEnv.YOUR_DOCKERHUB_ID}/${container}_${pEnv.ARCH}:${pEnv.SERVICE_VERSION}`.replace(/\r?\n|\r/g, '')
}
updateContainerAndServiceNames() {
console.log('update', this.getEdgeDeploy(), this.getEdgeOwner(), this.getServiceContainerName(), this.getServiceContainerName())
Expand Down
3 changes: 3 additions & 0 deletions src/common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ export class Utils {
if(key == 'HZN_NODE_ID') {
content += `${key}=${pEnv.HZN_DEVICE_ID}`
}
if(key == 'HZN_MGMT_HUB_CERT_PATH') {
content += `${key}=${pEnv.CONFIG_CERT_PATH}`
}
}
})
console.log(content)
Expand Down

0 comments on commit 8011926

Please sign in to comment.