-
使用 Helm 部署 Camunda 平台之前,您需要以下内容:
1.* Kubernetes 集群:本地、云平台或本地。 Minikube文档
安装minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
sudo install minikube-darwin-amd64 /usr/local/bin/minikube
wudy.yu@promote ~ % curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 71.8M 100 71.8M 0 0 3231k 0 0:00:22 0:00:22 --:--:-- 3084k
wudy.yu@promote ~ % sudo install minikube-darwin-amd64 /usr/local/bin/minikube
Password:
启动集群
minikube start
wudy.yu@promote ~ % kubectl get po -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-565d847f94-cn4qx 1/1 Running 0 35m
kube-system etcd-minikube 1/1 Running 0 35m
kube-system kube-apiserver-minikube 1/1 Running 0 35m
kube-system kube-controller-manager-minikube 1/1 Running 0 35m
kube-system kube-proxy-fmbh7 1/1 Running 0 35m
kube-system kube-scheduler-minikube 1/1 Running 0 35m
kube-system storage-provisioner 1/1 Running 1 (35m ago) 35m
minikube 开启dashboard
minikube dashboard
创建一个部署并在端口80上公开
wudy.yu@promote ~ % kubectl create deployment nginx-wudy --image=docker.io/nginx:1.23
deployment.apps/nginx-wudy created
wudy.yu@promote ~ % kubectl expose deployment nginx-wudy --type=NodePort --port=80
service/nginx-wudy exposed
minikube启动浏览器
wudy.yu@promote ~ % kubectl get services nginx-wudy
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx-wudy NodePort 10.101.84.180 <none> 80:32213/TCP 2m43s
wudy.yu@promote ~ % minikube service nginx-wudy
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ You are trying to run the amd64 binary on an M1 system. │
│ Please consider running the darwin/arm64 binary instead. │
│ Download at https://github.com/kubernetes/minikube/releases/download/v1.27.1/minikube-darwin-arm64 │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|-----------|------------|-------------|---------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-----------|------------|-------------|---------------------------|
| default | nginx-wudy | 80 | http://192.168.49.2:32213 |
|-----------|------------|-------------|---------------------------|
🏃 Starting tunnel for service nginx-wudy.
|-----------|------------|-------------|------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-----------|------------|-------------|------------------------|
| default | nginx-wudy | | http://127.0.0.1:64845 |
|-----------|------------|-------------|------------------------|
🎉 正通过默认浏览器打开服务 default/nginx-wudy...
或者使用kubectl转发端口
kubectl port-forward service/hello-minikube 7080:80
访问:http://localhost:7080/
2.* Helm二进制文件。
brew install helm
3.* Kubectl二进制文件。
brew install kubectl
- 添加 Camunda Helm
您必须添加 Camunda Helm 图表存储库才能使用图表。完成此操作后,Helm 能够获取并安装托管在https://helm.camunda.io中的图表
wudy.yu@promote ~ % helm repo add camunda https://helm.camunda.io
"camunda" has been added to your repositories
wudy.yu@promote ~ % helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "camunda" chart repository
Update Complete. ⎈Happy Helming!⎈
- 安装 Camunda Helm
创建、查看命名空间
wudy.yu@promote ~ % kubectl create namespace camunda
namespace/camunda created
wudy.yu@promote ~ % kubectl get ns
NAME STATUS AGE
camunda Active 12s
default Active 93m
kube-node-lease Active 93m
kube-public Active 93m
kube-system Active 93m
kubernetes-dashboard Active 53m
在 Kubernetes 集群中安装可用的 Camunda Platform 8 组件
wudy.yu@promote ~ % helm install camunda-wudy -n camunda camunda/camunda-platform
NAME: camunda-wudy
LAST DEPLOYED: Sun Oct 23 12:34:47 2022
NAMESPACE: camunda
STATUS: deployed
REVISION: 1
NOTES:
# (camunda-platform - 8.0.14)
___ _ __ __ _ _ _ _ ___ _ ___ _ _ _____ ___ ___ ___ __ __
/ __| /_\ | \/ | | | | \| | \ /_\ | _ \ | /_\_ _| __/ _ \| _ \ \/ |
| (__ / _ \| |\/| | |_| | .` | |) / _ \ | _/ |__ / _ \| | | _| (_) | / |\/| |
\___/_/ \_\_| |_|\___/|_|\_|___/_/ \_\ |_| |____/_/ \_\_| |_| \___/|_|_\_| |_|
## Installed Services:
- Zeebe:
- Enabled: true
- Docker Image used for Zeebe: camunda/zeebe:8.0.0
- Zeebe Cluster Name: "camunda-wudy-zeebe"
- Prometheus ServiceMonitor Enabled: false
- Operate:
- Enabled: true
- Docker Image used for Operate: camunda/operate:8.0.0
- Tasklist:
- Enabled: true
- Docker Image used for Tasklist: camunda/tasklist:8.0.0
- Optimize:
- Enabled: true
- Docker Image used for Optimize: camunda/optimize:3.9.0-preview-2
- Identity:
- Enabled: true
- Docker Image used for Identity: camunda/identity:8.0.0
- Keycloak: bitnami/keycloak:16.1.1-debian-10-r52
- Elasticsearch:
- Enabled: true
- ElasticSearch URL: http://elasticsearch-master:9200
### Zeebe
The Cluster itself is not exposed as a service that means that you can use `kubectl port-forward` to access the Zeebe cluster from outside Kubernetes:
> kubectl port-forward svc/camunda-wudy-zeebe-gateway 26500:26500 -n camunda
Now you can connect your workers and clients to `localhost:26500`
### Connecting to Web apps
As part of the Helm charts an ingress definition can be deployed, but you require to have an Ingress Controller for that Ingress to be Exposed.
In order to deploy the ingress manifest, set `<service>.ingress.enabled` to `true`. Example: `operate.ingress.enabled=true`
If you don't have an ingress controller you can use `kubectl port-forward` to access the deployed web application from outside the cluster:
Identity: kubectl port-forward svc/camunda-wudy-identity 8080:80
Operate: kubectl port-forward svc/camunda-wudy-operate 8081:80
Tasklist: kubectl port-forward svc/camunda-wudy-tasklist 8082:80
Optimize: kubectl port-forward svc/camunda-wudy-optimize 8083:80
If you want to use different ports for the services, please adjust the related configs in the values file since these ports are used as redirect URL for Keycloak.
The authentication via Identity/Keycloak is enabled. In order to login into one of the services please port-forward to Keycloak
as well, otherwise a login will not be possible. Make sure you use `18080` as port.
> kubectl port-forward svc/camunda-wudy-keycloa 18080:80
Now you can point your browser to one of the service's login page. Example: http://localhost:8081 for Operate.
Default user and password: "demo/demo"
wudy.yu@promote ~ %
网友评论