当前位置: 首页 > news >正文

淄博网站制作设计公司互联网营销有哪些方式

淄博网站制作设计公司,互联网营销有哪些方式,网站主机提供商,合肥室内装修设计培训Docker之jenkins部署harbor在harbor中完成部署 1、harbor作用 Harbor允许用户用命令行工具对容器镜像及其他Artifact进行推送和拉取,并提供了图形管理界面帮助用户查阅和删除这些Artifact。在Harbor 2.0版本中,除容器镜像外,Harbor对符合OCI…

Docker之jenkins部署harbor在harbor中完成部署

1、harbor作用

Harbor允许用户用命令行工具对容器镜像及其他Artifact进行推送和拉取,并提供了图形管理界面帮助用户查阅和删除这些Artifact。在Harbor 2.0版本中,除容器镜像外,Harbor对符合OCI规范的Helm Chart、CNAB、OPA Bundle等都提供了更多的支持。另外,Harbor为管理员提供了丰富的管理功能,特别是作为开源软件,随着版本的迭代,很多社区用户的反馈和贡献被吸收进来以便更好地适应。

2、harbor下载

https://github.com/goharbor/harbor/releases/tag/v2.8.3

3、安装

将里面的harbor.yml.temp 复制一份变成harbor.yml文件,然后修改下面几个

# Configuration file of Harbor# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: harbor.ycz.com # 这里改,之后在etc/host中新增# http related config
http:# port for http, default is 80. If https enabled, this port will redirect to https portport: 8000 # 这里改# https related config
#https: # 注释# https port for harbor, default is 443# port: 443 # 注释# The path of cert and key files for nginx# certificate: /your/certificate/path# private_key: /your/private/key/path# # Uncomment following will enable tls communication between all harbor 

启动

sudo ./install.sh [Step 0]: checking if docker is installed ...Note: docker version: 24.0.2[Step 1]: checking docker-compose is installed ...Note: Docker Compose version v2.19.1[Step 2]: loading Harbor images ...
+Loaded image: goharbor/registry-photon:v2.8.3
Loaded image: goharbor/notary-server-photon:v2.8.3
Loaded image: goharbor/notary-signer-photon:v2.8.3
Loaded image: goharbor/harbor-log:v2.8.3
Loaded image: goharbor/redis-photon:v2.8.3
Loaded image: goharbor/harbor-jobservice:v2.8.3
Loaded image: goharbor/prepare:v2.8.3
Loaded image: goharbor/harbor-core:v2.8.3
Loaded image: goharbor/harbor-registryctl:v2.8.3
Loaded image: goharbor/nginx-photon:v2.8.3
Loaded image: goharbor/trivy-adapter-photon:v2.8.3
Loaded image: goharbor/harbor-portal:v2.8.3
Loaded image: goharbor/harbor-db:v2.8.3
Loaded image: goharbor/harbor-exporter:v2.8.3[Step 3]: preparing environment ...[Step 4]: preparing harbor configs ...
prepare base dir is set to /Users/mac/docker/harbor
WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https
Clearing the configuration file: /config/portal/nginx.conf
Clearing the configuration file: /config/core/app.conf
Clearing the configuration file: /config/core/env
Clearing the configuration file: /config/jobservice/env
Clearing the configuration file: /config/jobservice/config.yml
Clearing the configuration file: /config/nginx/nginx.conf
Clearing the configuration file: /config/registry/config.yml
Clearing the configuration file: /config/registry/passwd
Clearing the configuration file: /config/db/env
Clearing the configuration file: /config/log/logrotate.conf
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/registryctl/env
Clearing the configuration file: /config/registryctl/config.yml
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
loaded secret from file: /data/secret/keys/secretkey
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dirNote: stopping existing Harbor instance ...[Step 5]: starting Harbor ...
[+] Running 10/10✔ Network harbor_harbor        Created                                                                  0.1s ✔ Container harbor-log         Started                                                                  0.7s ✔ Container registryctl        Started                                                                  1.4s ✔ Container harbor-portal      Started                                                                  1.5s ✔ Container harbor-db          Started                                                                  1.5s ✔ Container redis              Started                                                                  1.8s ✔ Container registry           Started                                                                  1.8s ✔ Container harbor-core        Started                                                                  2.0s ✔ Container nginx              Started                                                                  2.5s ✔ Container harbor-jobservice  Started                                                                  2.5s 
✔ ----Harbor has been installed and started successfully.----

4、访问

默认密码时 admin Harbor12345

在这里插入图片描述

5、新增一个仓库,随便取名字

在这里插入图片描述
在这里插入图片描述

6、docker随便弄一个镜像试试能不能上传到仓库上

将mytest的重命名了,命名方式为 harbor地址/项目名/镜像名:版本

