ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

test3

2019-12-20 10:02:55  阅读:400  来源: 互联网

标签:test3 harbor config Generated file ikongjian root



模板
——— 
这里
 


harbor镜像仓库部署
1. 安装harbor环境
2. 安装harobr镜像仓库
通过界面登陆harbor
创建镜像项目kubernetes
测试harbor仓库可用性
报错1:镜像直接上传到harbor正常,但是通过nginx一直显示超时:
harbor镜像仓库高可用


 
 
 
 
harbor镜像仓库部署
1. 安装harbor环境
确认docker 和 docker-compose版本号
[root@harbor harbor]# docker version Client: Docker Engine - Community Version: 18.09.7 Server: Docker Engine - Community Version: 18.09.7 [root@harbor harbor]# docker-compose --version docker-compose version 1.24.1, build 4667896
 
2. 安装harobr镜像仓库
github官网地址 https://github.com/goharbor/harbor/releases
[root@harbor ~]# wget https://github.com/goharbor/harbor/releases/download/v1.9.3/harbor-offline-installer-v1.9.3.tgz [root@harbor ~]# tar -zxvf harbor-offline-installer-v1.9.1.tgz [root@harbor ~]# cd harbor/ [root@harbor harbor]# ls harbor.v1.9.1.tar.gz harbor.yml install.sh LICENSE prepare [root@harbor harbor]# ls keys/ #自己制作证书的位置 ikongjian.key ikongjian.pem
 
修改主机名,开启https认证并添加证书
[root@harbor harbor]# vim harbor.yml #修改以下这些地方 hostname: harbor.ikongjian.com https: port: 443 certificate: /root/harbor/keys/ikongjian.pem private_key: /root/harbor/keys/ikongjian.key # http_proxy: harbor.ikongjian.com # https_proxy: harbor.ikongjian.com [root@harbor harbor]# ./prepare prepare base dir is set to /root/harbor 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/db/env Generated configuration file: /config/jobservice/env Generated configuration file: /config/jobservice/config.yml loaded secret from file: /secret/keys/secretkey Generated certificate, key file: /secret/core/private_key.pem, cert file: /secret/registry/root.crt Generated configuration file: /compose_location/docker-compose.yml Clean up the input dir [root@harbor harbor]# ./install.sh [Step 0]: checking installation environment ... Note: docker version: 19.03.2 Note: docker-compose version: 1.24.1 [Step 1]: loading Harbor images ... cad87ea2da29: Loading layer [==================================================>] 77.02MB/77.02MB
 
 
通过界面登陆harbor
https://harbor.ikongjian.com ,开启https后默认只走这个

默认用户名和密码 admin Harbor12345

 
创建镜像项目kubernetes
路径:项目 -> 新建项目 -> 项目名称 kubernetes -> 确认

 
 
测试harbor仓库可用性
[root@ikongjian ~]# docker tag busybox harbor.ikongjian.com/kubernetes/busybox:v0.3 [root@ikongjian ~]# docker push harbor.ikongjian.com/kubernetes/busybox:v0.3 The push refers to repository [harbor.ikongjian.com/kubernetes/busybox] eac247cb7af5: Layer already exists v0.3: digest: sha256:24fd20af232ca4ab5efbf1aeae7510252e2b60b15e9a78947467340607cd2ea2 size: 527
 
 
报错1:镜像直接上传到harbor正常,但是通过nginx一直显示超时:
[root@ikongjian ~]# docker push harbor.ikongjian.com/kubernetes/busybox:v0.3 The push refers to repository [harbor.ikongjian.com/kubernetes/busybox] eac247cb7af5: Retrying in 10 seconds
解决:需要修改安装包里面Nginx配置文件,删掉scheme的那几行,在反向代理的配置上如果有写的话
 
harbor镜像仓库高可用
 
创建用户

 

 
 
 
 
 
问题:registry https://192.168.70.120 is unhealthy: unhealthy

 
 
 
 
 
 
 
 
 
 
 
 
 
 

