Installation

Install from code

1. Get source code

                    
git clone https://github.com/merceedge/MerceEdge.git
git submodule init
git submodule update     
                    
                

2. Install python3.6 environment

It is best to use virtualenv or pipenv, please install according to your operating system environment.

Install a mqtt server locally (because MerceEdge uses the MQTT service, we need an MQTT server. We can also specify an existing MQTT service in MerceEdge, which will be introduced in the following document. Here we install an MQTT service directly. Just fine). This example uses the mosquitto service. You can download it by referring to here. After installation, it will run by default:

                    
mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf 
                    
                

3. Install MerceEdge

                    
(MerceEdge) / # cd MerceEdge
(MerceEdge) MerceEdge # python setup.py develop
                    
                

4. Verify that the installation

                    
(MerceEdge) MerceEdge # edge

__  __                   _____    _            
|  \/  | ___ _ __ ___ ___| ____|__| | __ _  ___ 
| |\/| |/ _ \ '__/ __/ _ \  _| / _` |/ _` |/ _ \
| |  | |  __/ | | (_|  __/ |__| (_| | (_| |  __/
|_|  |_|\___|_|  \___\___|_____\__,_|\__, |\___|
                                   |___/      

Load user config file: 
...

* Serving Flask app "merceedge.api_server.app" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
                    
                

Install from docker

1. Install docker and docker-compose

2. git clone MerceEdge source code

                
git clone https://github.com/merceedge/MerceEdge.git .
cd MerceEdge   
                
            

3. Build docker image

                    
docker-compose build   
                    
            

4. Run

                
docker-compose up   
                
            

If you want run as daemon

                
docker-compose up -d