eclipse che(腾讯云·部署Eclipse Che[亲测有效])

发布时间:2025-12-10 19:18:35 浏览次数:14

腾讯云·部署Eclipse Che[亲测有效]-eclipse 撤回

腾讯云·部署Eclipse Che(云原生IDE)(CSDN云通用)[亲测有效]eclipseche要求使用一个泛域名来自动配置相关的服务及实现多租户模式,我们需要解析一个*.xxx.xxx.cn这样的域名到nginxcontroller,所以cert-manager申请证书时,必须使用dns01方式认证域名所有权,HTTP方式不支持泛域名的所有权认证。这里需要注意的是是controller使用的镜像地址国内无法访问,需要换成你自己的镜像地址,可以将镜像翻墙下载,然后上传到腾讯云。首次需要注册用户,然后登陆控制台即可,让您的团队尽情的享用云原生IDE吧。…

目录

准备工作

安装chectl

安装NGINX Ingress Controller

安装cert-manager

安装dnspod webhook

申请dnspod的api调用凭证

安装dnspod webhook

申请ssl证书

安装eclipse che

后续的优化提升

片尾


准备工作

已经创建了一个腾讯云容器服务集群 配置好kubectl客户端 已经有一个腾讯云(DNSPod)解析的域名

安装chectl

