Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 31 additions & 17 deletions test-tools/IoT-APP-Store-Demo/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,50 @@
# IoT Application Store
Wasm application management portal for WAMR

# Requirement
Install django with pip3
```
pip3 install django
```

# Run
1. Start wasm server
## Start the server

### Using docker
1. install docker and docker-compose
``` bash
sudo apt install docker.io docker-compose
```

2. start
``` bash
docker-compose up
```
### Using commands
> Note: must use python3.5. If you don't have python3.5 on your machine, had better using docker
1. install the required package
``` bash
pip3 install django
```

2. Start device server
``` bash
cd wasm_django/server
python3 wasm_server.py
```

2. Start IoT application management web portal
```
3. Start IoT application management web portal
``` bash
cd wasm_django
python3 manage.py runserver 0.0.0.0:80
```

3. Download WAMR runtime from [help](http://localhost/help/) page
> NOTE: You need to start web server according to *step 2* before accessing this link!
## Start the runtime
1. Download WAMR runtime from [help](http://localhost/help/) page
> NOTE: You need to start the server before accessing this link!

4. Start a WAMR runtime from localhost
```
2. Start a WAMR runtime from localhost
``` bash
chmod +x simple
./simple
```
or from other computers
```
``` bash
./simple -a [your.server.ip.address]
```

# Online demo
http://39.106.110.7/
## Online demo
http://82.156.57.236/
22 changes: 22 additions & 0 deletions test-tools/IoT-APP-Store-Demo/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '2.0'

services:
web_portal:
build: ./wasm_django
network_mode: "host"
depends_on:
- 'device_server'
restart: always
volumes:
- store:/app/static/upload/
device_server:
build:
context: ./wasm_django
dockerfile: ./server/Dockerfile
network_mode: "host"
restart: always
volumes:
- store:/app/static/upload/

volumes:
store:
9 changes: 9 additions & 0 deletions test-tools/IoT-APP-Store-Demo/wasm_django/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:3.5

WORKDIR /app
ADD . /app

RUN pip install django

ENTRYPOINT ["python", "manage.py", "runserver", "0.0.0.0:80"]

Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ <h1>
How to use?
</h1>
<p>
1. Download a simple runtime (build for ubuntu 16.04 64 bits, other platforms please build
1. Download a simple runtime (build for ubuntu 20.04 64 bits, other platforms please build
from the <a href="https://github.com/intel/wasm-micro-runtime">source code</a>)
</p>
<p>
2. In the terminal: <code>cd ~/Download && ./simple -a 39.106.110.7</code>
2. In the terminal: <code>cd ~/Download && ./simple -a 82.156.57.236</code>
</p>
<div class="span12">
<div class="alert alert-info">
Expand All @@ -51,7 +51,7 @@ <h5>
<p>For more details please refer to this <a
href="https://github.com/bytecodealliance/wasm-micro-runtime/tree/main/samples/littlevgl">guide</a>
</p>
<p><code>cd ~/Download && ./wasm_runtime_wgl -a 39.106.110.7</code></p>
<p><code>cd ~/Download && ./wasm_runtime_wgl -a 82.156.57.236</code></p>
</div>
</div>
<p>
Expand Down
6 changes: 6 additions & 0 deletions test-tools/IoT-APP-Store-Demo/wasm_django/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.5

WORKDIR /app
ADD server/wasm_server.py /app/server/

ENTRYPOINT ["python", "server/wasm_server.py"]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.