Giter Club home page Giter Club logo

open-horizon-integration's Introduction

open-horizon-integration

EdgeX/Open Horizon Integration (Systems Management Sub-project) | Owner: Systems Management

open-horizon-integration's People

Contributors

chainhead avatar dabooz avatar joewxboy avatar jwagantall avatar losdevnull avatar michaelestrin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-horizon-integration's Issues

Put build artifacts into build directory

Several artifacts are generated as part of the process for setting up the OH hub.

  • [ ] Move the generated artifacts to ./oh/build/
  • [ ] update make clean to remove ./oh/build

Create Document: 07 Add System Management Service

This document should demonstrate:

  1. How to add the System Management Service to the existing demo
  2. How to confirm that it is working
  3. Discover the results if System Management is used to stop, start, or restart any services under Open Horizon management

Sample Open Horizon Agent pattern should be multi-arch

The example Open Horizon Agent pattern listed in the setup instructions
is amd64. It would be better if the user could also register the pattern on an ARM based edge device.

Request to make the example pattern a multi-arch container.

The IBM team has used the Docker buildx experimental feature to build multi-arch containers.

Documentation re-factoring - Folder restructuring

The following folder structure will be used to organise the documentation better.

README.md
hub
  aws-ec2-linux-vm.md
  oracle-virtualbox-vm.md
  bare-metal.md
  docker-hub.md
agent
  ubuntu.md
  osx.md
  raspberry-pi.md
  docker-agent.md
verfication
  verify.md
pattern
policy

Notes:

  1. The README.md document will introduce the reader about the following:
    1. The scope of 'integration' between EdgeX and OpenHorizon.
    2. A navigation of this project in terms of installation of agent, hub and how to work with them with samples.
  2. Each of the folders in the folder structure will have as many files as required.

Documentation - Verify set-up with deployment of artefacts to hub and agent.

Requirement

Update documentation should have following instructions once a user has completed the installation of hub and agent.

  1. Deploy service definition to hub.
  2. Deploy pattern to hub.
  3. Register agent with hub.

Solution

  1. The verification folder will have the res folder and agent.md to enable registration of the
    agent.
  2. The patterns folder will have service.json, pattern.json and exchange.md to enable set-up of exchange.

Create Document: 05 verify Device Random Data

After following the steps in 04 and running the Device Random service, this document should:

  1. demonstrate how to verify that the data is being sent
  2. show how to modify settings like the interval data is being sent, and the range of values
  3. point to the existig documentation for the service

Bug in Makefile

After cloning the repo and going into the hub/oh folder, running make throws an error:

~/open-horizon-integration/hub/oh# make
cat: docker-compose.yml.tmpl: No such file or directory

Create Document 09: Service Definition File

Document in detail (or point to existing documentation, if it already exists) what the contents of the Service Definition file are, how to use it, and what the expected results would be.

apt package install using testing

The Agent install process is using the testing aptrepo. We cannot use the alternate updates aptrepo. Let's temporarily download and install the deb packages manually until we can migrate to the LF Edge build infrastructure and use EXF processes.

Remove the need to set the MY_IP env var during OH hub setup.

Teach the ./hub/makefile how to introspect the public IP address of the machine you're running on and use that introspected IP address during generation of the config.json file. If the introspection is not successful, make will fail. Don't forget to update the doc.

Issue #8 should be done before this one.

make clean not removing containers properly

When I run make clean in the hub/oh folder, I get the following output, which suggests the images and containers are not being removed:

root@joe-oh-hub-svcs1:~/open-horizon-integration/hub/oh# make clean
docker rm -f "agbot"
Error: No such container: agbot
makefile:244: recipe for target 'remove' failed
make: [remove] Error 1 (ignored)
docker rm -f "exchange-api"
Error: No such container: exchange-api
makefile:244: recipe for target 'remove' failed
make: [remove] Error 1 (ignored)
docker rm -f "css-api"
Error: No such container: css-api
makefile:244: recipe for target 'remove' failed
make: [remove] Error 1 (ignored)
docker rm -f "exchange-db"
Error: No such container: exchange-db
makefile:244: recipe for target 'remove' failed
make: [remove] Error 1 (ignored)
docker rm -f "css-db"
Error: No such container: css-db
makefile:244: recipe for target 'remove' failed
make: [remove] Error 1 (ignored)
sudo rm -fr /root/open-horizon-integration/hub/oh/docker-compose.yml css agbot exchange

Maybe the names have changed?

Forbidden error for getting Agent's certificate

