Openstack liberty install

来源:互联网 发布:淘宝备案网址时什么 编辑:程序博客网 时间:2024/05/22 16:06

(1)The guide:

http://docs.openstack.org/liberty/install-guide-rdo/keystone-install.html

 

(2) ChooseRehat/CentOS or Ubantu

 

(3) Set thehttp_proxy and ftp_proxy

 

(4) # yum upgrade

It may take a longtime, more than 10 mins

 

(5) Message queue orQPID:

Message queue:

http://docs.openstack.org/liberty/install-guide-rdo/environment-messaging.html

QPID:

http://my.oschina.net/xxbAndy/blog/297415

 

 

 

(6) There maybe 404or 500 when run the following command:

$ openstack servicecreate \

  --name keystone --description "OpenStackIdentity" identity

 

Check the localhost:

GRANT ALL PRIVILEGESON keystone.* TO 'keystone'@'localhost' \

  IDENTIFIED BY 'KEYSTONE_DBPASS';

[root@cts-orchheat-2015.1.0]# vi /etc/hosts

127.0.0.1 localhost

Warning

 

Some distributionsadd an extraneous entry in the /etc/hosts file that resolves the actualhostname to another loopback IP address such as 127.0.1.1. You must comment outor remove this entry to prevent name resolution problems. Do not remove the127.0.0.1 entry.

 

http://www.gossamer-threads.com/lists/openstack/dev/46906

http://www.aboutyun.com/thread-7124-1-1.html

https://ask.openstack.org/en/question/45486/keystone-user-create-an-unexpected-error-prevented-the-server-from-fulfilling-your-request-http-500/

 

http://www.aboutyun.com/thread-11420-1-1.html

 

(7) su -s /bin/sh -c"keystone-manage db_sync" keystone

No Handlers could befound for logger "oslo_config.cfg"

 

修改日志文件的路径:

log_dir=/var/log/nova

 

(8) The status ofcomputer is down on controller node.

And there is anerror as below in /var/log/nova/nova-computer.log on computer node:

2015-12-2509:46:45.468 11049 TRACE nova.openstack.common.threadgroup RemoteError: Remoteerror: OperationalError (_mysql_exceptions.OperationalError) (1045,"Access denied for user 'nova'@'135.252.226.147' (using password:YES)")

 

Solution: there isconnections between two controllers, stop the unused controller(and ininstallthe computer node), the service is up.

 

GAO, Carl A (Carl)10:35

[root@vMRF3Ctrl ~]#netstat -la | grep 135

tcp 0 0135.252.226.132:rsync 0.0.0.0:* LISTEN

tcp 0 0135.252.226.13:webcache 0.0.0.0:* LISTEN

tcp 0 0135.252.226.132:x11 0.0.0.0:* LISTEN

tcp 0 0135.252.226.132:6001 0.0.0.0:* LISTEN

tcp 0 0135.252.226.132:6002 0.0.0.0:* LISTEN

tcp 0 0135.252.226.147:37137 135.252.226.132:amqp ESTABLISHED

tcp 0 0135.252.226.147:52256 135.252.226.132:mysql TIME_WAIT

tcp 0 0135.252.226.147:37162 135.252.226.132:amqp ESTABLISHED

tcp 0 0135.252.226.147:37160 135.252.226.132:amqp ESTABLISHED

tcp 0 0135.252.226.147:37150 135.252.226.132:amqp ESTABLISHED

 

[root@controllernova]# netstat -la | grep 135

tcp 0 0controller:mysql 135.252.226.147:52345 TIME_WAIT

tcp 0 0controller:mysql 135.252.226.147:52343 TIME_WAIT

tcp 0 0controller:mysql 135.252.226.147:52344 TIME_WAIT

tcp 0 0controller:mysql 135.252.226.147:52328 TIME_WAIT

tcp 0 0controller:mysql 135.252.226.147:52326 TIME_WAIT

tcp 0 0controller:mysql 135.252.226.147:52327 TIME_WAIT

tcp 0 0controller:mysql 135.252.226.147:52322 TIME_WAIT

tcp 0 0controller:ssh 135.251.85.53:56922 ESTABLISHED

tcp 0 0controller:mysql 135.252.226.147:52325 TIME_WAIT

tcp 0 0controller:mysql 135.252.226.147:52338 TIME_WAIT

tcp 0 0controller:mysql 135.252.226.147:52342 TIME_WAIT

