Skip to content

Commit

Permalink
lgtm
Browse files Browse the repository at this point in the history
  • Loading branch information
dcmartin committed Apr 12, 2020
1 parent 9cfa913 commit be2c50e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
31 changes: 24 additions & 7 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

These instructions are for Debian LINUX, notably Ubuntu and Raspbian. Instructions for _macOS_ are TBD.

## _Quick Start_
For Ubuntu 18.04 LTS access host and install pre-requisites and enable `docker` group permissions.

```
sudo apt update -qq -y && sudo apt upgrade -qq -y
sudo apt install -qq -y git make curl jq net-tools apache2-utils docker-compose
sudo addgroup ${USER} docker
```
Log out and log back in activate `docker` group privileges.

```
git clone http://github.com/dcmartin/open-horizon
cd open-horizon && make all
```

# Detailed Setup Instructions

## Step 1 - Clone [repository](http://github.com/dcmartin/open-horizon)

```
Expand All @@ -12,19 +29,19 @@ git clone http://github.com/dcmartin/open-horizon

## Step 2 - Install pre-requisites

### 2.1 Utilities
```
sudo apt update -qq -y && sudo apt upgrade -qq -y
sudo apt install -qq -y curl jq
```

### 2.2 `docker`
### 2.1 `docker`
```
curl -sSL -o get.docker.sh http://get.docker.com/
chmod 755 get.docker.sh
sudo ./get.docker.sh
```

### 2.2 Utilities
```
sudo apt update -qq -y && sudo apt upgrade -qq -y
sudo apt install -qq -y curl jq make net-tools docker-compose apache2-utils
```

### 2.3 `/etc/docker/daemon.json`
If the host device has specialized capabilities or configuration requirements this file may require modification. For example to enable the `nvidia` _runtime_ as the default, the `daemon.json` file would contain the following:

Expand Down
8 changes: 4 additions & 4 deletions services/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ TARGETS = all tidy clean distclean build push publish verify build-service push-

default: build

all: build push ${KEYS} publish
all: build push $(KEYS) publish

## KEYS
PRIVATE_KEY_FILE ?= ${HZN_ORG_ID}.key
Expand All @@ -78,11 +78,11 @@ gpu:

## all

$(ALL):
$(ALL): $(KEYS)
@echo "${MC}>>> MAKE --" $$(date +%T) "-- making $@""${NC}" &> /dev/stderr
$(MAKE) TAG=${TAG} HZN_ORG_ID=$(HZN_ORG_ID) -C $@

$(TARGETS):
$(TARGETS): $(KEYS)
@echo "${MC}>>> MAKE --" $$(date +%T) "-- making $@ in ${ALL}""${NC}" &> /dev/stderr
@for dir in $(ALL); do \
$(MAKE) TAG=$(TAG) HZN_ORG_ID=$(HZN_ORG_ID) -C $$dir $@; \
Expand All @@ -94,7 +94,7 @@ pattern-publish: ${KEYS}
$(MAKE) TAG=${TAG} HZN_ORG_ID=$(HZN_ORG_ID) -C $$dir $@; \
done

pattern-validate:
pattern-validate: $(KEYS)
@echo "${MC}>>> MAKE --" $$(date +%T) "-- validating $(PATTERNS)""${NC}" &> /dev/stderr
@for dir in $(PATTERNS); do \
$(MAKE) TAG=${TAG} HZN_ORG_ID=$(HZN_ORG_ID) -C $$dir $@; \
Expand Down

0 comments on commit be2c50e

Please sign in to comment.