当前位置: 首页 >> 虚拟化 >> 【部署】openstack 单节点快速安装部署 >> 正文

【部署】openstack 单节点快速安装部署

2021年02月23日 16:47:40    作者:Jiaozn    分类:虚拟化     评论(0)

安装openstack
yum install -y centos-release-openstack-newton
yum update -y
yum install -y openstack-packstack
packstack --gen-answer-file=answer.txt
 #vim answer.txt        可以编辑配置文件(对云计算构架的项目选择修改密码)  也可以不修改
        CONFIG_NTP_SERVERS=192.168.0.254  
        CONFIG_KEYSTONE_ADMIN_PW=xxbandy

packstack --answer-file=answer.txt
安装过程,有可能因为源的原因中断,你可以重复运行上一句。

[root@localhost runcore]# packstack --gen-answer-file=answer.txt
[root@localhost runcore]# packstack --answer-file=answer.txt
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20161230-102423-2sGXEN/openstack-setup.log

Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
Preparing servers                                    [ DONE ]
Pre installing Puppet and discovering hosts' details[ ERROR ]

ERROR : Failed to run remote script, stdout: Loaded plugins: fastestmirror, langpacks
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')

stderr: Warning: Permanently added '192.168.0.163' (ECDSA) to the list of known hosts.
+ trap t ERR
+ yum install -y puppet hiera openssh-clients tar nc rubygem-json


 One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64
++ t
++ exit 1

Please check log file /var/tmp/packstack/20161230-102423-2sGXEN/openstack-setup.log for more information
Additional information:
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
######------------------------------------------------############----------------------------------------------
##注释:使用应答文件安装,出现上述错误。先是修改了hostname和hosts文件,然后运行,还是错误。第二步按照错误的提示内容执行yum install -y puppet hiera openssh-clients tar nc rubygem-json。再运行应答文件即通过了!

[root@localhost runcore]# vi /etc/hostname
[root@localhost runcore]# vi /etc/hosts
[root@localhost runcore]# packstack --answer-file=answer.txt
[root@localhost runcore]# yum install -y puppet hiera openssh-clients tar nc rubygem-json
已加载插件:fastestmirror, langpacks
base                                                                   | 3.6 kB  00:00:00     
centos-ceph-jewel                                                      | 2.9 kB  00:00:00     
centos-openstack-newton                                                | 2.9 kB  00:00:00     
centos-qemu-ev                                                         | 2.9 kB  00:00:00     
extras                                                                 | 3.4 kB  00:00:00     
updates                                                                | 3.4 kB  00:00:00     
(1/7): centos-qemu-ev/7/x86_64/primary_db                              |  47 kB  00:00:01     
(2/7): base/7/x86_64/group_gz                                          | 155 kB  00:00:01     
(3/7): centos-ceph-jewel/7/x86_64/primary_db                           |  41 kB  00:00:02     
(4/7): extras/7/x86_64/primary_db                                      | 183 kB  00:00:00     
(5/7): updates/7/x86_64/primary_db                                     | 1.2 MB  00:00:06     
(6/7): centos-openstack-newton/x86_64/primary_db                       | 671 kB  00:00:27     
(7/7): base/7/x86_64/primary_db                                        | 5.6 MB  00:00:39     
Loading mirror speeds from cached hostfile
 * base: mirrors.yun-idc.com
 * extras: mirrors.yun-idc.com
 * updates: mirrors.163.com
软件包 puppet-3.8.7-2.el7.noarch 已安装并且是最新版本
软件包 1:hiera-1.3.4-5.el7.noarch 已安装并且是最新版本
软件包 openssh-clients-6.6.1p1-31.el7.x86_64 已安装并且是最新版本
软件包 2:tar-1.26-31.el7.x86_64 已安装并且是最新版本
软件包 2:nmap-ncat-6.40-7.el7.x86_64 已安装并且是最新版本
软件包 rubygem-json-1.7.7-29.el7.x86_64 已安装并且是最新版本
无须任何处理
[root@localhost runcore]# packstack --answer-file=answer.txt

#查看账户密码
cat /etc/nagios/keystonerc_admin


安装KVM
#1安装kvm
yum -y install qemu-kvm libvirt virt-install bridge-utils
#2查看是否安装
lsmod | grep kvm
#3
systemctl start libvirtd
systemctl enable libvirtd
#
安装virt-manager
yum install virt-manager


除非注明,发表在“Jiaozn的博客”的文章『【部署】openstack 单节点快速安装部署』版权归Jiaozn所有。 转载请注明出处为“本文转载于『Jiaozn的博客』原地址https://jiaozn.com/reed/656.html

评论

发表评论   

昵称*

E-mail*

网站