2016年7月29日金曜日

Oracle OpenStack R 2.1 | Docker Registry へのイメージ インポート。

この投稿は、下記の一部です。
Oracle OpenStack for Oracle Linux R 2.1 をためす。(2016年07月 版)

今回は、ここまでで構築した Docker Registry に、
Oracle OpenStack R 2.1 の Docker イメージをインポートします。

前提について。

Oracle Linux 7 で、Docker Registry サーバを構築しておきます。
Oracle OpenStack R 2.1 | Oracle Linux 7 への Docker Registry 構築。

今回の Docker Registry のコンテナは、5443 番ポートでアクセスするように起動しています。
[root@opst-registry ~]# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
08225d155a24        registry:2.3        "/bin/registry /etc/d"   20 seconds ago      Up 19 seconds       0.0.0.0:5443->5000/tcp   registry

また、Oracle Software Delivery Cloud から、
「Oracle OpenStack For Oracle Linux 2.1.1.0.0 for Linux x86-64」
のファイルをダウンロードしておきます。
Oracle Software Delivery Cloud
https://edelivery.oracle.com/

ファイル名は「V138282-01.zip」でした。




 zip ファイルには、3つのファイルファイルが含まれます。
[root@opst-registry ~]# unzip -l V138282-01.zip
Archive:  V138282-01.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     9871  04-25-2016 22:03   import_to_registry.sh
3732127205  04-25-2016 22:02   ol-openstack-images-2.1.1.tar.bz2
      100  04-25-2016 22:03   ol-openstack-images-2.1.1.sha256sum
---------                     -------
3732137176                     3 files

Docker イメージのインポート。

インポートで必要になる RPM (unzip と bzip2)をインストールしておきます。
[root@opst-registry ~]# yum install -y unzip bzip2

ダウンロードしておいた Oracle OpenStack R 2.1 の zip ファイルを展開します。
[root@opst-registry ~]# unzip V138282-01.zip
Archive:  V138282-01.zip
  inflating: import_to_registry.sh
  inflating: ol-openstack-images-2.1.1.tar.bz2
  inflating: ol-openstack-images-2.1.1.sha256sum 
そして、インポートします。
インポート先 Registry として、opst-registry.gowatana.lab (このサーバ自身)の
5443 番ポートを指定しています。
[root@opst-registry ~]# bash import_to_registry.sh opst-registry.gowatana.lab:5443

この処理は下記のようなことをしているので、結構長く待つことになります。
  • ファイルの展開
  • 自分自身の Docker-Engine にイメージをいったんインポート
  • Docker Registry に push

インポート後の様子。

Registry にインポートされた Docker イメージについては、
/var/lib/registry/ ディレクトリ配下を見てみると様子がわかります。
OpenStack コンポーネントのプロセスごとにコンテナがあるようなものなので、
多くのコンテナがあります。
[root@opst-registry ~]# ls -lh /var/lib/registry/docker/registry/v2/repositories/oracle/
合計 0
drwxr-xr-x 1 root root 50  6月 22 09:27 ol-openstack-base
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-ceilometer-alarm
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-ceilometer-api
drwxr-xr-x 1 root root 50  6月 22 09:17 ol-openstack-ceilometer-base
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-ceilometer-central
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-ceilometer-collector
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-ceilometer-compute
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-ceilometer-notification
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-cinder-api
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-cinder-backup
drwxr-xr-x 1 root root 50  6月 22 09:16 ol-openstack-cinder-base
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-cinder-scheduler
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-cinder-volume
drwxr-xr-x 1 root root 50  6月 22 09:27 ol-openstack-data
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-glance-api
drwxr-xr-x 1 root root 50  6月 22 09:17 ol-openstack-glance-base
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-glance-registry
drwxr-xr-x 1 root root 50  6月 22 09:27 ol-openstack-haproxy
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-heat-api
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-heat-api-cfn
drwxr-xr-x 1 root root 50  6月 22 09:17 ol-openstack-heat-base
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-heat-engine
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-horizon
drwxr-xr-x 1 root root 50  6月 22 09:27 ol-openstack-keepalived
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-keystone
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-kolla-ansible
drwxr-xr-x 1 root root 50  6月 22 09:27 ol-openstack-memcached
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-murano-api
drwxr-xr-x 1 root root 50  6月 22 09:17 ol-openstack-murano-base
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-murano-engine
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-mysqlcluster-api
drwxr-xr-x 1 root root 50  6月 22 09:16 ol-openstack-mysqlcluster-base
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-mysqlcluster-mgmt
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-mysqlcluster-ndb
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-neutron-agents
drwxr-xr-x 1 root root 50  6月 22 09:27 ol-openstack-neutron-base
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-neutron-linuxbridge-agent
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-neutron-openvswitch-agent
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-neutron-server
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-nova-api
drwxr-xr-x 1 root root 50  6月 22 09:09 ol-openstack-nova-base
drwxr-xr-x 1 root root 50  6月 22 09:19 ol-openstack-nova-compute
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-nova-conductor
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-nova-consoleauth
drwxr-xr-x 1 root root 50  6月 22 09:24 ol-openstack-nova-iscsid
drwxr-xr-x 1 root root 50  6月 22 09:26 ol-openstack-nova-libvirt
drwxr-xr-x 1 root root 50  6月 22 09:23 ol-openstack-nova-multipathd
drwxr-xr-x 1 root root 50  6月 22 09:19 ol-openstack-nova-network
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-nova-novncproxy
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-nova-scheduler
drwxr-xr-x 1 root root 50  6月 22 09:18 ol-openstack-ovs-base
drwxr-xr-x 1 root root 50  6月 22 09:24 ol-openstack-ovs-db-server
drwxr-xr-x 1 root root 50  6月 22 09:24 ol-openstack-ovs-vswitchd
drwxr-xr-x 1 root root 50  6月 22 09:27 ol-openstack-rabbitmq
drwxr-xr-x 1 root root 50  6月 22 09:27 ol-openstack-rsyslog
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-swift-account-auditor
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-swift-account-reaper
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-swift-account-replicator
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-swift-account-server
drwxr-xr-x 1 root root 50  6月 22 09:16 ol-openstack-swift-base
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-swift-container-auditor
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-swift-container-replicator
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-swift-container-server
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-swift-container-updater
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-swift-object-auditor
drwxr-xr-x 1 root root 50  6月 22 09:22 ol-openstack-swift-object-base
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-swift-object-expirer
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-swift-object-replicator
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-swift-object-server
drwxr-xr-x 1 root root 50  6月 22 09:20 ol-openstack-swift-object-updater
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-swift-proxy-server
drwxr-xr-x 1 root root 50  6月 22 09:21 ol-openstack-swift-rsyncd
drwxr-xr-x 1 root root 50  6月 22 09:25 ol-openstack-utils

