The third day of openstack Platform Construction

Source: Internet
Author: User
Tags openvswitch

The third day of openstack Platform Construction

Author: xxbandy

If you have any question, please contact me[Email protected] Or 371990778(Qq)

Note: The master node is server10.example.com, and the Nova node is desktop10.example.com.

DNS resolution has been performed on each host in the lab environment

1. Manage the neutron node service and configure the network service for the NOVA-compute Node

[[Email protected] ~] # Source/root/keystonrc_admin

[[Email protected] ~ (Keystone_admin)] # Vim/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini

Tenant_network_type = VLAN tenant type
Network_vlan_ranges = physnet1: 1: 100 VLAN address pool
Bridge_mappings = physnet1: br-eth1 bridge Interface

Create an interface:

[[Email protected] ~ (Keystone_admin)] # ovs-vsctl add-Br br-eth1
[[Email protected] ~ (Keystone_admin)] # ovs-vsctl add-port br-eth1 eth1
[[Email protected] ~ (Keystone_admin)] # ovs-vsctl show

Restart all the services related to neutron startup (condrestart) and view logs (because any minor error during setup will affect the entire platform)
[[Email protected] ~ (Keystone_admin)] # For I in/etc/init. d/neutron-*; do $ I condrestart; done
[[Email protected] ~ (Keystone_admin)] # grep error/var/log/neutron/openvswitch-agent.log

View the local startup service:

[[Email protected] ~ (Keystone_admin)] # Nova-manage servece list only displays the node enable of the current host (because we are all in one, that is, all services are deployed on one host)


2. Add a nova node and configure the same Nova-compute service.

A new host is added, and the memory hard disk can be expanded according to your actual needs (the NOVA-compute node mainly runs VM instances and related services, so you just want to see how much is better for your environment. Because in the test environment, we share host resources to the Nova-compute)

However, we need to set the IP address of the Nova-compute node to static.

Add node configuration for Nova-compute:

# Yum Update-y; reboot
# Yum install openstack-Nova-compute-y

Since we have correctly configured the NOVA-compute and neutron on the server10.example.com host, on the newly added Nova node, We will completely copy the configuration file and make appropriate adjustments.

[[Email protected] Nova (keystone_admin)] # SCP/etc/NOVA. conf 192.168.0.10:/etc/NOVA/

[[Email protected] Nova] # Vim/etc/NOVA. conf
My_ip = 192.168.0.10
Vncserver_listen = 192.168.0.10
Vncserver_proxyclient_address = 192.168.0.10
Lib1__type = KVM (Remember, because KVM is used on the added real machine and qemu is used on the virtual machine)

Note the connection with MySQL.
Connection = MYSQL: // NOVA: [email protected]/NOVA uses the westos password of the Nova user to log on to the Nova database (by default, it is copied to the localhost)

[[Email protected] Nova] #/etc/init. d/openstack-Nova-compute start
[[Email protected] Nova] #/etc/init. d/lib1_d start
Note: In fact, you should start the libmongod service in the environment!
[[Email protected] Nova] # chkconfig openstack-Nova-compute on
[[Email protected] Nova] # chkconfig lib1_d on


[[Email protected] Nova] # Nova-manage Service list
Binary host zone status state updated_at
Nova-conductor server10.example.com internal enabled :-) 2014-08-03 03:42:26
Nova-compute server10.example.com Nova enabled :-) 2014-08-03 03:42:26
Nova-consoleauth server10.example.com internal enabled :-) 2014-08-03 03:42:25
Nova-scheduler server10.example.com internal enabled :-) 2014-08-03 03:42:25
Nova-compute route top10.example.com Nova enabled :-) 03:42:31

From the output, we can see that a new Nova-compute node is added, namely top10.example.com.

At the same time, to help us identify the node on which the cloud host is started, we will disable the NOVA-compute of server10 first.

[[Email protected] Nova] # Nova-manage Service disable -- Host server10.example.com -- service Nova-compute

In this case, there will be only one Nova-compute node in the entire environment. That is to say, the final VM instance starts on the top 10 hosts and consumes the top 10 hardware resources.



3. Configure the neutron network service for the NOVA-compute Node

[[Email protected] Nova] # Yum install openstack-neutron-openvswitch-y
[[Email protected] neutron] # SCP 192.168.0.110:/etc/neutron/Neutron. CONF/etc/neutron/

