Learn OpenStack (5): Deploy the Juno version of OpenStack Four node environment on Mac

Source: Internet
Author: User
Tags openvswitch

0. Frontier

After a period of tossing and Juno, finally installed in their own Mac version of the four node environment. In this process, spent a lot of time, encountered a lot of problems, learned a lot of knowledge, toss a lot of things that do not need to toss, this article tries to make a summary of the process.

1. Initial environment

Description

1. VirtualBox Ubuntu Installation: (VirtualBox NIC configuration visible http://www.cnblogs.com/sammyliu/p/4137772.html)

The 14.04 server version is installed, and after you install it:

(1) Modify sources.list to use the source of Xiamen University (2) Run: echo "Deb Http://ubuntu-cloud.archive.canonical.com/ubuntu" "Trusty-updates/juno Main ">/etc/apt/sources.list.d/cloudarchive-juno.list apt-get update apt-get upgrade Add-apt-repository Cloud -archive:juno     Apt-get Dist-upgrade

2. My environment, the most lack of memory, but OpenStack is very memory-intensive, especially controller node, MySQL and RABBITMQ are accounted for more than 1G of memory, so each node's memory is looking almost just good to allocate. At the same time also lamented the use of VirtualBox, Ubuntu configuration is very convenient, start very fast, it may also be the MAC uses SSD for the sake of.

3. Set management network to access the external network for easy installation.

4. Why the storage network and VM traffic networks are on the same web, as described below.

With the initial network environment configured, the next step is to install each OpenStack node.

2. Installation

The installation of OpenStack is performed in accordance with Juno's official installation documentation, and the process is no longer duplicated, as shown in the installation results:

3. Configuration

The configuration is basically a reference standard official document, and the detailed process is no longer duplicated. Here are some important configurations to note:

3.1 Cinder Configuration

1. Using volume Group,cinder will create virtual volume within the volume group to create volume.

[Email protected]:/home/s1# VGS
VG #PV #LV #SN Attr vsize vfree
Cinder-volumes 1 2 0 wz--n-5.34g 3.36g System 1 2 0 wz--n-3.72g 0

2. Use the local hard drive via Lvmiscsidriver and use Tgtadm as iSCSI Helper.

The default lvmiscsidriver does not provide an interface to allow the user to configure the IP address used by iSCSI, so it automatically uses the Management Network network card to set up the iSCSI session. Some other vendor provide iSCSI implementations that can use other NICs, so the storage network can be detached from the management network.

[Email protected]:/home/s1# iscsiadm-m Session
TCP: [2] 192.168.1.24:3260,1 iqn.2010-10.org.openstack:volume-870d464f-5c2f-4220-869f-92039f766758tcp: [3] 192.168.1.24:3260,1 iqn.2010-10.org.openstack:volume-15d76291-d1a7-423f-82f0-14bd52652a7c 3. Multiple backend is not used, so volume type is not required. 3.2 Nova Configuration

1. Because the machine's CPU does not support hardware acceleration for virtual machines, the configuration Libvirt uses Qumu.

3.3 Neutron Configuration

1. Configure the use of neutron in Nova instead of the default nova-network.

Network_api_class = Nova.network.neutronv2.api.APIsecurity_group_api = Neutron
Linuxnet_interface_driver = Nova.network.linux_net.LinuxOVSInterfaceDriver
Firewall_driver = Nova.virt.firewall.NoopFirewallDriver

2. In the ML2 configuration, use Flat,gre, and Openvswitch.

4. Running

0. Make sure all the service is running properly

[Email protected]:/home/s1# Cinder service-list
+------------------+------------+------+---------+-------+----------------------------+-----------------+
|    Binary | Host |  Zone | Status |         State | Updated_at | Disabled Reason |
+------------------+------------+------+---------+-------+----------------------------+-----------------+
| Cinder-scheduler | Controller | Nova |   Enabled | Up |       2014-12-28t16:00:28.000000 | None |
|   Cinder-volume | Block1 | Nova |   Enabled | Up |       2014-12-28t16:00:28.000000 | None |
| Cinder-volume | Controller | Nova |  Enabled | Down |       2014-12-28t14:25:29.000000 | None |+------------------+------------+------+---------+-------+----------------------------+-----------------+ [ Email protected]:/home/s1# Nova Service-list
+----+------------------+------------+----------+---------+-------+----------------------------+--------------- --+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+--------------- --+
| 1 | Nova-cert | Controller | Internal | Enabled | Up | 2014-12-28t16:00:45.000000 | -               |
| 2 | Nova-consoleauth | Controller | Internal | Enabled | Up | 2014-12-28t16:00:46.000000 | -               |
| 3 | Nova-scheduler | Controller | Internal | Enabled | Up | 2014-12-28t16:00:45.000000 | -               |
| 4 | Nova-conductor | Controller | Internal | Enabled | Up | 2014-12-28t16:00:43.000000 | -               |
| 5 | Nova-compute | compute1 | Nova | Enabled | Up | 2014-12-28t16:00:42.000000 | -               |+----+------------------+------------+----------+---------+-------+----------------------------+--------- --------+ [email protected]:/home/s1# neutron agent-list
+--------------------------------------+--------------------+----------+-------+----------------+-------------- -------------+
| ID | Agent_type | Host | Alive | admin_state_up | binary |
+--------------------------------------+--------------------+----------+-------+----------------+-------------- -------------+
| 262b412c-0c3c-446d-8e9f-313a09970a8b | Open VSwitch Agent | compute1 | :-)   | True | neutron-openvswitch-agent |
| 3c7067be-6711-4479-8f64-7162a889feb1 | Metadata Agent | Network | :-)    | True | neutron-metadata-agent |
| 465b0881-dcb3-4adc-9df3-3035fca02661 | DHCP Agent | Network | :-)     | True | neutron-dhcp-agent |
| 79FBACD2-5B08-4B34-B252-D0094D2B99FD | Open VSwitch Agent | Network | :-)    | True | neutron-openvswitch-agent |
| bc276c9d-63c5-4918-86c9-fe83edc31901 | L3 Agent | Network | :-)    | True | neutron-l3-agent |
+--------------------------------------+--------------------+----------+-------+----------------+-------------- -------------+

