r/openstack • • Feb 13 '14

OpenStack in Production

So this week I finally got my company's private cloud into full production. We are now hosting a major customer facing SaaS application out of our Havana cloud that I built! I'd love to answer any questions that people here have.

19 Upvotes

44 comments sorted by

3

u/[deleted] Feb 13 '14

That's awesome - congrats. Which OpenStack components did you make use of?

4

u/squeaky19 Feb 13 '14

So to give a better overview,

We have 3x Controllers that are running a MariaDB Galera Cluster. All services are being presented HA using a combninatioon of HAProxy and keepalived. The services our controlers are providing are Keystone, Neutron w/ OVS/VLAN & LBaaS, Nova API/Schedulers,Glance and Cinder (with Ceph providing physical storage), and Horizon. We have Heat configured but we aren't using it yet.

The our compute nodes are using Ceph for the instance storage (mounted to /var/lib/nova/instances), right now we aren't using shared storage so we don't have instance portability, but we don't need it as our applications are very fault tolerant and new VMs can be spun up as needed.

All of our orchestration is run through a series of shell scripts and configuration of our instances is done with chef

Coming up, we plan to introduce Object Storage via RadosGW in Ceph with authentication provided by Keystone and presented as Swift using the S3 compatibility in Ceph. We also plan on introducing Ceilometer soon so we can get better metrics out of the system.

2

u/[deleted] Feb 13 '14

Very cool. Follow-up questions:

What is your Ceph layout & capacity? What is your compute capacity? Did you go vanilla OpenStack or use a distro like RDO? Curious as to why you didn't make use of something like Fuel for orchestration?

4

u/squeaky19 Feb 13 '14

Our Ceph layout is a little less than ideal, we have 3 nodes each with 22 10k SAS disks paired into Raid-0 stripes (for a little added speed per OSD). I don't have SSDs for the journals so they sit on the Disks with the data. So each Node has a mon and 11 osds.

As far as OpenStack we did a vanilla install.

We had an affinity for Rackspace's Private Cloud as it's chef based and we have a lot of chef knowledge in the building. But ultimately we wanted N+2 redundancy for our controllers and PC didn't handle this, as well we wanted to go with Havana and the timeframe we were on didn't allow us the time to wait for their cookbooks to come out of Beta. We looked at Crowbar and Fuel (and had a contract with Mirantis that we ended up abandoning) but neither of those tools fit what we were trying to do.

0

u/[deleted] Mar 04 '14

[deleted]

1

u/squeaky19 Mar 04 '14

It's a very complicated answer. There was a lot of technical and business reasons behind it. I didn't necessarily agree with all of them.

2

u/MadPhoenix Feb 13 '14

I applaud you for running Ceph and think it's neat, but doesn't running it locally negate the advantages of the system while also making it more complicated? I mean, since you can't take advantage of things like the cluster map and data replication among discrete failure domains (hosts, racks, rows, whatever) why not just use RAID (hardware or MD) with LVM on top of it for VM storage?

2

u/squeaky19 Feb 13 '14

Ceph is running on phsycially separate hardware. Sorry if I didn't make that clear. We don't have enough hardware yet to expand out further (racks/rows/etc), we used Ceph for fault tolerance, speed, and easy of expansion.

Right now our entire stack is living in two rather sparse racks, but if the company growth projections pan out we will be expanding that soon.

1

u/MadPhoenix Feb 13 '14

The our compute nodes are using Ceph for the instance storage (mounted to /var/lib/nova/instances), right now we aren't using shared storage so we don't have instance portability

So isn't that shared storage then? Why can't you do instance migration?

2

u/squeaky19 Feb 13 '14

Ah, I should have clarified this, we gave each node a separate ceph volume, while it's in a shared space, each node only mounts it's own volume.

We did this because we have no production faith in any of the filesystems that allowed for shared storage, so we just went with XFS, or as I like to refer to it "old faithful"

1

u/MadPhoenix Feb 13 '14