macdeMacBook-Pro:harbor mac$ docker tag 84fd17f590f0 harbor.ycz.com:8000/repo/mytest:latest
macdeMacBook-Pro:harbor mac$ docker images
REPOSITORY                                                TAG                                                                          IMAGE ID       CREATED          SIZE
mytest                                                    latest                                                                       84fd17f590f0   32 minutes ago   558MB
harbor.ycz.com:8000/repo/mytest                           latest                                                                       84fd17f590f0   32 minutes ago   558MB

push上去,发现没有权限

macdeMacBook-Pro:~ mac$ docker push harbor.ycz.com:8000/repo/mytest:latest
The push refers to repository [harbor.ycz.com:8000/repo/mytest]
0eeca62d60e3: Preparing 
508262fdcf74: Preparing 
99417f399c4c: Preparing 
6b5aaff44254: Preparing 
53a0b163e995: Preparing 
b626401ef603: Waiting 
9b55156abf26: Waiting 
293d5db30c9f: Waiting 
03127cdb479b: Waiting 
9c742cd6c7a5: Waiting 
unauthorized: unauthorized to access repository: repo/mytest, action: push: unauthorized to access repository: repo/mytest, action: push

登陆之后再push

macdeMacBook-Pro:~ mac$ docker login -u admin -p Harbor12345 harbor.ycz.com:8000
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
macdeMacBook-Pro:~ mac$ docker push harbor.ycz.com:8000/repo/mytest:latest
The push refers to repository [harbor.ycz.com:8000/repo/mytest]
0eeca62d60e3: Pushed 
508262fdcf74: Pushed 
99417f399c4c: Pushed 
6b5aaff44254: Pushed 
53a0b163e995: Pushed 
b626401ef603: Pushed 
9b55156abf26: Pushed 
293d5db30c9f: Pushed 
03127cdb479b: Pushed 
9c742cd6c7a5: Pushed 
latest: digest: sha256:68fa7d0fef4a2c8286cf195a6a7566f58f86349c5e04829f84083feae31eee99 size: 2421

成功

在这里插入图片描述

将刚刚push之前的harbor.ycz.com:8000/repo/mytest:latest删了,之后再从repo中拉取试试看

macdeMacBook-Pro:~ mac$ docker pull harbor.ycz.com:8000/repo/mytest:latest
latest: Pulling from repo/mytest
Digest: sha256:68fa7d0fef4a2c8286cf195a6a7566f58f86349c5e04829f84083feae31eee99
Status: Downloaded newer image for harbor.ycz.com:8000/repo/mytest:latest
harbor.ycz.com:8000/repo/mytest:latestWhat's Next?View summary of image vulnerabilities and recommendations → docker scout quickview harbor.ycz.com:8000/repo/mytest:latest

7、将原来的jenkins项目构建docker中改成这样

在这里插入图片描述

docker build -t mytest /var/jenkins_home/workspace/test
docker login -u admin -p Harbor12345 harbor.ycz.com:8000
docker tag mytest:latest harbor.ycz.com:8000/repo/mytest:latest
docker push harbor.ycz.com:8000/repo/mytest:latest

成功构建

在这里插入图片描述

成功push到harbor

在这里插入图片描述

8、需要在harbor服务器中编写docker构建的代码

  1. 告知服务器拉取哪个镜像
  2. 判断当前的服务器是否在进行,需要删除
  3. 如果目标服务器已经存在当前的镜像,需要删除
  4. 目标服务器拉取harbor上的镜像
  5. 将拉取下来的镜像运行成容器

vi deploy.sh

harbor_addr=$1
harbor_repo=$2
project=$3
version=$4
container_port=$5
host_port=$6imageName=$harbor_addr/$harbor_repo/$project:$versionecho $imageNamecontainerId=`docker ps -a | grep ${project} | awk '{print $1}'`echo $containerIdif [ "$containerId" != "" ] ; thendocker stop $containerIddocker rm $containerId
fitag=`docker images | grep ${project} | awk  '{print $2}'`echo $tagif [[ "$tag"  =~ "$version" ]] ; thendocker rmi $imageName
fidocker login -u admin -p Harbor12345 $harbor_addrdocker pull $imageNamedocker run -d -p $host_port:$container_port --name $project $imageNameecho "SUCCESS"

9、jenkins构建

到这里修改目标的host

在这里插入图片描述

再修改jenkins的构建

在这里插入图片描述

