`
sillycat
  • 浏览: 2552533 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Registry Harbor 2019(1)Version 1.9.0 and HA Solution

 
阅读更多
Private Registry Harbor 2019(1)Version 1.9.0 and HA Solution

Check version
> docker --version
Docker version 19.03.2, build 6a30dfc

Install Docker Compose
> sudo yum install epel-release
> sudo yum install -y python-pip
> sudo pip install docker-compose
> sudo pip install --upgrade pip
> sudo yum upgrade python*

Check version
> docker-compose version
docker-compose version 1.24.1, build 4667896
docker-py version: 3.7.3
CPython version: 2.7.5
OpenSSL version: OpenSSL 1.0.2k-fips  26 Jan 2017

Find the offline release version from here https://github.com/goharbor/harbor/releases
> sudo yum install wget
> wget https://storage.googleapis.com/harbor-releases/release-1.9.0/harbor-offline-installer-v1.9.0.tgz

> tar -xf harbor-offline-installer-v1.9.0.tgz
> mv harbor ~/tool/harbor-1.9.0

> sudo ln -s /home/carl/tool/harbor-1.9.0 /opt/harbor-1.9.0
> sudo ln -s /opt/harbor-1.9.0 /opt/harbor

Prepare the configuration
> vi harbor.yml
hostname: 192.168.56.110
http:
  # port for http, default is 80. If https enabled, this port will redirect to https port
  port: 8088
harbor_admin_password: xxxxxxxx

This command will load the configuration, and prepare the images
> sudo ./prepare

Install the software
> sudo ./install.sh

Visit the page
http://192.168.56.110:8088
We can visit the admin page and add user there

Try login with Docker Command Line
> docker login 192.168.56.110
Username: sillycat
Password:
Error response from daemon: Get https://192.168.56.110/v2/: x509: certificate signed by unknown authority

Solution:
> sudo vi /etc/docker/daemon.json
{
        "insecure-registries": ["192.168.56.110:8088"]
}
Restart Docker service
> sudo systemctl restart docker.service

Still exception:
https://github.com/goharbor/harbor/issues/2273
https://github.com/docker/for-mac/issues/1317


How to stop the Service
> sudo docker-compose down -v

How to start the Service
>  sudo docker-compose up -d

Clean database
> rm -r /data/database

Clean the images
> rm -r /data/registry

How to Change Config
> sudo docker-compose down -v

Change configuration file
> vi harbor.yml
hostname: 192.168.56.110
> sudo ./prepare
> sudo docker-compose up -d

Success with this command
> docker login http://192.168.56.110:8088
Username: sillycat
Password:
WARNING! Your password will be stored unencrypted in /home/carl/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded

Try that, pull latest ubuntu
> docker pull ubuntu

Tag the image
> docker tag ubuntu  192.168.56.110:8088/library/ubuntu:v1

Push to server
> docker push 192.168.56.110:8088/library/ubuntu:v1

We can login without prompt
> docker login 192.168.56.110:8088 -u=“sillycat" -p=“xxxxxxxx"

Here is how it release to Docker Registry
    stage('Release to Docker Registry') {
      steps {
        withCredentials([usernamePassword(credentialsId: 'yiyi_harbor', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
        sh '''
        docker build -f deployment/docker/Dockerfile -t 52.13.38.xxx:49002/connector/sillycat/netsuiteconnector:1.1 .
        docker login 52.13.38.xxx:49002 -u="$USERNAME" -p="$PASSWORD"
        docker push 52.13.38.xxx:49002/connector/sillycat/netsuiteconnector:1.1
    '''
        }
      }
    }

HA Solution
Master-Slave can solve the problems that a lot of clients want to fetch the images. But the master is still a single point of failures.
https://www.imooc.com/article/270050

Master-Master can solve the problem, Load balance to the Harbor master.
https://segmentfault.com/a/1190000020144752

Harbor-Harbor Share storage
How to Share the Storage: AWS S3, OpenStack Swift, Ceph and etc. We can directly use NFS.
How to share the session: Redis storage session
How to share database: Use other database instead of local file





References:
https://github.com/NaturalHistoryMuseum/scratchpads2/wiki/Install-Docker-and-Docker-Compose-(Centos-7)
https://github.com/goharbor/harbor/releases
https://github.com/goharbor/harbor
https://blog.51cto.com/coolsky/2343408
https://www.cnblogs.com/breezey/p/9444231.html


分享到:
评论

相关推荐

    企业级RegistryHarbor.zip

    Project Harbor是由VMware公司中国团队为企业用户设计的Registry server开源项目,包括了权限管理(RBAC)、LDAP、审计、管理界面、自我注册、HA等企业必需的功能,同时针对中国用户的特点,设计镜像复制和中文支持等...

    Windows Registry Editor Version 5.00

    VC++6.0中ActiveX控件注册表项,用于在Windows系统中注册ActiveX控件。 使用方法:将Windows Registry Editor Version 5.00文件复制到C:\WINDOWS\system32路径下即可。

    jenkins2.328配置连接harbor2.4的认证-jenkinsfile连接harbor-详细文档

    1. Harbor 介绍 Harbor 是一个开源的容器registry,提供了镜像管理、身份验证、访问控制和镜像扫描等功能。Harbor 可以与 Jenkins 等 CI/CD 工具集成,实现自动化的镜像构建、测试和部署。 2. Jenkins 介绍 ...

    harbor配置oss1

    Harbor 是一个企业级的 Registry 服务器,可以存储和管理 Docker 镜像。它提供了丰富的功能,如镜像管理、权限控制、LDAP 集成等。下面我们将详细介绍如何配置 Harbor,并将其与 Oss1 集成。 一、环境安装 在开始...

    搭建Harbor企业级docker仓库-2.7.1

    Harbor是一个用于存储和分发Docker镜像的企业级Registry服务器,通过添加一些企业必需的功能特性,例如安全、标识和管理等,扩展了开源Docker Distribution。作为一个企业级私有Registry服务器,Harbor提供了更好的...

    WSO2 Governance Registry Documentation Version 4.6.0

    标题 "WSO2 Governance Registry Documentation Version 4.6.0" 和描述 "WSO2 Governance Registry Documentation Version 4.6.0 官方完整版文档" 暗示了本文档是WSO2 Governance Registry 4.6.0版本的官方完整文档...

    Registry_Workshop_4.5.0.and key

    Registry_Workshop_4.5.0.and key

    TCP/IP Registry Values for Microsoft Windows Vista and Windows Server 2008

    TCP/IP Registry Values for Microsoft Windows Vista and Windows Server 2008

    harbor-offline-installer-v1.5.0.tgz

    Harbor 是由 VMware 公司中国团队为企业用户设计的的 Registry server 开源项目,包括了权限管理(RBAC)、LDAP、审计、管理界面、自我注册、HA 等企业必需的功能,同时针对中国用户的特点,设计镜像复制和中文支持等...

    搭建Harbor镜像仓库:从安装到上传镜像

    [root@docker1 harbor]# vim /etc/docker/daemon.json ``` 文件内容: ``` { "insecure-registries": ["http://192.168.200.201"], "registry-mirrors": ["https://uy35zvn6.mirror.aliyuncs.com"] } ``` 重启 ...

    harbor镜像仓库维护手册

    Harbor 镜像仓库维护手册 Harbor 镜像仓库是基于 Docker 的镜像仓库管理系统,提供了镜像管理、镜像仓库、镜像分发等功能。本文档旨在介绍 Harbor 镜像仓库的维护手册,包括 Harbor 的启动、停止、日志查看、...

    harbor-online-installer-v1.8.2.tgz

    Harbor是一个用于存储和分发Docker镜像的企业级Registry服务器,通过添加一些企业必需的功能特性,例如安全、标识和管理等,扩展了开源Docker Distribution。作为一个企业级私有Registry服务器,Harbor提供了更好的...

    micrometer-registry-prometheus-1.8.2-API文档-中文版.zip

    对应Maven信息:groupId:io.micrometer,artifactId:micrometer-registry-prometheus,version:1.8.2 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中...

    WebSphere Service Registry and Repository Handbook

    ### WebSphere Service Registry and Repository (WSRR) Handbook #### 一、概述 《WebSphere Service Registry and Repository Handbook》是一本详细介绍IBM WebSphere Service Registry and Repository(WSRR)...

    Kubernetes与Harbor的集成方案.pdf

    * HA Deployment:计划推出高可用性部署方案,提高Harbor的可用性和可靠性。 总结 Harbor是一个功能强大且灵活的容器注册服务器,可以满足企业的容器镜像管理需求。其提供了Web Admin GUI、用户管理和访问控制、...

    api-ms-win-core-registry-l1-1-0.dll

    api-ms-win-core-registry-l1-1-0.dll适用于window10 、windows server2012 64位系统

    Offline NT Password and Registry Editor

    1. `install.bat`:这是一个批处理文件,通常用于自动化执行一系列命令,可能是用来运行“Offline NT Password and Registry Editor”的安装或启动过程。 2. `bd050303.bin`:这可能是一个二进制文件,可能是程序的...

    Advanced Registry Optimizer

    It provides a simple and effective solution to keep your PC running faster, cleaner, and error free. It scans and fixes invalid registry entries found in Windows Registry and optimizes Windows ...

Global site tag (gtag.js) - Google Analytics