forked from sangge/tpre-python
docs: Add some commands
This commit is contained in:
parent
0b0a073e4b
commit
8806b0fc00
@ -38,7 +38,9 @@ The project relies on the following software:
|
|||||||
### Docker installer
|
### Docker installer
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
apt update && apt install docker.io mosh -y
|
apt update && apt install mosh -y
|
||||||
|
chmod +x install_docker.sh
|
||||||
|
./install_docker.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker version
|
### Docker version
|
||||||
|
@ -3,13 +3,24 @@
|
|||||||
## Run docker
|
## Run docker
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it -p 8000:8000 -p 8001:8001 -p 8002:8002 -v ~/mimajingsai:/app -e HOST_IP=110.41.130.197 git.mamahaha.work/sangge/tpre:base bash
|
docker run -it -p 8000-8002:8000-8002 -v ~/mimajingsai/src:/app -e HOST_IP=60.204.193.58 git.mamahaha.work/sangge/tpre:base bash
|
||||||
|
docker run -it -p 8000-8002:8000-8002 -v ~/mimajingsai/src:/app -e HOST_IP=119.3.125.234 git.mamahaha.work/sangge/tpre:base bash
|
||||||
|
docker run -it -p 8000-8002:8000-8002 -v ~/mimajingsai/src:/app -e HOST_IP=124.70.165.73 git.mamahaha.work/sangge/tpre:base bash
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tpre3: docker run -it -p 8000:8000 -p 8001:8001 -p 8002:8002 -v ~/mimajingsai:/app -e HOST_IP=60.204.233.103 git.mamahaha.work/sangge/tpre:base bash
|
tpre3: docker run -it -p 8000:8000 -p 8001:8001 -p 8002:8002 -v ~/mimajingsai:/app -e HOST_IP=60.204.233.103 git.mamahaha.work/sangge/tpre:base bash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Start application
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nohup python server.py &
|
||||||
|
nohup python node.py &
|
||||||
|
nohup python client.py &
|
||||||
|
cat nohup.out
|
||||||
|
```
|
||||||
|
|
||||||
## Cloud server ip
|
## Cloud server ip
|
||||||
|
|
||||||
**tpre1**: 110.41.155.96
|
**tpre1**: 110.41.155.96
|
||||||
@ -21,7 +32,8 @@ tpre3: docker run -it -p 8000:8000 -p 8001:8001 -p 8002:8002 -v ~/mimajingsai:/a
|
|||||||
### Client request message
|
### Client request message
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python client_cli.py 110.41.21.35 aaa
|
python client_cli.py 124.70.165.73 name
|
||||||
|
python client_cli.py 124.70.165.73 environment
|
||||||
```
|
```
|
||||||
|
|
||||||
## Client router
|
## Client router
|
||||||
|
8
install_docker.sh
Normal file
8
install_docker.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do apt-get remove $pkg; done
|
||||||
|
|
||||||
|
apt update
|
||||||
|
apt install apt-transport-https ca-certificates curl gnupg lsb-release
|
||||||
|
curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||||||
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
apt update
|
||||||
|
apt install docker-ce docker-ce-cli containerd.io
|
@ -18,8 +18,7 @@ import asyncio
|
|||||||
# 测试文本
|
# 测试文本
|
||||||
test_msessgaes = {
|
test_msessgaes = {
|
||||||
"name": b"proxy re-encryption",
|
"name": b"proxy re-encryption",
|
||||||
"environment": b"distributed environment",
|
"environment": b"distributed environment"
|
||||||
"usage": b"data sharing",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user