tcp 0 48controller:ssh 135.252.134.188:51665 ESTABLISHED

tcp6 0 0controller:amqp 135.252.226.147:37145 ESTABLISHED

tcp6 0 0controller:amqp 135.252.226.147:37173 ESTABLISHED

tcp6 0 0controller:amqp 135.252.226.147:37138 ESTABLISHED

 

(8) liberty没有openstack-neutron-openvswitch?而是使用了openstack-neutron-linuxbridge

 

yum installopenstack-neutron openstack-neutron-linuxbridge ebtables ipset

 http://www.chenshake.com/

 

 

http://www.chenshake.com/centos-7-x-openstack-liberty-linux-bridgevlan/

 

 

Neutron,其实和其他的OpenStack组件差不多,他都是一个中间层,自己基本不干具体的活,通过插件的机制,调用第三方的组件来完成相关的功能。

 

对于Neutron来说,在Havana版本前,支持LinuxBridge和Openvswitch两种插件。后来发现直接通过Neutron去调用插件的方式,有些不够理想

 

linuxbridge和ovs,实现功能的代码,其实有很大部分是重复的,这样让人感觉很不爽

出于功能和性能的考虑,有些场景下,需要同时使用linuxbridge和OVS,采用这种直接调用插件的模式,是无法实现的。

在H版本以后,社区就推出一个Neutron插件Modular Layer 2 (ml2) plugin,这个插件底下调用linux bridge和ovs两个Driver。

 

linuxbridge和OVS,可以干的活是支持不同的网络,目前这两种Driver,都可以实现下面几种网络功能。

 

local

flat

vlan

vxlan

GRE (linux bridge不支持)

那么这5种网络里,local网络,主要是用于测试,GRE网络,目前社区已经基本处于维护,大家基本也可以不考虑。所以大家只需要了解其中3种就可以。

 

OpenStack的网络里,可以有4种的网络流量

 

管理网络:消息队列和数据库访问的网络

API网络:外部调用API

External:连接外网(provider网络)

Guest:虚拟机互相通讯网络(Tenant 网络)

4种网络里,和Neutron有关的就是External和Guest,Provider网络和Tenant网络。

 

对于Provider 网络和Tenant网络,技术实现基本都是一样的,区别仅仅在于

 

Provider 网络,是有管理员创建

Tenant 网络,是由用户自己创建

Provider网络,常用的网络是:Flat和Vlan。vxlan基本是没有使用的可能性。

 

Tenant 网络,可以设置的选项就是vlan,vxlan和flat,local主要是测试使用。

 

(9) Set theTime_zone consistent with your system, otherwise http service will not be ableto start

 

[root@compute1yum.repos.d]# timedatectl list-timezones |grep Shanghai

Asia/Shanghai

[root@compute1yum.repos.d]# timedatectl set-timezone Asia/Shanghai

 

TIME_ZONE ="Asia/Shanghai"

 

systemctl restarthttpd.service memcached.service

 

Optionally,configure the time zone:

 

Select Text

1

TIME_ZONE ="TIME_ZONE"

Replace TIME_ZONEwith an appropriate time zone identifier. For more information, see the list oftime zones.

 

 

(10) Networking:

[root@controllerlog]# source admin-openrc.sh

[root@controllerlog]# neutron net-create ext-net --router:external --provider:physical_networkexternal --provider:network_type flat

[root@controllerlog]# neutron subnet-create ext-net 10.90.10.0/26 --name ext-subnet--allocation-pool start=10.90.10.2,end=10.90.10.62 --disable-dhcp --gateway10.90.10.1

 

[root@controllerlog]$ source demo-openrc.sh

[root@controllerlog]# neutron net-create demo-net

[root@controllerlog]# neutron subnet-create demo-net 10.90.10.64/26 --name demo-subnet--gateway 10.90.10.65

 

 

(11) List:

nova service-list

neutron agent-list

neutron ext-list

$ openstack--os-auth-urlhttp://controller:35357 \

  --os-project-name admin --os-username admin--os-auth-type password \

  role list

 $ openstack --os-auth-urlhttp://controller:35357 \

  --os-project-name admin --os-username admin--os-auth-type password \

  user list

 $ openstack --os-auth-urlhttp://controller:35357 \

  --os-project-name admin --os-username admin--os-auth-type password \

  project list

0 0