Gotcha. I thought that the Ceph QEMU driver was considered production ready, maybe it's not. Once that is production ready it will be really nice. I'm particularly intrigued by the ability to use the same Ceph backend for both Glance and Nova, and being able to make copy-on-write clones from Glance images to running virtual machine instances.

2

u/squeaky19 Feb 13 '14

I think it is, but time got the better of us and we decided to approach this at a later time.

1

u/Daviey Feb 14 '14

Why isn't non-shared storage live migration an option? Openstack+Libvirt+Qemu does a pretty good job at this...

1

u/MadPhoenix Feb 14 '14

Sure, but shared-storage live migration is a much quicker process and takes far fewer resources than a full block migration. That's why I was surprised that they're not using their shared storage for it. But it sounds like they had their own reasons to stick with XFS on Ceph, instead of using Ceph's RBD or QEMU integration (which would allow shared storage live migration).

1

u/ostack2000 Jun 11 '14

What type of Keystone authentication are you using? Keystone / MySQL? Keystone / LDAP/AD? If LDAP/AD is this a shared LDAP/AD directory? If so, were you able to add the O'Stack service accounts to this LDA/AD?

2

u/leogodin217 Feb 13 '14

Nice! OpenStack is an exciting technology. I have a couple questions.

  1. Is your SaaS app "cloud aware". Meaning, if you lost a host, would your app lose functionality? I know that's a leading question and there isn't a single definition for cloud aware, but many large IT shops have an install base of older VMs created during server-consolidation projects. They depend on highly-available hosts, fast block storage, automated resource distribution, etc.... These use cases make OpenStack adoption difficult to adopt.

  2. Are you using commodity servers? Many cheap servers rather than what HP/IBM would call enterprise class?

  3. What are you using for storage? hardware/software?

3

u/squeaky19 Feb 13 '14
  1. Yes our apps are very "cloud aware", there is some further fault tolerance that we need to introduce, but right now they can handle a number of failures. We plan on furthering this and doing Netflix or Dropbox style rollouts of updated that involve spinning up new instances and cutting over the LB and then destroying the old ones after testing.

  2. I would call them commodity servers, we are using Dell servers (R420s for the most part), on the dev part of the cloud we are going to be introducing reclaimed R210s.

  3. We have Dell R710s with Ceph for storage

2

u/dasbierclaw Mar 27 '14

Great job on this deployment! RPC does have its limitations and I'm glad to see you were able to come up with creative solutions when forging your own path/install.

I'm always curious to see how others configure their networking. Have you encountered any limitations with LBaaS, specifically the inability to leverage a single VIP address for multiple services (ie. 80/443)? If so, how did you overcome that or was it even necessary in your case? How many dhcp agents do you have in the environment? How many networks do you have configured?

Are you separating your management network from your instance networks via separate network interfaces, or is all traffic traversing a bonded interface?

Inquiring minds want to know! :)

1

u/squeaky19 Mar 27 '14

Have you encountered any limitations with LBaaS, specifically the inability to leverage a single VIP address for multiple services (ie. 80/443)?

Very specifically this. We are overcoming it using a NAT on our external VPN to route incoming/outgoing requests via the proper LBs.

We have 4 10G NICs in each box bonded into 2 pairs, 1 bond for instance networks the other for management networks.

1

u/[deleted] Feb 13 '14

What were some of the troubles you faced? When troubleshooting, how useful did you find the logs and what cues led you to solutions?

2

u/squeaky19 Feb 13 '14

Wow this is a good question. I wish I had kept a running blog while I was building this because I ran into a LOT of troubles but eventually overcame them all.

Initlally we were going to use the Cisco Nexus plugin in Neutron to handle our networking, but we just couldn't get it working (documentation on this was terrible). We eventually abandoned it and went with Vanilla OpenVSwitch with VLANs.

As far as an issue I ran into where logs helped, we had an issue with Neutron working on the Compute nodes, eventually found in the logs that Keystone auth was failing. We tracked it down to one of the 3 controllers returning bad data and found that MariaDB on that controller had been disconnected from the Galera cluster and was running solo (we fixed this and starting better Galera monitoring).

