Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Infrastructure In Code

Infrastructure In Code

Pierre-Yves Ritschard

November 21, 2013
Tweet

More Decks by Pierre-Yves Ritschard

Other Decks in Technology

Transcript

  1. SHORT BIO Pierre-Yves Ritschard CTO @ exoscale - The leading

    swiss public cloud provider Open Source Developer - riemann, collectd, pallet, openbsd Architect of several cloud platforms - paper.li Recovering Operations Engineer
  2. In the 2000's we had switches, routers ,hypervisors and virtual

    machines Tangentially, configuration management became a thing
  3. We still apply a big ball of mud approach to

    infrastructure instances are still black boxes full of mutable state
  4. As a corollary, we keep a mapping of services to

    instances Although admittedly, configuration management helps
  5. We insist on carrying over concepts from the physical world

    c r e a t e I P F o r w a r d i n g R u l e ... are we crazy ?
  6. We need to change our trust model No more NAT

    No more Address association No more volumes
  7. Stop treating instances as the base unit of reasoning mitigates

    the risk of ending with a big ball of mud
  8. User Data c l o u d - i n

    i t is a great tool
  9. Basic networking suffices for almost all use cases More scalable

    routing Great firewalling abilities through security groups
  10. Pallet: a small introduction Configuration management, provisionning, command and control

    Same tool space than chef and knife, but a library Built on top of apache Jclouds Clojure
  11. Node specifications ( d e f u b u n

    t u - n o d e ( n o d e - s p e c : n e t w o r k { : i n b o u n d - p o r t s [ 2 2 , 8 0 , 4 4 3 ] } , : i m a g e { : o s - f a m i l y : u b u n t u , : o s - v e r s i o n - m a t c h e s " 1 2 . 0 4 " } , : h a r d w a r e { : m i n - c o r e s 1 , : m i n - d i s k 1 0 , : m i n - r a m 5 1 2 } ) )
  12. Server specifications ( d e f w e b -

    s e r v e r ( s e r v e r - s p e c : p h a s e s { : c o n f i g u r e ( p l a n - f n ( p a c k a g e " n g i n x " ) ( p a c k a g e " m y - w e b - a p p " ) ) } ) ) ( d e f l b - s e r v e r ( s e r v e r - s p e c : p h a s e s { : c o n f i g u r e ( p l a n - f n ( p a c k a g e " h a p r o x y " ) ( h a p r o x y / a d d - b a c k e n d " w e b " : s e r v e r s ( n o d e s - w i t h - r o l e : w e b ) ) ) } ) )
  13. Groups ( d e f w e b ( g

    r o u p - s p e c " w e b " : r o l e s [ : w e b ] : e x t e n d s [ b a s e - s e r v e r w e b - s e r v e r ] : n o d e - s p e c u b u n t u - n o d e ) ) ( d e f l b ( g r o u p - s p e c " l b " : r o l e s [ : l b ] : e x t e n d s [ b a s e - s e r v e r l b - s e r v e r ] : n o d e - s p e c u b u n t u - n o d e ) )
  14. Provision from the CLI l e i n p a

    l l e t c o n v e r g e l b 1 w e b 4 Or your Code ( c o n v e r g e { l b 1 , w e b 4 } )
  15. Pallet embraces the cloudstack API ( { : k e

    y " p a l l e t - g r o u p " , : r e s o u r c e i d " 3 b d 6 d 1 c d - e 8 f 8 - 4 4 5 f - 8 1 8 0 - 6 4 4 9 4 6 f 1 2 e d d " , : r e s o u r c e t y p e " U s e r V M " , : v a l u e " w e b " } , { : k e y " p a l l e t - s t a t e " , : r e s o u r c e i d " 3 b d 6 d 1 c d - e 8 f 8 - 4 4 5 f - 8 1 8 0 - 6 4 4 9 4 6 f 1 2 e d d " , : r e s o u r c e t y p e { : b o o t s t r a p p e d t r u e } , : v a l u e " w e b " } , { : k e y " p a l l e t - g r o u p " , : r e s o u r c e i d " 3 b d 6 d 1 c d - e 8 f 8 - 4 4 5 f - 8 1 8 0 - 6 4 4 9 4 6 f 1 2 e d d " , : r e s o u r c e t y p e " U s e r V M " , : v a l u e { : o s - v e r s i o n " 1 2 . 0 2 " , : o s - f a m i l y : u b u n t u , : i m a g e - i d " a 1 7 b 4 0 d 6 - 8 3 e 4 - 4 f 2 a - 9 e f 0 - d c e 6 a f 5 7 5 f f f a " } } )