building a cloudstack ui for the enterprise

25
© 2014 Sungard AS. All rights reserved. Building a CloudStack UI for the Enterprise David Grizzanti, Bill Jones Sungard Availability Services CCCNA’14 - APRIL 10TH, 2014 - DENVER, CO

Upload: david-grizzanti

Post on 06-May-2015

305 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Building a CloudStack UI for the Enterprise

© 2014 Sungard AS. All rights reserved.

Building a CloudStack UI for the Enterprise David Grizzanti, Bill Jones

Sungard Availability Services

CCCNA’14 - APRIL 10TH, 2014 - DENVER, CO

Page 2: Building a CloudStack UI for the Enterprise

Overview

!   Who are we?

–  David Grizzanti (Software Engineer @ Sungard AS)

–  Bill Jones (Software Engineer @ Sungard AS)

!   Cloud Engineering @ Sungard Availability Services

–  Current Cloud Offering & why CloudStack is the future

!   What’s unique about our UI

–  Features

–  Technologies we’re using

!   Overall Architecture

!   Integrating with CloudStack

!   Demo

!   Continuous Integration

2 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 3: Building a CloudStack UI for the Enterprise

About Sungard Availability Services

Sungard Availability Services provides IT Operations support to IT departments that need to ensure business viability by keeping mission critical information and applications up and running. Sungard AS provides tailored enterprise cloud services, as well as innovative solutions including: !   Disaster Recovery !   Managed Hosting !   Software !   Consulting

As of March 31st, 2014 Sungard AS was split from Sungard and became a separate, independent company.

Page 4: Building a CloudStack UI for the Enterprise

Cloud Engineering at Sungard AS

Current Cloud Platform

!   Enterprise Cloud Services – we operate a shared, multi-tenant infrastructure

!   We provide a fully managed “Virtual Data Center” environment for our customers

!   Our customers get cloud economics and agility without needing to re-architect their applications

!   We currently use traditional network isolation and security techniques

!   We have developed our own orchestration platform for our fully automated service provisioning

Issues with this approach

!   Runs on complicated hardware

!   Difficult to perform upgrades, general lifecycle issues

!   Need for a self-service option

4 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 5: Building a CloudStack UI for the Enterprise

Cloud Engineering at Sungard AS

Future/Choosing CloudStack

!   We are growing, so scaling is a concern

!   Customers want more flexibility and provide more customization

!   Improve reliability of provisioning automation

!   Provide more features to customers in an agile fashion

!   Need for a “Public” cloud as well as enterprise offerings

What UI do we offer our customers?

5 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 6: Building a CloudStack UI for the Enterprise

UI: Necessary Features

Self Service !   Ability to enter credit card and spin up a VM within minutes Utility Billing !   Customer shouldn’t be blocked from adding more capacity Cost Control !   Customers can see projected spend and manage budgets across their

entire company

Make it straightforward and easy to use!

6 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 7: Building a CloudStack UI for the Enterprise

UI: What sets us apart

Real Time Notifications to the UI !   Integrates with Event Bus/RabbitMQ

Elevated Permissions on top of API !   Allow more than just ROOT Admin to administer accounts

Roles !   Allow for multiple user Roles above what CloudStack provides

Customer centric UI !   Workplace concept to integrate CloudStack resources and billing

7 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 8: Building a CloudStack UI for the Enterprise

Overall Architecture Unified Cloud Portal

Web

Single Sign On

Bunny Ears

Billing Integration API

Hermes

Client/Browser CloudPlatform

SockJS

Page 9: Building a CloudStack UI for the Enterprise

Let’s talk about the tech!

!   Ruby (Bunny Ears) –  Worker that’s reading from RabbitMQ

!   Ruby on Rails –  Main web app (running under nginx + unicorn)

! Node.js (Hermes) –  Notifies client/browser of changes CloudStack resource state

! Backbone.js/Marionette.js + SockJS(WebSockets) –  Javascript frameworks used to drive UI changes in the browser –  Websockets keep connection open to Node.js for updating client’s