模板 ——— 这里 harbor镜像仓库部署 1. 安装harbor环境 2. 安装harobr镜像仓库 通过界面登陆harbor 创建镜像项目kubernetes 测试harbor仓库可用性 报错1:镜像直接上传到harbor正常,但是通过nginx一直显示超时: harbor镜像仓库高可用 harbor镜像仓库部署 1. 安装harbor环境 确认docker 和 docker-compose版本号 [root@harbor harbor]# docker version Client: Docker Engine - Community Version: 18.09.7 Server: Docker Engine - Community Version: 18.09.7 [root@harbor harbor]# docker-compose --version docker-compose version 1.24.1, build 4667896 2. 安装harobr镜像仓库 github官网地址 https://github.com/goharbor/harbor/releases [root@harbor ~]# wget https://github.com/goharbor/harbor/releases/download/v1.9.3/harbor-offline-installer-v1.9.3.tgz [root@harbor ~]# tar -zxvf harbor-offline-installer-v1.9.1.tgz [root@harbor ~]# cd harbor/ [root@harbor harbor]# ls harbor.v1.9.1.tar.gz harbor.yml install.sh LICENSE prepare [root@harbor harbor]# ls keys/ #自己制作证书的位置 ikongjian.key ikongjian.pem 修改主机名,开启https认证并添加证书 [root@harbor harbor]# vim harbor.yml #修改以下这些地方 hostname: harbor.ikongjian.com https: port: 443 certificate: /root/harbor/keys/ikongjian.pem private_key: /root/harbor/keys/ikongjian.key # http_proxy: harbor.ikongjian.com # https_proxy: harbor.ikongjian.com [root@harbor harbor]# ./prepare prepare base dir is set to /root/harbor 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/db/env Generated configuration file: /config/jobservice/env Generated configuration file: /config/jobservice/config.yml loaded secret from file: /secret/keys/secretkey Generated certificate, key file: /secret/core/private_key.pem, cert file: /secret/registry/root.crt Generated configuration file: /compose_location/docker-compose.yml Clean up the input dir [root@harbor harbor]# ./install.sh [Step 0]: checking installation environment ... Note: docker version: 19.03.2 Note: docker-compose version: 1.24.1 [Step 1]: loading Harbor images ... cad87ea2da29: Loading layer [==================================================>] 77.02MB/77.02MB 通过界面登陆harbor https://harbor.ikongjian.com ,开启https后默认只走这个 默认用户名和密码 admin Harbor12345 创建镜像项目kubernetes 路径:项目 -> 新建项目 -> 项目名称 kubernetes -> 确认 测试harbor仓库可用性 [root@ikongjian ~]# docker tag busybox harbor.ikongjian.com/kubernetes/busybox:v0.3 [root@ikongjian ~]# docker push harbor.ikongjian.com/kubernetes/busybox:v0.3 The push refers to repository [harbor.ikongjian.com/kubernetes/busybox] eac247cb7af5: Layer already exists v0.3: digest: sha256:24fd20af232ca4ab5efbf1aeae7510252e2b60b15e9a78947467340607cd2ea2 size: 527 报错1:镜像直接上传到harbor正常,但是通过nginx一直显示超时: [root@ikongjian ~]# docker push harbor.ikongjian.com/kubernetes/busybox:v0.3 The push refers to repository [harbor.ikongjian.com/kubernetes/busybox] eac247cb7af5: Retrying in 10 seconds 解决:需要修改安装包里面Nginx配置文件,删掉scheme的那几行,在反向代理的配置上如果有写的话 harbor镜像仓库高可用 创建用户 问题:registry https://192.168.70.120 is unhealthy: unhealthy

标签:test3,harbor,config,Generated,file,ikongjian,root
来源: https://www.cnblogs.com/wangzhangtao/p/12071575.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有