1. Create a flavor tiny with less system requirements than m1.tiny because of limited resources:

[Email protected]:/home/s1# Nova Flavor-list
+--------------------------------------+-----------+-----------+------+-----------+------+-------+------------- +-----------+
| ID | Name | MEMORY_MB | Disk | Ephemeral | Swap | Vcpus | Rxtx_factor | Is_public |
+--------------------------------------+-----------+-----------+------+-----------+------+-------+------------- +-----------+
| 1 | M1.tiny | 512 | 1 |      0 | | 1 | 1.0 | True |
| 2 | M1.small | 2048 | 20 |      0 | | 1 | 1.0 | True |
| 3 | M1.medium | 4096 | 40 |      0 | | 2 | 1.0 | True |
| 4 | M1.large | 8192 | 80 |      0 | | 4 | 1.0 | True |
| 5 | M1.xlarge | 16384 | 160 |      0 | | 8 | 1.0 | True |
| a0317e03-d265-4dd3-a9e4-275a2b25c100 | Tiny | 300 | 1 |      0 | | 1 | 1.0 | True |+--------------------------------------+-----------+-----------+------+-----------+------+-------+-------- -----+-----------+ 2. Create a neutron network[Email protected]:/home/s1# Neutron net-list
+--------------------------------------+----------+-----------------------------------------------------+
| ID | name | Subnets |
+--------------------------------------+----------+-----------------------------------------------------+
| 2E068976-92B2-4A50-BBCB-14B70D4195AF | ext-net | a04711a2-0917-4d1b-9f93-cc2691c22517 192.168.1.0/24 |
| 0a4cd030-d951-401a-8202-937b788bea43 | demo-net | 08B53624-63A7-4C99-97B0-C8BAE3B3CBCE 10.0.1.0/24 |
| | Demo-net2 |5598bdf9-2de4-4a4e-9054-2070102e0f1f 10.0.0.0/24 |+--------------------------------------+----------+- ----------------------------------------------------+ [email protected]:/home/s1# neutron subnet-list
+--------------------------------------+--------------+----------------+--------------------------------------- -------------+
| ID | name | CIDR | Allocation_pools |
+--------------------------------------+--------------+----------------+--------------------------------------- -------------+
| a04711a2-0917-4d1b-9f93-cc2691c22517 | ext-subnet | 192.168.1.0/24 | {"Start": "192.168.1.100", "End": "192.168.1.200"} |
| 08B53624-63A7-4C99-97B0-C8BAE3B3CBCE | demo-subnet | 10.0.1.0/24 | {"Start": "10.0.1.2", "End": "10.0.1.254"} |
| 5598bdf9-2de4-4a4e-9054-2070102e0f1f | Demo-subnet2 | 10.0.0.0/24 | {"Start": "10.0.0.2", "End": "10.0.0.254"} |
+--------------------------------------+--------------+----------------+--------------------------------------- -------------+[email protected]:/home/s1# Neutron router-list
+--------------------------------------+-------------+--------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- -------------------+-------------+-------+
| ID                                    | name        | External_gateway_info                                                                                                                                                                             | Distributed | ha    |
+--------------------------------------+-------------+--------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- -------------------+-------------+-------+
| 9ba04071-f32b-435e-8f44-e32936568102 | Demo-router | {"network_id": "2e068976-92b2-4a50-bbcb-14b70d4195af", "Enable_snat": True, "external_fixed_ips": [{"subnet_id": " a04711a2-0917-4d1b-9f93-cc2691c22517 "," IP_Address ":" 192.168.1.100 "}]} | False | False |
+--------------------------------------+-------------+--------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- -------------------+-------------+-------+ 3. Create Volume[Email protected]:/home/s1# Cinder List
+--------------------------------------+--------+--------------+------+-------------+----------+--------------- -----------------------+
| ID | Status | Display Name | Size | Volume Type |             bootable | Attached to |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------- -----------------------+
| 15d76291-d1a7-423f-82f0-14bd52652a7c |    In-use |  vol22 |     1 |   None | true | 9ff3776b-6835-4a4e-8b11-b440591ca9b9 |
| 870d464f-5c2f-4220-869f-92039f766758 |    In-use |  vol33 |     1 |   None | true | 20c011e1-de8f-4ac8-ac6a-5ba0f9dd9b42 |+--------------------------------------+--------+--------------+------+--- ----------+----------+--------------------------------------+ 4. Create a virtual machine from volume 5. Check the virtual machine1. VMs can use 2. VMS can access each other 3. Virtual machine can access the external network 6. Network 5 after the virtual machine is created. Problems encountered and solutions

