kolla安装(1)

Kolla是openstack大帐篷项目,目标是使用细粒度构建、部署openstack。以前fuel们都是一口气,以openstack为单位进行安装,kolla,允许使用以service(如nova,heat,)为单位进行细粒度部署。某一服务与其他服务的关联度被消弱。

kolla使用ansible作为安装脚本。ansible,相比puppet,更像ini或yaml文件。


kolla安装【1】

操作系统:centos7.1

其他要求:额是使用了服务器,官方要求8G内存,60G硬盘。我是64G内存,1T硬盘

安装步骤

1 最小化安装centos7.1,

yum install epel-release
yum install python-pip

curl -sSL https://get.docker.io | bash

抓取结果如下,

[root@localhost ~]# curl -sSL https://get.docker.io | bash
[root@localhost ~]# curl -sSL https://get.docker.io | bash
+ sh -c 'sleep 3; yum -y -q install docker-engine'
warning: /var/cache/yum/x86_64/7/docker-main-repo/packages/docker-engine-selinux-1.11.1-1.el7.centos.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 2c52609d: NOKEY
Public key for docker-engine-selinux-1.11.1-1.el7.centos.noarch.rpm is not installed
Importing GPG key 0x2C52609D:
 Userid     : "Docker Release Tool (releasedocker) <[email protected]>"
 Fingerprint: 5811 8e89 f3a9 1289 7c07 0adb f762 2157 2c52 609d
 From       : https://yum.dockerproject.org/gpg
restorecon:  lstat(/var/lib/docker) failed:  No such file or directory
warning: %post(docker-engine-selinux-1.11.1-1.el7.centos.noarch) scriptlet failed, exit status 255
Non-fatal POSTIN scriptlet failure in rpm package docker-engine-selinux-1.11.1-1.el7.centos.noarch


If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:


  sudo usermod -aG docker your-user


Remember that you will have to log out and back in for this to take effect!
上面有个错误,我没太关注

[root@localhost ~]# 


3 查看版本

docker --version
[root@localhost ~]# docker --version
Docker version 1.11.1, build 5604cbe
[root@localhost ~]# 


# Create the drop-in unit directory for docker.service
mkdir -p /etc/systemd/system/docker.service.d

# Create the drop-in unit file
tee /etc/systemd/system/docker.service.d/kolla.conf <<-'EOF'
[Service]
MountFlags=shared
EOF

