Difference between revisions of "Five easy ways to install AGILE (running the default stack)"

From AGILE IoT Wiki
Jump to: navigation, search
Line 1: Line 1:
AGILE support different use cases, and correspondingly several installation methods:
+
= Prerequisites =
# '''ResinOS based gateway with local management:''' select this option if a robust OS is required, one of the supported GW platforms are used, but remote cloud based management is not needed. AGILE will be running on the gateway machine, but docker-compose will be run from a local management machine. The management machine can be any PC, it is only used to configure the GW at deployment, and later, if necessary, to update services.
+
 
# '''Raspbian based standalone gateway:''' only available for Raspberry Pi (1, 2, 3, 3+), this type of deployment is useful for those who are used to Raspbian, would like to run other services next to AGILE, and are not afraid of logging in to the gateway with SSH to manage things. 
+
Thanks to its dockerized design, AGILE prerequisites are very simple: docker, docker-compose, git
# '''Docker and docker-compose based installation:''' Useful for any other platform not supported by the above methods (e.g. Linux based PCs, OS X), or when deploying AGILE code on an existing server. It is also useful for testing the AGILE stack without a dedicated gateway (i.e. on a laptop).
+
* to run AGILE: '''docker''' version 1.10.0 (or later) and '''docker-compose''' version 1.10.0 (or later)
# '''ResinOS based managed solution:''' useful for large scale deployments with fleet management services, or when cloud based management is required.
+
* to build AGILE from source: docker version 17.05.0 (or later) and docker-compose version 1.10.0 (or later). Building on earlier versions of docker is also possible after disabling the 2-stage build process in dockerfiles.
 +