browser ! Redis

–  Storing information related to each async job –  User invites

!   Bootstrap –  Responsive front-end framework

9 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 10: Building a CloudStack UI for the Enterprise

Working with the CloudStack API

Benefits !   Fully featured API ! Async Jobs Job Management !   Storing request parameters + Job ID in Redis for retrieval and

correlation Areas for improvement !   Better permissions model (this is already in progress) !   A Truly RESTful interface !   Consistency around responses for all requests (async and non-async)

10 CCCNA’14 - April 10th, 2014 - Denver, CO

Web

Page 11: Building a CloudStack UI for the Enterprise

Example…

Page 12: Building a CloudStack UI for the Enterprise

Working with the Event Bus

Benefits !   Real time notifications (async jobs results) !   No polling required Node.js + SockJS (Websockets) !   Worker process reads from RabbitMQ !   Queries CloudStack/Redis !   Sends events to Hermes -> Client’s browser Areas for improvement !   Multiple events types can sometimes be confusing !   Data spread across more than 1 event !   Incorrect information included in events

12 CCCNA’14 - April 10th, 2014 - Denver, CO

Hermes

Bunny Ears

Client/Browser

Page 13: Building a CloudStack UI for the Enterprise

Overall Architecture Unified Cloud Portal

Web

Single Sign On

Bunny Ears

Billing Integration API

Hermes

Client/Browser CloudPlatform

SockJS

Page 14: Building a CloudStack UI for the Enterprise

Let’s see a Demo!

Page 15: Building a CloudStack UI for the Enterprise

VM Creation

Page 16: Building a CloudStack UI for the Enterprise

VM Events

Page 17: Building a CloudStack UI for the Enterprise

Network Configuration

Page 18: Building a CloudStack UI for the Enterprise

Testing is Hard

Try as hard as possible to TDD Tried to use VCR in the beginning… The rise and fall of Smokestack !   Built a replica of CloudStack for integration testing (well, almost) !   Became too much work to maintain !   Went with “simulator” (quicker on dev cycle)

Test Coverage !   Code Climate !   Quality & security analysis for Ruby on Rails and Javascript

18 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 19: Building a CloudStack UI for the Enterprise

Continuous Integration with CloudStack

Typical Flows !   Run master after each push !   Job in jenkins to build new projects for each new branch we push,

auto-build on intial push or update !   Both master and “feature” branches run full unit and integration tests

Run full test suite after every code push !   Challenge of trying to run “integration” tests on every push !   Using CloudStack Simulator for feature tests

–  Pool of CloudStack instances –  Vagrant/VirtualBox + Rails app to handle resetting each instance

after use

19 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 20: Building a CloudStack UI for the Enterprise

Simulator Pool

Page 21: Building a CloudStack UI for the Enterprise

Next Steps

Move to Docker? Docker CloudStack Simulator ! github.com/dgrizzanti/docker-cloudstack-simulator

21 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 22: Building a CloudStack UI for the Enterprise

Tools for sharing

Built a fully featured ruby client for CloudStack (StackerBee) !   Exception handling !   Idiomatic Ruby formatting for names (snake_case vs mixedCase) !   Handling of map parameters !   Configurable API version !   CloudStack REPL !   Faraday – HTTP lib (configurable middleware) !   Exposes console access URL !   Tests! github.com/promptworks/stacker_bee

Vagrant CloudStack Simulator ! github.com/promptworks/vagrant-cloudstack-simulator

22 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 23: Building a CloudStack UI for the Enterprise

Logging

Tracing requests while testing !   Need a reliable way to trace a request all phases of the application !   UI -> CloudStack !   CloudStack -> RabbitMQ -> BunnyEars -> Hermes -> Client

23 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 24: Building a CloudStack UI for the Enterprise

Credits/Acknowledgements

24 CCCNA’14 - April 10th, 2014 - Denver, CO

Page 25: Building a CloudStack UI for the Enterprise

Questions? David Grizzanti @dgrizzanti [email protected] Bill Jones [email protected]