Skip to content

Commit

Permalink
Merge pull request #129 from playground/oh-mesh-3
Browse files Browse the repository at this point in the history
update readme, comment out console.log
  • Loading branch information
playground authored Apr 10, 2024
2 parents 10f7200 + dfafcba commit 22d292b
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 9 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ NOTE: Auto-dock is a containerized service that comes with hzn-cli built into th

### To setup Edge Node Agent, All-In-One, Agent with Mesh, running CLI & agent in containers and etc.

`curl -sSL https://raw.githubusercontent.com/playground/hzn-cli/main/install.sh --output install.sh && bash ./install.sh`
```
curl -sSL https://raw.githubusercontent.com/playground/hzn-cli/main/install.sh --output install.sh && bash ./install.sh
```

#### Some example commands to work with Mesh
```
Expand Down
2 changes: 1 addition & 1 deletion 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.

20 changes: 20 additions & 0 deletions notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,23 @@ COPY script/anax.service /root/
# You can add a 2nd arg to this on the docker run cmd or the CMD statement in another dockerfile, to configure a specific >
ENTRYPOINT ["/root/anax.service", "start"]

oh-mesh

oh deploy createDeployment --name ohmesh-frontend --image quay.io/skupper/hello-world-frontend
oh deploy exposeDeployment --name ohmesh-frontend --port 8080 --type LoadBalancer

oh deploy createDeployment --name ohmesh-backend --image quay.io/skupper/hello-world-backend
oh deploy exposeDeployment --name ohmesh-backend --port 8080

k3s kubectl -n ohmesh-frontend-k3s-ns logs skupper-router-544bf88bb4-xdxd8
k3s kubectl -n ohmesh-frontend-k3s-ns logs skupper-router-544bf88bb4-xdxd8 -c agent
kubectl -n ohmesh-frontend-k3s-ns exec -i agent-6ff5f98f9-95v8r -- hzn node list
k3s kubectl get events -n ohmesh-backend-k3s-ns

k3s kubectl exec -it ohmesh-backend-f5c846596-swmxc -n ohmesh-backend-k3s-ns -- /bin/sh
cat hello
wget http://0.0.0.0:8080/api/health
cat health
wget http://0.0.0.0:8080/api/data
wget http://0.0.0.0:8080/api/date
netstat -anp
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.8.11",
"version": "0.8.12",
"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
2 changes: 1 addition & 1 deletion src/common/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class Env {
const localEnv = dotenv.parse(readFileSync(`${this.hznConfig}/.env-local`));
for(let i in localEnv) {
pEnv[i] = localEnv[i];
console.log(pEnv[i])
//console.log(pEnv[i])
}
const supportEnv = dotenv.parse(readFileSync(`${this.hznConfig}/.env-support`));
for(let i in supportEnv) {
Expand Down
2 changes: 1 addition & 1 deletion templates/ieam-in-container.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
},
"test": true,
"anaxInContainer": "docker run -d -t --restart always --name horizon1 --privileged -p 127.0.0.1:8081:8510 -e DOCKER_NAME=horizon1 -e HZN_VAR_RUN_BASE=/var/tmp/horizon/horizon1 -e ANAX_DOCKER_ENDPOINT=unix:///var/run/docker.sock -v /var/run/docker.sock:/var/run/docker.sock -v /var/horizon:/etc/default/horizon:ro -v ${CONFIG_CERT_PATH}:${HZN_MGMT_HUB_CERT_PATH} -v horizon1_var:/var/horizon/ -v horizon1_etc:/etc/horizon/ -v /var/tmp/horizon/horizon1:/var/tmp/horizon/horizon1 openhorizon/amd64_anax:2.30.0-1291",
"cliInContainer": "docker run -d -it --restart always --name auto-dock --privileged --network=\"host\" -v /var/lib/docker/volumes/mms_shared_volume/_data:/mms-shared/ -p 127.0.0.1:8888:8888 -v /var/run/docker.sock:/var/run/docker.sock -v /var/agent-install.crt:/var/agent-install.crt -v ${CONFIG_FILE_PATH}/${CONFIG_FILE_NAME}:/var/${CONFIG_FILE_NAME} -e HORIZON_URL=http://localhost:8081 -e HZN_ORG_ID=${HZN_ORG_ID} -e HZN_EXCHANGE_USER_AUTH=${HZN_EXCHANGE_USER_AUTH} -e HZN_FSS_CSSURL=${HZN_FSS_CSSURL} -e HZN_EXCHANGE_URL=${HZN_EXCHANGE_URL} -e HZN_CONFIG_FILE=/var/ieam-in-container.json -e version=v2.30.0-1291 -e css=${HZN_CSS} playbox21/auto-dock-express_amd64:1.0.6"
"cliInContainer": "docker run -d -it --restart always --name auto-dock --privileged --network=\"host\" -v /var/lib/docker/volumes/mms_shared_volume/_data:/mms-shared/ -p 127.0.0.1:8888:8888 -v /var/run/docker.sock:/var/run/docker.sock -v /var/agent-install.crt:/var/agent-install.crt -v ${CONFIG_FILE_PATH}/${CONFIG_FILE_NAME}:/var/${CONFIG_FILE_NAME} -e HORIZON_URL=http://localhost:8081 -e HZN_ORG_ID=${HZN_ORG_ID} -e HZN_EXCHANGE_USER_AUTH=${HZN_EXCHANGE_USER_AUTH} -e HZN_FSS_CSSURL=${HZN_FSS_CSSURL} -e HZN_EXCHANGE_URL=${HZN_EXCHANGE_URL} -e HZN_CONFIG_FILE=/var/${CONFIG_FILE_NAME} -e version=v2.30.0-1291 -e css=${HZN_CSS} playbox21/auto-dock-express_amd64:1.0.6"
}

2 changes: 1 addition & 1 deletion templates/ieam-m1-incontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@
},
"test": true,
"anaxInContainer": "docker run -d -t --restart always --name horizon1 --privileged -p 127.0.0.1:8081:8510 -e DOCKER_NAME=horizon1 -e HZN_VAR_RUN_BASE=/var/tmp/horizon/horizon1 -e ANAX_DOCKER_ENDPOINT=unix:///var/run/docker.sock -v /var/run/docker.sock:/var/run/docker.sock -v /var/horizon:/etc/default/horizon:ro -v ${CONFIG_CERT_PATH}:${HZN_MGMT_HUB_CERT_PATH} -v horizon1_var:/var/horizon/ -v horizon1_etc:/etc/horizon/ -v /var/tmp/horizon/horizon1:/var/tmp/horizon/horizon1 openhorizon/arm64_anax:2.30.0-1194",
"cliInContainer": "docker run -d -it --restart always --name auto-dock --privileged --network=\"host\" -v /var/lib/docker/volumes/mms_shared_volume/_data:/mms-shared/ -p 127.0.0.1:8888:8888 -v /var/run/docker.sock:/var/run/docker.sock -v /var/agent-install.crt:/var/agent-install.crt -v ${CONFIG_FILE_PATH}/${CONFIG_FILE_NAME}:/var/${CONFIG_FILE_NAME} -e HORIZON_URL=http://localhost:8081 -e HZN_ORG_ID=${HZN_ORG_ID} -e HZN_EXCHANGE_USER_AUTH=${HZN_EXCHANGE_USER_AUTH} -e HZN_FSS_CSSURL=${HZN_FSS_CSSURL} -e HZN_EXCHANGE_URL=${HZN_EXCHANGE_URL} -e HZN_CONFIG_FILE=/var/fyre-in-container.json -e version=v2.30.0-1291 -e css=${HZN_CSS} playbox21/auto-dock-express_arm64:1.0.6"
"cliInContainer": "docker run -d -it --restart always --name auto-dock --privileged --network=\"host\" -v /var/lib/docker/volumes/mms_shared_volume/_data:/mms-shared/ -p 127.0.0.1:8888:8888 -v /var/run/docker.sock:/var/run/docker.sock -v /var/agent-install.crt:/var/agent-install.crt -v ${CONFIG_FILE_PATH}/${CONFIG_FILE_NAME}:/var/${CONFIG_FILE_NAME} -e HORIZON_URL=http://localhost:8081 -e HZN_ORG_ID=${HZN_ORG_ID} -e HZN_EXCHANGE_USER_AUTH=${HZN_EXCHANGE_USER_AUTH} -e HZN_FSS_CSSURL=${HZN_FSS_CSSURL} -e HZN_EXCHANGE_URL=${HZN_EXCHANGE_URL} -e HZN_CONFIG_FILE=/var/${CONFIG_FILE_NAME} -e version=v2.30.0-1291 -e css=${HZN_CSS} playbox21/auto-dock-express_arm64:1.0.6"
}
Loading

0 comments on commit 22d292b

Please sign in to comment.