* In our examples '''git''' is also used. However, this can be circumvented with the direct download of the compose stack description file (https://raw.githubusercontent.com/Agile-IoT/agile-stack/master/docker-compose.yml) or compressed code archives.
 +
 
 +
= Installation =
 +
 
 +
AGILE supports different use cases, and correspondingly several installation methods:
 +
# '''ResinOS based gateway with local management'''
 +
# '''Raspbian based standalone gateway'''  
 +
# '''Docker and docker-compose based installation'''  
 +
# '''ResinOS based managed solution'''
 
# '''Building and installing from source'''
 
# '''Building and installing from source'''
  
  
 
== ResinOS based gateway with local management ==  
 
== ResinOS based gateway with local management ==  
 +
 +
Select this option if a robust OS is required, one of the supported GW platforms are used, but remote cloud based management is not needed. AGILE will be running on the gateway machine, but docker-compose will be run from a local management machine. The management machine can be any PC, it is only used to configure the GW at deployment, and later, if necessary, to update services.
 +
 
* Download ResinOS from https://resinos.io/#downloads-raspberrypi
 
* Download ResinOS from https://resinos.io/#downloads-raspberrypi
* (optional) Install resin-cli
npm i -g resin-cli
+
* (optional) Install resin-cli

* (optional) Configure the dowloaded SD image (only required if connecting to WiFi)
resin local configure resin.img
+
npm i -g resin-cli
* Burn image to microSD (we recommend Etcher.io)
+
* (optional) Configure the dowloaded SD image (only required if connecting to WiFi)
* Clone agile-stack
git clone https://github.com/agile-iot/agile-stack && cd agile-stack
+
resin local configure resin.img
* Configure the stack by creating and editing the .env file 
cp .env.example .env
+
* Burn image to microSD (we recommend [http://etcher.io Etcher.io])
* After powering on the GW with the microSD card, Initialise AGILE 
docker-compose up -d
+
* Clone agile-stack

* Connect to http://resin.local:8000
+
git clone https://github.com/agile-iot/agile-stack && cd agile-stack
 +
* Configure the stack by creating and editing the .env file
 +
cp .env.example .env
 +
* After powering on the GW with the microSD card, Initialise AGILE
 +

docker-compose up -d
 +
* To access the gateway, connect to http://resin.local:8000
 
* for further details, see https://github.com/Agile-IoT/agile-stack/
 
* for further details, see https://github.com/Agile-IoT/agile-stack/
 +
 +
== Raspbian based standalone gateway ==
 +
 +
This installation method is only available for Raspberry Pi (1, 2, 3, 3+), this type of deployment is useful for those who are used to Raspbian, would like to run other services next to AGILE, and are not afraid of logging in to the gateway with SSH.
 +
 +
* download a Raspbian based SD image from ….
 +
* Burn image to microSD (we recommend [http://etcher.io Etcher.io])
 +
* Connect the Pi to your LAN (for WiFi, edit files directly on SD card to add credentials)
 +
* Power on the Pi
 +
* Connect to http://agilegw.local:8000
 +
* If you LAN does not support Bonjour (i.e. ping agilegw.local is not working), further steps are needed to access the GW: connect with SSH to your gateway, update the agile configuration with an accessible IP addres or domain name of the gateway, and restart AGILE.
 +
 +
== Docker and docker-compose based installation ==
 +
 +
Useful for any other platform not supported by the above methods (e.g. Linux based PCs, OS X), or when deploying AGILE code on an existing server. It is also useful for testing the AGILE stack without a dedicated gateway (i.e. on a laptop).
 +
 +
* clone the agile-stack
 +
* Clone agile-cli
 +
* Set up the CLI
 +
* Start agile
 +
* Connect to http://localhost:8000
 +
 +
== ResinOS based managed solution ==
 +
 +
Useful for large scale deployments with fleet management services, or when cloud based management is required.
 +
  
 
== Building and installing from source ==
 
== Building and installing from source ==
 +
 
* Clone agile-dev
 
* Clone agile-dev
 
* Configure agile-dev for local build
 
* Configure agile-dev for local build

Revision as of 09:37, 11 April 2018

Prerequisites

Thanks to its dockerized design, AGILE prerequisites are very simple: docker, docker-compose, git

  • to run AGILE: docker version 1.10.0 (or later) and docker-compose version 1.10.0 (or later)
  • to build AGILE from source: docker version 17.05.0 (or later) and docker-compose version 1.10.0 (or later). Building on earlier versions of docker is also possible after disabling the 2-stage build process in dockerfiles.
  • In our examples git is also used. However, this can be circumvented with the direct download of the compose stack description file (https://raw.githubusercontent.com/Agile-IoT/agile-stack/master/docker-compose.yml) or compressed code archives.

Installation

AGILE supports different use cases, and correspondingly several installation methods:

  1. ResinOS based gateway with local management
  2. Raspbian based standalone gateway
  3. Docker and docker-compose based installation
  4. ResinOS based managed solution
  5. Building and installing from source


ResinOS based gateway with local management

Select this option if a robust OS is required, one of the supported GW platforms are used, but remote cloud based management is not needed. AGILE will be running on the gateway machine, but docker-compose will be run from a local management machine. The management machine can be any PC, it is only used to configure the GW at deployment, and later, if necessary, to update services.

npm i -g resin-cli
  • (optional) Configure the dowloaded SD image (only required if connecting to WiFi)

resin local configure resin.img
  • Burn image to microSD (we recommend Etcher.io)
  • Clone agile-stack

git clone https://github.com/agile-iot/agile-stack && cd agile-stack
  • Configure the stack by creating and editing the .env file
cp .env.example .env
  • After powering on the GW with the microSD card, Initialise AGILE

docker-compose up -d

Raspbian based standalone gateway

This installation method is only available for Raspberry Pi (1, 2, 3, 3+), this type of deployment is useful for those who are used to Raspbian, would like to run other services next to AGILE, and are not afraid of logging in to the gateway with SSH.

  • download a Raspbian based SD image from ….
  • Burn image to microSD (we recommend Etcher.io)
  • Connect the Pi to your LAN (for WiFi, edit files directly on SD card to add credentials)
  • Power on the Pi
  • Connect to http://agilegw.local:8000
  • If you LAN does not support Bonjour (i.e. ping agilegw.local is not working), further steps are needed to access the GW: connect with SSH to your gateway, update the agile configuration with an accessible IP addres or domain name of the gateway, and restart AGILE.

Docker and docker-compose based installation

Useful for any other platform not supported by the above methods (e.g. Linux based PCs, OS X), or when deploying AGILE code on an existing server. It is also useful for testing the AGILE stack without a dedicated gateway (i.e. on a laptop).

ResinOS based managed solution

Useful for large scale deployments with fleet management services, or when cloud based management is required.


Building and installing from source

  • Clone agile-dev
  • Configure agile-dev for local build
  • build
 everything
docker compose build
  • Start the AGILE framework
agile
docker-compose up -d