Skip to content

Commit 67cb53c

Browse files
committed
Merge remote-tracking branch 'origin/Layotto_飞船_YoungMa962' into Layotto_飞船_YoungMa962
2 parents 042d848 + d3865b9 commit 67cb53c

File tree

6 files changed

+97
-1
lines changed

6 files changed

+97
-1
lines changed

.github/workflows/layotto-ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ jobs:
272272
- name: Push Image to DockerHub
273273
run: |
274274
make image.push.linux_amd64.layotto VERSION=latest
275+
- name: Build layotto/proxyv2:latest Image
276+
run: |
277+
make image.proxyv2.build VERSION=latest
278+
- name: Push layotto/proxyv2:latest Image to DockerHub
279+
run: |
280+
make image.proxyv2.push VERSION=latest
275281
276282
build-push-linux-arm64-image:
277283
name: "🎉 Linux ARMD64 Image"

docker/proxyv2/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM mosnio/proxyv2:v1.0.0-1.10.6
2+
COPY ./layotto /usr/local/bin/mosn

docs/_sidebar.md

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
- [Zookeeper](en/component_specs/sequencer/zookeeper.md)
7070
- [MongoDB](en/component_specs/sequencer/mongo.md)
7171
- [Secret Store](en/component_specs/secret/common.md)
72+
- [How to deploy and upgrade Layotto](en/operation/)
7273
- Design documents
7374
- [Actuator design doc](en/design/actuator/actuator-design-doc.md)
7475
- [Configuration API with Apollo](en/design/configuration/configuration-api-with-apollo.md)

docs/en/operation/README.md

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# How to deploy and upgrade Layotto
2+
3+
## 1. Deploy Layotto
4+
5+
There are some ways to deploy Layotto that you can find below.
6+
7+
- Deploy using released binaries
8+
- Deploy using Docker
9+
- Deploy on Kubernetes
10+
11+
### Deploy Layotto using released binaries
12+
13+
You can start Layotto directly via executing the binary file. Refer to the [Quick start](en/start) guide.
14+
15+
### Deploy using Docker
16+
17+
You can run Layotto using the official Docker images.Currently include:
18+
19+
- [layotto/layotto](https://hub.docker.com/repository/docker/layotto/layotto)
20+
- [layotto/layotto.arm64](https://hub.docker.com/repository/docker/layotto/layotto.arm64)
21+
22+
It does not contain a `config.json` configuration file in the image, you can mount your own configuration file into the `/runtime/configs/` directory of the image. For example.
23+
24+
```shell
25+
docker run -v "$(pwd)/configs/config.json:/runtime/configs/config.json" -d -p 34904:34904 --name layotto layotto/layotto start
26+
```
27+
28+
Of course, you can also run Layotto and other systems (such as Redis) at the same time via docker-compose. Refer to the [Quick start](en/start/state/start?id=step-1-deploy-redis-and-layotto)
29+
30+
### Deploy on Kubernetes
31+
32+
#### Option 1. Deploy via Istio
33+
34+
If you are using Istio now, you can deploy the Sidecar via Istio.
35+
36+
You can refer to [MOSN guide](https://mosn.io/docs/user-guide/start/istio/). Just replace the MOSN image in the tutorial with a Layotto image.
37+
38+
#### Option 2. Other ways
39+
40+
You can prepare your own image and k8s configuration file, then deploy Layotto via Kubernetes.
41+
42+
We are working on the official Layotto image and the solution for deploying to Kubernetes using Helm, so feel free to join us to build it. More details in <https://github.com/mosn/layotto/issues/392>
43+
44+
## 2.Toggle existing MOSN to Layotto for MOSN users
45+
46+
Existing MOSN can be upgraded to Layotto by replacing the MOSN sidecar image with Layotto image.
47+
48+
Explanation:
49+
50+
Layotto and MOSN are running in the same process, which can be understood as:
51+
52+
> Layotto == MOSN + a special grpcFilter packaged together
53+
54+
So.
55+
56+
> replace MOSN with Layotto == replace MOSN with "MOSN + a special grpcFilter"
57+
58+
There is no essential difference between Layotto and MOSN, just pay attention to the versions of them, which must correspond to each other.
59+
60+
The previously released Layotto v0.3.0 corresponds to MOSN version v0.24.1
61+
62+
## 3. How to upgrade Layotto
63+
64+
There are two options to upgrade.
65+
66+
- Upgrade sidecar container using k8s native solution
67+
68+
- [Hot upgrade: upgrade the sidecar without affecting the business](https://mosn.io/en/docs/concept/smooth-upgrade/)
69+
70+
The advantage of hot upgrade is that it can automatically migrate persistent connections, which can be seen in detail by clicking the above document.
71+
72+
The solutions to achieve hot upgrade are as follows:
73+
74+
- Register a SIGHUP event listener with MOSN, and send a SIGHUP signal to the MOSN process to call ForkExec to generate a new MOSN process.
75+
76+
- Directly start a new MOSN process.
77+
78+
- [Hot upgrade using OpenKruise](https://mosn.io/blog/posts/mosn-sidecarset-hotupgrade/)

docs/zh/start/configuration/start.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ docker-compose up -d
1616
```
1717

1818
#### **本地编译(不适合 Windows)**
19-
您可以使用 Docker 运行 MinIO,然后本地编译、运行 Layotto。
19+
您可以使用 Docker 运行 etcd,然后本地编译、运行 Layotto。
2020

2121
> [!TIP|label: 不适合 Windows 用户]
2222
> Layotto 在 Windows 下会编译失败。建议 Windows 用户使用 docker-compose 部署

make/image.mk

+9
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ image.build: image.verify $(addprefix image.build., $(addprefix $(IMAGE_PLAT).,
6161
.PHONY: image.build.multiarch
6262
image.build.multiarch: image.verify $(foreach p,$(IMAGE_PLATFORMS),$(addprefix image.build., $(addprefix $(p)., $(IMAGES))))
6363

64+
.PHONY: image.proxyv2.build
65+
image.proxyv2.build: go.build.linux_amd64.layotto
66+
cp $(OUTPUT_DIR)/linux/amd64/layotto $(ROOT_DIR)/docker/proxyv2
67+
cd $(ROOT_DIR)/docker/proxyv2 && $(DOCKER) build --no-cache --rm -t layotto/proxyv2:$(VERSION) .
68+
69+
.PHONY: image.proxyv2.push
70+
image.proxyv2.push:
71+
$(DOCKER) push layotto/proxyv2:$(VERSION)
72+
6473
.PHONY: image.build.%
6574
image.build.%: go.build.%
6675
$(eval IMAGE := $(COMMAND))

0 commit comments

Comments
 (0)