openstack Juno系列之计算节点搭建
nova-compute安装配置--------------------apt-get install nova-compute sysfsutils编辑配置文件vi /etc/nova/nova.confverbose = Truerpc_backend = rabbitrabbit_host = controllerrabbit_password = RABBIT_PASSauth_strategy = keystonemy_ip = MANAGEMENT_INTERFACE_IP_ADDRESS此处为控制节点管理地址10.0.0.31
vnc_enabled = Truevncserver_listen = 0.0.0.0vncserver_proxyclient_address = MANAGEMENT_INTERFACE_IP_ADDRESS 此处为控制节点管理地址10.0.0.31novncproxy_base_url = http://controller:6080/vnc_auto.html
auth_uri = http://controller:5000/v2.0identity_uri = http://controller:35357admin_tenant_name = serviceadmin_user = novaadmin_password = NOVA_PASS
host = controller查看机器是否支持虚拟化如果返回是0那说明不支持虚拟化则在配置文件里面修改为 QEMUegrep -c '(vmx|svm)' /proc/cpuinfo
编辑配置文件vi /etc/nova/nova-compute.confvirt_type = kvm重启服务service nova-compute restart删除默认数据库rm -f /var/lib/nova/nova.sqlite执行下变量验证nova服务是否搭建成功source admin-openrc.sh
nova service-list+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+| Id | Binary | Host | Zone | Status| State | Updated_at | Disabled Reason |+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+| 1| nova-conductor | controller | internal | enabled | up | 2014-09-16T23:54:02.000000 | - || 2| nova-consoleauth | controller | internal | enabled | up | 2014-09-16T23:54:04.000000 | - || 3| nova-scheduler | controller | internal | enabled | up | 2014-09-16T23:54:07.000000 | - || 4| nova-cert | controller | internal | enabled | up | 2014-09-16T23:54:00.000000 | - || 5| nova-compute | compute1 | nova | enabled | up | 2014-09-16T23:54:06.000000 | - |+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+查看镜像nova image-list-------------------配置计算节点网络-------------------配置转发vi /etc/sysctl.confnet.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0sysctl -p安装neuronapt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agentvi /etc/neutron/neutron.conf verbose = Truerpc_backend = rabbitrabbit_host = controllerrabbit_password = RABBIT_PASS
auth_strategy = keystone
core_plugin = ml2service_plugins = routerallow_overlapping_ips = True
auth_uri = http://controller:5000/v2.0identity_uri = http://controller:35357admin_tenant_name = serviceadmin_user = neutronadmin_password = NEUTRON_PASS编辑ml2配置文件vi /etc/neutron/plugins/ml2/ml2_conf.ini...type_drivers = flat,gretenant_network_types = gremechanism_drivers = openvswitch
...tunnel_id_ranges = 1:1000
...enable_security_group = Trueenable_ipset = Truefirewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
...local_ip = INSTANCE_TUNNELS_INTERFACE_IP_ADDRESStunnel_type = greenable_tunneling = True重启服务service openvswitch-switch restart
编辑nova配置vi/etc/nova/nova.conf...network_api_class = nova.network.neutronv2.api.APIsecurity_group_api = neutronlinuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriverfirewall_driver = nova.virt.firewall.NoopFirewallDriver
...url = http://controller:9696auth_strategy = keystoneadmin_auth_url = http://controller:35357/v2.0admin_tenant_name = serviceadmin_username = neutronadmin_password = NEUTRON_PASS重启服务service nova-compute restartservice neutron-plugin-openvswitch-agent restart
查看是否搭建成功$ source admin-openrc.sh$ neutron agent-list+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+| id | agent_type | host | alive | admin_state_up | binary |+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+...| a5a49051-05eb-4b4f-bfc7-d36235fe9131 | Open vSwitch agent | compute1 | :-) | True | neutron-openvswitch-agent |+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
页:
[1]