Also we found that key-signing based tokens were not working between nodes even though we had the same singing key on all 3 nodes. We decided that we didn't need this and moved to UUID based keys.

1

u/squeaky19 Feb 13 '14

Also when an instance is failing to start, the nova-scheduler logs proved invaluable in diagnosing the issue.

1

u/[deleted] Feb 13 '14

Thanks!! This is solid gold. We just deployed an OpenStack pilot environment for a few limited users. Setting it up took 4 people a month and I'm still low on confidence. It seems new things keep coming up every other day and troubleshooting is a much greater challenge in OpenStack than most other software.

Notes like these are invaluable. Until OpenStack matures a bit more, it's posts like these that help us all run smoothly!!

2

u/squeaky19 Feb 13 '14

Don't get discouraged, it was a team of 3 (but really just 1 doing the vast majority of the work), we went from bare hardware to functioning cloud in about 3 months.

1

u/eviltoiletpaper Feb 13 '14

I have a few questions:

  • What is the size of your deployment? How many nodes per zone?

  • Is the deployment distributed across datacenters?

  • How did you distribute your network nodes?

  • How did you get over the scaling issues with OVS and AMQP?

  • Are you using any Neutron services like l3 router, lbaas, vpnaas etc.?

  • What documentation did you follow for the Cisco Nexus plugin? I just ask coz I have deployed the Nexus plugin in a PoC environment before :)

2

u/squeaky19 Feb 13 '14
  • Right now our deployment is very small, we have a single AZ and are using host aggregates to separate prod from dev using the FilterScheduler with AggregateMultiTenancyIsolation. We will eventually be bringing a second data center online, but right now or DR fails into RackSpace.

  • Due to the small size of the deployment, our controllers are also acting as our network nodes

  • We don't have scaling issues yet, we are using RabbitMQ in HA mode with HA Queues enabled across the board

  • We are using L3 Router and LBaaS

  • I couldn't find any good documentation for the Nexus plugin and I think that was my problem. This is the extent of the documentation that I was able to find and it just wasn't sufficient. I would love if you could point me to something more useful

2

u/1img Feb 26 '14