I am getting forbidden error while accessing this url (http://pkg.bluehorizon.network/macos/certs/horizon-cli.crt) for downloading agent certificate
error:
--2021-02-03 15:53:57-- http://pkg.bluehorizon.network/macos/certs/horizon-cli.crt
Resolving pkg.bluehorizon.network (pkg.bluehorizon.network)... 13.248.196.204
Connecting to pkg.bluehorizon.network (pkg.bluehorizon.network)|13.248.196.204|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2021-02-03 15:53:57 ERROR 403: Forbidden.

ORG_ID in Anax configuration doucment

  1. When the hub was set-up, a number of environment variables were set and persisted in $HOME/.bashrc. Therefore, is the step of setting up the environment variables in hub/04-configure-anax.md required?
  2. The ORG_ID is set-up with the same value as HZN_ORG_ID. Also, the ORG_ID does not appear in the list of environment variables set-up and persisted when setting up the hub. So, what is the purpose of ORG_ID?

OSX installation message on upgrade when installing.

Running this command sudo installer -pkg "horizon-cli-2.24.18.pkg" -target / results in these messages for me.

installer: Package name is horizon-cli-2.24.18
installer: Installing at base path /
installer: The install was successful.

Whereas, the documentation reports messages related to upgradation.

installer: Package name is horizon-cli-2.24.18
installer: Upgrading at base path /
installer: The upgrade was successful.

When does the installer command respond with messages on upgradation?

agreement list is empty even after the registration is completed.!!!! [bug]

(base) nitu.gupta@nitu:~/LF-EDGE/OpenHorizon_collab/12march/open-horizon-integration/horizon-edgex$ hzn register -p pattern-edgex-amd64 --policy ./configs/node.policy
Horizon Exchange base URL: http://172.20.0.1:3090/v1
Using node ID 'nitunode' from the Horizon agent
Generated random node token
Node testorg/nitunode does not exist in the exchange with the specified token, creating/updating it...
Will proceeed with the given pattern pattern-edgex-amd64.
Updating the node policy...
Initializing the Horizon node...
Warning: no input file was specified. This is only valid if none of the services need variables set (including GPS coordinates).
However, if there is 'useInput' specified in the node already in the exchange, the useInput will be used.
Changing Horizon state to configured to register this node with Horizon...
Horizon node is registered. Workload agreement negotiation should begin shortly. Run 'hzn agreement list' to view.

When trying to see the node list

{
"id": "nitunode",
"organization": "testorg",
"pattern": "testorg/pattern-edgex-amd64",
"name": "nitunode",
"token_last_valid_time": "2020-03-12 17:53:15 +0530 IST",
"token_valid": true,
"ha": false,
"configstate": {
"state": "configured",
"last_update_time": "2020-03-12 17:53:16 +0530 IST"
},
"configuration": {
"exchange_api": "http://172.20.0.1:3090/v1/",
"exchange_version": "2.13.0",
"required_minimum_exchange_version": "2.13.0",
"preferred_exchange_version": "2.13.0",
"mms_api": "http://172.20.0.1:9443",
"architecture": "amd64",
"horizon_version": "2.25.0"
},
"connectivity": {
"firmware.bluehorizon.network": true,
"images.bluehorizon.network": true
}
}

==============
When checking the agreement list

(base) nitu.gupta@nitu:~/LF-EDGE/OpenHorizon_collab/12march/open-horizon-integration/horizon-edgex$ hzn agreement list
[]

Miscellaneous questions on installation of agent on Ubuntu

  1. Does apt-get install -y bluehorizon install agent certificates also? When installing the agent on OSX, there is an explicit step to download and install agent certificates.
  2. Does apt-get install -y bluehorizon also trigger horizon container start? Can this be overridden in case the start-up is to be done with a file other than /etc/default/horizon?

Miscellaneous questions on installation of agent on OSX.

  1. Can we look-up the version number for horizon-cli package before these commands?
wget http://pkg.bluehorizon.network/macos/horizon-cli-2.24.18.pkg
sudo installer -pkg "horizon-cli-2.24.18.pkg" -target /
  1. Is there a switch option for horizon-container start to run with the default index of 1 but some other file e.g. anax.conf in my current directory ? I am able to run with horizon-container start 1 anax.conf. Instead, is this possible horizon-container start --default-file anax.conf?

  2. Once the container has started successfully, is there a command on the Hub side to check end-to-end connectivity?

  3. Running this command sudo installer -pkg "horizon-cli-2.24.18.pkg" -target / results in these messages for me.

installer: Package name is horizon-cli-2.24.18
installer: Installing at base path /
installer: The install was successful.

Whereas, the documentation reports messages related to upgradation.

installer: Package name is horizon-cli-2.24.18
installer: Upgrading at base path /
installer: The upgrade was successful.

When does the installer command respond with messages on upgradation?

Typo in /hub/README.md

The word "organization" is misspelled as "orgnaization" in /hub/README/md. Please fix.

Some enhancements for documented steps running hub services on Ubuntu 16.04

I tried to follow the steps and were able to successfully have hub services up and running in a Ubuntu 16.04 box. There are some problems that I encountered so some enhancement in the documentation would be expected.

  1. apt-get installl docker-compose might give us an old version of docker compose that is not compatible with the docker-compose.yml provide. We'd update the instruction to install latest docker-compose from binary.
  2. The command for finding local IP MY_IP could be problematic since some systems could have addr: prefix before the actual IP address (see below as example). Better to handle that explicitly.
# ifconfig | grep 'inet '
          inet addr:172.18.0.1  Bcast:172.18.255.255  Mask:255.255.0.0
          inet addr:10.42.0.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet addr:172.17.0.1  Bcast:172.17.255.255  Mask:255.255.0.0
          inet addr:9.42.17.33  Bcast:9.42.17.255  Mask:255.255.255.0
          inet addr:10.42.0.0  Bcast:10.42.0.0  Mask:255.255.255.255
          inet addr:127.0.0.1  Mask:255.0.0.0

Restructure make processing in ./hub/oh

In the steps to setup the OH hub, the config.json file is created by running an envsubst command. Create a top level makefile in ./hub/ with the following targets. It can delegate the makefile targets in ./hub/oh/makefile for much of this.

  • default: creates the config.json file
  • up: starts the OH hub
  • down: stops the OH hub
  • clean: cleans up generated files
  • realclean: clean + removes OH and edgex docker images from the local docker image repo

postgres restarting since update

When running make up, cannot connect to exchange due to postgres cconstantly restarting.

@dabooz says it's due to the update, and the fix is to add an env var POSTGRES_HOST_AUTH_METHOD=trust to the Docker Compose template in the exchange-db section.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.