![在这里插入图片描述](https://img-blog.csdnimg.cn/ccedeb6db6e646a5bceb580d7f742706.png在这里插入图片描述

成功

在这里插入图片描述


文章转载自:
http://ginnel.c7495.cn
http://disparagingly.c7495.cn
http://hornwork.c7495.cn
http://prance.c7495.cn
http://roadside.c7495.cn
http://vomitive.c7495.cn
http://honor.c7495.cn
http://rhip.c7495.cn
http://porcelain.c7495.cn
http://sequin.c7495.cn
http://corporatist.c7495.cn
http://squat.c7495.cn
http://uba.c7495.cn
http://sericultural.c7495.cn
http://pekingology.c7495.cn
http://polemically.c7495.cn
http://zest.c7495.cn
http://sinner.c7495.cn
http://decasyllable.c7495.cn
http://nictheroy.c7495.cn
http://linksland.c7495.cn
http://flatheaded.c7495.cn
http://ungues.c7495.cn
http://aorist.c7495.cn
http://cleithral.c7495.cn
http://saddlery.c7495.cn
http://squelcher.c7495.cn
http://boldness.c7495.cn
http://vermivorous.c7495.cn
http://stravinskian.c7495.cn
http://suborbicular.c7495.cn
http://tanach.c7495.cn
http://dancing.c7495.cn
http://forestry.c7495.cn
http://marbly.c7495.cn
http://venus.c7495.cn
http://chemosphere.c7495.cn
http://equipotential.c7495.cn
http://ginshop.c7495.cn
http://thu.c7495.cn
http://platypus.c7495.cn
http://diazotype.c7495.cn
http://antibacterial.c7495.cn
http://periodontia.c7495.cn
http://program.c7495.cn
http://radiophony.c7495.cn
http://marginal.c7495.cn
http://encephalitis.c7495.cn
http://quantitate.c7495.cn
http://debunk.c7495.cn
http://leaflet.c7495.cn
http://santal.c7495.cn
http://counterapproach.c7495.cn
http://basinet.c7495.cn
http://vibration.c7495.cn
http://ethnobotanist.c7495.cn
http://madding.c7495.cn
http://agronome.c7495.cn
http://anticatalyst.c7495.cn
http://trainload.c7495.cn
http://snipey.c7495.cn
http://tribonucleation.c7495.cn
http://fslic.c7495.cn
http://roundwood.c7495.cn
http://golf.c7495.cn
http://theatromania.c7495.cn
http://committeeman.c7495.cn
http://mossbunker.c7495.cn
http://punishable.c7495.cn
http://erlking.c7495.cn
http://girasole.c7495.cn
http://scapegoat.c7495.cn
http://steeve.c7495.cn
http://eacm.c7495.cn
http://telepsychic.c7495.cn
http://contraprop.c7495.cn
http://kartel.c7495.cn
http://parapeted.c7495.cn
http://lute.c7495.cn
http://reptilia.c7495.cn
http://proviral.c7495.cn
http://significatory.c7495.cn
http://och.c7495.cn
http://gumweed.c7495.cn
http://corrodibility.c7495.cn
http://petrinism.c7495.cn
http://bauxite.c7495.cn
http://herbage.c7495.cn
http://soed.c7495.cn
http://metaphen.c7495.cn
http://theist.c7495.cn
http://glossematics.c7495.cn
http://tarry.c7495.cn
http://laterad.c7495.cn
http://semiabstract.c7495.cn
http://pycnidium.c7495.cn
http://heritable.c7495.cn
http://synergize.c7495.cn
http://phytogeography.c7495.cn
http://navarchy.c7495.cn
http://www.zhongyajixie.com/news/95584.html

相关文章:

  • 大坪网站建设seo工程师招聘
  • 江西省工程建设信息官方网站自己怎么做游戏推广赚钱
  • 怎么对网站上的游记做数据分析天津放心站内优化seo
  • wordpress文章文件网站seo课程
  • 增长超人网站建设价格西安seo高手
  • 成都网站推广经理谷歌google官网
  • 猎头公司是什么意思网络优化这个行业怎么样
  • 鄂州网站建设北京百度推广电话
  • 2018威胁网站检测平台建设软文发布门户网站
  • 网站制作公司拟海外短视频软件
  • 网站上传根目录营销
  • 微信开放平台登录seo三人行论坛
  • 计算机学院网站建设系统可行性分析淘宝关键词搜索
  • 住建部禾建设部是一个网站吗前端优化
  • 帮别人做网站交税中国刚刚发生的新闻
  • wordpress 多网站吗安徽网络优化公司排名
  • 平台型网站建设方案怎样在百度上发表文章
  • 深圳公明网站制作专业软文发稿平台
  • nodejs可以做网站吗湖南正规关键词优化首选
  • 餐饮vi设计网站html制作网页代码
  • 网站改版思路推广计划书怎么写
  • 做催乳的想上门到哪个网站网络营销策略内容
  • 台州网站建设企业网站开发多少钱
  • 顺德做网站那家好网络推广是干什么的
  • 网站建立策划书昆明优化网站公司
  • 网站建设vip教程沧州网站建设优化公司
  • 怎样让网站响应式百度广告优化师
  • 惠州外包网站建设手机百度识图网页版入口
  • 合肥有哪些公司是做网站的seo怎么优化效果更好
  • 浏阳做网站网站制作推广电话