博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu14.0.4.3 devstack 安装openstack
阅读量:7103 次
发布时间:2019-06-28

本文共 5930 字,大约阅读时间需要 19 分钟。

参考网址:

 

现在装完一切正常,就是不能重启,一旦重启VM,会导致给br-ex设置的IP地址丢失,正在想办法解决。

在虚拟机安装完成后,可以使用快照保存,下次使用时恢复即可。物理机没有办法。

网络环境

vmware workstation,安装ubuntu 14.04 虚拟机,记住,最小化安装,仅仅安装ssh server服务就可以。

虚拟机使用NAT网络,虚拟机默认通过dhcp获得的IP地址是

192.168.27.128/24

auto eth0iface eth0 inet static        address 192.168.27.128        netmask 255.255.255.0        network 192.168.27.0        broadcast 192.168.27.255        gateway 192.168.27.2        # dns-* options are implemented by the resolvconf package, if installed        dns-nameservers 114.114.114.114        dns-search test.com

 

vmware workstation默认设置分配的IP地址池是128开始分配。所以我的

Floating Ip是:192.168.27.102到192.168.27.110

网关是:192.168.27.2

查看网关命令:route -n

看图,就应该很清楚 

设置ubuntu源

对于ubuntu的系统,默认安全会从国外的源安装,导致速度比较慢。

sudo gedit /etc/apt/sources.list deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

 

允许update

sudo apt-get update

 

记得同步一下时间

sudo ntpdate ntp.sjtu.edu.cn

 

安装

sudo apt-get install git

 

下载devstack

cd /homegit clone http://git.trystack.cn/openstack-dev/devstack.git

目前Devstack脚本已经不支持直接使用root身份运行,你需要创建stack用户运行

cd /home/devstack/tools/./create-stack-user.sh
sudo passwd stack

修改devstack目录权限,让stack用户可以运行

chown -R stack:stack /home/devstackchmod 777 /dev/pts/0

可以考虑在虚拟机里增加一块磁盘专门给cinder使用,这个需要在运行脚本前创建好。(可选)

pvcreate /dev/sdbvgcreate stack-volumes-default /dev/sdb

切换的stack用户下

su stackcd /home/devstack

进入devstack目录下,创建local.conf文件

