Packstack to Quantum

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
The following is a description of how to go from packstack with traditional nova networking to Quantum. In the example below the OpenvSwitch plugin is used:
+
The following is a description of how to go from Packstack with traditional nova networking to Quantum. In the example below the OpenvSwitch plugin is used:
  
 
1. Terminate nova networking
 
1. Terminate nova networking
 
 
     service openstack-nova-network stop
 
     service openstack-nova-network stop
 
     chkconfig openstack-nova-network off
 
     chkconfig openstack-nova-network off
  
2. Install quantum service
+
2. Install quantum service and the Open vSwitch plugin
 
+
    yum install openstack-quantum
+
 
+
3. Install OpenvSwicth plugin
+
  
     yum install openstack-quantum-openvswitch
+
     yum install openstack-quantum openstack-quantum-openvswitch
  
4. The Quantum installation scripts make use of keystone environment variables. Make sure that the administrator environment variables are set.
+
3. The Quantum installation scripts make use of keystone environment variables. Make sure that the administrator environment variables are set.
  
 
     source /root/keystonerc_admin
 
     source /root/keystonerc_admin
  
5. Configure quantum service
+
4. Configure quantum service to use Open vSwitch (you can get the MySQL password from the Packstack answer file, see CONFIG_MYSQL_PW)
  
 
     quantum-server-setup
 
     quantum-server-setup
  
6.1. The above script will ask if the nova parameters need to be updated. Restart the nova compute service. The script will configure Quantum as the networking module for Nova.
+
5.1. The above script will ask if the nova parameters need to be updated. Restart the nova compute service. The script will configure Quantum as the networking module for Nova.
  
 
     service openstack-nova-compute restart
 
     service openstack-nova-compute restart
  
6.2 Start the openvswitch service
+
5.2 Start the openvswitch service
  
 
     service openvswitch start
 
     service openvswitch start
 
     chkconfig openvswitch on
 
     chkconfig openvswitch on
  
6.3 Create the integration bridge (for the private network)
+
5.3 Create the integration bridge (for the private network)
  
 
     ovs-vsctl add-br br-int
 
     ovs-vsctl add-br br-int
  
6.4 Create the external bridge (for the layer 3 agent)
+
5.4 Create the external bridge (for the layer 3 agent)
  
 
     ovs-vsctl add-br br-ex
 
     ovs-vsctl add-br br-ex
  
6.5 Ensure that the interfaces are persistant after reboot. This is done by creating interface files, for example for br-int:
+
5.5 Ensure that the interfaces are persistant after reboot. This is done by creating interface files, for example for br-int:
  
 
     DEVICE=br-int
 
     DEVICE=br-int
Line 46: Line 41:
 
     ONBOOT=yes
 
     ONBOOT=yes
  
7. Start quantum service
+
6. Start quantum service
  
 
     service quantum-server start
 
     service quantum-server start
 
     chkconfig quantum-server on
 
     chkconfig quantum-server on
  
7.1 Start quantum agent
+
6.1 Start quantum agent
  
 
     service quantum-openvswitch-agent start
 
     service quantum-openvswitch-agent start
 
     chkconfig quantum-openvswitch-agent on
 
     chkconfig quantum-openvswitch-agent on
  
8. In order for the IPAM to take place one needs to invoke the DHCP agent. Use the DHCP setup tool
+
7. In order for the IPAM to take place one needs to invoke the DHCP agent. Use the DHCP setup tool
  
 
     quantum-dhcp-setup
 
     quantum-dhcp-setup
  
8.1. Start DHCP agent
+
7.1. Start DHCP agent
  
 
     service quantum-dhcp-agent start
 
     service quantum-dhcp-agent start
 
     chkconfig quantum-dhcp-agent on
 
     chkconfig quantum-dhcp-agent on
  
9. In order to support floating IP's one need to invoke the Layer 3 agent. Use the L3 agent setup tool
+
8. In order to support floating IP's one need to invoke the Layer 3 agent. Use the L3 agent setup tool
  
 
     quantum-l3-setup
 
     quantum-l3-setup
  
9.1. Start the L3 agent
+
8.1. Start the L3 agent
  
 
     service quantum-l3-agent start
 
     service quantum-l3-agent start
 
     chkconfig quantum-l3-agent on  
 
     chkconfig quantum-l3-agent on  
  
10. Ensure that the openvswitch cleanup utility is enabled (this is used after reboot to ensure that device management of the quantum agents is not affected by the fact that the openvswitch creates the interfaces at boot)
+
9. Ensure that the openvswitch cleanup utility is enabled (this is used after reboot to ensure that device management of the quantum agents is not affected by the fact that the openvswitch creates the interfaces at boot)
  
 
     chkconfig quantum-ovs-cleanup on
 
     chkconfig quantum-ovs-cleanup on
  
11. Create a Quantum endpoint with keystone
+
10. Create a Quantum endpoint with keystone
  
 
     keystone service-create --name=quantum --type=network --description="Quantum Service"
 
     keystone service-create --name=quantum --type=network --description="Quantum Service"
 
     keystone endpoint-create --region RegionOne --service-id<ID>  --publicurl "http://127.0.0.1:9696" --adminurl "http://127.0.0.1:9696" --internalurl "http://127.0.0.1:9696"
 
     keystone endpoint-create --region RegionOne --service-id<ID>  --publicurl "http://127.0.0.1:9696" --adminurl "http://127.0.0.1:9696" --internalurl "http://127.0.0.1:9696"
  