# Run these commands to reload the daemon
systemctl daemon-reload
systemctl restart docker
[root@localhost ~]# pip install -U docker-py
You are using pip version 7.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting docker-py
  Downloading docker_py-1.8.1-py2.py3-none-any.whl (41kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 45kB 1.8MB/s 
Collecting backports.ssl-match-hostname>=3.5 (from docker-py)
  Downloading backports.ssl_match_hostname-3.5.0.1.tar.gz
Collecting ipaddress>=1.0.16 (from docker-py)
  Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting requests>=2.5.2 (from docker-py)
  Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 507kB 188kB/s 
Collecting six>=1.4.0 (from docker-py)
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting websocket-client>=0.32.0 (from docker-py)
  Downloading websocket_client-0.37.0.tar.gz (194kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 196kB 262kB/s 
Installing collected packages: backports.ssl-match-hostname, ipaddress, requests, six, websocket-client, docker-py
  Found existing installation: backports.ssl-match-hostname 3.4.0.2
    Uninstalling backports.ssl-match-hostname-3.4.0.2:
      Successfully uninstalled backports.ssl-match-hostname-3.4.0.2
  Running setup.py install for backports.ssl-match-hostname
  Running setup.py install for websocket-client
Successfully installed backports.ssl-match-hostname-3.5.0.1 docker-py-1.8.1 ipaddress-1.0.16 requests-2.10.0 six-1.10.0 websocket-client-0.37.0
[root@localhost ~]# 

以上???是因为我的xshell没设置为utf8

yum -y install python-devel libffi-devel openssl-devel gcc git

  Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                                                                                                                                    51/61 
  Verifying  : 4:perl-macros-5.16.3-286.el7.x86_64                                                                                                                                       52/61 
  Verifying  : git-1.8.3.1-6.el7_2.1.x86_64                                                                                                                                              53/61 
  Verifying  : rsync-3.0.9-17.el7.x86_64                                                                                                                                                 54/61 
  Verifying  : libcom_err-devel-1.42.9-7.el7.x86_64                                                                                                                                      55/61 
  Verifying  : glibc-2.17-106.el7_2.4.x86_64                                                                                                                                             56/61 
  Verifying  : glibc-common-2.17-105.el7.x86_64                                                                                                                                          57/61 
  Verifying  : krb5-libs-1.13.2-10.el7.x86_64                                                                                                                                            58/61 
  Verifying  : glibc-2.17-105.el7.x86_64                                                                                                                                                 59/61 
  Verifying  : 1:openssl-libs-1.0.1e-42.el7.9.x86_64                                                                                                                                     60/61 
  Verifying  : 1:openssl-1.0.1e-42.el7.9.x86_64                                                                                                                                          61/61 


Installed:
  gcc.x86_64 0:4.8.5-4.el7     git.x86_64 0:1.8.3.1-6.el7_2.1     libffi-devel.x86_64 0:3.0.13-16.el7     openssl-devel.x86_64 1:1.0.1e-51.el7_2.4     python-devel.x86_64 0:2.7.5-34.el7    


Dependency Installed:
  cpp.x86_64 0:4.8.5-4.el7                      glibc-devel.x86_64 0:2.17-106.el7_2.4      glibc-headers.x86_64 0:2.17-106.el7_2.4           kernel-headers.x86_64 0:3.10.0-327.13.1.el7     
  keyutils-libs-devel.x86_64 0:1.5.8-3.el7      krb5-devel.x86_64 0:1.13.2-12.el7_2        libcom_err-devel.x86_64 0:1.42.9-7.el7            libgnome-keyring.x86_64 0:3.8.0-3.el7           
  libmpc.x86_64 0:1.0.1-3.el7                   libselinux-devel.x86_64 0:2.2.2-6.el7      libsepol-devel.x86_64 0:2.1.9-3.el7               libverto-devel.x86_64 0:0.2.5-4.el7             
  mpfr.x86_64 0:3.1.1-4.el7                     pcre-devel.x86_64 0:8.32-15.el7            perl.x86_64 4:5.16.3-286.el7                      perl-Carp.noarch 0:1.26-244.el7                 
  perl-Encode.x86_64 0:2.51-7.el7               perl-Error.noarch 1:0.17020-2.el7          perl-Exporter.noarch 0:5.68-3.el7                 perl-File-Path.noarch 0:2.09-2.el7              
  perl-File-Temp.noarch 0:0.23.01-3.el7         perl-Filter.x86_64 0:1.49-3.el7            perl-Getopt-Long.noarch 0:2.40-2.el7              perl-Git.noarch 0:1.8.3.1-6.el7_2.1             
  perl-HTTP-Tiny.noarch 0:0.033-3.el7           perl-PathTools.x86_64 0:3.40-5.el7         perl-Pod-Escapes.noarch 1:1.04-286.el7            perl-Pod-Perldoc.noarch 0:3.20-4.el7            
  perl-Pod-Simple.noarch 1:3.28-4.el7           perl-Pod-Usage.noarch 0:1.63-3.el7         perl-Scalar-List-Utils.x86_64 0:1.27-248.el7      perl-Socket.x86_64 0:2.010-3.el7                
  perl-Storable.x86_64 0:2.45-3.el7             perl-TermReadKey.x86_64 0:2.30-20.el7      perl-Text-ParseWords.noarch 0:3.29-4.el7          perl-Time-HiRes.x86_64 4:1.9725-3.el7           
  perl-Time-Local.noarch 0:1.2300-2.el7         perl-constant.noarch 0:1.27-2.el7          perl-libs.x86_64 4:5.16.3-286.el7                 perl-macros.x86_64 4:5.16.3-286.el7             
  perl-parent.noarch 1:0.225-244.el7            perl-podlators.noarch 0:2.5.1-3.el7        perl-threads.x86_64 0:1.87-4.el7                  perl-threads-shared.x86_64 0:1.43-6.el7         
  rsync.x86_64 0:3.0.9-17.el7                   zlib-devel.x86_64 0:1.2.7-15.el7          


Dependency Updated:
  glibc.x86_64 0:2.17-106.el7_2.4  glibc-common.x86_64 0:2.17-106.el7_2.4  krb5-libs.x86_64 0:1.13.2-12.el7_2  openssl.x86_64 1:1.0.1e-51.el7_2.4  openssl-libs.x86_64 1:1.0.1e-51.el7_2.4 


Complete!
[root@localhost ~]# 


[root@localhost ~]# pip install -U python-openstackclient
You are using pip version 7.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting python-openstackclient
  Downloading python_openstackclient-2.4.0-py2.py3-none-any.whl (422kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 425kB 95kB/s 
Collecting python-novaclient!=2.33.0,>=2.29.0 (from python-openstackclient)
  Downloading python_novaclient-4.0.0-py2.py3-none-any.whl (337kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 339kB 263kB/s 
Collecting stevedore>=1.9.0 (from python-openstackclient)
  Downloading stevedore-1.12.0-py2.py3-none-any.whl
Collecting cliff!=1.16.0,!=1.17.0,>=1.15.0 (from python-openstackclient)
  Downloading cliff-2.0.0-py2-none-any.whl
Collecting python-keystoneclient!=1.8.0,!=2.1.0,>=1.6.0 (from python-openstackclient)
  Downloading python_keystoneclient-2.3.1-py2.py3-none-any.whl (390kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 393kB 614kB/s 
Collecting os-client-config>=1.13.1 (from python-openstackclient)
  Downloading os_client_config-1.17.0-py2.py3-none-any.whl (55kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 57kB 360kB/s 
Requirement already up-to-date: requests!=2.9.0,>=2.8.1 in /usr/lib/python2.7/site-packages (from python-openstackclient)
Collecting openstacksdk>=0.8.5 (from python-openstackclient)
  Downloading openstacksdk-0.8.5-py2.py3-none-any.whl (424kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 425kB 275kB/s 
Collecting oslo.utils>=3.5.0 (from python-openstackclient)
  Downloading oslo.utils-3.8.0-py2.py3-none-any.whl (87kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 90kB 410kB/s 
Collecting Babel!=2.3.0,!=2.3.1,!=2.3.2,!=2.3.3,>=1.3 (from python-openstackclient)
  Downloading Babel-2.3.4-py2.py3-none-any.whl (7.1MB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 7.1MB 41kB/s 
Collecting oslo.config>=3.9.0 (from python-openstackclient)
  Downloading oslo.config-3.9.0-py2.py3-none-any.whl (90kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 90kB 310kB/s 
Collecting keystoneauth1>=2.1.0 (from python-openstackclient)
  Downloading keystoneauth1-2.6.0-py2.py3-none-any.whl (199kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 200kB 222kB/s 
Collecting pbr>=1.6 (from python-openstackclient)
  Downloading pbr-1.9.1-py2.py3-none-any.whl (96kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 98kB 434kB/s 
Requirement already up-to-date: six>=1.9.0 in /usr/lib/python2.7/site-packages (from python-openstackclient)
Collecting python-cinderclient>=1.6.0 (from python-openstackclient)
  Downloading python_cinderclient-1.6.0-py2.py3-none-any.whl (240kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 241kB 68kB/s 
Collecting python-glanceclient>=2.0.0 (from python-openstackclient)
  Downloading python_glanceclient-2.0.0-py2.py3-none-any.whl (177kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 180kB 416kB/s 
Collecting oslo.i18n>=2.1.0 (from python-openstackclient)
  Downloading oslo.i18n-3.6.0-py2.py3-none-any.whl (42kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 45kB 3.4MB/s 
Collecting oslo.serialization>=1.10.0 (from python-novaclient!=2.33.0,>=2.29.0->python-openstackclient)
  Downloading oslo.serialization-2.4.0-py2.py3-none-any.whl
Collecting iso8601>=0.1.9 (from python-novaclient!=2.33.0,>=2.29.0->python-openstackclient)
  Downloading iso8601-0.1.11-py2.py3-none-any.whl
Collecting PrettyTable<0.8,>=0.7 (from python-novaclient!=2.33.0,>=2.29.0->python-openstackclient)
  Downloading prettytable-0.7.2.zip
Collecting simplejson>=2.2.0 (from python-novaclient!=2.33.0,>=2.29.0->python-openstackclient)
  Downloading simplejson-3.8.2.tar.gz (76kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 77kB 2.0MB/s 
Collecting cmd2>=0.6.7 (from cliff!=1.16.0,!=1.17.0,>=1.15.0->python-openstackclient)
  Downloading cmd2-0.6.8.tar.gz
Collecting pyparsing>=2.0.1 (from cliff!=1.16.0,!=1.17.0,>=1.15.0->python-openstackclient)
  Downloading pyparsing-2.1.1-py2.py3-none-any.whl
Collecting PyYAML>=3.1.0 (from cliff!=1.16.0,!=1.17.0,>=1.15.0->python-openstackclient)
  Downloading PyYAML-3.11.zip (371kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 372kB 707kB/s 
Collecting unicodecsv>=0.8.0 (from cliff!=1.16.0,!=1.17.0,>=1.15.0->python-openstackclient)
  Downloading unicodecsv-0.14.1.tar.gz
Collecting debtcollector>=1.2.0 (from python-keystoneclient!=1.8.0,!=2.1.0,>=1.6.0->python-openstackclient)
  Downloading debtcollector-1.3.0-py2.py3-none-any.whl
Collecting positional>=1.0.1 (from python-keystoneclient!=1.8.0,!=2.1.0,>=1.6.0->python-openstackclient)
  Downloading positional-1.1.0.tar.gz
Collecting appdirs>=1.3.0 (from os-client-config>=1.13.1->python-openstackclient)
  Downloading appdirs-1.4.0-py2.py3-none-any.whl
Collecting requestsexceptions>=1.1.1 (from os-client-config>=1.13.1->python-openstackclient)
  Downloading requestsexceptions-1.1.3-py2.py3-none-any.whl
Collecting funcsigs>=0.4 (from oslo.utils>=3.5.0->python-openstackclient)
  Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Collecting netifaces>=0.10.4 (from oslo.utils>=3.5.0->python-openstackclient)
  Downloading netifaces-0.10.4.tar.gz
Collecting netaddr!=0.7.16,>=0.7.12 (from oslo.utils>=3.5.0->python-openstackclient)
  Downloading netaddr-0.7.18-py2.py3-none-any.whl (1.5MB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 1.5MB 117kB/s 
Collecting pytz>=2013.6 (from oslo.utils>=3.5.0->python-openstackclient)
  Downloading pytz-2016.4-py2.py3-none-any.whl (480kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 483kB 57kB/s 
Collecting monotonic>=0.6 (from oslo.utils>=3.5.0->python-openstackclient)
  Downloading monotonic-1.1-py2.py3-none-any.whl
Collecting warlock<2,>=1.0.1 (from python-glanceclient>=2.0.0->python-openstackclient)
  Downloading warlock-1.2.0.tar.gz
Collecting msgpack-python>=0.4.0 (from oslo.serialization>=1.10.0->python-novaclient!=2.33.0,>=2.29.0->python-openstackclient)
  Downloading msgpack-python-0.4.7.tar.gz (126kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 126kB 298kB/s 
Collecting wrapt>=1.7.0 (from debtcollector>=1.2.0->python-keystoneclient!=1.8.0,!=2.1.0,>=1.6.0->python-openstackclient)
  Downloading wrapt-1.10.8.tar.gz
Collecting jsonschema<3,>=0.7 (from warlock<2,>=1.0.1->python-glanceclient>=2.0.0->python-openstackclient)
  Downloading jsonschema-2.5.1-py2.py3-none-any.whl
Collecting jsonpatch<2,>=0.10 (from warlock<2,>=1.0.1->python-glanceclient>=2.0.0->python-openstackclient)
  Downloading jsonpatch-1.13-py2.py3-none-any.whl
Collecting functools32 (from jsonschema<3,>=0.7->warlock<2,>=1.0.1->python-glanceclient>=2.0.0->python-openstackclient)
  Downloading functools32-3.2.3-2.zip
Collecting jsonpointer>=1.9 (from jsonpatch<2,>=0.10->warlock<2,>=1.0.1->python-glanceclient>=2.0.0->python-openstackclient)
  Downloading jsonpointer-1.10-py2-none-any.whl
Installing collected packages: pbr, pytz, Babel, oslo.i18n, msgpack-python, funcsigs, wrapt, debtcollector, netifaces, netaddr, iso8601, monotonic, oslo.utils, oslo.serialization, stevedore, positional, keystoneauth1, PrettyTable, simplejson, python-novaclient, pyparsing, cmd2, PyYAML, unicodecsv, cliff, oslo.config, python-keystoneclient, appdirs, requestsexceptions, os-client-config, openstacksdk, python-cinderclient, functools32, jsonschema, jsonpointer, jsonpatch, warlock, python-glanceclient, python-openstackclient
  Running setup.py install for msgpack-python
  Running setup.py install for wrapt
  Running setup.py install for netifaces
  Running setup.py install for positional
  Running setup.py install for PrettyTable
  Running setup.py install for simplejson
  Running setup.py install for cmd2
  Running setup.py install for PyYAML
  Running setup.py install for unicodecsv
  Running setup.py install for functools32
  Running setup.py install for warlock
Successfully installed Babel-2.3.4 PrettyTable-0.7.2 PyYAML-3.11 appdirs-1.4.0 cliff-2.0.0 cmd2-0.6.8 debtcollector-1.3.0 funcsigs-1.0.2 functools32-3.2.3-2 iso8601-0.1.11 jsonpatch-1.13 jsonpointer-1.10 jsonschema-2.5.1 keystoneauth1-2.6.0 monotonic-1.1 msgpack-python-0.4.7 netaddr-0.7.18 netifaces-0.10.4 openstacksdk-0.8.5 os-client-config-1.17.0 oslo.config-3.9.0 oslo.i18n-3.6.0 oslo.serialization-2.4.0 oslo.utils-3.8.0 pbr-1.9.1 positional-1.1.0 pyparsing-2.1.1 python-cinderclient-1.6.0 python-glanceclient-2.0.0 python-keystoneclient-2.3.1 python-novaclient-4.0.0 python-openstackclient-2.4.0 pytz-2016.4 requestsexceptions-1.1.3 simplejson-3.8.2 stevedore-1.12.0 unicodecsv-0.14.1 warlock-1.2.0 wrapt-1.10.8


[root@localhost ~]# git clone https://git.openstack.org/openstack/kolla
Cloning into 'kolla'...
remote: Counting objects: 31484, done.
remote: Compressing objects: 100% (16138/16138), done.
remote: Total 31484 (delta 18324), reused 26527 (delta 14068)
Receiving objects: 100% (31484/31484), 4.00 MiB | 118.00 KiB/s, done.
Resolving deltas: 100% (18324/18324), done.
[root@localhost ~]# 


[root@localhost ~]# pip install kolla/
You are using pip version 7.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Processing ./kolla
Requirement already satisfied (use --upgrade to upgrade): pbr>=1.6 in /usr/lib/python2.7/site-packages (from kolla==2.0.0.0rc2.dev430)
Collecting docker-py<1.8.0,>=1.6.0 (from kolla==2.0.0.0rc2.dev430)
  Downloading docker-py-1.7.2.tar.gz (68kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 69kB 366kB/s 
Collecting Jinja2>=2.8 (from kolla==2.0.0.0rc2.dev430)
  Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 266kB 325kB/s 
Collecting gitdb>=0.6.4 (from kolla==2.0.0.0rc2.dev430)
  Downloading gitdb-0.6.4.tar.gz (400kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 401kB 275kB/s 
Collecting GitPython>=1.0.1 (from kolla==2.0.0.0rc2.dev430)
  Downloading GitPython-2.0.2-py2.py3-none-any.whl (425kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 425kB 174kB/s 
Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/lib/python2.7/site-packages (from kolla==2.0.0.0rc2.dev430)
Requirement already satisfied (use --upgrade to upgrade): oslo.config>=3.9.0 in /usr/lib/python2.7/site-packages (from kolla==2.0.0.0rc2.dev430)
Collecting graphviz>=0.4.0 (from kolla==2.0.0.0rc2.dev430)
  Downloading graphviz-0.4.10-py2.py3-none-any.whl
Collecting beautifulsoup4 (from kolla==2.0.0.0rc2.dev430)
  Downloading beautifulsoup4-4.4.1-py2-none-any.whl (81kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 81kB 224kB/s 
Collecting setuptools>=16.0 (from kolla==2.0.0.0rc2.dev430)
  Downloading setuptools-21.0.0-py2.py3-none-any.whl (509kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 512kB 256kB/s 
Collecting pycrypto>=2.6 (from kolla==2.0.0.0rc2.dev430)
  Downloading pycrypto-2.6.1.tar.gz (446kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 446kB 139kB/s 
Requirement already satisfied (use --upgrade to upgrade): requests>=2.5.2 in /usr/lib/python2.7/site-packages (from docker-py<1.8.0,>=1.6.0->kolla==2.0.0.0rc2.dev430)
Requirement already satisfied (use --upgrade to upgrade): websocket-client>=0.32.0 in /usr/lib/python2.7/site-packages (from docker-py<1.8.0,>=1.6.0->kolla==2.0.0.0rc2.dev430)
Collecting MarkupSafe (from Jinja2>=2.8->kolla==2.0.0.0rc2.dev430)
  Downloading MarkupSafe-0.23.tar.gz
Collecting smmap>=0.8.5 (from gitdb>=0.6.4->kolla==2.0.0.0rc2.dev430)
  Downloading smmap-0.9.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): stevedore>=1.5.0 in /usr/lib/python2.7/site-packages (from oslo.config>=3.9.0->kolla==2.0.0.0rc2.dev430)
Requirement already satisfied (use --upgrade to upgrade): netaddr!=0.7.16,>=0.7.12 in /usr/lib/python2.7/site-packages (from oslo.config>=3.9.0->kolla==2.0.0.0rc2.dev430)
Requirement already satisfied (use --upgrade to upgrade): debtcollector>=1.2.0 in /usr/lib/python2.7/site-packages (from oslo.config>=3.9.0->kolla==2.0.0.0rc2.dev430)
Requirement already satisfied (use --upgrade to upgrade): backports.ssl-match-hostname in /usr/lib/python2.7/site-packages (from websocket-client>=0.32.0->docker-py<1.8.0,>=1.6.0->kolla==2.0.0.0rc2.dev430)
Requirement already satisfied (use --upgrade to upgrade): Babel>=1.3 in /usr/lib/python2.7/site-packages (from debtcollector>=1.2.0->oslo.config>=3.9.0->kolla==2.0.0.0rc2.dev430)
Requirement already satisfied (use --upgrade to upgrade): funcsigs>=0.4 in /usr/lib/python2.7/site-packages (from debtcollector>=1.2.0->oslo.config>=3.9.0->kolla==2.0.0.0rc2.dev430)
Requirement already satisfied (use --upgrade to upgrade): wrapt>=1.7.0 in /usr/lib64/python2.7/site-packages (from debtcollector>=1.2.0->oslo.config>=3.9.0->kolla==2.0.0.0rc2.dev430)
Requirement already satisfied (use --upgrade to upgrade): pytz>=0a in /usr/lib/python2.7/site-packages (from Babel>=1.3->debtcollector>=1.2.0->oslo.config>=3.9.0->kolla==2.0.0.0rc2.dev430)
Installing collected packages: docker-py, MarkupSafe, Jinja2, smmap, gitdb, GitPython, graphviz, beautifulsoup4, setuptools, pycrypto, kolla
  Found existing installation: docker-py 1.8.1
    Uninstalling docker-py-1.8.1:
      Successfully uninstalled docker-py-1.8.1
  Running setup.py install for docker-py
  Running setup.py install for MarkupSafe
  Running setup.py install for smmap
  Running setup.py install for gitdb
  Found existing installation: setuptools 0.9.8
    Uninstalling setuptools-0.9.8:
      Successfully uninstalled setuptools-0.9.8
  Running setup.py install for pycrypto
  Running setup.py install for kolla
Successfully installed GitPython-2.0.2 Jinja2-2.8 MarkupSafe-0.23 beautifulsoup4-4.4.1 docker-py-1.7.2 gitdb-0.6.4 graphviz-0.4.10 kolla-2.0.0.0rc2.dev430 pycrypto-2.6.1 setuptools-21.0.0 smmap-0.9.0
[root@localhost ~]# 

cd kolla
cp -r etc/kolla /etc/

yum -y install ntp
systemctl enable ntpd.service
systemctl start ntpd.service

[root@localhost kolla]# systemctl enable ntpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.
[root@localhost kolla]# systemctl start ntpd.service
[root@localhost kolla]# 


[root@localhost kolla]# systemctl stop libvirtd.service
Failed to stop libvirtd.service: Unit libvirtd.service not loaded.
[root@localhost kolla]# systemctl disable libvirtd.service
Failed to execute operation: Access denied
[root@localhost kolla]# 

这里libvirtd没有启动


yum -y install ansible1.9

  Verifying  : ansible1.9-1.9.4-2.el7.noarch                                                                                                                                              7/16 
  Verifying  : libtomcrypt-1.17-23.el7.x86_64                                                                                                                                             8/16 
  Verifying  : libtommath-0.42.0-4.el7.x86_64                                                                                                                                             9/16 
  Verifying  : python-pyasn1-0.1.6-2.el7.noarch                                                                                                                                          10/16 
  Verifying  : PyYAML-3.10-11.el7.x86_64                                                                                                                                                 11/16 
  Verifying  : python-babel-0.9.6-8.el7.noarch                                                                                                                                           12/16 
  Verifying  : python-six-1.9.0-2.el7.noarch                                                                                                                                             13/16 
  Verifying  : sshpass-1.05-5.el7.x86_64                                                                                                                                                 14/16 
  Verifying  : python-paramiko-1.15.1-1.el7.noarch                                                                                                                                       15/16 
  Verifying  : python2-crypto-2.6.1-9.el7.x86_64                                                                                                                                         16/16 


Installed:
  ansible1.9.noarch 0:1.9.4-2.el7                                                                                                                                                              


Dependency Installed:
  PyYAML.x86_64 0:3.10-11.el7           libtomcrypt.x86_64 0:1.17-23.el7    libtommath.x86_64 0:0.42.0-4.el7     libyaml.x86_64 0:0.1.4-11.el7_0         python-babel.noarch 0:0.9.6-8.el7     
  python-httplib2.noarch 0:0.7.7-3.el7  python-jinja2.noarch 0:2.7.2-2.el7  python-keyczar.noarch 0:0.71c-2.el7  python-markupsafe.x86_64 0:0.11-10.el7  python-paramiko.noarch 0:1.15.1-1.el7 
  python-pyasn1.noarch 0:0.1.6-2.el7    python-six.noarch 0:1.9.0-2.el7     python2-ecdsa.noarch 0:0.13-4.el7    sshpass.x86_64 0:1.05-5.el7            


Failed:
  python2-crypto.x86_64 0:2.6.1-9.el7                                                                                                                                                          


Complete!
[root@localhost kolla]# 


[root@localhost kolla]# yum -y install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.opencas.cn
 * extras: mirrors.btte.net
 * updates: mirrors.yun-idc.com
Package gcc-4.8.5-4.el7.x86_64 already installed and latest version
Nothing to do
[root@localhost kolla]# 

gcc上面安装过了,所以告诉我已经安装


3 安装registery(多节点用)

docker run -d -p 4000:5000 --restart=always --name registry registry:2

[root@localhost kolla]# docker run -d -p 4000:5000 --restart=always --name registry registry:2
Unable to find image 'registry:2' locally
Pulling repository docker.io/library/registry
52b85edb4008: Error pulling image (2) from docker.io/library/registry, Server error: Status 0 while fetching image layer (bce27ca01572489ceae9e56752a9edf5352061d2ed3e42c15e8628bcde640178) 2a9edf5352061d2ed3e42c15e8628bcde640178) 
d1cc0e6af849: Download complete 
b806a64dca70: Downloading 2.686 MB
1254b143a190: Download complete 
bce27ca01572: Error pulling dependent layers 
9dafad94c4ab: Waiting 
0ff9c19fd87b: Waiting 
c020dba7ed60: Waiting 
docker: Error pulling image (2) from docker.io/library/registry, Server error: Status 0 while fetching image layer (bce27ca01572489ceae9e56752a9edf5352061d2ed3e42c15e8628bcde640178).
See 'docker run --help'.

这次失败了。

[root@localhost kolla]# docker run -d -p 4000:5000 --restart=always --name registry registry:2
Unable to find image 'registry:2' locally
Pulling repository docker.io/library/registry
52b85edb4008: Error pulling image (2) from docker.io/library/registry, Server error: Status 0 while fetching image layer (bce27ca01572489ceae9e56752a9edf5352061d2ed3e42c15e8628bcde640178) 2a9edf5352061d2ed3e42c15e8628bcde640178) 
d1cc0e6af849: Download complete 
b806a64dca70: Downloading 2.686 MB
1254b143a190: Download complete 
bce27ca01572: Error pulling dependent layers 
9dafad94c4ab: Waiting 
0ff9c19fd87b: Waiting 
c020dba7ed60: Waiting 
docker: Error pulling image (2) from docker.io/library/registry, Server error: Status 0 while fetching image layer (bce27ca01572489ceae9e56752a9edf5352061d2ed3e42c15e8628bcde640178).
See 'docker run --help'.
[root@localhost kolla]# docker run -d -p 4000:5000 --restart=always --name registry registry:2
Unable to find image 'registry:2' locally
2: Pulling from library/registry
efd26ecc9548: Retrying in 1 second 
a3ed95caeb02: Download complete 
39091a8d8094: Downloading 
c5ad04c01f33: Download complete 
e441cc69d374: Download complete 
docker: net/http: TLS handshake timeout.
See 'docker run --help'.

这次超时了

[root@localhost kolla]# docker run -d -p 4000:5000 --restart=always --name registry registry:2
Unable to find image 'registry:2' locally
2: Pulling from library/registry
efd26ecc9548: Pull complete 
a3ed95caeb02: Pull complete 
39091a8d8094: Pull complete 
c5ad04c01f33: Pull complete 
e441cc69d374: Pull complete 
Digest: sha256:5206f99cc4d06dedc6d291324935ef134001f30fe05bf47e8d0b58d7e93e3843
Status: Downloaded newer image for registry:2
4a6ec0cd083e86501d0f13b373983c0dc56d4617fbccdb2d7b6170bf9ce78904
[root@localhost kolla]# 

这次有点成功了。

vi etc/sysconfig/docker

other_args="--insecure-registry 192.168.40.193:4000"
这里40.193是我本机ip

5

vi /etc/systemd/system/docker.service.d/kolla.conf

[Service]
EnvironmentFile=/etc/sysconfig/docker
# It's necessary to clear ExecStart before attempting to override it
# or systemd will complain that it is defined more than once.
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// $other_args

这里已经预先设置了mount为shared

重启docker服务

systemctl daemon-reload
systemctl stop docker
systemctl start docker

6 编译映像

kolla-build
未完待续,请看下集,下集拍摄中。


参考

1 http://docs.openstack.org/developer/kolla/quickstart.html

你可能感兴趣的:(kolla安装(1))