首页 > 其他分享 >opea helm app

opea helm app

时间:2024-09-24 19:46:19浏览次数:1  
标签:harbor app harborurl opea certs helm -- ca

Helm | Docs   Helm 中文手册

 

 

env

There are 2 ENV values, one is for the harbor registry FQDN, another is used for the  workspace of image to store

harborurl=your-harbor.com
project=catalog-apps

Install the certificate on the machine

we leverage the openssl  to get certificate from harbor registry and store it in docker configure path. 

sudo mkdir -p /etc/docker/certs.d/${harborurl}
 
openssl s_client -showcerts  -connect registry.${harborurl}:443 </dev/null | awk '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/' |sudo tee -a /etc/docker/certs.d/${harborurl}/ca.crt

or alternative way: 

wget --no-proxy http://${harborurl}:8081/ca.crt
sudo mkdir -p /etc/docker/certs.d/${harborurl}
sudo mv ca.crt /etc/docker/certs.d/${harborurl}
sudo systemctl restart docker

On edge node

Add the certificate to the trust pool

sudo cp ca.crt /usr/local/share/ca-certificates/habor-ca.crt
 
sudo update-ca-certificates --fresh

Login the harbor registry

run this command on orchestrator server to get the the credential of harbor registry.

 
credential=$(kubectl get -n harbor secrets harbor-admin-credential -o json | jq .metadata.annotations | grep -oP "(?<=\"credential).*(?=}})" | tr -d '"\')
credential=${credential#:}
echo "credential=$credential"

Note

NOTE: copy the above print to edge node.

#  Username: admin; Password: Harbor12345
user=${credential%:*}
pass=${credential#*:}
docker login ${harborurl}

Docker push

push your docker image to harbor registry

dockimg=test
ov=latest
nv=latest
 
docker tag $dockimg:$ov ${harborurl}/${project}/$dockimg:$nv
docker push ${harborurl}/${project}/$dockimg:$nv

Push helm chart

first install helm tool.

curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm

check your helm-chart before you push to harbor registry

chart=mychartpath
helm install . --dry-run --debug ./$chart

then push your helm chart to harbor registry

 
chartball=xxx.tgz
chratpath=<helm-dir>
reponame=iotedge-repo
tar czvf $chartball $chratpath
 
 
helm plugin install https://github.com/chartmuseum/helm-push
helm repo add --username ${user} --password ${pass} --ca-file /etc/docker/certs.d/${harborurl}/ca.crt $reponame https://registry.${harborurl}/chartrepo/${project}
helm cm-push -u ${user} -p ${pass} --ca-file /etc/docker/certs.d/${harborurl}/ca.crt $chartball $reponame

Batch Push helm charts

for SUBDIR in */; do
 
    # Remove trailing slash
    SUBDIR_NAME="${SUBDIR%/}"
    echo $SUBDIR_NAME
 
    if [ -e $SUBDIR_NAME/Chart.yaml ]
    then
        echo "This is a Helm Chart file"
        tar -czf "${SUBDIR_NAME}.tgz" "$SUBDIR_NAME"
        helm cm-push -u ${user} -p ${pass} --ca-file /etc/docker/certs.d/${harborurl}/ca.crt ${SUBDIR_NAME}.tgz $reponame
        rm ${SUBDIR_NAME}.tgz
    else
        echo "Not a Helm Chart file, skip"
    fi
done

Trouble shooting

upload the certs into new cluster

mkdir -p /opt/certs
cd /opt/certs
wget --no-proxy http://${harborurl}:8081/ca.crt
wget --no-proxy http://${harborurl}:8081/harbor.com.crt
wget --no-proxy http://${harborurl}:8081/harbor.com.key

update the rke2 registry

$ cat /etc/rancher/rke2/registries.yaml
---
# Define the proxy registry to pull images from
mirrors:
  zz-iotedge-harbor.sh.intel.com:
    endpoint:
      - "https://zz-iotedge-harbor.sh.intel.com"
 
configs:
  "zz-iotedge-harbor.sh.intel.com":
    auth:
      username: admin
      password: 1q2w3e@intelQ_0
    tls:
      cert_file: /opt/certs/harbor.com.crt
      key_file: /opt/certs/harbor.com.key
      ca_file: /opt/certs/ca.crt
      insecure_skip_verify: true

restart the service

$ sudo systemctl restart rke2-server
# Make sure it's in effect.
$ sudo cat /var/lib/rancher/rke2/agent/etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".registry.configs."zz-iotedge-harbor.sh.intel.com".auth]
  username = "admin"
  password = "1q2w3e@intelQ_0"
 
 
 
 
[plugins."io.containerd.grpc.v1.cri".registry.configs."zz-iotedge-harbor.sh.intel.com".tls]
  ca_file = "/opt/certs/ca.crt"
  cert_file = "/opt/certs/harbor.com.crt"
  key_file = "/opt/certs/harbor.com.key"
  insecure_skip_verify = true

 

 

标签:harbor,app,harborurl,opea,certs,helm,--,ca
From: https://www.cnblogs.com/shaohef/p/18429870

相关文章

  • 谷歌地图 | Navigation SDK 重磅发布!为你的 App 注入导航新体验
    9月17日,Google地图正式发布NavigationSDKforAndroid和iOS!借助NavigationSDK,开发者们现在可以更轻松地为用户打造定制化的导航体验,提升用户满意度,增强用户粘性。无论是界面风格、路线规划还是实时交通信息,SDK都能满足你的需求,帮助你打造一款更具竞争力的App。图例1Nav......
  • 如何开发数字药店与医保购药APP:技术架构与实现细节
    本文将深入探讨数字药店与医保购药APP的技术架构及其实现细节,帮助开发者更好地理解该领域的技术需求。 一、技术架构概述数字药店与医保购药APP的技术架构通常可以分为以下几个层次:1.前端层:-用户界面-用户体验2.中间层:-API网关-业务逻辑层3.后端层:-数据库-微服务架构 4.数据层:-数......
  • 谷歌地图 | Navigation SDK 重磅发布!为你的 App 注入导航新体验
    9月17日,Google地图正式发布NavigationSDKforAndroid和iOS!借助NavigationSDK,开发者们现在可以更轻松地为用户打造定制化的导航体验,提升用户满意度,增强用户粘性。无论是界面风格、路线规划还是实时交通信息,SDK都能满足你的需求,帮助你打造一款更具竞争力的App。Navigati......
  • dataframe的apply按行操作
    1.原始数据及要求+---------------+-----------+---------------+--------+|stock_name|operation|operation_day|price|+---------------+-----------+---------------+--------+|Leetcode|Buy|1|1000||CoronaMasks|Buy......
  • mapper返回值类型
    在MyBatis中,Mapper接口的方法可以返回不同类型的值,这取决于你希望如何处理查询的结果。以下是一些常见的返回类型:void:当不需要返回值时使用。通常用于INSERT、UPDATE和DELETE操作。int 或 Integer:返回受影响行数,通常用于检查操作是否成功。boolean:通常用于检查是......
  • 找到一个免费开源APP,自动搭载影像数据、地名地址API等
    找到一个免费的开源APP,代码全开源,APP里也自动搭载了影像数据API、地名地址API还有一些天气及算法API。扒了一个具体操作的教程,供大家参考。APP自助开发教程1、进入星图云开发者平台,点击登录,登录后完成开发者认证2、点击进入星图云开发者平台自助开发模块,选择APP,点击立即开始......
  • 【Vue】【uni-app】【小程序】多层嵌套方法导致this指向出错:解析 JSON 失败: TypeErro
    项目场景:在使用vue+uni-app开发微信小程序的时候,调试报错:解析JSON失败:TypeError:Cannotreadproperty‘push’ofundefined问题描述报错如下:以下是出问题的代码:data(){return{fileLists:[],}}//上传文......
  • 下载 |《2024年AI Agent行业报告》——大模型时代的“APP”,探索新一代人机交互及协作
    前言随着大型模型在各行各业的广泛应用,基于大型模型的人工智能体(AIAgent)迎来了快速发展的阶段。研究AIAgent是人类不断接近人工通用智能(AGI)的探索之一。知名AIAgent项目AutoGPT已经在GitHub的星星数已经达到140,000颗,进一步反映了用户对于AIAgents项目的广泛兴趣和支持。随......
  • AI6012: Machine Learning Methodologie Applications
    AI6012:MachineLearningMethodologies&pplicationsAssignment(25points)Importantnotes:tofinishthisassignment,youareallowedtolookuptextbooksorsearchmaterialsviaGoogleforreference.NOplagiarismfromclassmatesisallowed.Thesubm......
  • uniapp微信小程序 [AI算法识别] camera拍摄 实时帧的实现
    <template> <viewclass="con"> <camera device-position="back" frame-size="small" resolution="high" @initdone="startListener" @stop="endListener" @error="er......