Kolla 本地私有 Docker 镜像搭建

本贴最后更新于 2250 天前,其中的信息可能已经时移世异

asdsadsad

Kolla 本地私有 Docker 镜像搭建

1、搭建私服 Registry

私服 Registry 节点 IP:10.0.20.210,服务端口:4000

部署私服 Registry 节点

docker pull registry
docker run -d -p 4000:5000 -v /home/docker_volume/registry:/var/lib/registry --restart=always --privileged=true --name registry registry

2、下载 Kolla 镜像

# Kolla相关镜像参数
registry_url=10.0.20.210:4000
kolla_base_distro="centos"
kolla_install_type="source"
openstack_release="queens"
kolla_openstack_images=(
fluentd
kolla-toolbox
cron
haproxy
keepalived
memcached
mariadb
rabbitmq
keystone
ceph-mon
ceph-mgr
ceph-rgw
ceph-osd
cinder-volume
cinder-backup
cinder-api
cinder-scheduler
glance-api
glance-registry
nova-ssh
nova-libvirt
nova-placement-api
nova-api
nova-scheduler
nova-conductor
nova-consoleauth
nova-novncproxy
nova-compute
openvswitch-db-server
openvswitch-vswitchd
neutron-server
neutron-openvswitch-agent
neutron-dhcp-agent
neutron-l3-agent
neutron-metadata-agent
heat-api
heat-api-cfn
heat-engine
horizon
)
# 将Kolla远程镜像重新打标签Push到本地Registry私服
for kolla_openstack_image_subname in ${kolla_openstack_images[@]};
do
  kolla_openstack_image_name=kolla/${kolla_base_distro}-${kolla_install_type}-${kolla_openstack_image_subname}:${openstack_release}
  docker pull ${registry_url}/${kolla_openstack_image_name}
  docker tag ${registry_url}/${kolla_openstack_image_name} ${kolla_openstack_image_name}
  docker pull ${kolla_openstack_image_name}
  docker tag ${kolla_openstack_image_name} ${registry_url}/${kolla_openstack_image_name}
  docker push ${registry_url}/${kolla_openstack_image_name}
  docker rmi ${registry_url}/${kolla_openstack_image_name}
  docker rmi ${kolla_openstack_image_name}
done

查看私有镜像清单

curl http://10.0.20.210:4000/v2/_catalog

3、删除私服内无用镜像

语法命令如下,注意替换 <image_name> 为实际要删除的镜像名。

docker exec registry /bin/rm -rf /var/lib/registry/docker/registry/v2/repositories/<image_name>
docker exec registry /bin/registry garbage-collect /etc/docker/registry/config.yml
  • kolla
    2 引用
  • OpenStack

    OpenStack 是一个云操作系统,通过数据中心可控制大型的计算、存储、网络等资源池。所有的管理通过前端界面管理员就可以完成,同样也可以通过 Web 接口让最终用户部署资源。

    10 引用 • 5 关注

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...