Skip to content

Commit

Permalink
fix use docker-compose to start etcd and layotto (#635)
Browse files Browse the repository at this point in the history
* fix some words
* add Stop containers and release resources step
  • Loading branch information
YoungMa962 committed Jun 17, 2022
1 parent 496dab3 commit af5bd54
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
18 changes: 17 additions & 1 deletion docs/en/start/configuration/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The architecture of this demo is shown in the figure below. The processes starte
[Then config file](https://github.com/mosn/layotto/blob/main/configs/runtime_config.json) claims `etcd` in the `config_store` section, but users can change it to other configuration center they want (currently only support etcd and apollo).
### step 1. Deploy etcd and Layotto
<!-- tabs:start -->
#### **with Docker Compose**
#### **With Docker Compose**
You can start etcd and Layotto with docker-compose

```bash
Expand Down Expand Up @@ -75,6 +75,22 @@ delete keys success
write start
receive subscribe resp store_name:"config_demo" app_id:"apollo" items:<key:"heihei" content:"heihei1" group:"application" label:"prod" tags:<key:"feature" value:"haha" > tags:<key:"release" value:"16" > >
```
### step 3. Stop containers and release resources
<!-- tabs:start -->
#### **Docker Compose**
If you started etcd and Layotto with docker-compose, you can shut them down as follows:

```bash
cd ${project_path}/docker/layotto-etcd
docker-compose stop
```

#### **Destroy the etcd container**
If you started etcd with Docker, you can destroy the etcd container as follows:
```shell
docker rm -f etcd
```
<!-- tabs:end -->

## Next step
### What did this demo do?
Expand Down
18 changes: 17 additions & 1 deletion docs/en/start/sequencer/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The architecture of this example is shown in the figure below, and the processes
![img.png](../../../img/sequencer/etcd/img.png)
### step 1. Deploy etcd and Layotto
<!-- tabs:start -->
#### **with Docker Compose**
#### **With Docker Compose**
You can start etcd and Layotto with docker-compose

```bash
Expand Down Expand Up @@ -84,6 +84,22 @@ Next id:next_id:9
Next id:next_id:10
Demo success!
```
### step 3. Stop containers and release resources
<!-- tabs:start -->
#### **Docker Compose**
If you started etcd and Layotto with docker-compose, you can shut them down as follows:

```bash
cd ${project_path}/docker/layotto-etcd
docker-compose stop
```

#### **Destroy the etcd container**
If you started etcd with Docker, you can destroy the etcd container as follows:
```shell
docker rm -f etcd
```
<!-- tabs:end -->

### Next step
#### What does this client program do?
Expand Down
16 changes: 16 additions & 0 deletions docs/zh/start/sequencer/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ Next id:next_id:9
Next id:next_id:10
Demo success!
```
### step 3.销毁容器,释放资源
<!-- tabs:start -->
#### **关闭 Docker Compose**
如果您是用 docker-compose 启动的 etcd 和 Layotto,可以按以下方式关闭:

```bash
cd ${project_path}/docker/layotto-etcd
docker-compose stop
```
#### **销毁 etcd Docker 容器**
如果您是用 Docker 启动的 etcd,可以按以下方式销毁 etcd 容器:

```shell
docker rm -f etcd
```
<!-- tabs:end -->

### 下一步
#### 这个客户端程序做了什么?
Expand Down

0 comments on commit af5bd54

Please sign in to comment.