Update Install, configure and launch authored by Guillaume Garzone's avatar Guillaume Garzone
......@@ -95,62 +95,14 @@ docker-compose -f LOM2M-compose-local-build-LOM2M-only.yml down
To perform more complex tests you can use the `LOM2M-compose-local-build-FULL.yml` file to deploy an Eclipse OM2M IN CSE, LOM2M MN CSE, a monitor, and other modules (node-red, oneM2M IoT Dashboard...)
# Launch LOM2M with available docker image
N.B.: before downloading the image, you must add credentials in your docker to be able to access the private repository. (i.e. gitlab.laas.fr:4567) (cf. [Docker login](https://docs.docker.com/engine/reference/commandline/login/))
1. Download the latest stable image for LOM2M:
```bash
docker pull gitlab.laas.fr:4567/gauchard/lom2m:latest
```
2. Run a container from image
The 8282 port must be mapped to host. Example to run LOM2M with environment variables set in a file (env-file.txt):
```bash
docker run --name lom2m-test -p "<your-port>:8282" --env-file=env-file.txt \
-d --build gitlab.laas.fr:4567/gauchard/lom2m:latest
```
You can also use docker-compose. Some examples are provided in the source code in docker/LOM2M
Here is basic example:
```yaml
version: '3.7'
services:
lom2m-mn:
stdin_open: true
tty: true
image: gitlab.laas.fr:4567/gauchard/lom2m:latest
environment:
- LOM2M_REMOTE_POA=http://ip:port/context
- LOM2M_REMOTE_CSE_ID=cse-id
- LOM2M_REMOTE_CSE_NAME=cse-name
- LOM2M_ADMIN_ORIGINATOR=originator
- LOM2M_LOCAL_POA_IP=your.machine.ip
- LOM2M_LOCAL_POA_PORT=5492
ports:
- 5492:8282
```
# Build LOM2M yourself using docker and the provided Dockerfile
1. Clone the LOM2M source code repository:
```bash
git clone https://gitlab.laas.fr/gauchard/lom2m.git
```
2. Go to the lom2m directory
3. From lom2m source code directory, launch the following docker build command:
```bash
......@@ -187,7 +139,7 @@ git submodule update --init
# Clone LOM2M src
cd "path/to/lom2m"
git clone https://gitlab.laas.fr/gauchard/lom2m.git
git clone <git-repo-url>
# Go to LOM2M src dir
cd "path/to/lom2m"/lom2m/src/server
......
......