您好,登录后才能下订单哦!
本篇文章给大家分享的是有关怎么进行VMware Harbor部署,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
了解一下怎么部署harbor。
OS:Ubuntu 16.04.3 LTS
Kernel:ubuntu16.04-2 4.4.0-87-generic
我跟她https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_18.03.0~ce-0~ubuntu_amd64.deb
dpkg -i docker-ce_18.03.0_ce-0_ubuntu_amd64.deb
docker info
apt-get install python2.7 python-minimal
curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
ps:不要apt-get install docker-compose安装,默认仓库中的docker-compose版本太低
curl -L https://raw.githubusercontent.com/docker/compose/1.19.0/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
cd /opt/programs wget https://storage.googleapis.com/harbor-releases/release-1.5.0/harbor-offline-installer-v1.5.1.tgz =========================下载完解压======================================== tar zxvf harbor-offline-installer-v1.5.1.tgz
/opt/programs/harbor
文件在/opt/programs/harbor/harbor.cfg
_version = 1.5.0 hostname = 192.168.1.6 ui_url_protocol = http max_job_workers = 5 customize_crt = on ssl_cert = /data/cert/server.crt ssl_cert_key = /data/cert/server.key secretkey_path = /data admiral_url = NA log_rotate_count = 5 log_rotate_size = 200M http_proxy = https_proxy = no_proxy = 127.0.0.1,172.31.68.243,ui email_identity = email_server = smtp.mydomain.com email_server_port = 25 email_username = sample_admin@mydomain.com email_password = abc email_from = admin <sample_admin@mydomain.com> email_ssl = false email_insecure = false harbor_admin_password = Harbor12345 auth_mode = db_auth ldap_url = ldaps://ldap.mydomain.com ldap_basedn = ou=people,dc=mydomain,dc=com ldap_uid = uid ldap_scope = 2 ldap_timeout = 5 ldap_verify_cert = true ldap_group_basedn = ou=group,dc=mydomain,dc=com ldap_group_filter = objectclass=group ldap_group_gid = cn ldap_group_scope = 2 self_registration = on token_expiration = 30 project_creation_restriction = everyone db_host = mysql db_password = root123 db_port = 3306 db_user = root redis_url = redis:6379 clair_db_host = postgres clair_db_password = password clair_db_port = 5432 clair_db_username = postgres clair_db = postgres uaa_endpoint = uaa.mydomain.org uaa_clientid = id uaa_clientsecret = secret uaa_verify_cert = true uaa_ca_cert = /path/to/ca.pem registry_storage_provider_name = filesystem registry_storage_provider_config =
./install.sh
docker image ls
docker container ls
http://192.168.1.6
ps:默认用户名密码是admin/Harbor12345
ps:怎么使用就不详细描述了,下面讲解一下怎么push镜像上去,换一台机ubuntu机器执行以下命令(ubuntu16.04-2)
#/etc/docker/daemon.json { "registry-mirrors": ["http://aa2fd190.m.daocloud.io"], "insecure-registries":["http://172.31.68.241"] }
#/lib/systemd/system/docker.service # 在service模块下调整ExecStart项 [Service] Type=notify ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
systemctl daemon-reload systemctl restart docker.service
systemctl status docker.service
docker login 192.168.1.6
root@ubuntu16.04-2:~#docker login 192.168.1.6 Username (admin): admin Password: Login Succeeded root@ubuntu16.04-2:~#
先检查当前主机上的image
针对hello-world打tag
ps:里面的ip换成192.168.1.6(实在是没图了)
docker tag hello-world:latest 172.31.68.241/library/hello-world:latest
docker push 172.31.68.241/library/hello-world:latest
#/etc/default/docker # 调整DOCKER_OPTS如下 DOCKER_OPTS="--registry-mirror=http://172.31.68.241 --insecure-registry 172.31.68.241"
systemctl daemon-reload systemctl restart docker.service
docker pull 172.31.68.241/library/hello-world
以上就是怎么进行VMware Harbor部署,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。