mirror of
https://github.com/labring/sealos.git
synced 2026-09-01 15:38:06 +08:00
update sealos cloud deploy docs. (#3483)
This commit is contained in:
@@ -16,8 +16,8 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
build_from:
|
||||
description: 'Build all-in-one image from components image tag, default is nightly'
|
||||
default: 'nightly'
|
||||
description: 'Build all-in-one image from components image tag, default is latest'
|
||||
default: 'latest'
|
||||
required: false
|
||||
type: string
|
||||
push:
|
||||
@@ -90,9 +90,9 @@ jobs:
|
||||
- name: Build sealos cloud cluster image
|
||||
working-directory: deploy/cloud
|
||||
run: |
|
||||
[ -z "${{ inputs.build_from }}" ] && BuildFromTag="nightly" || BuildFromTag="${{ inputs.build_from }}"; echo "BuildFromTag=${BuildFromTag}"
|
||||
sed -i "s#nightly#${BuildFromTag}#g" init.sh
|
||||
sed -i "s#nightly#${BuildFromTag}#g" etc/sealos/desktop-config.yaml
|
||||
[ -z "${{ inputs.build_from }}" ] && BuildFromTag="latest" || BuildFromTag="${{ inputs.build_from }}"; echo "BuildFromTag=${BuildFromTag}"
|
||||
sed -i "s#latest#${BuildFromTag}#g" init.sh
|
||||
sed -i "s#latest#${BuildFromTag}#g" etc/sealos/desktop-config.yaml
|
||||
sudo bash init.sh
|
||||
sudo sealos build -t ${{ steps.prepare.outputs.repo }}:${{ steps.prepare.outputs.tag_name }} -f Kubefile
|
||||
sudo sealos push ${{ steps.prepare.outputs.repo }}:${{ steps.prepare.outputs.tag_name }}
|
||||
|
||||
@@ -6,7 +6,7 @@ COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
ENV userNamespace="user-system"
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV wildcardCertSecretName="wildcard-cert"
|
||||
ENV wildcardCertSecretNamespace="sealos-system"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ USER 65532:65532
|
||||
COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
ENV cloudDomain="cloud.example.io"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV cloudPort="6443"
|
||||
|
||||
CMD ["kubectl apply -f manifests/deploy.yaml","kubectl delete -f manifests/rbac.yaml --ignore-not-found=true","kubectl delete crd usergroups.user.sealos.io --ignore-not-found=true","kubectl delete crd usergroupbindings.user.sealos.io --ignore-not-found=true"]
|
||||
|
||||
@@ -4,6 +4,6 @@ COPY etc etc
|
||||
COPY scripts scripts
|
||||
COPY manifests manifests
|
||||
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
|
||||
CMD ["bash scripts/init.sh"]
|
||||
|
||||
+40
-22
@@ -1,11 +1,15 @@
|
||||
# Sealos cloud cluster image
|
||||
|
||||
-------
|
||||
## prepare
|
||||
|
||||
1. A cloud domain and dns to your k8s cluster. Suppose your domain name is `cloud.example.io`.
|
||||
2. A TLS cert that resolves `cloud.example.io` and `*.cloud.example.io`
|
||||
### DNS setup
|
||||
A cloud domain and dns to your k8s cluster. Suppose your domain name is `127.0.0.1.nip.io` by using [nip.io](https://nip.io/).
|
||||
You need change the ip `127.0.0.1` to your real ip if you need access your cluster from outside or use other dns service.
|
||||
|
||||
### TLS setup
|
||||
You need a TLS cert that resolves `127.0.0.1.nip.io` and `*.127.0.0.1.nip.io`.
|
||||
|
||||
#### Using acme.sh with alidns
|
||||
Here is one way to get a TLS cert by using acme.sh with alidns.
|
||||
|
||||
1. install [acme.sh](https://github.com/acmesh-official/acme.sh)
|
||||
@@ -16,7 +20,7 @@ Here is one way to get a TLS cert by using acme.sh with alidns.
|
||||
export Ali_Key="<your ali key>"
|
||||
export Ali_Secret="<your ali secret>"
|
||||
|
||||
acme.sh --issue --dns dns_ali -d "cloud.example.io" -d "*.cloud.example.io"
|
||||
acme.sh --issue --dns dns_ali -d "127.0.0.1.nip.io" -d "*.127.0.0.1.nip.io"
|
||||
```
|
||||
|
||||
4. base64 encode your cert and key, and save the output which will be used in the next step
|
||||
@@ -27,23 +31,33 @@ Here is one way to get a TLS cert by using acme.sh with alidns.
|
||||
|
||||
Other dns api please read: https://github.com/acmesh-official/acme.sh/wiki/dnsapi
|
||||
|
||||
### kubernetes cluster
|
||||
#### Using self-signed cert
|
||||
We provide a self-signed cert for you to test by default if you didn't provide a cert. You can replace it with your own cert.
|
||||
|
||||
### Kubernetes cluster
|
||||
Please read sealos doc to create a kubernetes cluster: https://sealos.io/en/docs/lifecycle-management/quick-start/installation
|
||||
|
||||
```shell
|
||||
sealos gen labring/kubernetes:v1.25.6 \
|
||||
labring/helm:v3.8.2 \
|
||||
labring/calico:v3.24.1 \
|
||||
labring/cert-manager:v1.8.0 \
|
||||
labring/openebs:v3.4.0 \
|
||||
labring/kubernetes-reflector:v7.0.151 \
|
||||
--masters 172.16.236.195 > Clusterfile
|
||||
sealos gen labring/kubernetes:v1.25.6\
|
||||
labring/helm:v3.12.0\
|
||||
labring/calico:v3.24.1\
|
||||
labring/cert-manager:v1.8.0\
|
||||
labring/openebs:v3.4.0\
|
||||
labring/kubernetes-reflector:v7.0.151\
|
||||
labring/zot:v1.4.3\
|
||||
labring/kubeblocks:v0.5.3\
|
||||
--env policy=anonymousPolicy\
|
||||
--masters 10.140.0.16 > Clusterfile
|
||||
|
||||
sealos apply -f Clusterfile
|
||||
```
|
||||
|
||||
Note: if you want to change pod cidr, please edit the Clusterfile before run `sealos apply`
|
||||
Note: if you want to change pod cidr, please edit the `Clusterfile` before run `sealos apply`
|
||||
|
||||
### ingress-nginx
|
||||
create `ingress-nginx-config.yaml` file
|
||||
### Ingress-nginx
|
||||
We use ingress-nginx to expose our services. You can install ingress-nginx by using sealos:
|
||||
|
||||
Create `ingress-nginx-config.yaml` file
|
||||
```yaml
|
||||
# ingress-nginx-config.yaml
|
||||
apiVersion: apps.sealos.io/v1beta1
|
||||
@@ -63,14 +77,17 @@ spec:
|
||||
strategy: merge
|
||||
```
|
||||
|
||||
install ingress-nginx and switch to NodePort mode
|
||||
Install ingress-nginx and switch to NodePort mode
|
||||
|
||||
```shell
|
||||
sealos run docker.io/labring/ingress-nginx:v1.5.1 --config-file ingress-nginx-config.yaml
|
||||
```
|
||||
|
||||
### save your cert file to a sealos config file
|
||||
### Save your cert file to a sealos config file
|
||||
|
||||
#### please make sure spec.match is the same as the image you want to run and ths registry name such as ghcr.io/docker.io
|
||||
You can skip this step if you use the self-signed cert that we provide by default.
|
||||
|
||||
Please make sure `spec.match` is the same as the image you want to run and the registry name such as ghcr.io/docker.io can
|
||||
|
||||
```yaml
|
||||
# tls-secret.yaml
|
||||
@@ -84,12 +101,13 @@ spec:
|
||||
strategy: merge
|
||||
data: |
|
||||
data:
|
||||
tls.crt: <your-fullchain.cer-base64>
|
||||
tls.key: <your-${your domain}.key-base64>
|
||||
tls.crt: <your-tls.cer-base64>
|
||||
tls.key: <your-tls.key-base64>
|
||||
```
|
||||
|
||||
------
|
||||
## run sealos cloud cluster image
|
||||
```shell
|
||||
sealos run docker.io/labring/sealos-cloud:latest --env cloudDomain="cloud.example.com" --config-file tls-secret.yaml
|
||||
sealos run docker.io/labring/sealos-cloud:latest\
|
||||
--env cloudDomain="127.0.0.1.nip.io"\
|
||||
--config-file tls-secret.yaml
|
||||
```
|
||||
|
||||
@@ -5,7 +5,7 @@ metadata:
|
||||
spec:
|
||||
path: manifests/secret.yaml
|
||||
# do not modify this image, it's used by ci.
|
||||
match: ghcr.io/labring/sealos-cloud-desktop-frontend:nightly
|
||||
match: ghcr.io/labring/sealos-cloud-desktop-frontend:latest
|
||||
strategy: merge
|
||||
data: |
|
||||
data:
|
||||
|
||||
+14
-14
@@ -1,19 +1,19 @@
|
||||
#!/bin/bash
|
||||
mkdir -p tars
|
||||
sealos pull ghcr.io/labring/sealos-cloud-user-controller:nightly
|
||||
sealos pull ghcr.io/labring/sealos-cloud-terminal-controller:nightly
|
||||
sealos pull ghcr.io/labring/sealos-cloud-app-controller:nightly
|
||||
sealos pull ghcr.io/labring/sealos-cloud-desktop-frontend:nightly
|
||||
sealos pull ghcr.io/labring/sealos-cloud-terminal-frontend:nightly
|
||||
sealos pull ghcr.io/labring/sealos-cloud-applaunchpad-frontend:nightly
|
||||
sealos pull ghcr.io/labring/sealos-cloud-dbprovider-frontend:nightly
|
||||
sealos pull ghcr.io/labring/sealos-cloud-user-controller:latest
|
||||
sealos pull ghcr.io/labring/sealos-cloud-terminal-controller:latest
|
||||
sealos pull ghcr.io/labring/sealos-cloud-app-controller:latest
|
||||
sealos pull ghcr.io/labring/sealos-cloud-desktop-frontend:latest
|
||||
sealos pull ghcr.io/labring/sealos-cloud-terminal-frontend:latest
|
||||
sealos pull ghcr.io/labring/sealos-cloud-applaunchpad-frontend:latest
|
||||
sealos pull ghcr.io/labring/sealos-cloud-dbprovider-frontend:latest
|
||||
|
||||
|
||||
|
||||
sealos save -o tars/user.tar ghcr.io/labring/sealos-cloud-user-controller:nightly
|
||||
sealos save -o tars/terminal.tar ghcr.io/labring/sealos-cloud-terminal-controller:nightly
|
||||
sealos save -o tars/app.tar ghcr.io/labring/sealos-cloud-app-controller:nightly
|
||||
sealos save -o tars/frontend-desktop.tar ghcr.io/labring/sealos-cloud-desktop-frontend:nightly
|
||||
sealos save -o tars/frontend-terminal.tar ghcr.io/labring/sealos-cloud-terminal-frontend:nightly
|
||||
sealos save -o tars/frontend-applaunchpad.tar ghcr.io/labring/sealos-cloud-applaunchpad-frontend:nightly
|
||||
sealos save -o tars/frontend-dbprovider.tar ghcr.io/labring/sealos-cloud-dbprovider-frontend:nightly
|
||||
sealos save -o tars/user.tar ghcr.io/labring/sealos-cloud-user-controller:latest
|
||||
sealos save -o tars/terminal.tar ghcr.io/labring/sealos-cloud-terminal-controller:latest
|
||||
sealos save -o tars/app.tar ghcr.io/labring/sealos-cloud-app-controller:latest
|
||||
sealos save -o tars/frontend-desktop.tar ghcr.io/labring/sealos-cloud-desktop-frontend:latest
|
||||
sealos save -o tars/frontend-terminal.tar ghcr.io/labring/sealos-cloud-terminal-frontend:latest
|
||||
sealos save -o tars/frontend-applaunchpad.tar ghcr.io/labring/sealos-cloud-applaunchpad-frontend:latest
|
||||
sealos save -o tars/frontend-dbprovider.tar ghcr.io/labring/sealos-cloud-dbprovider-frontend:latest
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cloudDomain="cloud.io"
|
||||
cloudDomain="127.0.0.1.nip.io"
|
||||
tlsCrtPlaceholder="<tls-crt-placeholder>"
|
||||
tlsKeyPlaceholder="<tls-key-placeholder>"
|
||||
mongodb_uri=""
|
||||
|
||||
@@ -4,7 +4,7 @@ USER 65532:65532
|
||||
COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV certSecretName="wildcard-cert"
|
||||
ENV passWordEnabled="false"
|
||||
ENV githubEnabled="false"
|
||||
|
||||
@@ -45,7 +45,7 @@ spec:
|
||||
|
||||
```shell
|
||||
sealos run \
|
||||
--env cloudDomain="cloud.sealos.io" \
|
||||
--env cloudDomain="127.0.0.1.nip.io" \
|
||||
--env wildcardCertSecretName="wildcard-cert" \
|
||||
--env passwordEnabled="true" \
|
||||
docker.io/labring/sealos-cloud-desktop:latest \
|
||||
|
||||
@@ -5,7 +5,7 @@ USER 65532:65532
|
||||
COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV ingressSecret="wildcard-cert"
|
||||
|
||||
CMD ["kubectl apply -f manifests"]
|
||||
|
||||
@@ -5,7 +5,7 @@ USER 65532:65532
|
||||
COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV certSecretName="wildcard-cert"
|
||||
|
||||
CMD ["kubectl apply -f manifests"]
|
||||
|
||||
@@ -6,7 +6,7 @@ COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
ENV certSecretName="wildcard-cert"
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV transferEnabled="true"
|
||||
ENV rechargeEnabled="true"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ USER 65532:65532
|
||||
COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV certSecretName="wildcard-cert"
|
||||
|
||||
CMD ["kubectl apply -f manifests"]
|
||||
|
||||
@@ -5,7 +5,7 @@ USER 65532:65532
|
||||
COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV certSecretName="wildcard-cert"
|
||||
|
||||
CMD ["kubectl apply -f manifests"]
|
||||
|
||||
@@ -6,7 +6,7 @@ COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
ENV certSecretName="wildcard-cert"
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV ttydImage="docker.io/labring/docker-terminal:1.20.4-6"
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ COPY registry registry
|
||||
COPY manifests manifests
|
||||
COPY scripts scripts
|
||||
|
||||
ENV cloudDomain="cloud.example.com"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV certSecretName="wildcard-cert"
|
||||
ENV callbackUrl="cloud.example.com/login/callback"
|
||||
ENV ssoEndpoint="login.cloud.example.com"
|
||||
|
||||
Reference in New Issue
Block a user