12. Create a keystone tenant and user.
+
11. Create a keystone tenant and user.
  
12.1 Create the keystone tenant
+
11.1 Create the keystone tenant
  
 
     keystone tenant-list    # Record 'services' tenant ID
 
     keystone tenant-list    # Record 'services' tenant ID
 
     keystone user-create --name=quantum --email=quantum@example.com --tenant-id <services_ID>
 
     keystone user-create --name=quantum --email=quantum@example.com --tenant-id <services_ID>
  
12.2 Add the quantum user to the admin role
+
11.2 Add the quantum user to the admin role
  
 
     keystone role-list      # Record 'admin' role
 
     keystone role-list      # Record 'admin' role
Line 96: Line 91:
 
     keystone user-role-add --user_id <quantum_ID> --role_id <admin_ID> --tenant_id <services_ID>
 
     keystone user-role-add --user_id <quantum_ID> --role_id <admin_ID> --tenant_id <services_ID>
  
13. Now one is able to start to use the Quantum CLI
+
12. Now one is able to start to use the Quantum CLI
  
13.1 Create a private network
+
12.1 Create a private network
  
 
     quantum net-create private
 
     quantum net-create private
  
13.2 Create a subnet
+
12.2 Create a subnet
  
 
     quantum subnet-create private 10.0.0.0/24
 
     quantum subnet-create private 10.0.0.0/24
  
14. Validate that a port has been created by the DHCP agent (quantum port-list). This port will have IP address 10.0.0.2. The gateway will 10.0.0.1.
+
13. Validate that a port has been created by the DHCP agent (quantum port-list). This port will have IP address 10.0.0.2. The gateway will 10.0.0.1.
  
15. At this stage VM's can be deployed and they will receive IP addresses from the DHCP service.
+
14. At this stage VM's can be deployed and they will receive IP addresses from the DHCP service.

Revision as of 09:13, 15 May 2013

The following is a description of how to go from Packstack with traditional nova networking to Quantum. In the example below the OpenvSwitch plugin is used:

1. Terminate nova networking

   service openstack-nova-network stop
   chkconfig openstack-nova-network off

2. Install quantum service and the Open vSwitch plugin

   yum install openstack-quantum openstack-quantum-openvswitch

3. The Quantum installation scripts make use of keystone environment variables. Make sure that the administrator environment variables are set.

   source /root/keystonerc_admin

4. Configure quantum service to use Open vSwitch (you can get the MySQL password from the Packstack answer file, see CONFIG_MYSQL_PW)

   quantum-server-setup

5.1. The above script will ask if the nova parameters need to be updated. Restart the nova compute service. The script will configure Quantum as the networking module for Nova.

   service openstack-nova-compute restart

5.2 Start the openvswitch service

   service openvswitch start
   chkconfig openvswitch on

5.3 Create the integration bridge (for the private network)

   ovs-vsctl add-br br-int

5.4 Create the external bridge (for the layer 3 agent)

   ovs-vsctl add-br br-ex

5.5 Ensure that the interfaces are persistant after reboot. This is done by creating interface files, for example for br-int:

   DEVICE=br-int
   DEVICETYPE=ovs
   TYPE=OVSBridge
   ONBOOT=yes

6. Start quantum service

   service quantum-server start
   chkconfig quantum-server on

6.1 Start quantum agent

   service quantum-openvswitch-agent start
   chkconfig quantum-openvswitch-agent on

7. In order for the IPAM to take place one needs to invoke the DHCP agent. Use the DHCP setup tool

   quantum-dhcp-setup

7.1. Start DHCP agent

   service quantum-dhcp-agent start
   chkconfig quantum-dhcp-agent on

8. In order to support floating IP's one need to invoke the Layer 3 agent. Use the L3 agent setup tool

   quantum-l3-setup

8.1. Start the L3 agent

   service quantum-l3-agent start
   chkconfig quantum-l3-agent on 

9. Ensure that the openvswitch cleanup utility is enabled (this is used after reboot to ensure that device management of the quantum agents is not affected by the fact that the openvswitch creates the interfaces at boot)

   chkconfig quantum-ovs-cleanup on

10. Create a Quantum endpoint with keystone

   keystone service-create --name=quantum --type=network --description="Quantum Service"
   keystone endpoint-create --region RegionOne --service-id<ID>  --publicurl "http://127.0.0.1:9696" --adminurl "http://127.0.0.1:9696" --internalurl "http://127.0.0.1:9696"

11. Create a keystone tenant and user.

11.1 Create the keystone tenant

   keystone tenant-list     # Record 'services' tenant ID
   keystone user-create --name=quantum --email=quantum@example.com --tenant-id <services_ID>

11.2 Add the quantum user to the admin role

   keystone role-list       # Record 'admin' role
   keystone user-list       # Record 'quantum' user ID
   keystone user-role-add --user_id <quantum_ID> --role_id <admin_ID> --tenant_id <services_ID>

12. Now one is able to start to use the Quantum CLI

12.1 Create a private network

   quantum net-create private

12.2 Create a subnet

   quantum subnet-create private 10.0.0.0/24

13. Validate that a port has been created by the DHCP agent (quantum port-list). This port will have IP address 10.0.0.2. The gateway will 10.0.0.1.

14. At this stage VM's can be deployed and they will receive IP addresses from the DHCP service.