ubuntu 14.04使用devstack安装openstack mitaka版本 -凯发k8官方网
2019独角兽企业重金招聘python工程师标准>>>
1.环境配置
virtualbox中安装提前下载好的ubuntu 14.04.5桌面版32位的镜像文件,并配置内存和磁盘大小,这里分别设置为3g以及30g,并把网络设置为nat的方式,虚拟机eth0默认ip为10.0.2.15,默认网关为10.0.2.2。这样就可以启动安装虚拟机了。
2.devstack安装
在安装好的ubuntu14.04的操作系统中,安装openssh-server,以便xshell可以和其连接,并配置端口转发规则,将虚拟机的22端口映射成本地的9023端口。这样以来,通过ssh即可登录到虚拟机里进行远程操作。为了加快安装的速度,我们把源改成中科大源,并添加豆瓣pypi源。
mkdir /root/.pip cat >/root/.pip/pip.conf <在非root用户下创建stack用户并设置密码。
sudo chown –r $user:$user /home/devstack cd /home/devstack/tools/ ./create-stack-user.sh passwd stack编辑/etc/sudoers, 在root用户下增加stack用户权限。
# user privilege specification root all=(all:all) all stack all=(all:all) allroot用户下修改/home/devstack, /opt/stack权限。
chown –r stack:stack /home/devstack chown –r stack:stack /opt/stack切换到stack用户执行。
su stack创建local.conf配置文件(非常重要)。
[[local|localrc]]# use trystack git mirror git_base=http://git.trystack.cn novnc_repo=http://git.trystack.cn/kanaka/novnc.git spice_repo=http://git.trystack.cn/git/spice/spice-html5.git#offline=true reclone=true# define images to be automatically downloaded during the devstack built process. download_default_images=false image_urls="http://images.trystack.cn/cirros/cirros-0.3.4-x86_64-disk.img"host_ip=10.0.2.15# credentials database_password=pass admin_password=pass service_password=pass service_token=pass rabbit_password=passhorizon_branch=stable/mitaka keystone_branch=stable/mitaka nova_branch=stable/mitaka neutron_branch=stable/mitaka glance_branch=stable/mitaka cinder_branch=stable/mitaka#keystone keystone_token_format=uuid##heat heat_branch=stable/mitaka enable_service h-eng h-api h-api-cfn h-api-cw## swift swift_branch=stable/mitaka enabled_services =,s-proxy,s-object,s-container,s-account swift_replicas=1 swift_hash=011688b44136573e209e# enabling neutron (network) service disable_service n-net enable_service q-svc enable_service q-agt enable_service q-dhcp enable_service q-l3 enable_service q-meta enable_service q-metering enable_service neutron## neutron options q_use_secgroup=true floating_range="10.0.2.0/24" fixed_range="192.168.0.0/24" network_gateway="192.168.0.1" q_floating_allocation_pool=start=10.0.2.102,end=10.0.2.200 public_network_gateway="10.0.2.2" q_l3_enabled=true public_interface=eth0 q_use_providernet_for_public=true ovs_physical_bridge=br-ex public_bridge=br-ex ovs_bridge_mappings=public:br-ex# #vlan configuration. q_plugin=ml2 enable_tenant_vlans=true# logging logfile=/opt/stack/logs/stack.sh.log verbose=true log_color=true screen_logdir=/opt/stack/logs由于虚拟机的操作系统是32位,因此要把stackrc文件中的所有x86_64改为i386,并把其中的git_base改为https的方式,以免git失败。最后即可执行stack.sh文件。
./stack.sh 如果运行过程中没有报错,那么恭喜你已经成功了。登录方式为虚拟机的ip地址/dashboard。
注:如果执行中出错,在重新运行stack.sh脚本之前,一定要先运行./unstack.sh。
安装完成后配置/home/devstack/stackrc。
设备重启后,需要手动再执行./stack.sh;没有设置offline的话,很多需要从网上下载;./stack.sh 运行后,之前的测试环境不会恢复,重新安装。
转载于:https://my.oschina.net/u/1179767/blog/735035
总结
以上是凯发k8官方网为你收集整理的ubuntu 14.04使用devstack安装openstack mitaka版本的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇:
- 下一篇: zabbix在configure时候遇到