Rubyizing the devs and ops of an enterprise 1.0

Post on 15-Jan-2015

743 views 1 download

Tags:

description

My Presentation during RubyConf India 2011, presented on 28th / 29th May 2011 in Bangalore India

Transcript of Rubyizing the devs and ops of an enterprise 1.0

Rubyizing the Devs and Ops of an Enterprise

Yashasree Barve

RubyConf India 2011

About me

Technologist @ TCS since last 13 years

An Agile Ruby developer since 2007

&

I'm lovin' it

RubyConf India 2011

Back in 2007

Who is this Ruby?

RubyConf India 2011

A Rewarding Journey

2011

2007

Who is this Ruby?

I Love Ruby

RubyConf India 2011

An Enterprise

Images created using wordle.net

RubyConf India 2011

Agile Enters the Enterprise

RubyConf India 2011

RubyConf India 2011

Let us try Ruby and Rails!

RubyConf India 2011

But This is An Enterprise…

PerformanceHeterogeneity

Availability

Security

Scalability

Complexity

Reliability

RubyConf India 2011

How to eat an Elephant?One bite at a time!

RubyConf India 2011

THE RAILS WAY

RubyConf India 2011

Believe it or not,most big company security break-ins

involve your employees!

RubyConf India 2011

Security Plug in

Single Sign On Server

Apache PassengerApache Passenger

SecurityPlug in

Rails App

Login

Enterprise Directory ServerEnterprise Directory Server

Authenticate

Authorize

RubyConf India 2011

Microsoft ADSDomino LDAP

IBM ITDS

Support ALL of those!

RubyConf India 2011

Directory Server Plug in

Apache PassengerApache Passenger

LDAPPlug in

Rails App

> person = MyLdap::Person.find_name 'John Doe'> person.first_name #=> 'John'> person.last_name #=> 'Doe'> person.is_contractor? #=> true> person.is_in_group?('some_admins') #=> true> person.groups #=> ['some_admins', 'that_user']

> group = MyLdap::Group.find_by_name 'some_admins'> group.contains? person> #=> true

> Other ways to find a person:> MyLdap::Person.find_by_distinguished_name> MyLdap::Person.find_by_sso_name

> person = MyLdap::Person.find_name 'John Doe'> person.first_name #=> 'John'> person.last_name #=> 'Doe'> person.is_contractor? #=> true> person.is_in_group?('some_admins') #=> true> person.groups #=> ['some_admins', 'that_user']

> group = MyLdap::Group.find_by_name 'some_admins'> group.contains? person> #=> true

> Other ways to find a person:> MyLdap::Person.find_by_distinguished_name> MyLdap::Person.find_by_sso_name

Enterprise Directory ServerEnterprise Directory Server

RubyConf India 2011

every Page you See

every Click you Make

RubyConf India 2011

Usage Tracking

Apache PassengerApache Passenger

TrackingPlug in

Rails App

enable_page_tracking to track who visited which page

link_to to send info about clicked link

Set defaults in environment.rb

Define app specific parameters in environment config

Rake task to include relevant files in the application

enable_page_tracking to track who visited which page

link_to to send info about clicked link

Set defaults in environment.rb

Define app specific parameters in environment config

Rake task to include relevant files in the application

Enterprise Usage TrackingExternal Server

Enterprise Usage TrackingExternal Server

HTTP

RubyConf India 2011

Plug ins that DRYed us

RubyConf India 2011

Hosting Internally

Gem Server

Enterprise Subversion

Server

C:\my_app\trunk>gem install –source http://mygemserver:8808/ distributeC:\my_app\trunk>gem install –source http://mygemserver:8808/ distribute

C:\my_app\trunk>ruby script/plugininstall my_security –source http://svn....com/ruby/plugins/my_security/trunk

C:\my_app\trunk>ruby script/plugininstall my_security –source http://svn....com/ruby/plugins/my_security/trunk

RubyConf India 2011 SOURCE: Source

RailsUp and Running

RubyConf India 2011

Create a Brand New Rails app that

• gets committed in SCM• configured on CI • branding, security, ldap, and so on installed • ready to be deployed with configured Capfile• defaults to rspec, mocha, cucumber

RubyConf India 2011

Way We Work

Keep it Simple.Keep it Simple.

Automated Tests, A part of life.

Automated Tests, A part of life.

ContinuouslyIntegrate,Release Often.

ContinuouslyIntegrate,Release Often.

RubyConf India 2011

Vibrant Rubyists Group

Team up Share Excel

RubyConf India 2011

Oops!

But what about theOps

RubyConf India 2011

The BIG Task of Deployment

Powered by Capistrano and Passenger

C:\my_app\trunk>capd deploy:migrationstriggering start callbacks for `deploy:migrations'

Select Stage:1. production2. integration3. devutility4. qaPlease select:

C:\my_app\trunk>capd deploy:migrationstriggering start callbacks for `deploy:migrations'

Select Stage:1. production2. integration3. devutility4. qaPlease select:

> capd apache:configure> capd apache:passenger:configure> capd apache:restart> capd install> capd uninstall> capd deploy:bundle_gems

> capd deploy:minify_and_upload_assets> capd deploy:minify_erbs

> capd google:configure> capd ldap:configure> capd database:configure

> capd hoptoad:notify

> capd apache:configure> capd apache:passenger:configure> capd apache:restart> capd install> capd uninstall> capd deploy:bundle_gems

> capd deploy:minify_and_upload_assets> capd deploy:minify_erbs

> capd google:configure> capd ldap:configure> capd database:configure

> capd hoptoad:notify

RubyConf India 2011

Towards One Click deployment

Inspired by Heroku

RubyConf India 2011

Busting those Tickets!

Apache PassengerApache Passenger

Admin Rails App

Legacy Enterprise AppsLegacy Enterprise Apps

RubyConf India 2011

More Transparency

SplunkSplunk

HoptoadHoptoad

RubyConf India 2011

Chef at work

Infrastructure as a codeand

The code is Ruby

RubyConf India 2011

Envisioning the Provisioning

• Monitor the App Performance

• Spin a virtual server to scale horizontally

RubyConf India 2011

Dev Ops

RubyConf India 2011

This presentation would not have been possible without

My fellow RubyistsAmit Kumar

Thomas NewtonPatrick Shaughnessy

&My creative designer buddy

Mayura Sawant

Thanks mates!

RubyConf India 2011

Thank you all for being patient and hearing me out.

Hope this helps you!

Any questions?