Skip to content

Commit

Permalink
Merge pull request #127 from playground/oh-mesh-3
Browse files Browse the repository at this point in the history
add templates and update readme
  • Loading branch information
playground authored Apr 5, 2024
2 parents 5531382 + 010bd2c commit 10f7200
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 3 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,18 @@ Register agent with Policy
Would you like to proceed to install Management Hub: Y/n?
prompt: answer: y
```

# Install Docker on Ubuntu
Note: Don't use sudo snap install docker

```
- sudo apt update
- sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- apt-cache policy docker-ce
- sudo apt install docker-ce -y
- sudo systemctl status docker
More details here: https://phoenixnap.com/kb/install-docker-on-ubuntu-20-04
```
4 changes: 3 additions & 1 deletion templates/ieam-in-container.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"HZN_CSS": true,
"HZN_MGMT_HUB_CERT_PATH": "/var/agent-install.crt",
"CONFIG_CERT_PATH": "/home/mesh/cert/ieam/agent-install.crt",
"CONFIG_FILE_PATH": "/Users/jeff/sandbox/templates/3-22-2023",
"CONFIG_FILE_NAME": "ieam-in-container.json",
"ANAX": "api/v1/objects/IBM/agent_files/agent-install.sh/data"
},
"service": {
Expand Down Expand Up @@ -62,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 /home/mesh/ieam-in-container.json:/var/ieam-in-container.json -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/ieam-in-container.json -e version=v2.30.0-1291 -e css=${HZN_CSS} playbox21/auto-dock-express_amd64:1.0.6"
}

68 changes: 68 additions & 0 deletions templates/ieam-m1-incontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"org": {
"HZN_ORG_ID": "biz",
"HZN_DEVICE_TOKEN": "",
"HZN_DEVICE_ID": "dragon-head",
"HZN_EXCHANGE_USER_AUTH": "<iamapikey>",
"HZN_EXCHANGE_URL": "https://cp-console.ieam42-edge-8e873dd4c685acf6fd2f13f4cdfb05bb-0000.us-south.containers.appdomain.cloud/edge-exchange/v1",
"HZN_FSS_CSSURL": "https://cp-console.ieam42-edge-8e873dd4c685acf6fd2f13f4cdfb05bb-0000.us-south.containers.appdomain.cloud/edge-css",
"HZN_AGBOT_URL": "https://cp-console.ieam42-edge-8e873dd4c685acf6fd2f13f4cdfb05bb-0000.us-south.containers.appdomain.cloud/edge-agbot/",
"HZN_SDO_SVC_URL": "https://cp-console.ieam42-edge-8e873dd4c685acf6fd2f13f4cdfb05bb-0000.us-south.containers.appdomain.cloud/edge-sdo-ocs/api",
"HZN_AGENT_PORT": "8510",
"HZN_CSS": true,
"HZN_MGMT_HUB_CERT_PATH": "/var/agent-install.crt",
"CONFIG_CERT_PATH": "/home/mesh/agent-install.crt",
"CONFIG_FILE_PATH": "/Users/jeff/sandbox/templates/3-22-2023",
"CONFIG_FILE_NAME": "ieam-m1-in-container.json",
"ANAX": "api/v1/objects/IBM/agent_files/agent-install.sh/data"
},
"service": {
"SERVICE_NAME": "mms-agent",
"SERVICE_CONTAINER_NAME": "mms-agent",
"SERVICE_VERSION": "1.0.0",
"SERVICE_VERSION_RANGE_UPPER": "1.0.0",
"SERVICE_VERSION_RANGE_LOWER": "1.0.0",
"SERVICE_CONTAINER_CREDS": "",
"VOLUME_MOUNT": "/mms-shared",
"MMS_SHARED_VOLUME": "mms_shared_volume",
"MMS_OBJECT_TYPE": "mms_agent_config",
"MMS_OBJECT_ID": "mms_agent_config_json",
"MMS_OBJECT_FILE": "config/config.json",
"MMS_CONTAINER_CREDS": "",
"MMS_CONTAINER_NAME": "mms-agent",
"MMS_SERVICE_NAME": "mms-agent",
"MMS_SERVICE_VERSION": "1.0.0",
"MMS_SERVICE_FALLBACK_VERSION": "1.0.0",
"UPDATE_FILE_NAME": "mms-agent-config.json"
},
"folders": [
"/var/tmp/horizon/horizon1/fss-domain-socket",
"/var/tmp/horizon/horizon1/ess-auth",
"/var/tmp/horizon/horizon1/secrets",
"/var/tmp/horizon/horizon1/nmp"
],
"local": {
"YOUR_DOCKERHUB_ID": "playbox21",
"DOCKER_REGISTRY": "hub.docker.com",
"DOCKER_TOKEN": "<docker token>"
},
"register": {
"policy": {
"properties": [
{
"name": "openhorizon.allowPrivileged",
"value": true
}
],
"deployment": {
"properties": [
{"name": "mms-agent", "value": "MMS Agent"},
{"name": "liquid-prep", "value": "Liquid Prep"}
]
}
}
},
"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"
}
6 changes: 4 additions & 2 deletions templates/open-horizon-in-container.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"org": {
"HZN_ORG_ID": "playground",
"HZN_DEVICE_TOKEN": "",
"HZN_DEVICE_ID": "dragon-box",
"HZN_DEVICE_ID": "dragon-head",
"HZN_EXCHANGE_USER_AUTH": "<iamapikey>",
"HZN_EXCHANGE_URL": "http://132.177.125.232:3090/v1",
"HZN_FSS_CSSURL": "http://132.177.125.232:9443/",
Expand All @@ -12,6 +12,8 @@
"HZN_CSS": false,
"CONFIG_CERT_PATH": "/home/mesh/cert/agent-install.crt",
"AGENT_INSTALL_CONFIG": "/home/mesh/cert/agent-install.cfg",
"CONFIG_FILE_PATH": "/Users/jeff/sandbox/templates/3-22-2023",
"CONFIG_FILE_NAME": "open-horizon-in-container.json",
"ANAX": "https://github.com/open-horizon/anax/releases/download/v2.30.0-1291"
},
"service": {
Expand Down Expand Up @@ -62,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 -v /var/run/docker.sock:/var/run/docker.sock -v /var/horizon:/etc/default/horizon:ro -v /var/agent-install.crt:/var/agent-install.crt -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 /home/mesh/oh-in-container.json:/var/oh-in-container.json -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/oh-in-container.json -e version=v2.30.0-1291 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/open-horizon-in-container.json -e version=v2.30.0-1291 playbox21/auto-dock-express_amd64:1.0.6"
}

69 changes: 69 additions & 0 deletions templates/open-horizon-m1-in-container.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"org": {
"HZN_ORG_ID": "playground",
"HZN_DEVICE_TOKEN": "",
"HZN_DEVICE_ID": "dragon-head",
"HZN_EXCHANGE_USER_AUTH": "<iamapikey>",
"HZN_EXCHANGE_URL": "http://132.177.125.232:3090/v1",
"HZN_FSS_CSSURL": "http://132.177.125.232:9443/",
"HZN_AGBOT_URL": "http://132.177.125.232:3111",
"HZN_SDO_SVC_URL": "http://132.177.125.232:9008/api",
"HZN_AGENT_PORT": "8510",
"HZN_CSS": false,
"CONFIG_CERT_PATH": "/home/mesh/cert/agent-install.crt",
"AGENT_INSTALL_CONFIG": "/home/mesh/cert/agent-install.cfg",
"CONFIG_FILE_PATH": "/Users/jeff/sandbox/templates/3-22-2023",
"CONFIG_FILE_NAME": "open-horizon-m1-in-container.json",
"ANAX": "https://github.com/open-horizon/anax/releases/download/v2.30.0-1291"
},
"service": {
"SERVICE_NAME": "mms-agent",
"SERVICE_CONTAINER_NAME": "mms-agent",
"SERVICE_VERSION": "1.0.0",
"SERVICE_VERSION_RANGE_UPPER": "1.0.0",
"SERVICE_VERSION_RANGE_LOWER": "1.0.0",
"SERVICE_CONTAINER_CREDS": "",
"VOLUME_MOUNT": "/mms-shared",
"MMS_SHARED_VOLUME": "mms_shared_volume",
"MMS_OBJECT_TYPE": "mms_agent_config",
"MMS_OBJECT_ID": "mms_agent_config_json",
"MMS_OBJECT_FILE": "config/config.json",
"MMS_CONTAINER_CREDS": "",
"MMS_CONTAINER_NAME": "mms-agent",
"MMS_SERVICE_NAME": "mms-agent",
"MMS_SERVICE_VERSION": "1.0.0",
"MMS_SERVICE_FALLBACK_VERSION": "1.0.0",
"UPDATE_FILE_NAME": "mms-agent-config.json"
},
"folders": [
"/var/tmp/horizon/horizon1/fss-domain-socket",
"/var/tmp/horizon/horizon1/ess-auth",
"/var/tmp/horizon/horizon1/secrets",
"/var/tmp/horizon/horizon1/nmp"
],
"local": {
"YOUR_DOCKERHUB_ID": "playbox21",
"DOCKER_REGISTRY": "hub.docker.com",
"DOCKER_TOKEN": "<docker token>"
},
"register": {
"policy": {
"properties": [
{
"name": "openhorizon.allowPrivileged",
"value": true
}
],
"deployment": {
"properties": [
{"name": "mms-agent", "value": "MMS Agent"},
{"name": "liquid-prep", "value": "Liquid Prep"}
]
}
}
},
"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 -v /var/run/docker.sock:/var/run/docker.sock -v /var/horizon:/etc/default/horizon:ro -v /var/agent-install.crt:/var/agent-install.crt -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-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/open-horizon-m1-in-container.json -e version=v2.30.0-1291 playbox21/auto-dock-express_arm64:1.0.6"
}

0 comments on commit 10f7200

Please sign in to comment.