Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
huolongshe 78d4c6a3d0 | 2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago | |
ability.yml | 2 years ago | |
consul-config-loader.yml | 2 years ago | |
consul.yml | 2 years ago | |
cubeai-configmap.yml | 2 years ago | |
gateway.yml | 2 years ago | |
ingressgateway.yml | 2 years ago | |
nexus.yml | 2 years ago | |
nexus_configure_minikube.sh | 2 years ago | |
pmodelhub.yml | 2 years ago | |
popen.yml | 2 years ago | |
portal.yml | 2 years ago | |
ppersonal.yml | 2 years ago | |
redis.yml | 2 years ago | |
uaa-mysql.yml | 2 years ago | |
uaa.yml | 2 years ago | |
umd.yml | 2 years ago | |
umm-mysql.yml | 2 years ago | |
umm.yml | 2 years ago | |
umu.yml | 2 years ago |
在将CubeAI部署至k8s云原生环境之前,可以先在单机上使用minikube进行部署测试。
参见根目录README文档(https://git.openi.org.cn/OpenI/cubeai)完成开发环境初始配置。
Istio的安装基于minikube,也需要在普通账号下进行(假定已创建普通帐号:minikube,并且安装启动好minikube):
# su minikube
$ cd ~
$ wget https://github.com/istio/istio/releases/download/1.11.2/istio-1.11.2-linux-amd64.tar.gz --no-check-certificate
$ tar xzf istio-1.11.2-linux-amd64.tar.gz
$ chmod u+x istio-1.11.2/bin/istioctl
$ ./istio-1.11.2/bin/istioctl install --set hub=mirror.baidubce.com/istio -y
$ minikube kubectl -- -nistio-system patch svc istio-ingressgateway --patch '{"spec":{"externalIPs":["'"$(minikube ip)"'"],"ports":[{"name":"nexus-ui","port":8081,"protocol":"TCP","targetPort":8081},{"name":"consul-ui","port":8500,"protocol":"TCP","targetPort":8500},{"name":"uaa-mysql","port":8306,"protocol":"TCP","targetPort":8306},{"name":"umm-mysql","port":8307,"protocol":"TCP","targetPort":8307}]}}'
各微服务镜像编译和打包
预先将CubeAI源代码下载至当前帐号的 cubenet 目录之下,然后:
$ cd ~/cubenet/cubeai/
$ sh build-dockers.sh
各微服务镜像加载至Minikube集群
$ minikube image load uaa gateway portal umm umu umd ability pmodelhub popen ppersonal
根据实际情况修改本目录下的cubeai-configmap.yml配置文件,注意:
kubernetes:api:token配置项的值,填入此命令的运行结果:
$ minikube kubectl -- -nkube-system get $(minikube kubectl -- get secret -nkube-system -oname|grep remote-admin-token) -ojsonpath={.data.token}|base64 -d
将文件中出现的所有IP地址字符串“192.168.49.2”,替换为此命令的运行结果:
$ minikube kubectl -- get ep kubernetes --no-headers|awk '{print $2}'|cut -f1 -d':'
拉起所有K8S资源:
$ minikube kubectl -- create namespace cubeai
$ minikube kubectl -- label namespace cubeai istio-injection=enabled
$ minikube kubectl -- apply -f ~/cubenet/cubeai/minikube
查看所有资源是否正常
$ minikube kubectl -- -ncubeai get cm,pvc,pv,deploy,po,svc,vs,gw -owide
等待nexus服务启动后,执行nexus自动配置:
$ cd ~/cubenet/cubeai/minikube
$ sh nexus_configure_minikube.sh
如某个微服务代码有更新,以uaa为例,打包新的uaa镜像之后必须执行:
$ cd ~/cubenet/cubeai/minikube
$ minikube kubectl -- delete -f uaa.yml
$ minikube image rm uaa
$ minikube image load uaa
$ minikube kubectl -- apply -f uaa.yml
在浏览器中输入如下地址打开CubeAI平台页面:
http://192.168.49.2
删除所有Minikube部署的微服务的方法:
$ minikube kubectl -- delete -f ~/cubenet/cubeai/minikube
CubeAI智立方是中国联通研究院自主研发的集AI模型自动化服务封装、发布、共享、部署和能力开放等功能于一体的开源AI算能服务平台,其核心作用在于打通AI模型开发至实际生产应用之间的壁垒,加速AI创新和应用进程,促进AI应用从设计、开发直到部署、运营整个生命周期的自动化快速迭代和演进。
Shell
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》