Packstack all-in-one方式安装openstack queens版本

首先,本次环境详情:VMware® Workstation 14 Pro + CentOS-7-x86_64-Minimal-1804.iso

     外网环境:192.168.123.0/24 ,虚拟机的ip是192.168.123.129

1. 更新环境:  yum update -y

2.更换centos 清华源:  

  详情参考:https://mirrors.tuna.tsinghua.edu.cn/help/centos/

3.设置语言环境:

  vi /etc/environment 添加如下内容

  LANG=en_US.utf-8
  LC_ALL=en_US.utf-8

4.网络设置

  (1)设置静态IP

  (2)禁用firewalld、NetworkManager 

    sudo systemctl disable firewalld
    sudo systemctl stop firewalld
    sudo systemctl disable NetworkManager
    sudo systemctl stop NetworkManager
    sudo systemctl enable network
    sudo systemctl start network

       (3)selinux

    sudo vi /etc/selinux/config 修改SELINUX=disabled

    sudo setenfore 0

5.安装openstack queens版本库

  sudo yum install -y centos-release-openstack-queens

  sudo yum update -y

6.安装packstack库

  sudo yum install -y openstack-packstack

7.开始安装

  (1)对于单节点OpenStack部署,请运行以下命令:sudo packstack --allinone

       (2)DIY设置

    a.生成配置文件:packstack --gen-answer-file=answer.ini

    b.修改配置文件,如: CONFIG_KEYSTONE_ADMIN_PW= #设置admin用户的密码

    c. 指定配置文件安装openstack:packstack --answer-file=answer.ini

8.安装完成:大约30分钟

  完成此过程后,您可以登录OpenStack Web界面Horizo​​n http://$YOURIP/dashboard

  用户名是admin密码可以在控制节点目录中的文件keystonerc_admin找到/root

9.重新创建网络

  先删除已有的网络,在界面-管理员-路由-删除路由,然后删除网络

  在命令行: source keystonerc_admin

  neutron net-create --provider:network_type flat --provider:physical_network extnet --router:external  --shared external_network

  neutron subnet-create --name public_subnet --enable_dhcp=True --allocation-pool start=192.168.123.100,end=192.168.123.200 --gateway=192.168.123.2 external_network 192.168.123.0/24
  neutron net-create private_network
  neutron subnet-create --name private_subnet --allocation-pool start=10.10.1.100,end=10.10.1.200 --gateway=10.10.1.1 private_network 10.10.1.0/24
  neutron router-create router1
  neutron router-interface-add router1 private_subnet
  neutron router-gateway-set router1 external_network

9.Configure network interfaces以及创建实例

   参考:

  http://www.tuxfixer.com/create-project-tenant-in-openstack-and-launch-instances/

  http://wiki.christophchamp.com/index.php?title=OpenStack_deployment_via_packstack_from_RDO

  http://www.tuxfixer.com/install-openstack-newton-all-in-one-with-heat-orchestration-service-on-centos-7/

10.vnc无法正常使用

  在/etc/nova/nova.conf里修改如下内容:

  [vnc]
  vnc_enabled = True
  server_listen = 0.0.0.0
  server_proxyclient_address = <node_ip_address>
  novncproxy_base_url = http://<node_ip_address>:6080/vnc_auto.html

11.无法登陆dashboard

  查看iptables的状态,若是开启请关闭

  查看httpd的状态,若是关闭请重启

posted @ 2018-11-21 10:26  一只小麻瓜  阅读(2925)  评论(0编辑  收藏  举报