SaaS 软件即服务
PasS 平台
IaaS 基础设施
XaaS 一切皆服务
openstack版本
liberty版本 自由
mitaka版本 最新版 [日本] 三鹰
开源项目:RDO
packstack工具来安装openstack
alinone
所有的组件全部安装,而且不好定制,只适合于测试环境
注意:当我们使用alinone安装的时候,会从互联网上下载一个镜像cirros
应答文件
环境:
[root@h1 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
网络配置:
控制节点: 192.168.1.201 h1.hequan.com h1
结算节点: 192.168.1.202 h2.hequan.com h2
openstack RDO安装
[root@h1 ~]# systemctl is-active NetworkManager active [root@h1 ~]# systemctl stop NetworkManager [root@h1 ~]# systemctl disable NetworkManager
软件 http://mirrors.163.com/centos/7.2.1511/cloud/x86_64/ 根据版本下载下来, 此次安装的是liberty版本
修改yum源
[openstack] name=openstack baseurl= ##把下载的软件放到此目录 enabled=1 gpgcheck=0 yum clean all
[root@h1 openstack]# yum list openstack-packstack 已加载插件:fastestmirror dvd | 3.6 kB 00:00:00 openstack | 2.9 kB 00:00:00 (1/3): dvd/group_gz | 155 kB 00:00:00 (2/3): openstack/primary_db | 656 kB 00:00:00 (3/3): dvd/primary_db | 2.8 MB 00:00:00 Determining fastest mirrors 可安装的软件包 openstack-packstack.noarch 1:7.0.0-0.10.dev1682.g42b3426.el7 openstack yum install openstack-packstack
alinonea安装方式
[root@h1 openstack]# packstack --help | grep demo Provisioning demo config: --provision-demo=PROVISION_DEMO Specify 'y' to provision for demo usage and testing. [root@h1 openstack]# packstack --allinone --provision-demo=n ##全部安装
应答文件安装
[root@h1 ~]# packstack --help | grep ans --gen-answer-file=GEN_ANSWER_FILE Generate a template of an answer file. --answer-file=ANSWER_FILE [root@h1 ~]# packstack --gen-answer-file=he.txt 67 CONFIG_NAGIOS_INSTALL=n 1116 CONFIG_PROVISION_DEMO=n [root@h1 ~]# grep _PW he.txt [root@h1 ~]# sed -i.bak -r 's/(.+_PW)=.+/\1=hequan/' he.txt ##替换密码 [root@h1 ~]# packstack --answer-file=he.txt ##开始安装
**** 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.1.201. To use the command line tools you need to source the file. * To access the OpenStack Dashboard browse to http://192.168.1.201/dashboard . Please, find your login credentials stored in the keystonerc_admin in your home directory. * To use Nagios, browse to http://192.168.1.201/nagios username: nagiosadmin, password: hequan * The installation log file is available at: /var/tmp/packstack/20160704-140637-VHTW2y/openstack-setup.log * The generated manifests are available at: /var/tmp/packstack/20160704-140637-VHTW2y/manifests
[root@h1 ~]# cat keystonerc_admin unset OS_SERVICE_TOKEN export OS_USERNAME=admin export OS_PASSWORD=hequan export OS_AUTH_URL=http://192.168.1.201:5000/v2.0 export PS1='[\u@\h \W(keystone_admin)]\$ ' export OS_TENANT_NAME=admin export OS_REGION_NAME=RegionOne
登陆后,右上角点击admin 密码hequan 设置语言 时区
添加节点
结算节点: 192.168.1.202 h2.hequan.com h2
同上 配置yum 和openstack软件环境
[root@h1 ~]# ssh-keygen [root@h1 ~]# ssh-copy-id -i .ssh/id_rsa.pub h2
vim he.txt 84 # List the servers on which to install the Compute service. 85 CONFIG_COMPUTE_HOSTS=192.168.1.201,192.168.1.202 ##只要在文件里面添加上节点,再次执行就可以了。 packstack --answer-file=he.txt ##再次执行,不会覆盖原来的
转载于:https://blog.51cto.com/hequan/1795664