通过packstack快速安装openstack

一 实践说明
操作系统版本:Centos7
openstack版本:ocata

二实践步骤
1 准备虚拟机
内存:6G
处理器:2核
硬盘:64G
网络环境:
[root@localhost network-scripts]# cat ifcfg-enp0s3
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
UUID=4d03487c-46c4-49e9-bf44-4258044135cc
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.0.120
PREFIX=24
GATEWAY=192.168.0.1
DNS1=223.5.5.5
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no
2 配置centos为阿里源
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo_bak
wget http://mirrors.aliyun.com/repo/Centos-7.repo
mv Centos-7.repo CentOS-Base.repo
yum clean all
yum makecache
yum update
/etc/environment文件中添加下面两行:
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
4 安装步骤
systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
yum install -y centos-release-openstack-ocata
yum update -y
yum install -y openstack-packstack
packstack --allinone
5 第一次安装时,报了如下错误
Applying 192.168.0.120_controller.pp
Testing if puppet apply is finished: 192.168.0.120_controller.pp  [ \ ]
192.168.0.120_controller.pp:                      [ ERROR ]            
Applying Puppet manifests                         [ ERROR ]
ERROR : Error appeared during Puppet run: 192.168.0.120_controller.pp
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install python-openstackclient' returned 1: Error downloading packages:
You will find full trace in log /var/tmp/packstack/20180317-203645-GewzfU/manifests/192.168.0.120_controller.pp.log
Please check log file /var/tmp/packstack/20180317-203645-GewzfU/openstack-setup.log for more information
Additional information:
* A new answerfile was created in: /root/packstack-answers-20180317-203646.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.0.120. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.0.120/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
You have mail in /var/spool/mail/root
6 第二次安装成功,安装使用如下脚本 packstack --answer-file packstack-answers-20180317-203646.txt 进行安装,第二次安装的过程如下:
[root@localhost ~]# packstack --answer-file packstack-answers-20180317-203646.txt
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20180318-091906-r_BX4u/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 [ DONE ]
Preparing pre-install entries                        [ DONE ]
Setting up CACERT                                    [ DONE ]
Preparing AMQP entries                               [ DONE ]
Preparing MariaDB entries                            [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries                           [ DONE ]
Preparing Glance entries                             [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries                             [ DONE ]
Preparing Nova API entries                           [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Preparing Nova Compute entries                       [ DONE ]
Preparing Nova Scheduler entries                     [ DONE ]
Preparing Nova VNC Proxy entries                     [ DONE ]
Preparing OpenStack Network-related Nova entries     [ DONE ]
Preparing Nova Common entries                        [ DONE ]
Preparing Neutron LBaaS Agent entries                [ DONE ]
Preparing Neutron API entries                        [ DONE ]
Preparing Neutron L3 entries                         [ DONE ]
Preparing Neutron L2 Agent entries                   [ DONE ]
Preparing Neutron DHCP Agent entries                 [ DONE ]
Preparing Neutron Metering Agent entries             [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Preparing OpenStack Client entries                   [ DONE ]
Preparing Horizon entries                            [ DONE ]
Preparing Swift builder entries                      [ DONE ]
Preparing Swift proxy entries                        [ DONE ]
Preparing Swift storage entries                      [ DONE ]
Preparing Gnocchi entries                            [ DONE ]
Preparing MongoDB entries                            [ DONE ]
Preparing Redis entries                              [ DONE ]
Preparing Ceilometer entries                         [ DONE ]
Preparing Aodh entries                               [ DONE ]
Preparing Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.0.120_controller.pp
192.168.0.120_controller.pp:                         [ DONE ]          
Applying 192.168.0.120_network.pp
192.168.0.120_network.pp:                            [ DONE ]       
Applying 192.168.0.120_compute.pp
192.168.0.120_compute.pp:                            [ DONE ]       
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]
**** Installation completed successfully ******
Additional information:
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.0.120. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.0.120/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* The installation log file is available at: /var/tmp/packstack/20180318-091906-r_BX4u/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20180318-091906-r_BX4u/manifests
You have new mail in /var/spool/mail/root
三 安装验证
1 两种找密码的方法

admin密码为:b3ebd382f8c248dc

demo的密码为:2e1e215ea9054cda

[root@localhost ~]# cat packstack-answers-20180317-203646.txt
# Password to use for the Identity service 'admin' user.
CONFIG_KEYSTONE_ADMIN_PW=b3ebd382f8c248dc

# Password to use for the Identity service 'demo' user.
CONFIG_KEYSTONE_DEMO_PW=2e1e215ea9054cda
[root@localhost ~]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD=b3ebd382f8c248dc
    export OS_AUTH_URL=http://192.168.0.120:5000/v3
    export PS1='[\u@\h \W(keystone_admin)]\$ '
    
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
2 登录验证 
网址: http://192.168.0.120/dashboard
用户名:admin
密码:b3ebd382f8c248dc
通过packstack快速安装openstack_第1张图片
通过packstack快速安装openstack_第2张图片

四 实践参考
1官方安装packstack-pike版本
https://www.rdoproject.org/install/packstack/
2 centos7 packstack-mitaka版本安装
http://blog.csdn.net/wzf28/article/details/52185353
3 http://mirrors.aliyun.com/repo/ 目录下有CentOS源和EPEL源repo文件以及设置方法,配置为阿里源,是用mitaka安装。
http://blog.csdn.net/Titan0427/article/details/52555133
4 centos7 packstack-ocata版本安装方法
http://blog.csdn.net/ns2250225/article/details/77336995
5 centos7 packstack-pike版本安装
http://blog.csdn.net/chenhaifeng2016/article/details/78924857
http://blog.csdn.net/wylfengyujiancheng/article/details/78658406
6配置pike版本openstack源,配置的是阿里云源
http://blog.csdn.net/wylfengyujiancheng/article/details/78658406
7 centos6,配置openstack源和centos源的方法,使用的是grizzly版本
https://jingyan.baidu.com/article/6c67b1d6a1fb992787bb1eae.html
8 centos6,centos采用网易的源,使用的grizzly
http://www.jb51.net/article/101880.htm
9 非常详细的openstack安装过程
https://www.cnblogs.com/yaohong/archive/2017/07/29/7251852.html

五 openstack安装涉及的三个源,可选择使用
1 CentOS源:CentOS基本安装源,设置CentOS7的Centos源为阿里的源的设置方法参考下面文章。
https://www.cnblogs.com/muyunren/p/7221505.html
2 EPEL源:EPEL 是yum的一个软件源,里面包含了许多基本源里没有的软件
设置EPEL源为阿里的源的方法参考下面文章。
https://www.cnblogs.com/imweihao/p/7357484.html
centos用户可以直接通过yum install epel-release 安装并启用EPEL。CentOS Extra默认包含该包,参考下面文章。
https://www.cnblogs.com/sxdcgaq8080/p/7516186.html
3 openstack源:涉及Openstack各版本的安装文件
阿里云的镜像地址如下
http://mirrors.aliyun.com/centos/7.4.1708/cloud/x86_64/openstack-ocata
设置openstack源为阿里源的方法。
http://blog.csdn.net/wylfengyujiancheng/article/details/78658406

六 国内镜像源
https://www.cnblogs.com/liuzhi/p/6238054.html

你可能感兴趣的:(Openstack)