--base-image
用於指定使用本身定製的基礎鏡像,不用官方網站的
樣例以下:kolla-build --base-image registry.access.redhat.com/rhel7/rhel --base rhel
--base BASE, -b BASE node
用於指定基礎鏡像的發佈類型,可選的值爲centos, rhel, ubuntu, oraclelinuxlinux
樣例以下:kolla-build -b ubuntugit
--base-tag BASE_TAG
基礎發佈鏡像的標籤,從docker hub上拉取基礎鏡像的某個標籤版本,默認自動拉取的是latest標籤redis
樣例以下:mongodb
[root@localhost tools]# kolla-build -b centos -t binary --base-tag 1.0.0 rally docker
INFO:kolla.image.build:Found the docker image folder at /usr/share/kolla/docker
INFO:kolla.image.build:Added image base to queue
INFO:kolla.image.build:Attempting to run task BuildTask(base) for the first time
INFO:kolla.image.build.base:Building
INFO:kolla.image.build.base:Step 1/46 : FROM centos:1.0.0ubuntu
--cache
在製做鏡像的時候,使用docker緩存,這個參數的好處是,當某一個鏡像製做失敗時,從新制做,會加快鏡像製做速度
--debug, -d
打開debug開關
--namespace NAMESPACE, -n NAMESPACE
docker的命名空間,主要用於隔離容器swift
--nocache
不緩存鏡像
--nodebug
取消debug開關
--profile PROFILE, -p PROFILE
指定要建立的鏡像集合,這個鏡像集合的值在kolla-build.conf的[profiles]中定義,默認的鏡像集合有:infra,main, aux, default, gate
樣例以下 kolla-build --profile magnumcentos
--template-only
不製做鏡像,僅僅生成 Dockerfile文件
--template-override TEMPLATE_OVERRIDE
模板覆蓋文件的路徑,不清楚如何用
--threads THREADS, -T THREADS
製做鏡像的時候,使用多少個線程
--version
顯示kolla的版本
--type INSTALL_TYPE, -t INSTALL_TYPE
openstack的安裝方式,容許的值爲binary,source,rdo
樣例以下 kolla-build -t source
當使用源碼的時候,openstack源碼的路徑在kolla-build.conf中配置,
源碼的類型支持url, git, local。local類型的有兩種方式,一種是包含有源代碼的目錄,或者是源碼壓縮包的目錄
樣例以下:
[glance-base]
type = url
location = http://tarballs.openstack.org/glance/glance-master.tar.gz緩存
[keystone-base]
type = git
location = https://git.openstack.org/openstack/keystone
reference = stable/mitaka
[heat-base]
type = local
location = /home/kolla/src/heat
[ironic-base]
type = local
location = /tmp/ironic.tar.gz
--tag TAG The Docker tag
鏡像在docker裏面的標籤
樣例以下:
kolla-build -b centos -t binary --tag 1.0.0 rally
[root@localhost tools]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
kolla/centos-binary-rally 1.0.0 aee18a82388b 28 seconds ago 682MB
kolla/centos-binary-nova-compute 1.0.0 66993a1beb69 3 hours ago 1.2GB
新增兩個參數
--template-only Don't build images. Generate Dockerfile only----僅僅生成dockerfile文件
--template-override TEMPLATE_OVERRIDE Path to template override file----對要覆蓋block的內容的編寫
[root@localhost ~]# kolla-build -b centos --base-tag 7 --tag 2.0 --template-only --template-override /root/chen-template-overrides.j2 rabbitmq
INFO:kolla.image.build:Found the docker image folder at /usr/share/kolla/docker
INFO:kolla.image.build:Dockerfiles are generated in /tmp/kolla-2018-11-08_22-04-08_ZLzTGF/docker-----------在build鏡像的時候,若是是生成鏡像,那麼會先生成dockerfile文件,再根據該dockerfile生成該鏡像
[root@localhost ~]#
[root@localhost docker]# pwd/tmp/kolla-2018-11-08_22-04-08_ZLzTGF/docker[root@localhost docker]# lsaodh cinder dnsmasq grafana ironic kolla-toolbox manila murano rabbitmq swift vmtpbarbican cloudkitty elasticsearch haproxy iscsid kube mariadb neutron rally tacker watcherbase collectd etcd heat kafka kubernetes-entrypoint memcached nova redis telegraf zaqarbifrost congress fluentd heka karbor kubetoolbox mistral octavia sahara tempest zookeeperceilometer cron freezer helm-repository keepalived kuryr monasca openstack-base searchlight tgtd zunceph designate glance horizon keystone macros.j2 mongodb openvswitch senlin trovechrony dind gnocchi influxdb kibana magnum multipathd panko solum vitrage[root@localhost docker]#