added installation on docker to README
parent
df91f3b170
commit
753b2a86ce
|
|
@ -1,24 +1,60 @@
|
||||||
## MyEMS Aggregation Service 数据汇总服务
|
## myems-aggregation
|
||||||
|
|
||||||
### Introduction
|
MyEMS Aggregation Service
|
||||||
|
|
||||||
This service is a component of MyEMS and it aggregates normalized data up to multiple dimensions.
|
数据汇总服务
|
||||||
|
|
||||||
### Prerequisites
|
## Introduction
|
||||||
|
|
||||||
|
This service is a component of MyEMS. It aggregates normalized data up to multiple dimensions.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
mysql-connector-python
|
mysql-connector-python
|
||||||
|
|
||||||
python-decouple
|
python-decouple
|
||||||
|
|
||||||
### Quick Run for Development
|
|
||||||
|
## Quick Run for Development
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
cd myems/myems-aggregation
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
cp example.env .env
|
||||||
chmod +x run.sh
|
chmod +x run.sh
|
||||||
run.sh
|
./run.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installation
|
## Installation
|
||||||
|
|
||||||
|
### Option 1: Install myems-aggregation on Docker
|
||||||
|
|
||||||
|
In this section, you will install myems-aggregation on Docker.
|
||||||
|
|
||||||
|
* Copy example.env file to .env file and modify the .env file
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd myems/myems-aggregation
|
||||||
|
cp example.env .env
|
||||||
|
```
|
||||||
|
* Build a Docker image
|
||||||
|
```bash
|
||||||
|
docker build -t myems/myems-aggregation .
|
||||||
|
```
|
||||||
|
* Run a Docker container
|
||||||
|
```bash
|
||||||
|
docker run -d --restart always --name myems-aggregation myems/myems-aggregation
|
||||||
|
```
|
||||||
|
|
||||||
|
-d Run container in background and print container ID
|
||||||
|
|
||||||
|
--restart Restart policy to apply when a container exits
|
||||||
|
|
||||||
|
--name Assign a name to the container
|
||||||
|
|
||||||
|
### Option 2: Install myems-aggregation on Ubuntu Server (bare-metal or virtual machine)
|
||||||
|
|
||||||
|
In this section, you will install myems-aggregation on Ubuntu Server.
|
||||||
|
|
||||||
Download and install MySQL Connector:
|
Download and install MySQL Connector:
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -45,7 +81,7 @@ cd myems
|
||||||
git checkout master (or the latest release tag)
|
git checkout master (or the latest release tag)
|
||||||
cp -R ~/myems/myems-aggregation /myems-aggregation
|
cp -R ~/myems/myems-aggregation /myems-aggregation
|
||||||
```
|
```
|
||||||
Create .env file based on example.env and edit the .env file if needed:
|
Copy exmaple.env file to .env and modify the .env file:
|
||||||
```bash
|
```bash
|
||||||
cp /myems-aggregation/example.env /myems-aggregation/.env
|
cp /myems-aggregation/example.env /myems-aggregation/.env
|
||||||
nano /myems-aggregation/.env
|
nano /myems-aggregation/.env
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,9 @@ chmod +x run.sh
|
||||||
./run.sh
|
./run.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install myems-api on Docker
|
## Installation
|
||||||
|
|
||||||
|
### Option 1: Install myems-api on Docker
|
||||||
|
|
||||||
In this section, you will install myems-api on Docker.
|
In this section, you will install myems-api on Docker.
|
||||||
|
|
||||||
|
|
@ -67,7 +69,7 @@ docker run -d -p 8000:8000 --restart always --name myems-api myems/myems-api
|
||||||
--name Assign a name to the container
|
--name Assign a name to the container
|
||||||
|
|
||||||
|
|
||||||
## Install myems-api on Ubuntu Server
|
### Option 2: Install myems-api on Ubuntu Server (bare-metal or virtual machine)
|
||||||
|
|
||||||
In this section, you will install myems-api on Ubuntu Server.
|
In this section, you will install myems-api on Ubuntu Server.
|
||||||
|
|
||||||
|
|
@ -208,7 +210,7 @@ systemctl start myems-api.socket
|
||||||
systemctl start myems-api.service
|
systemctl start myems-api.service
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install myems-api on macOS
|
### Option 3: Install myems-api on macOS
|
||||||
|
|
||||||
Please refer to [Installation on macOS (Chinese)](./installation_macos_zh.md)
|
Please refer to [Installation on macOS (Chinese)](./installation_macos_zh.md)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@ MyEMS Cleaning Service
|
||||||
|
|
||||||
MyEMS 数据清洗服务
|
MyEMS 数据清洗服务
|
||||||
|
|
||||||
### Introduction
|
## Introduction
|
||||||
|
|
||||||
This service is a component of MyEMS and it cleans the historical data.
|
This service is a component of MyEMS. It cleans the historical data.
|
||||||
|
|
||||||
### Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
mysql-connector-python
|
mysql-connector-python
|
||||||
|
|
||||||
|
|
@ -15,15 +15,47 @@ schedule
|
||||||
|
|
||||||
python-decouple
|
python-decouple
|
||||||
|
|
||||||
### Quick Run for Development
|
## Quick Run for Development
|
||||||
```bash
|
```bash
|
||||||
|
cd myems/myems-cleaning
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
cp example.env .env
|
||||||
chmod +x run.sh
|
chmod +x run.sh
|
||||||
run.sh
|
./run.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installation
|
## Installation
|
||||||
|
|
||||||
|
### Option 1: Install myems-cleaning on Docker
|
||||||
|
|
||||||
|
In this section, you will install myems-cleaning on Docker.
|
||||||
|
|
||||||
|
* Copy example.env file to .env file and modify the .env file
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd myems/myems-cleaning
|
||||||
|
cp example.env .env
|
||||||
|
```
|
||||||
|
* Build a Docker image
|
||||||
|
```bash
|
||||||
|
docker build -t myems/myems-cleaning .
|
||||||
|
```
|
||||||
|
* Run a Docker container
|
||||||
|
```bash
|
||||||
|
docker run -d --restart always --name myems-cleaning myems/myems-cleaning
|
||||||
|
```
|
||||||
|
|
||||||
|
-d Run container in background and print container ID
|
||||||
|
|
||||||
|
--restart Restart policy to apply when a container exits
|
||||||
|
|
||||||
|
--name Assign a name to the container
|
||||||
|
|
||||||
|
|
||||||
|
### Option 2: Install myems-cleaning on Ubuntu Server (bare-metal or virtual machine)
|
||||||
|
|
||||||
|
In this section, you will install myems-cleaning on Ubuntu Server.
|
||||||
|
|
||||||
Download and install MySQL Connector:
|
Download and install MySQL Connector:
|
||||||
```bash
|
```bash
|
||||||
cd ~/tools
|
cd ~/tools
|
||||||
|
|
@ -51,13 +83,9 @@ python3 setup.py install
|
||||||
|
|
||||||
Install myems-cleaning service
|
Install myems-cleaning service
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
cp -R myems/myems-cleaning /myems-cleaning
|
||||||
git clone https://github.com/MyEMS/myems.git
|
|
||||||
cd myems
|
|
||||||
git checkout master (or the latest release tag)
|
|
||||||
cp -R ~/myems/myems-cleaning /myems-cleaning
|
|
||||||
```
|
```
|
||||||
Create .env file based on example.env and edit the .env file if needed:
|
Copy file example.env to .env and edit the .env file:
|
||||||
```bash
|
```bash
|
||||||
cp /myems-cleaning/example.env /myems-cleaning/.env
|
cp /myems-cleaning/example.env /myems-cleaning/.env
|
||||||
nano /myems-cleaning/.env
|
nano /myems-cleaning/.env
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,16 @@
|
||||||
## MyEMS Normalization Service 数据规范化服务
|
# myems-normalization
|
||||||
|
|
||||||
### Introduction
|
MyEMS Normalization Service
|
||||||
|
|
||||||
This service is a component of MyEMS and it normalizes energy data in historical database.
|
数据规范化服务
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
This service is a component of MyEMS. It normalizes energy data in historical database.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
mysql-connector-python
|
mysql-connector-python
|
||||||
|
|
||||||
|
|
@ -17,15 +21,46 @@ sympy
|
||||||
python-decouple
|
python-decouple
|
||||||
|
|
||||||
|
|
||||||
### Quick Run for Development
|
## Quick Run for Development
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
cd myems/myems-normalization
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
cp example.env .env
|
||||||
chmod +x run.sh
|
chmod +x run.sh
|
||||||
run.sh
|
./run.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installation
|
## Installation
|
||||||
|
|
||||||
|
### Option 1: Install myems-normalization on Docker
|
||||||
|
|
||||||
|
In this section, you will install myems-normalization on Docker.
|
||||||
|
|
||||||
|
* Copy example.env file to .env file and modify the .env file
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd myems/myems-normalization
|
||||||
|
cp example.env .env
|
||||||
|
```
|
||||||
|
* Build a Docker image
|
||||||
|
```bash
|
||||||
|
docker build -t myems/myems-normalization .
|
||||||
|
```
|
||||||
|
* Run a Docker container
|
||||||
|
```bash
|
||||||
|
docker run -d --restart always --name myems-normalization myems/myems-normalization
|
||||||
|
```
|
||||||
|
|
||||||
|
-d Run container in background and print container ID
|
||||||
|
|
||||||
|
--restart Restart policy to apply when a container exits
|
||||||
|
|
||||||
|
--name Assign a name to the container
|
||||||
|
|
||||||
|
### Option 2: Install myems-normalization on Ubuntu Server (bare-metal or virtual machine)
|
||||||
|
|
||||||
|
In this section, you will install myems-normalization on Ubuntu Server.
|
||||||
|
|
||||||
Download and install MySQL Connector:
|
Download and install MySQL Connector:
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -96,7 +131,7 @@ cd myems
|
||||||
git checkout master (or the latest release tag)
|
git checkout master (or the latest release tag)
|
||||||
cp -r ~/myems/myems-normalization /myems-normalization
|
cp -r ~/myems/myems-normalization /myems-normalization
|
||||||
```
|
```
|
||||||
Create .env file based on example.env and edit the .env file if needed:
|
Copy example.env file to .env file and modify the .env file:
|
||||||
```bash
|
```bash
|
||||||
cp /myems-normalization/example.env /myems-normalization/.env
|
cp /myems-normalization/example.env /myems-normalization/.env
|
||||||
nano /myems-normalization/.env
|
nano /myems-normalization/.env
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue