(1).實驗環境node
主機名 | IP地址 | 角色 | 內存 | 網卡 | CPU | 磁盤 |
OpenStack-con | 192.168.128.110 | controller(控制) | 8G | 橋接網卡ens32和ens33 | 4核 | 200G |
OpenStack-compython |
192.168.128.111 | compute(計算) | 4G | 橋接網卡ens32 | 4核 | 20G |
OpenStack-sto | 192.168.128.112 | storage(存儲) | 4G | 橋接網卡ens32 | 4核 | 2個20G |
注意:OpenStack-con主機充當兩個角色:kolla-ansible部署節點和controller節點。mysql
(2).準備工做linux
三臺主機都安裝<Tab>鍵補全軟件包和vim軟件包git
yum -y install bash-completion.noarch vim
三臺主機都關閉firewalld和SELinuxgithub
# vim /etc/selinux/config SELINUX=disabled # setenforce 0 # getenforce Permissive # systemctl disable firewalld && systemctl stop firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [root@OpenStack-con ~]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1) 12月 27 10:43:55 OpenStack-con systemd[1]: Starting firewalld - dynamic firewall daemon... 12月 27 10:44:01 OpenStack-con systemd[1]: Started firewalld - dynamic firewall daemon. 12月 27 11:03:53 OpenStack-con systemd[1]: Stopping firewalld - dynamic firewall daemon... 12月 27 11:03:54 OpenStack-con systemd[1]: Stopped firewalld - dynamic firewall daemon.
在OpenStack-con(110)上配置hosts文件,並複製到另兩臺主機上sql
[root@OpenStack-con ~]# vim /etc/hosts 192.168.128.110 OpenStack-con 192.168.128.111 OpenStack-com 192.168.128.112 OpenStack-sto [root@OpenStack-con ~]# scp /etc/hosts 192.168.128.111:/etc/ [root@OpenStack-con ~]# scp /etc/hosts 192.168.128.112:/etc/
修改OpenStack-con(110)的ens33配置文件docker
[root@OpenStack-con ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33 //只放如下內容 TYPE=Ethernet BOOTPROTO=none //靜態獲取IP ONBOOT=yes //啓用網卡 PROXY_METHOD=none NAME=ens33 DEVICE=ens33 [root@OpenStack-con ~]# systemctl restart network
(3).安裝ansiblejson
1)在OpenStack-con(110)主機上安裝並更新pip工具bootstrap
//安裝epel源 [root@OpenStack-con ~]# yum -y install epel-release [root@OpenStack-con ~]# yum -y install python-pip [root@OpenStack-con ~]# mkdir .pip //配置pip軟件包源 [root@OpenStack-con ~]# tee /root/.pip/pip.conf << 'EOF' [global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com EOF //更新pip [root@OpenStack-con ~]# pip install -U pip
2)配置OpenStack-com(111)和OpenStack-sto(112)pip軟件包源
注意:這一步是爲了後期安裝
//OpenStack-com(111)執行一次 [root@OpenStack-com ~]# mkdir .pip [root@OpenStack-com ~]# tee /root/.pip/pip.conf << 'EOF' [global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com EOF //OpenStack-sto(112)執行一次 [root@OpenStack-sto ~]# mkdir .pip [root@OpenStack-sto ~]# tee /root/.pip/pip.conf << 'EOF' [global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com EOF
3)在OpenStack-con(110)上安裝ansible
//安裝依賴包 [root@OpenStack-con ~]# yum -y install python-devel libffi-devel gcc openssl-devel libselinux-python [root@OpenStack-con ~]# pip install ansible
4)在OpenStack-con(110)上配置ansible參數
注意:pip安裝的ansible是沒有配置文件的,此時須要前往github將默認配置文件拷貝下來。網址:https://github.com/ansible/ansible/blob/devel/examples/ansible.cfg
[root@OpenStack-con ~]# ansible --version //能夠看到此時是沒有配置文件的 ansible 2.9.2 configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] //生成配置文件 [root@OpenStack-con ~]# mkdir /etc/ansible [root@OpenStack-con ~]# vim /etc/ansible/ansible.cfg [root@OpenStack-con ~]# ansible --version //已經自動加載了配置文件 ansible 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
而後開始優化
[root@OpenStack-con ~]# vim /etc/ansible/ansible.cfg forks = 10 //第19行,設置並行進程數。若是要管理的主機不少,能夠優先嚐試增長該值 host_key_checking = False //第67行,跳過ssh首次鏈接提示驗證部分 pipelining = True //第403行,開啓管道輸送。ansible在執行一個模塊須要ssh到目的主機屢次,開啓該模式減小ssh鏈接次數,縮短ansible執行時間。 //在部署大規模服務器或引用模塊很是多時,開啓pipelining會給ansible帶來顯著的性能提高
(4).OpenStack-sto(112)配置cinder(塊存儲)信息
[root@OpenStack-sto ~]# yum -y install yum-utils device-mapper-persistent-data lvm2 //安裝相關軟件包 [root@OpenStack-sto ~]# pvs //查看已經存在的pv PV VG Fmt Attr PSize PFree /dev/sda2 centos lvm2 a-- <19.00g 0 [root@OpenStack-sto ~]# pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created. [root@OpenStack-sto ~]# vgcreate cinder /dev/sdb Volume group "cinder" successfully created [root@OpenStack-sto ~]# systemctl status lvm2-lvmetad.service //保證開機自啓 ● lvm2-lvmetad.service - LVM2 metadata daemon Loaded: loaded (/usr/lib/systemd/system/lvm2-lvmetad.service; static; vendor preset: enabled) Active: active (running) since 二 2019-12-17 15:26:11 CST; 20min ago Docs: man:lvmetad(8) Main PID: 11954 (lvmetad) CGroup: /system.slice/lvm2-lvmetad.service └─11954 /usr/sbin/lvmetad -f 12月 17 15:26:11 OpenStack-sto systemd[1]: Started LVM2 metadata daemon. 12月 17 15:26:11 OpenStack-sto systemd[1]: Starting LVM2 metadata daemon...
(5).在OpenStack-con(110)上安裝kolla-ansible並自定義OpenStack的相關配置文件
1)安裝kolla-ansible
注意:最新的版本須要指定,不然報錯
//stein版本採用以下命令,我這裏就是使用的stein版本 [root@OpenStack-con ~]# pip install kolla-ansible==8.0.1 --ignore-installed PyYAML //train版本採用以下命令 [root@OpenStack-con ~]# pip install kolla-ansible==9.0.1 --ignore-installed PyYAML
提供錯誤用於對比
//在部署高可用mysql用戶時,提示沒法解析內部模塊 [root@OpenStack-con ~]# kolla-ansible deploy -i /etc/kolla/multinode ...... TASK [mariadb : Creating haproxy mysql user] *********************************************************************************************************************************** fatal: [192.168.128.110]: FAILED! => {"changed": false, "msg": "Can not parse the inner module output: localhost | SUCCESS => {\n "changed": false, \n "user": "haproxy"\n}\n"} //查看kolla下的mariadb日誌文件,沒有error或ERROR [root@OpenStack-con ~]# cat /var/log/kolla/mariadb/mariadb.log | grep fail 2020-01-03 10:29:58 0 [Warning] WSREP: access file(/var/lib/mysql//gvwstate.dat) failed(No such file or directory) 2020-01-03 10:29:58 0 [Note] WSREP: restore pc from disk failed 2020-01-03 10:30:13 0 [Warning] WSREP: access file(/var/lib/mysql//gvwstate.dat) failed(No such file or directory) 2020-01-03 10:30:13 0 [Note] WSREP: restore pc from disk failed 2020-01-03 11:11:29 0 [Warning] WSREP: access file(/var/lib/mysql//gvwstate.dat) failed(No such file or directory) 2020-01-03 11:11:29 0 [Note] WSREP: restore pc from disk failed //查看kolla下的ansible日誌文件 [root@OpenStack-con ~]# vim /var/log/kolla/ansible.log 2020-01-03 13:33:25,107 p=127 u=ansible | localhost | SUCCESS => { "changed": false, "user": "haproxy" } //另外mariadb實例能夠進入,密碼能夠正常登陸
2)複製kolla-ansible的相關配置文件
[root@OpenStack-con ~]# cp -r /usr/share/kolla-ansible/etc_examples/kolla /etc/ [root@OpenStack-con ~]# cp /usr/share/kolla-ansible/ansible/inventory/* /etc/kolla/ [root@OpenStack-con ~]# ls /etc/kolla/ all-in-one globals.yml multinode passwords.yml
文件說明:all-in-one是安裝單節點OpenStack的ansible自動安裝配置文件;multinode是安裝多節點OpenStack的ansible自動安裝配置文件;globals.yml是OpenStack部署的自定義配置文件;passwords.yml是OpenStack中各個服務的密碼文件。
3)生成密鑰,並受權三臺主機
[root@OpenStack-con ~]# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: SHA256:MlEHvdjHadF+ydFC80Gg0u/sKcP+hvC8gDpvHTOGuL4 root@OpenStack-con The key's randomart image is: +---[RSA 2048]----+ | oo. +=o.| | . .o o o+o| | . + = +..+| | .. + * .o.| | + S o . . | | . +.* o | | ..o.O .o | | o.. ..B... | | .E=. .o*+ | +----[SHA256]-----+ [root@OpenStack-con ~]# ssh-copy-id -i .ssh/id_rsa.pub root@OpenStack-con [root@OpenStack-con ~]# ssh-copy-id -i .ssh/id_rsa.pub root@OpenStack-com [root@OpenStack-con ~]# ssh-copy-id -i .ssh/id_rsa.pub root@OpenStack-sto
4)配置multinode多節點主機清單文件
[root@OpenStack-con ~]# vim /etc/kolla/multinode //修改模塊名不帶:chilldren的部分 # These initial groups are the only groups required to be modified. The # additional groups are for more control of the environment. [control] #控制模塊 # These hostname must be resolvable from your deployment host OpenStack-con #給110主機 # The above can also be specified as follows: #control[01:03] ansible_user=kolla # The network nodes are where your l3-agent and loadbalancers will run # This can be the same as a host in the control group [network] #網絡模塊 OpenStack-con #給110主機 [compute] #計算模塊 OpenStack-com #給111主機 [monitoring] #監控模塊 OpenStack-con #給110主機 # When compute nodes and control nodes use different interfaces, # you need to comment out "api_interface" and other interfaces from the globals.yml # and specify like below: #compute01 neutron_external_interface=eth0 api_interface=em1 storage_interface=em1 tunnel_interface=em1 [storage] #存儲模塊 OpenStack-sto #給112主機 [deployment] #部署模塊 OpenStack-con #給110主機
5)檢測全部主機是否正常通訊
[root@OpenStack-con ~]# ansible -i /etc/kolla/multinode all -m ping [DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this will change, but still be user configurable on deprecation. This feature will be removed in version 2.10. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. [WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details OpenStack-con | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "ping": "pong" } OpenStack-com | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "ping": "pong" } OpenStack-sto | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "ping": "pong" }
6)自動生成OpenStack各服務的密碼文件
[root@OpenStack-con ~]# kolla-genpwd [root@OpenStack-con ~]# vim /etc/kolla/passwords.yml keystone_admin_password: 123456 //第165行,修改網頁登陸密碼
7)編輯/etc/kolla/global.yml自定義OpenStack中的部署事項
[root@OpenStack-con ~]# vim /etc/kolla/globals.yml //第14行和第15行,選擇下載的基礎鏡像,5選1 # Valid options are ['centos', 'debian', 'oraclelinux', 'rhel', 'ubuntu'] kolla_base_distro: "centos" //第17行和第18行,選擇的安裝方法,2選1。binary二進制安裝,source源碼安裝 # Valid options are [ binary, source ] kolla_install_type: "source" //第20行和第21行,選擇OpenStack的版本標籤,詳細請看:https://releases.openstack.org/ # Valid option is Docker repository tag openstack_release: "stein" //注意版本必須小寫,後期下載的OpenStack相關的docker鏡像標籤也爲stein。我是train版本失敗,才換成stein //第23行和第24行,存放配置文件的位置 # Location of configuration overrides #node_custom_config: "/etc/kolla/config" //默認存放地址 //第31行,OpenStack內部管理網絡地址,經過該IP訪問OpenStack Web頁面進行管理。若是啓用了高可用,須要設置爲VIP(漂移IP) kolla_internal_vip_address: "192.168.128.110" //第87行,OpenStack內部管理網絡地址的網卡接口 network_interface: "ens32" //第92~9四、97~98行去除註釋,使內部通訊網絡都走ens32 api_interface: "{{ network_interface }}" storage_interface: "{{ network_interface }}" cluster_interface: "{{ network_interface }}" tunnel_interface: "{{ network_interface }}" dns_interface: "{{ network_interface }}" //第105行,OpenStack外部(或公共)網絡的網卡接口,能夠是vlan模式或flat模式。 //此網卡應該在沒有IP地址的狀況下處於活動,若是不是,那麼OpenStack雲平臺中的雲主機實例將沒法訪問外部網絡。(存在IP時br-ex橋接就不成功) neutron_external_interface: "ens33" //第190行,關閉高可用 enable_haproxy: "no" //第213行,啓用cinder(塊存儲) enable_cinder: "yes" //第218行,cinder(塊存儲)後端啓用lvm enable_cinder_backend_lvm: "yes" //第421行,cinder(塊存儲)的卷組名稱,須要和OpenStack-sto主機上的一致 cinder_volume_group: "cinder" //第443行和第444行,指定nova-compute守護進程使用的虛擬化技術。(kvm好像有點問題,你們能夠試試,看看大家能不能過nova下載) //nova-compute是一個很是重要的守護進程,負責建立和終止虛擬機實例,即管理虛擬機實例的生命週期 # Valid options are [ qemu, kvm, vmware, xenapi ] nova_compute_virt_type: "qemu"
8)經過kolla-ansible安裝OpenStack所需依賴包
注意:此時會對三臺主機都進行操做,請保持網絡暢通。報錯不用擔憂,請從新運行命令語句。
[root@OpenStack-con ~]# kolla-ansible -i /etc/kolla/multinode bootstrap-servers PLAY RECAP ********************************************************************* OpenStack-com : ok=40 changed=23 unreachable=0 failed=0 skipped=32 rescued=0 ignored=0 OpenStack-con : ok=40 changed=21 unreachable=0 failed=0 skipped=32 rescued=0 ignored=0 OpenStack-sto : ok=40 changed=23 unreachable=0 failed=0 skipped=32 rescued=0 ignored=0
9)對主機進行預部署檢查
[root@OpenStack-con ~]# kolla-ansible -i /etc/kolla/multinode prechecks PLAY RECAP ********************************************************************* OpenStack-com : ok=30 changed=0 unreachable=0 failed=0 skipped=22 rescued=0 ignored=0 OpenStack-con : ok=70 changed=0 unreachable=0 failed=0 skipped=77 rescued=0 ignored=0 OpenStack-sto : ok=23 changed=0 unreachable=0 failed=0 skipped=11 rescued=0 ignored=0
10)編輯docker volume卷掛載方式,並指定docker加速器
注意:三臺主機都須要進行設置,設置方法同樣
//因爲不存在docker卷掛載配置文件,因此須要手動生成 # mkdir -p /etc/systemd/system/docker.service.d/ # vim /etc/systemd/system/docker.service.d/kolla.conf [Service] MountFlags=shared //指定加速器,這裏使用阿里雲的加速器 # tee /etc/docker/daemon.json << 'EOF' { "registry-mirrors": ["https://8mkqrctt.mirror.aliyuncs.com"] } EOF # systemctl daemon-reload # systemctl restart docker && systemctl enable docker
11)拉取OpenStack的鏡像
[root@OpenStack-con ~]# kolla-ansible -i /etc/kolla/multinode pull PLAY RECAP ********************************************************************* OpenStack-com : ok=18 changed=6 unreachable=0 failed=0 skipped=11 rescued=0 ignored=0 OpenStack-con : ok=37 changed=15 unreachable=0 failed=0 skipped=52 rescued=0 ignored=0 OpenStack-sto : ok=14 changed=4 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 [root@OpenStack-con ~]# docker images | grep kolla |wc -l 59 [root@OpenStack-con ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE kolla/centos-binary-keystone-fernet stein 72f0bae505fe 20 hours ago 1.04GB kolla/centos-binary-keystone-ssh stein fb8fc703d9eb 20 hours ago 1.04GB kolla/centos-binary-keystone stein 2d17d726f53d 20 hours ago 1.04GB kolla/centos-binary-heat-api stein afed025af3c4 20 hours ago 1.02GB kolla/centos-binary-heat-api-cfn stein d0afede64c55 20 hours ago 1.02GB kolla/centos-binary-heat-engine stein 05028ad12780 20 hours ago 1.02GB kolla/centos-binary-cinder-api stein 46be58e7f676 20 hours ago 1.19GB kolla/centos-binary-cinder-scheduler stein e8243fedab80 20 hours ago 1.1GB kolla/centos-binary-nova-api stein 111d2392bf8e 20 hours ago 1.08GB kolla/centos-binary-nova-novncproxy stein e717e391a9b6 20 hours ago 1.05GB kolla/centos-binary-nova-conductor stein 17f5ec108ffa 20 hours ago 1.04GB kolla/centos-binary-nova-scheduler stein b6d8a40ae9ac 20 hours ago 1.04GB kolla/centos-binary-glance-api stein d2249e1a4935 20 hours ago 1.04GB kolla/centos-binary-neutron-l3-agent stein 1d32dc99e8a2 20 hours ago 1.08GB kolla/centos-binary-neutron-openvswitch-agent stein 647ef07fc6ae 20 hours ago 1.08GB kolla/centos-binary-neutron-server stein dc2362806d50 20 hours ago 1.08GB kolla/centos-binary-neutron-dhcp-agent stein 0fab1de92d76 20 hours ago 1.04GB kolla/centos-binary-horizon stein f1aa61435a02 20 hours ago 1.21GB kolla/centos-binary-placement-api stein 03d91d2015d8 20 hours ago 1.05GB kolla/centos-binary-openvswitch-db-server stein afa614377634 20 hours ago 423MB kolla/centos-binary-openvswitch-vswitchd stein 504bac87dc3a 20 hours ago 423MB kolla/centos-binary-mariadb stein faa1ccc316bb 20 hours ago 594MB kolla/centos-binary-chrony stein bce4d6909cb3 20 hours ago 407MB kolla/centos-binary-cron stein a87749b5addd 20 hours ago 406MB kolla/centos-binary-memcached stein 044390c82ab2 20 hours ago 407MB kolla/centos-binary-kolla-toolbox stein 20cb6d293506 20 hours ago 697MB kolla/centos-binary-fluentd stein 8bf3269af141 20 hours ago 540MB kolla/centos-binary-rabbitmq stein a8d8b0865dac 20 hours ago 486MB kolla/centos-binary-nova-consoleauth stein 41f28ce37a48 7 days ago 1.04GB kolla/centos-source-horizon stein fd11d967a930 8 weeks ago 1.04GB kolla/centos-source-cinder-api stein a7a9dd3a1fbc 8 weeks ago 1.09GB kolla/centos-source-neutron-server stein 94084ae4da8f 8 weeks ago 1.03GB kolla/centos-source-cinder-scheduler stein 78d79bd7a6c1 8 weeks ago 1.02GB kolla/centos-source-heat-engine stein 92dd229552db 8 weeks ago 895MB kolla/centos-source-heat-api stein f14709856b5e 8 weeks ago 895MB kolla/centos-source-heat-api-cfn stein 0c68cf4fa817 8 weeks ago 895MB kolla/centos-source-keystone-ssh stein 459b6fef664a 8 weeks ago 922MB kolla/centos-source-keystone-fernet stein b8151b6c6fa9 8 weeks ago 921MB kolla/centos-source-keystone stein e524b963dcbe 8 weeks ago 921MB kolla/centos-source-neutron-l3-agent stein 9bef84e9a9c2 8 weeks ago 1.04GB kolla/centos-source-neutron-openvswitch-agent stein 22abae3cc055 8 weeks ago 1GB kolla/centos-source-neutron-dhcp-agent stein f3127a4eed62 8 weeks ago 1GB kolla/centos-source-neutron-metadata-agent stein 84570a9474b5 8 weeks ago 1GB kolla/centos-source-glance-api stein 847137510938 8 weeks ago 911MB kolla/centos-source-nova-api stein 8054ea5b26a8 8 weeks ago 1.09GB kolla/centos-source-nova-novncproxy stein 70443bcd9875 8 weeks ago 1.06GB kolla/centos-source-nova-scheduler stein 128505029c6e 8 weeks ago 1.03GB kolla/centos-source-nova-conductor stein 4fa117f0c54a 8 weeks ago 1.03GB kolla/centos-source-placement-api stein e07c6cd6ad27 8 weeks ago 920MB kolla/centos-source-openvswitch-db-server stein 3105bdab8aad 8 weeks ago 424MB kolla/centos-source-mariadb stein 726aed6cb178 8 weeks ago 594MB kolla/centos-source-rabbitmq stein e6a3b5157ec9 8 weeks ago 486MB kolla/centos-source-memcached stein 72ed677d49f8 8 weeks ago 407MB kolla/centos-source-chrony stein 5b073a8c3ca2 8 weeks ago 407MB kolla/centos-source-cron stein c19e735f5b76 8 weeks ago 406MB kolla/centos-source-openvswitch-vswitchd stein 757c347670f1 8 weeks ago 424MB kolla/centos-source-fluentd stein 7b946e0d6253 8 weeks ago 540MB kolla/centos-source-kolla-toolbox stein 1fdf021874ba 8 weeks ago 688MB kolla/centos-binary-neutron-metadata-agent stein 8fbad310e219 2 months ago 1.04GB [root@OpenStack-com ~]# docker images | grep kolla | wc -l 22 [root@OpenStack-com ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE kolla/centos-binary-nova-compute stein 1301444e4ce4 20 hours ago 1.81GB kolla/centos-binary-nova-ssh stein 67b810ba9fd4 20 hours ago 1.05GB kolla/centos-binary-neutron-openvswitch-agent stein 647ef07fc6ae 20 hours ago 1.08GB kolla/centos-binary-openvswitch-db-server stein afa614377634 20 hours ago 423MB kolla/centos-binary-openvswitch-vswitchd stein 504bac87dc3a 20 hours ago 423MB kolla/centos-binary-nova-libvirt stein a8914e748a56 20 hours ago 1.21GB kolla/centos-binary-chrony stein bce4d6909cb3 20 hours ago 407MB kolla/centos-binary-cron stein a87749b5addd 20 hours ago 406MB kolla/centos-binary-kolla-toolbox stein 20cb6d293506 20 hours ago 697MB kolla/centos-binary-fluentd stein 8bf3269af141 20 hours ago 540MB kolla/centos-binary-iscsid stein ec09ef36eb84 20 hours ago 411MB kolla/centos-source-nova-compute stein e18a50090933 8 weeks ago 1.85GB kolla/centos-source-neutron-openvswitch-agent stein 22abae3cc055 8 weeks ago 1GB kolla/centos-source-nova-ssh stein f8583c071c07 8 weeks ago 1.06GB kolla/centos-source-openvswitch-vswitchd stein a939df78a335 8 weeks ago 424MB kolla/centos-source-openvswitch-db-server stein 3105bdab8aad 8 weeks ago 424MB kolla/centos-source-nova-libvirt stein 77836fa773c8 8 weeks ago 1.2GB kolla/centos-source-kolla-toolbox stein 4a67f40cdd71 8 weeks ago 688MB kolla/centos-source-chrony stein 5b073a8c3ca2 8 weeks ago 407MB kolla/centos-source-iscsid stein fa88a664b28c 8 weeks ago 411MB kolla/centos-source-cron stein c19e735f5b76 8 weeks ago 406MB kolla/centos-source-fluentd stein 7b946e0d6253 8 weeks ago 540MB [root@OpenStack-sto ~]# docker images | grep kolla | wc -l 16 [root@OpenStack-sto ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE kolla/centos-binary-cinder-volume stein e5903d4118f9 20 hours ago 1.14GB kolla/centos-binary-cinder-backup stein 3778ba53a0af 20 hours ago 1.13GB kolla/centos-binary-chrony stein bce4d6909cb3 20 hours ago 407MB kolla/centos-binary-cron stein a87749b5addd 20 hours ago 406MB kolla/centos-binary-tgtd stein c10e8a22cd18 20 hours ago 405MB kolla/centos-binary-kolla-toolbox stein 20cb6d293506 20 hours ago 697MB kolla/centos-binary-fluentd stein 8bf3269af141 20 hours ago 540MB kolla/centos-binary-iscsid stein ec09ef36eb84 20 hours ago 411MB kolla/centos-source-cinder-volume stein 937e4592e1f3 8 weeks ago 1.1GB kolla/centos-source-cinder-backup stein 717e08a70bdf 8 weeks ago 1.09GB kolla/centos-source-kolla-toolbox stein 4a67f40cdd71 8 weeks ago 688MB kolla/centos-source-chrony stein 5b073a8c3ca2 8 weeks ago 407MB kolla/centos-source-iscsid stein fa88a664b28c 8 weeks ago 411MB kolla/centos-source-cron stein c19e735f5b76 8 weeks ago 406MB kolla/centos-source-tgtd stein 7d4895d43472 8 weeks ago 406MB kolla/centos-source-fluentd stein 7b946e0d6253 8 weeks ago 540MB
拉取時,若是報錯,能夠嘗試從新拉取。檢查配置文件是否有問題,沒有問題的前提下能夠嘗試換版本進行操做。
12)部署OpenStack
部署OpenStack
[root@OpenStack-con ~]# kolla-ansible -i /etc/kolla/multinode deploy PLAY RECAP *********************************** OpenStack-com : ok=80 changed=38 unreachable=0 failed=0 skipped=54 rescued=0 ignored=0 OpenStack-con : ok=292 changed=161 unreachable=0 failed=0 skipped=144 rescued=0 ignored=0 OpenStack-sto : ok=51 changed=20 unreachable=0 failed=0 skipped=23 rescued=0 ignored=0
13)驗證部署
[root@OpenStack-con ~]# kolla-ansible -i /etc/kolla/multinode post-deploy PLAY RECAP ********************************************************************* localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [root@OpenStack-con ~]# cat /etc/kolla/admin-openrc.sh //會生成該文件,查看一下 # Clear any old environment that may conflict. for key in $( set | awk '{FS="="} /^OS_/ {print $1}' ); do unset $key ; done export OS_PROJECT_DOMAIN_NAME=Default export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_NAME=admin export OS_TENANT_NAME=admin export OS_USERNAME=admin //網頁的帳號 export OS_PASSWORD=123456 //網頁的密碼 export OS_AUTH_URL=http://192.168.128.110:35357/v3 export OS_INTERFACE=internal export OS_IDENTITY_API_VERSION=3 export OS_REGION_NAME=RegionOne export OS_AUTH_PLUGIN=password
14)使用內網的Windows測試