Today’s blog post is part five of seven in a series dedicated to Deploying Private Cloud at Home, where I will be demonstrating how to configure Compute node and OpenStack services on the compute node. We have already installed the MySQL Python library on compute node in previous posts.
- Install OpenStack compute packages on the node
yum install -y openstack-nova-compute openstack-utils
- Configure Nova compute service
openstack-config --set /etc/nova/nova.conf database connection mysql://nova:Youre_Password@controller/nova openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_uri https://controller:5000 openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_host controller openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_protocol http openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_port 35357 openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_user nova openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_tenant_name service openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_password Your_Password openstack-config --set /etc/nova/nova.conf DEFAULT rpc_backend qpid openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname controller openstack-config --set /etc/nova/nova.conf DEFAULT my_ip Your_Compute_node_IP openstack-config --set /etc/nova/nova.conf DEFAULT vnc_enabled True openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 0.0.0.0 openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address Your_Compute_node_IP openstack-config --set /etc/nova/nova.conf DEFAULT novncproxy_base_url https://controller:6080/vnc_auto.html openstack-config --set /etc/nova/nova.conf DEFAULT glance_host controller
- Start the Compute service and its dependencies. Configure them to start automatically when the system boots
service libvirtd start service messagebus start service openstack-nova-compute start chkconfig libvirtd on chkconfig messagebus on chkconfig openstack-nova-compute on
- Enable IP forwarding
perl -pi -e 's,net.ipv4.ip_forward = 0,net.ipv4.ip_forward = 1,' /etc/sysctl.conf perl -pi -e 's,net.ipv4.conf.default.rp_filter = 1,net.ipv4.conf.default.rp_filter = 0,' /etc/sysctl.conf echo "net.ipv4.conf.all.rp_filter=0" >> /etc/sysctl.conf sysctl -p
- Install legacy networking components and Flat DHCP
yum install -y openstack-nova-network openstack-nova-api
We are using legacy networking and single NIC on both controller and compute nodes. Flat and public interfaces will be the same on below configuration. In this case, it is etho replace with the one you have on your system.
openstack-config --set /etc/nova/nova.conf DEFAULT network_api_class nova.network.api.API openstack-config --set /etc/nova/nova.conf DEFAULT security_group_api nova openstack-config --set /etc/nova/nova.conf DEFAULT network_manager nova.network.manager.FlatDHCPManager openstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.libvirt.firewall.IptablesFirewallDriver openstack-config --set /etc/nova/nova.conf DEFAULT network_size 254 openstack-config --set /etc/nova/nova.conf DEFAULT allow_same_net_traffic False openstack-config --set /etc/nova/nova.conf DEFAULT multi_host True openstack-config --set /etc/nova/nova.conf DEFAULT send_arp_for_ha True openstack-config --set /etc/nova/nova.conf DEFAULT share_dhcp_address True openstack-config --set /etc/nova/nova.conf DEFAULT force_dhcp_release True openstack-config --set /etc/nova/nova.conf DEFAULT flat_network_bridge br0 openstack-config --set /etc/nova/nova.conf DEFAULT flat_interface eth0 openstack-config --set /etc/nova/nova.conf DEFAULT public_interface eth0
- Start the services and configure them to start when the system bootsservice openstack-nova-network start
service openstack-nova-metadata-api start chkconfig openstack-nova-network on chkconfig openstack-nova-metadata-api on
- Restart networking
service network restart
This completes the configuration of compute node. Stay tuned for part six where we will configure network services on controller node.
No comments