mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 15:05:19 +00:00
update IoT cloud demo (#876)
* update IoT APP store demo * update IoT app store apps * update IoT cloud demo document * [Cloud demo] mount app store between two dockers * [Cloud demo] update restart policy * [Cloud demo] update help page * [Cloud demo] update online demo address
This commit is contained in:
parent
56ae28bb32
commit
b9fd8f916b
|
@ -1,36 +1,50 @@
|
|||
# IoT Application Store
|
||||
Wasm application management portal for WAMR
|
||||
|
||||
# Requirement
|
||||
Install django with pip3
|
||||
```
|
||||
pip3 install django
|
||||
```
|
||||
## Start the server
|
||||
|
||||
# Run
|
||||
1. Start wasm 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
test-tools/IoT-APP-Store-Demo/docker-compose.yml
Normal file
22
test-tools/IoT-APP-Store-Demo/docker-compose.yml
Normal file
|
@ -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
test-tools/IoT-APP-Store-Demo/wasm_django/Dockerfile
Normal file
9
test-tools/IoT-APP-Store-Demo/wasm_django/Dockerfile
Normal file
|
@ -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"]
|
||||
|
|
@ -32,11 +32,11 @@
|
|||
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">
|
||||
|
@ -51,7 +51,7 @@
|
|||
<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>
|
||||
|
|
|
@ -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.
Loading…
Reference in New Issue
Block a user