70 個以上あります。
[root@opst-registry ~]# ls -lh /var/lib/registry/docker/registry/v2/repositories/oracle/ | wc -l
74

Registry に push するため Docker-Engine に取り込んだイメージもそのまま残っています。
インポートした先頭が 「oracle/」 のものに
「opst-registry.gowatana.lab:5443/oracle/」 とタグ付けして Registry に push しているので、
同じイメージが 2行ずつ表示されています。
[root@opst-registry ~]# docker images | awk '{print $1}'
REPOSITORY
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-base
oracle/ol-openstack-nova-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-mysqlcluster-base
oracle/ol-openstack-mysqlcluster-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-base
oracle/ol-openstack-swift-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-cinder-base
oracle/ol-openstack-cinder-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-glance-base
oracle/ol-openstack-glance-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-heat-base
oracle/ol-openstack-heat-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ceilometer-base
oracle/ol-openstack-ceilometer-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-murano-base
oracle/ol-openstack-murano-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ovs-base
oracle/ol-openstack-ovs-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-compute
oracle/ol-openstack-nova-compute
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-network
oracle/ol-openstack-nova-network
opst-registry.gowatana.lab:5443/oracle/ol-openstack-neutron-agents
oracle/ol-openstack-neutron-agents
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-object-replicator
oracle/ol-openstack-swift-object-replicator
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-object-auditor
oracle/ol-openstack-swift-object-auditor
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-object-server
oracle/ol-openstack-swift-object-server
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-novncproxy
oracle/ol-openstack-nova-novncproxy
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-object-updater
oracle/ol-openstack-swift-object-updater
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-object-expirer
oracle/ol-openstack-swift-object-expirer
opst-registry.gowatana.lab:5443/oracle/ol-openstack-mysqlcluster-mgmt
oracle/ol-openstack-mysqlcluster-mgmt
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-consoleauth
oracle/ol-openstack-nova-consoleauth
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-api
oracle/ol-openstack-nova-api
opst-registry.gowatana.lab:5443/oracle/ol-openstack-mysqlcluster-api
oracle/ol-openstack-mysqlcluster-api
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-scheduler
oracle/ol-openstack-nova-scheduler
opst-registry.gowatana.lab:5443/oracle/ol-openstack-mysqlcluster-ndb
oracle/ol-openstack-mysqlcluster-ndb
opst-registry.gowatana.lab:5443/oracle/ol-openstack-neutron-openvswitch-agent
oracle/ol-openstack-neutron-openvswitch-agent
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-rsyncd
oracle/ol-openstack-swift-rsyncd
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-conductor
oracle/ol-openstack-nova-conductor
opst-registry.gowatana.lab:5443/oracle/ol-openstack-neutron-linuxbridge-agent
oracle/ol-openstack-neutron-linuxbridge-agent
opst-registry.gowatana.lab:5443/oracle/ol-openstack-cinder-volume
oracle/ol-openstack-cinder-volume
opst-registry.gowatana.lab:5443/oracle/ol-openstack-neutron-server
oracle/ol-openstack-neutron-server
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-account-reaper
oracle/ol-openstack-swift-account-reaper
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-proxy-server
oracle/ol-openstack-swift-proxy-server
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-container-auditor
oracle/ol-openstack-swift-container-auditor
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-account-replicator
oracle/ol-openstack-swift-account-replicator
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-account-server
oracle/ol-openstack-swift-account-server
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-container-updater
oracle/ol-openstack-swift-container-updater
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-container-replicator
oracle/ol-openstack-swift-container-replicator
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-container-server
oracle/ol-openstack-swift-container-server
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-account-auditor
oracle/ol-openstack-swift-account-auditor
opst-registry.gowatana.lab:5443/oracle/ol-openstack-cinder-scheduler
oracle/ol-openstack-cinder-scheduler
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ceilometer-compute
oracle/ol-openstack-ceilometer-compute
opst-registry.gowatana.lab:5443/oracle/ol-openstack-cinder-api
oracle/ol-openstack-cinder-api
opst-registry.gowatana.lab:5443/oracle/ol-openstack-cinder-backup
oracle/ol-openstack-cinder-backup
opst-registry.gowatana.lab:5443/oracle/ol-openstack-glance-registry
oracle/ol-openstack-glance-registry
opst-registry.gowatana.lab:5443/oracle/ol-openstack-kolla-ansible
oracle/ol-openstack-kolla-ansible
opst-registry.gowatana.lab:5443/oracle/ol-openstack-glance-api
oracle/ol-openstack-glance-api
opst-registry.gowatana.lab:5443/oracle/ol-openstack-swift-object-base
oracle/ol-openstack-swift-object-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-keystone
oracle/ol-openstack-keystone
opst-registry.gowatana.lab:5443/oracle/ol-openstack-heat-engine
oracle/ol-openstack-heat-engine
opst-registry.gowatana.lab:5443/oracle/ol-openstack-horizon
oracle/ol-openstack-horizon
opst-registry.gowatana.lab:5443/oracle/ol-openstack-heat-api-cfn
oracle/ol-openstack-heat-api-cfn
opst-registry.gowatana.lab:5443/oracle/ol-openstack-heat-api
oracle/ol-openstack-heat-api
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ceilometer-alarm
oracle/ol-openstack-ceilometer-alarm
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ceilometer-notification
oracle/ol-openstack-ceilometer-notification
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ceilometer-central
oracle/ol-openstack-ceilometer-central
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ceilometer-api
oracle/ol-openstack-ceilometer-api
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ceilometer-collector
oracle/ol-openstack-ceilometer-collector
opst-registry.gowatana.lab:5443/oracle/ol-openstack-murano-api
oracle/ol-openstack-murano-api
opst-registry.gowatana.lab:5443/oracle/ol-openstack-murano-engine
oracle/ol-openstack-murano-engine
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-multipathd
oracle/ol-openstack-nova-multipathd
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ovs-vswitchd
oracle/ol-openstack-ovs-vswitchd
opst-registry.gowatana.lab:5443/oracle/ol-openstack-ovs-db-server
oracle/ol-openstack-ovs-db-server
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-iscsid
oracle/ol-openstack-nova-iscsid
opst-registry.gowatana.lab:5443/oracle/ol-openstack-utils
oracle/ol-openstack-utils
opst-registry.gowatana.lab:5443/oracle/ol-openstack-nova-libvirt
oracle/ol-openstack-nova-libvirt
opst-registry.gowatana.lab:5443/oracle/ol-openstack-rabbitmq
oracle/ol-openstack-rabbitmq
opst-registry.gowatana.lab:5443/oracle/ol-openstack-haproxy
oracle/ol-openstack-haproxy
opst-registry.gowatana.lab:5443/oracle/ol-openstack-keepalived
oracle/ol-openstack-keepalived
opst-registry.gowatana.lab:5443/oracle/ol-openstack-neutron-base
oracle/ol-openstack-neutron-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-memcached
oracle/ol-openstack-memcached
opst-registry.gowatana.lab:5443/oracle/ol-openstack-rsyslog
oracle/ol-openstack-rsyslog
opst-registry.gowatana.lab:5443/oracle/ol-openstack-base
oracle/ol-openstack-base
opst-registry.gowatana.lab:5443/oracle/ol-openstack-data
oracle/ol-openstack-data
registry
[root@opst-registry ~]#


つづく。

0 件のコメント:

コメントを投稿