$ bash <(curl -sL  https://www.eclipse.org/che/chectl/)

是否还在为Ide开发工具频繁失效而烦恼,来吧关注以下公众号获取最新激活方式。亲测可用!

为防止网络爬虫,请关注公众号回复”口令”

激活idea 激活CLion DataGrip DataSpell dotCover dotMemory dotTrace GoLand PhpStorm PyCharm ReSharper ReShaC++ Rider RubyMine WebStorm 全家桶 刷新

【正版授权,激活自己账号】:Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】:官方授权 正版激活 自己使用,支持Jetbrains家族下所有IDE…

复制

安装NGINX Ingress Controller

详细安装过程见:Installation Guide – NGINX Ingress Controller

这里需要注意的是是controller使用的镜像地址国内无法访问,需要换成你自己的镜像地址,可以将镜像翻墙下载,然后上传到腾讯云容器服务的镜像仓库里。

安装cert-manager

cert-manager是原生的Kubernetes证书管理控制器。 它可以帮助从各种证书机构颁发证书,例如Let’s Encrypt,HashiCorp Vault,Venafi,简单的签名密钥对或生成自签名证书。

它将确保证书有效并且是最新的,并在到期前尝试在配置的时间续订证书。

# Kubernetes 1.16+$ kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.2/cert-manager.yaml# Kubernetes <1.16$ kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.2/cert-manager-legacy.yaml

本文只要确保会使用即可,有时间再详细介绍一下cert-manager

安装dnspod webhook

申请dnspod的api调用凭证

在安装dnspod webhook之前,需要新申请dnspod调用api接口的id和和token,首先登陆dnspod管理控制台(使用腾讯云账号即可登陆),如下图所示:

进入“密钥管理”页面,点击“创建密钥”。

在创建“创建密钥”页面,输入密钥名称,点击“确定”即可。

创建成功后,如下图所示:

复制保存ID和Token、复制保存ID和Token、复制保存ID和Token,后面将用到。

安装dnspod webhook

下载代码:

$ git clone https://github.com/qqshfox/cert-manager-webhook-dnspod.git

使用helm安装:

$ cd cert-manager-webhook-dnspod$ helm install --name cert-manager-webhook-dnspod ./deploy/cert-manager-webhook-dnspod \    --namespace <NAMESPACE-WHICH-CERT-MANAGER-INSTALLED> \    --set groupName=<GROUP_NAME> \    --set secrets.apiID=<DNSPOD_API_ID>,secrets.apiToken=<DNSPOD_API_TOKEN> \    --set clusterIssuer.enabled=true,clusterIssuer.email=<EMAIL_ADDRESS>

注意:上面的命令中中,namespace配置为che,GROUP_NAME建议使用acme.xxx.com这样的唯一标识即可,DNSPOD_API_ID和DNSPOD_API_TOKEN为上一步申请的api调用凭证,EMAIL_ADDRESS配置为您常用地址即可,在证书过期的时候会发送提醒之类到这个邮箱地址。

安装完后,webhook将自动帮您创建一个cluster issuer,如下所示:

[root@VM_0_10_centos cheworkspace]# kubectl get clusterissuerNAME                                         READY   AGEcert-manager-webhook-dnspod-cluster-issuer   True    14h

查看yaml格式,如下:

apiVersion: cert-manager.io/v1kind: ClusterIssuermetadata:  ……  name: cert-manager-webhook-dnspod-cluster-issuer  ……spec:  acme:    email: zhcj11118@126.com    preferredChain: ""    privateKeySecretRef:      name: cert-manager-webhook-dnspod-letsencrypt    server: https://acme-v02.api.letsencrypt.org/directory    solvers:    - dns01:        webhook:          config:            apiID: 184422            apiTokenSecretRef:              key: api-token              name: cert-manager-webhook-dnspod-secret          groupName: acme.venusource.com          solverName: dnspod

申请ssl证书

eclipse che要求使用一个泛域名来自动配置相关的服务及实现多租户模式,我们需要解析一个*.xxx.xxx.cn这样的域名到nginx controller,所以cert-manager申请证书时,必须使用dns01方式认证域名所有权,HTTP方式不支持泛域名的所有权认证。请确保您在腾讯云申请了相关了域名。

新建文件che-certificate.yaml,内容如下:

apiVersion: cert-manager.io/v1kind: Certificatemetadata:  name: che-certificate  namespace: chespec:  dnsNames:    - 'ide.gwunion.cn'    - '*.ide.gwunion.cn'  secretName: che-tls  issuerRef:    name: cert-manager-webhook-dnspod-cluster-issuer    kind: ClusterIssuer

系统将调用letsencrypt的acme的接口为我们的域名申请证书。

注意:这里的secretName必须为che-tls,chectl在安装时会检查,如果有有che-tls这个secret就不在自动创建一个自签名的证书,直接使用che-tls。

执行下面的命令查看证书申请情况

kubectl describe Certificate che-certificate -n che

等待通过dns方式对域名进行所有权认证,一段1-2分钟内证书就申请完毕,并保存到名称为che-tls的secret内。

安装eclipse che

安装之前,请确保您使用的域名*.xxx.xxx.com已经解析到ingress nginx controller的IP地址,查看IP地址可执行下面的命令查看:

kubectl get services --namespace ingress-nginx

IP地址为EXTERNAL-IP字段,请在腾讯云域名解析控制台或dnspod域名解析控制台解析*.xxx.xxx.com的A记录到EXTERNAL-IP。

$ chectl server:start -a helm -b ide.gwunion.cn -p k8s --multiuser --k8spodreadytimeout=13000000 --k8spodwaittimeout=30000000› Current Kubernetes context: 'cls-8437x8wt-context-default'  ✔ Verify Kubernetes API...OK  ✔ ????  Looking for an already existing Eclipse Che instance    ✔ Verify if Eclipse Che is deployed into namespace "che"...it is not  ✔ ✈️  Kubernetes preflight checklist    ✔ Verify if kubectl is installed    ✔ Verify remote kubernetes status...done.    ✔ Check Kubernetes version: Found v1.18.4-tke.2.    ✔ Verify domain is set...set to ide.gwunion.cn.    ↓ Check if cluster accessible [skipped]  ✔ Start following logs    ↓ Start following Operator logs [skipped]    ✔ Start following Eclipse Che logs...done    ✔ Start following Postgres logs...done    ✔ Start following Keycloak logs...done    ✔ Start following Plugin registry logs...done    ✔ Start following Devfile registry logs...done  ✔ Start following events    ✔ Start following namespace events...done ›   Warning: Consider using the more reliable 'OLM' installer when deploying a stable release of Eclipse Che (--installer=olm).  ✔ ????‍  Running Helm to install Eclipse Che    ✔ Verify if helm is installed    ✔ Check Helm Version: Found v3.3.1+g249e521    ✔ Create Namespace (che)...does already exist.    ✔ Check Eclipse Che TLS certificate...TLS certificate secret found    ✔ Check Cluster Role Binding...done.    ✔ Preparing Eclipse Che Helm Chart...done.    ✔ Updating Helm Chart dependencies...done.    ✔ Deploying Eclipse Che Helm Chart...done.  ✔ ✅  Post installation checklist    ✔ PostgreSQL pod bootstrap      ✔ scheduling...done.      ✔ downloading images...done.      ✔ starting...done.    ✔ Devfile registry pod bootstrap      ✔ scheduling...done.      ✔ downloading images...done.      ✔ starting...done.    ✔ Plugin registry pod bootstrap      ✔ scheduling...done.      ✔ downloading images...done.      ✔ starting...done.    ✔ Eclipse Che pod bootstrap      ✔ scheduling...done.      ✔ downloading images...done.      ✔ starting...done.    ✔ Retrieving Eclipse Che server URL... https://che-che.ide.gwunion.cn    ✔ Eclipse Che status check  ✔ Show important messages    ✔ Autogenerated Keycloak credentials are: "admin:iZ245VK5RUHV"Command server:start has completed successfully.

这里简单说明一下chectl几个参数:

-a helm 为安装方式使用helm chart -b ide.gwunion.cn 为eclipse che使用的访问域名 -p k8s 安装平台为独立安装的k8s平台 –multiuser 支持多用户 –k8spodreadytimeout=13000000 等待pod为ready状态的超时时长 –k8spodwaittimeout=30000000 等待pod启动的超时时长,为什么要配置那么长时间,主要是由于国内网络状态太差,拉取镜像的时间较长,所以越大越好。

安装完成后,即可通过 https://che-che.xxx.com访问您的eclipse che云开发ide环境了,如下图所示:

首次需要注册用户,然后登陆控制台即可,让您的团队尽情的享用云原生IDE吧。

以后不用给你的团队配笔记本电脑了,人手一个ipad,性能可按需配置:

后续的优化提升

由于目前平台所有镜像都使用国外的镜像,下载速度较慢,建议在生产环境使用将镜像本地化,可以使用腾讯云的容器镜像服务。

片尾

小编写了那么久,不妨点赞三连后再走吧!

需要做网站?需要网络推广?欢迎咨询客户经理 13272073477