[[local|localrc]]# Define images to be automatically downloaded during the DevStack built process.IMAGE_URLS="http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img"#change github to trystackGIT_BASE=${GIT_BASE:-http://git.trystack.cn}NOVNC_REPO=${NOVNC_REPO:-http://git.trystack.cn/kanaka/noVNC.git}# CredentialsDATABASE_PASSWORD=passADMIN_PASSWORD=passSERVICE_PASSWORD=passSERVICE_TOKEN=passRABBIT_PASSWORD=pass#FLAT_INTERFACE=eth0HOST_IP=192.168.27.128SERVICE_HOST=192.168.27.128MYSQL_HOST=192.168.27.128RABBIT_HOST=192.168.27.128GLANCE_HOSTPORT=192.168.27.128:9292## Neutron optionsQ_USE_SECGROUP=TrueFLOATING_RANGE="192.168.27.0/24"FIXED_RANGE="10.0.0.0/24"Q_FLOATING_ALLOCATION_POOL=start=192.168.27.102,end=192.168.27.110PUBLIC_NETWORK_GATEWAY="192.168.27.2"Q_L3_ENABLED=TruePUBLIC_INTERFACE=eth0Q_USE_PROVIDERNET_FOR_PUBLIC=TrueOVS_PHYSICAL_BRIDGE=br-exPUBLIC_BRIDGE=br-exOVS_BRIDGE_MAPPINGS=public:br-ex# Work offline#OFFLINE=True# Reclone each timeRECLONE=yes# Branches Now the devstack have bug in keystone and neutron for liberty. so we need use master#KEYSTONE_BRANCH=stable/liberty#NOVA_BRANCH=stable/liberty#NEUTRON_BRANCH=stable/liberty#SWIFT_BRANCH=stable/liberty#GLANCE_BRANCH=stable/liberty#CINDER_BRANCH=stable/liberty#HEAT_BRANCH=stable/liberty#TROVE_BRANCH=stable/liberty#HORIZON_BRANCH=stable/liberty#SAHARA_BRANCH=stable/liberty#CEILOMETER_BRANCH=stable/liberty# Logging# -------# By default ``stack.sh`` output only goes to the terminal where it runs. It can# be configured to additionally log to a file by setting ``LOGFILE`` to the full# path of the destination log file. A timestamp will be appended to the given name.LOGFILE=/opt/stack/logs/stack.sh.logVERBOSE=TrueLOG_COLOR=TrueSCREEN_LOGDIR=/opt/stack/logs# the number of days by setting ``LOGDAYS``.LOGDAYS=1# Database Backend MySQLenable_service mysql# RPC Backend RabbitMQenable_service rabbit# Enable Keystone - OpenStack Identity Serviceenable_service key# Horizon - OpenStack Dashboard Serviceenable_service horizon# Enable Swift - Object Storage Service without replication.enable_service s-proxy s-object s-container s-accountSWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5SWIFT_REPLICAS=1# Enable Glance - OpenStack Image serviceenable_service g-api g-reg# Enable Cinder - Block Storage service for OpenStack#VOLUME_GROUP="cinder-volumes"enable_service cinder c-api c-vol c-sch c-bak# Enable Heat (orchestration) Service#enable_service heat h-api h-api-cfn h-api-cw h-eng# Enable Trove (database) Serviceenable_service trove tr-api tr-tmgr tr-cond# Enable Sahara (data_processing) Service#enable_service sahara# Enable Tempest - The OpenStack Integration Test Suiteenable_service tempest# Enabling Neutron (network) Servicedisable_service n-netenable_service q-svcenable_service q-agtenable_service q-dhcpenable_service q-l3enable_service q-metaenable_service q-meteringenable_service neutron## Neutron - Load Balancing#enable_service q-lbaas## Neutron - Firewall as a Service#enable_service q-fwaas## Neutron - VPN as a Service#enable_service q-vpn# VLAN configuration.Q_PLUGIN=ml2ENABLE_TENANT_VLANS=True# GRE tunnel configuration#Q_PLUGIN=ml2#ENABLE_TENANT_TUNNELS=True# VXLAN tunnel configuration#Q_PLUGIN=ml2#Q_ML2_TENANT_NETWORK_TYPE=vxlan# Enable Ceilometer - Metering Service (metering + alarming)enable_service ceilometer-acompute ceilometer-acentral ceilometer-collector ceilometer-apienable_service ceilometer-alarm-notify ceilometer-alarm-evalenable_service ceilometer-anotification## Enable NoVNCenable_service n-novnc[[post-config|$NOVA_CONF]][DEFAULT]# Ceilometer notification driverinstance_usage_audit=Trueinstance_usage_audit_period=hournotify_on_state_change=vm_and_task_statenotification_driver=nova.openstack.common.notifier.rpc_notifiernotification_driver=ceilometer.compute.nova_notifier

 

运行

./stack.sh

看看结果

测试

用admin登录Dashbord,为了测试,我们创建一个project:test,给project创建一个用户

使用该该账户重新登录Dashboard

大概的步骤

  1. 创建lan,分配内网IP地址段,记得设置dns
  2. 创建router,连接外网,同时连接lan
  3. 创建test安全组,允许tcp,udp,icmp全部访问
  4. 上传秘钥,或者创建秘钥
  5. 创建虚拟机,分配floating IP,验证网络所有功能

我是用vmware workstation做实验,我在我的笔记本上,可以直接ssh到虚拟机上,那么基本所有的问题都解决,最好是使用秘钥的方式,这样基本各种功能都测试了一遍。

 

 

 

参考文章

关于如何重启服务等相关问题

 

转载于:https://www.cnblogs.com/pingandezhufu/p/5268883.html

你可能感兴趣的文章
android:使用BaseExpandableListAdapter实现可折叠的列表
查看>>
什么时候用存储过程
查看>>
【MongoDB for Java】Java操作MongoDB
查看>>
0c-42-ARC模式下如何兼容非ARC的类
查看>>
程序员进阶之路—如何独当一面
查看>>
闲话WPF之十一(Dependency属性 [3] )
查看>>
JS组件系列——基于Bootstrap Ace模板的菜单Tab页效果优化
查看>>
eclipse中tomcat快速启动关闭参数设置
查看>>
C++ extern "c "的作用
查看>>
实践:几十亿条数据分布在几十个节点上的毫秒级实时排序方法
查看>>
PMWiki安装教程
查看>>
JAVA多线程之volatile 与 synchronized 的比较
查看>>
一个经典编程面试题的“隐退”
查看>>
POJ2109
查看>>
显示创建一个表的SQL语句
查看>>
光流和KLT
查看>>
Linux c括号作用域【原创笔记】
查看>>
高性能后台服务器架构设计
查看>>
MIUI刷机曝重大危险 可致短信照片等个人隐私被盗
查看>>
物联网时代 企业需做出的十大战略选择
查看>>