Have you considered using the OpenContrail plugin (http://opencontrail.org) instead of OVS in order to get a distributed router implementation ? This reduces latency by making sure that traffic from any two servers doesn't have to traverse the L3 router VM even if its traversing multiple app tiers or tenants.

1

u/squeaky19 Feb 26 '14

I'm not even familiar with it. I'll check it out though.

1

u/eviltoiletpaper Feb 13 '14

Thanks for the replies, It's be great if you can do a follow up when you try to scale up :)

Unfortunately, that seems to be all the pertinent documentation for the Nexus Havana plugin. I was able to follow it quite easily to install the plugin, what parts did you find insufficient? Maybe i can help.

2

u/squeaky19 Feb 13 '14

Honestly I wasn't sure how/what to do with it once it was installed. Does it need OpenVSwitch sitting next to it? If so what real benefit does it provide?

2

u/eviltoiletpaper Feb 13 '14

Yup it builds on top of OVS, you'll need the OVS plugin setup in VLAN mode for it to work properly.

The OVS plugin handles the vswitch side of things and also manages segmentation but it's not aware of the network fabric beyond the external bridge on the host.

The Nexus plugin manages trunking these vlans across the hardware fabric as required. The advantage is getting your ToR's dynamically configured to create and trunk network VLANs in hardware for east - west traffic.

The other easy option is to create and trunk all these vlans in your ToR's in advance but VLAN space is limited in Nexus switches, some of them only support as few as 800 vlans. With the plugin you get selective vlan creation an trunking only where it's required.

2

u/squeaky19 Feb 13 '14

See that's where I ran into trouble. I couldn't figure that part of it out.

I just setup my VLAN trunks where necessary and am off and running. As I'm just using a single pair of ToR Nexus's with no distribution switch (don't need it yet) I am going to wait to integrate this until our site grows enough to justify a more complex network.

Thanks for the info, I'm going to keep this bookmarked.

1

u/RaMPaGeNL- Feb 13 '14

Any tips or best practices when deploying an OpenStack cloud in production?

2

u/squeaky19 Feb 13 '14

First tip is get HA Rabbit MQ setup before enabling any of the other services and ensure that you have the rabbit_ha_queues option set to True before deploying anything. If you have to change this option, then you will have to clear out and recreate any queues after restarting the app.

2nd tip is become familiar with HA. You need to be able to loose any single controller box without it impacting service. I used HAProxy and Keepalived with all my APIs (I have the API listening on an alternate port then HAProxy listening on the default port pushing connections to the backend on the alternate port. Then I have multiple HAProxys running that use Keepalived to manage a VIP between them.

3rd tip is to make your applications resilient to failure. If you do this, then your HA requirements on your compute nodes get reduced and that will make things simpler.

I do plan on taking my install guide and removing anything proprietary and posting it online as a blog.

1

u/thesab Feb 14 '14

I've got some fun questions! :D

  • Does your Neutron DDOS your Keystone (token bug, see this) If so, how did you mitigate it?

  • Do you have disparity issues with Neutron and OVS? Every so often, a hypervisor will become very antisocial and lose its ability to receive inbound communication.

  • Do you use Horizon, and if so, does nova-api die on your controller node, thereby resulting in long timeouts and angry mobs?

1

u/squeaky19 Feb 14 '14

I actually have not run into any of these issues yet, but I will keep an eye out.

1

u/mthode Feb 14 '14

What version of openvswitch are you using. From what I understand 2.0.0 has multithreading

1

u/squeaky19 Feb 14 '14

I am using 1.10.2-0ubuntu2~cloud0, I will be testing out 2.0.0 in my test cloud as soon as I can get funding for the hardware.

1

u/syn_bad Feb 28 '14

Hi,

I am curious what you are using for security and if you deploy any firewalls or other security controls like IPS or malware detection with your OpenStack setup and how you did it.

1

u/squeaky19 Feb 28 '14

Our entire stack is hidden behind a Cisco ASA firewall. We are only allowing access to certian services on the inside via Reverse NAT. Management can only be accessed via VPN or a connection to our private LAN.

0

u/[deleted] Mar 03 '14

[deleted]

2

u/squeaky19 Mar 03 '14

Our controller nodes are physical nodes, I, personally, don't think they should ever be virtualized in a production scenario.

I am absolutely concerned about them failing. I am looking into using pacemaker to at least let them be active/passive. There is some instructions in the HA Guide.

http://docs.openstack.org/high-availability-guide/content/_adding_neutron_l3_agent_resource_to_pacemaker.html

0

u/[deleted] Mar 03 '14

[deleted]

1

u/squeaky19 Mar 04 '14

That is a very interesting solution to this problem. The question I have ism how do you ensure that your routers for the two networks get placed on separate network nodes?

2

u/[deleted] Mar 22 '14 edited Mar 22 '14

[removed] — view removed comment

1

u/squeaky19 Mar 27 '14

We have a pair of Cisco Nexus swtiches which are working as our "external" router .. our only network visible outside of OS is still a 10.x.x.x network. For things that need true Internet access we are NATting with a Cisco ASA. Our network is very simple right now so we have no need for a routing protocol. If we need to get that detailed we'll be hiring a network engineer to handle that as we don't have that experience in house.

Wtih the Nexus we don't have issues with VLANs as I assigned a VLAN range to Openstack and then let Openvswitch know what that range is (also have a specific VLAN with a VIP on the Nexus for external networking that I also let OVS know about).

We aren't missing anything that we need at this point, but are always looking at the new features for enhancements we can take advantage of. We aren't at a scale yet where we are booting more than 2-5 VMs at a time so we haven't run into the particular issue you are talking about.