[[Email protected] neutron] # SCP 192.168.0.110:/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini/etc/neutron/plugins/openvswitch/

[[Email protected] neutron] #/etc/init. d/openvswitch start
[[Email protected] neutron] # chkconfig openvswitch on

[[Email protected] neutron] # ovs-vsctl add-BR-int create a virtual bridge interface Br-int
[[Email protected] neutron] # ovs-vsctl add-Br br-eth1
[[Email protected] neutron] # ovs-vsctl add-port br-eth1 br101 local br101 bridge to br-eth1

[[Email protected] neutron] #/etc/init. d/neutron-openvswitch-Agent start
Starting neutron-openvswitch-AGENT: [OK]
[[Email protected] neutron] # chkconfig neutron-openvswitch-agent on
[[Email protected] neutron] # chkconfig neutron-ovs-cleanup on
[[Email protected] neutron] # tail-F/var/log/neutron/openvswitch-agent.log

[[Email protected] 0 neutron] # ovs-vsctl show
0d1feaba-56ce-4696-9d16-0a993cff5923
Bridge Br-int
Port "int-br-eth1"
Interface int-br-eth1"
Port Br-int
Interface Br-int
Type: Internal
Bridge br-eth1"
Port "br-eth1"
Interface br-eth1"
Type: Internal
Port "br101"
Interface "br101"
Port "phy-br-eth1"
Interface phy-br-eth1"
Ovs_version: "1.11.0"

The above output is basically correct.


4. When adding a nova node, you must install a dependency package to communicate with the master node (server10). The specific steps are as follows:

[[Email protected] neutron] # Yum install-y openstack-neutron-ml2.noarch

[[Email protected] Nova] # Vim/etc/NOVA. conf
Fig proxy_base_url = http: // 192.168.0.110: 6080/vnc_auto.html
Glance_host = 192.168.0.110 allows Nova-compute to find the glance file when creating a VM instance.
Rpc_backend = Nova. openstack. Common. rpc. impl_qpid allows the NOVA-compute to communicate with the master.

[[Email protected] Nova] #/etc/init. d/openstack-Nova-compute restart
[[Email protected] Nova] # chkconfig openstack-Nova-compute on

The configuration is complete.

Now use admin user login https://server10.example.com/dashboard to create related projects and user services.

1. Create a project
2. Create a user (Admin and member)Identity refers to the role of the user, that is, determine the permissions of the user
The user with the admin identity will perform the following operations
3. upload an imageIn the glance service, we have uploaded small. IMG and web. IMG.
4. Create a network: Create a network (Internet) for a project to communicate with the external network.
Click net1 to create a subnet Intranet 172.24.x.0 (no gateway is required). The 172 CIDR Block simulates a public IP address on the real host.

No DHCP, subnet details


Create a network: The intranet 192.168.32.0 network segment is actually the br101 interface previously Bridges
Click net2 to create the Intranet 192.168.32.0
Looking at the network topology, we can see that we have created two networks (172 and 192)
5. Add a route
Create a route and select a gateway. (View topology) add route information and connect the two networks to implement Intranet/Internet communication.
Add a route interface to link two CIDR blocks

6. Create a security group and set rulesCustom access rules are equivalent to Simple Firewall policies.
Create a key pair and download
Allocate a floating IP address (Public IP address) to the 172 public network and assign a floating IP address for customer communication.
7. Create a VM instance type (that is, host configuration)Customize the configurations of the desired host
Cloud Disk
8. Start VM instancesStart the VM instance and select the host name ...)
The administrator password is the administrator password used to access the VM instance, but it is not available by default. Security group selection
Select private network (view network topology)


Click More to bind a floating IP address (for direct logon to the VM instance)

Start VM instance:


The VM instance is started. The default IP address is 192.168.32.2.

[[Email protected] Nova] # view the list using the virsh command
ID name state
----------------------------------------------------
1 server10 running server10 is a KVM Virtual Machine
2 instance-00000003 running: the cloud host of openstack

Test logon with a simulated public IP Address: Use the previously created key pair to remotely log on to the VM instance (172.24.10.4 is the allocated public IP address)


Test the system after remote Logon:

Now, we can remotely log on to our VM instance.

This is the end of today. For more highlights, please stay tuned !!!!



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.