这篇文章主要讲解了“openstack的安装步骤”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“openstack的安装步骤”吧!
主要从事网页设计、PC网站建设(电脑版网站建设)、wap网站建设(手机版网站建设)、成都响应式网站建设公司、程序开发、微网站、微信小程序定制开发等,凭借多年来在互联网的打拼,我们在互联网网站建设行业积累了丰富的成都网站设计、成都网站建设、网络营销经验,集策划、开发、设计、营销、管理等多方位专业化运作于一体,具备承接不同规模与类型的建设项目的能力。
https://docs.openstack.org/mitaka/zh_CN/install-guide-ubuntu/keystone-install.html
在 [database] 部分,配置数据库访问:
[database]
...
connection = MySQL+pymysql://keystone:KEYSTONE_DBPASS@controller/keystone
controller要改为ip,要不然会连不上数据库
配置 Apache HTTP 服务器
编辑``/etc/apache2/apache2.conf``文件,为控制节点配置``ServerName``选项:
ServerName controller
controller要改为ip
配置Linuxbridge代理¶
Linuxbridge代理为实例建立layer-2虚拟网络并且处理安全组规则。
编辑``/etc/neutron/plugins/ml2/linuxbridge_agent.ini``文件并且完成以下操作:
在``[linux_bridge]``部分,将公共虚拟网络和公共物理网络接口对应起来:
[linux_bridge]
physical_interface_mappings = provider:PROVIDER_INTERFACE_NAME
PROVIDER_INTERFACE_NAME改为机器实际网口名称,比如eth0
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
> --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) Cannot add a NOT NULL column with default value NULL [SQL: u'ALTER TABLE address_scopes ADD COLUMN ip_version INTEGER NOT NULL']
报错原因是neutron配置文件(/etc/neutron/neutron.conf)中原先的connection字段未注掉,导致新配得connection被原先的覆盖掉了,原先默认的还使用sqlite3...
dashboard 输入 default/admin/huawei,登录认证失败,查看apach error.log,用户 admin 登录失败。检查dashboard配置文件,有一项配置有问题:
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3.0" % OPENSTACK_HOST
正确的应为:
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
解决完上一个问题后,登录不再提示认证失败,但还是无法登录,查看apach日志:
[Thu Jun 22 12:23:38.272490 2017] [:error] [pid 3107:tid 3051838272] Could not process panel theme_preview: Dashboard with slug "developer" is not registered.
[Thu Jun 22 12:23:41.487565 2017] [:error] [pid 3107:tid 3051838272] Login successful for user "admin".
实在找不出什么原因,换Chrome登录,居然登录成功了(Firefox和IE都不行)
root@ubuntu:~# pvcreate /dev/sdc
Device /dev/sdc not found (or ignored by filtering).
硬盘已添加,但创建还是失败,原因是 /etc/lvm/lvm.conf 中 filter字段,没有把sdc加入accept
neutron subnet-create --name provider \
--allocation-pool start=START_IP_ADDRESS,end=END_IP_ADDRESS \
--DNS-nameserver DNS_RESOLVER --gateway PROVIDER_NETWORK_GATEWAY \
provider PROVIDER_NETWORK_CIDR
START_IP_ADDRESS用192.168.1.100
END_IP_ADDRESS用192.168.1.200
DNS_RESOLVER用192.168.1.1
PROVIDER_NETWORK_GATEWAY用192.168.1.1
PROVIDER_NETWORK_CIDR用 192.168.1.0/24
openstack server create --flavor m1.tiny --image cirros \
--nic net-id=PROVIDER_NET_ID --security-group default \
--key-name mykey provider-instance
指定key_name就会报错:
Invalid key_name provided. (HTTP 400) (Request-ID: req-5f12f3e7-5ff9-4a1a-932e-ebd936de1be1)
不指定key_name也能创建
manila文件共享服务,选项1是lvm,本地文件系统,选项2通过driver,分布式文件系统
社区版自带manila的Horizon插件,M版本默认没有manila的Horizon插件,所以在Dashboard上看不到manila的操作。
https://github.com/openstack/manila-ui
先安装git
apt-get install git
从github下载horizon和manila-ui的代码
git clone https://github.com/openstack/horizon
git clone https://github.com/openstack/manila-ui
安装gcc
apt-get install gcc
安装python-dev
sudo apt-get install python-dev
安装python-pip
apt-get install python-pip
cd horizon
python tools/install_venv.py
dashboard登陆后,提示错误,apach日志:
RuntimeError: Unable to create a new session key. It is likely that the cache is unavailab
解决方法:
vi /etc/openstack-dashboard/local_settings.py
SESSION_ENGINE = 'django.contrib.sessions.backends.cache' 改为 SESSION_ENGINE = 'django.contrib.sessions.backends.file'
如果提示pip没有安装,apt-get install python-pip又无法安装,参照 http://www.linuxdiyf.com/linux/19248.html 解决
在OpenStack Mitaka发行版中Horizon中不包括Manila,需要安装额外的插件manila-ui才能在Horizon中显示Share菜单。
安装Manila UI 查看列表:http://tarballs.openstack.org/manila-ui/
pip install 'http://tarballs.openstack.org/manila-ui/manila-ui-stable-mitaka.tar.gz'
在Horizon中启用Manila UI 查看Manila UI安装路径:find /usr -name 'manila_ui'
cd /usr/local/lib/python2.7/dist-packages/manila_ui
sudo cp ./enabled/_90_manila_*.py /usr/share/openstack-dashboard/openstack_dashboard/local/enabled
配置中文语言支持
sudo apt-get install gettext python-pip python-dev build-essential
cd /usr/share/openstack-dashboard/horizon
sudo /usr/share/openstack-dashboard/manage.py makemessages -l en --no-obsolete
sudo /usr/share/openstack-dashboard/manage.py makemessages -d djangojs -l en --no-obsolete
cd /usr/share/openstack-dashboard/openstack_dashboard
sudo /usr/share/openstack-dashboard/manage.py makemessages --extension=html,txt,csv --ignore=openstack -l en --no-obsolete
cd /usr/share/openstack-dashboard/horizon
sudo /usr/share/openstack-dashboard/manage.py compilemessages
cd /usr/share/openstack-dashboard/openstack_dashboard
sudo /usr/share/openstack-dashboard/manage.py compilemessagescd /usr/local/lib/python2.7/dist-packages/manila_ui
重新加载Apache Web Server
sudo service apache2 reload
感谢各位的阅读,以上就是“openstack的安装步骤”的内容了,经过本文的学习后,相信大家对openstack的安装步骤这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!
分享文章:openstack的安装步骤
链接分享:http://scgulin.cn/article/gdspop.html