Skip to content

Commit

Permalink
Merge pull request #48 from joewxboy/issue-47
Browse files Browse the repository at this point in the history
Changed instructions for downloading and installing packages
  • Loading branch information
dabooz authored Apr 9, 2020
2 parents f10c978 + e82a1b1 commit 220ea07
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
37 changes: 16 additions & 21 deletions hub/03-install-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,38 +135,33 @@ Update the package manager
apt-get -y update
```

Install and test Docker
Install dependencies

``` bash
curl -fsSL get.docker.com | sh
docker --version
apt-get -y install jq
```

Configure package manager for the Anax Agent:

If you operating system is not xenial (16.x) then update the following appropriately for bionic (18.x).
*NOTE*: If you did not copy the CRLF after `EOF`, then you will need to press Enter/Return on your keyboard.
Install and test Docker

``` bash
wget -qO - http://pkg.bluehorizon.network/bluehorizon.network-public.key | apt-key add -
aptrepo=testing
cat <<EOF > /etc/apt/sources.list.d/bluehorizon.list
deb [arch=$(dpkg --print-architecture)] http://pkg.bluehorizon.network/linux/ubuntu xenial-$aptrepo main
deb-src [arch=$(dpkg --print-architecture)] http://pkg.bluehorizon.network/linux/ubuntu xenial-$aptrepo main
EOF

curl -fsSL get.docker.com | sh
docker --version
```

Refresh package manager index list

``` bash
apt-get -y update
```
Install the Anax Agent:

Install and the Agent
*NOTE* If your operating system is Ubuntu xenial (16.x) then use `dist=xenial` below.

``` bash
apt-get -y install bluehorizon
arch=$(dpkg --print-architecture)
dist=bionic
version=2.24.18
wget http://pkg.bluehorizon.network/linux/ubuntu/pool/main/h/horizon/bluehorizon_${version}~ppa~ubuntu.${dist}_all.deb
wget http://pkg.bluehorizon.network/linux/ubuntu/pool/main/h/horizon/horizon-cli_${version}~ppa~ubuntu.${dist}_${arch}.deb
wget http://pkg.bluehorizon.network/linux/ubuntu/pool/main/h/horizon/horizon_${version}~ppa~ubuntu.${dist}_${arch}.deb
dpkg -i horizon-cli_${version}~ppa~ubuntu.${dist}_${arch}.deb
dpkg -i horizon_${version}~ppa~ubuntu.${dist}_${arch}.deb
dpkg -i bluehorizon_${version}~ppa~ubuntu.${dist}_all.deb
```

IMPORTANT, exit out of root, back to your user account
Expand Down
8 changes: 4 additions & 4 deletions hub/04-configure-anax.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ The results of `hzn exchange user list` should be something like the following:
Next we will publish an example EdgeX service to the openhorizon hub and then tell the agent to run the service.

``` bash
git clone https://github.com/joewxboy/horizon-edgex.git
cd ./horizon-edgex
git clone https://github.com/edgexfoundry-holding/open-horizon-integration.git
cd ./open-horizon-integration
```

First, we'll generate an RSA key pair to be used for signing the edge service.
Expand All @@ -61,7 +61,7 @@ The digest is recorded in the published service definition.
This example service is composed of several EdgeX microservices.

```
hzn exchange service publish -P -f ./configs/service.json
hzn exchange service publish -P -f hub/configs/service.json
```

Now check to ensure that the service definition was published and is available in the exchange:
Expand All @@ -83,7 +83,7 @@ A pattern is the easiest way for a node to indicate which services it should run
Policy based service deployment is also supported, but is slightly more complex to setup.

```
hzn exchange pattern publish -f ./configs/pattern.json
hzn exchange pattern publish -f hub/configs/pattern.json
```

Now check to ensure the pattern is available:
Expand Down

0 comments on commit 220ea07

Please sign in to comment.