5.1 Ubuntu installation Failed

Phenomenon: VirtualBox cannot recognize Ubuntu ISO files

Cause: The ISO file is problematic, you need to re-download the ISO file, note that the MD5 value of the downloaded ISO file is the same as the MD5 value of the ISO on the server, and the difference is that the download is problematic.

5.2 Creating a virtual machine failed

LOG: Filter Ramfilter returned 0 hosts

Cause: Nova-scheduler cannot find a host that meets flavor requirements to create a virtual machine

Resolution: Reduce Flavor requirements

5.3 Virtual Machine cannot start Console:boot failed,not a bootable disk. No bootable device. Cause: The image of the volume that started the virtual machine does not contain boot loader. Resolution: For testing purposes, you can download the image from http://download.cirros-cloud.net/0.3.2/, such as the CIRROS-0.3.2-X86_64-DISK.IMG 5.4 virtual machine build failure log:Buildabortexception:build of instance 66fbb471-21a9-4f45-9ca7-37a6e4606179 aborted:failed to allocate the network ( s), not rescheduling.remoteerror:remote Error:operationalerror (operationalerror) (1048, "Column ' instance_uuid ' cannot be null")Cause: The Nova Update database table Instance_extra failed. A bug was opened for openstack,https://bugs.launchpad.net/nova/+bug/1405741, but no one was there for me. FIX: Modify code, comment out the wrong place, and rerun, the result is that the state of the virtual machine remains in the building state, you can manually modify the database records to become active. Update instances set vm_state= ' active ' where uuid= ' 9ff3776b-6835-4a4e-8b11-b440591ca9b9 '; 6. Impressions

1. Learning OpenStack, Devstack is not enough to start with the environment.

2. One of the great benefits of open source products is that you can modify the code as needed

3. Set debug=true in config file, you can get the most detailed log, compile and debug.

4. Free VirtualBox compared to the toll of parallels desktop handy, see my other article blog:http://www.cnblogs.com/sammyliu/p/4149005.html

5. OpenStack has many things to learn ...

6. Other thoughts come in and add it TBD

Learn OpenStack (5): Deploy the Juno version of OpenStack Four node environment on Mac

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.