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

Pstrami

Avatar for dannylloyd dannylloyd
February 14, 2012

 Pstrami

pstrami is a lightweight framework that provides a simple dsl for deploying multi-server / role applications, using powershell. It supports the concept of having different deployment configurations per enviornment and allows seperation of developer and administrator concerns.

Avatar for dannylloyd

dannylloyd

February 14, 2012
Tweet

Other Decks in Programming

Transcript

  1. I  am  here  to  share  what  I  learned  about  

    deploying  web  and  server  based  applications;   §  in  an  automated  fashion  (one  click)   §  to  a  multi  server  environment   §  to  different  configurations  for  different   environments   §  to  remote  machines  ;  over  firewall  friendly   protocols.  
  2. ¡  Powershell  is  great  for  scripting  .   §  Interops

     with  the  command  line  very  nicely   §  Interops  with  the  operating  system  very  nicely.   §  You  can  create  clean  syntax  or  DSL  for  your   deployments   ¡  MSDeploy   §  Is  the  answer  to  powershell’s  horrible  remoting   story.   ¡  Web  PI  (Platform  Installer)  
  3. powershell   pstrami   powershell   msdeploy   msdeploy  

    Configuration   in    pstrami  (dsl)   pstrami   Deployment   script.   (  powershell)   Deployment  Machine   Application  Server   Network  &  Firewall   Boundaries  
  4. ¡  We  are  talking  about  deploying  .Net  code;  on  

    Windows  Servers..        Right?       ¡  Powershell    is  just  baked  into  the  newer   operating  systems.  All  of  the  server  products   are  now  shipping  with  Powershell  support.   ¡  Powershell  2.0  is  supported  on  pretty  much   every  operating  system.  
  5. ¡  AKA:  Web  Deployment  Tool   ¡  Does  a  lot..

     Actually..  It  does  too  much.   ¡  I  think  it  is  a  great  tool  for  very  simple   scenarios.     ¡  For  more  advanced  scenarios  I  prefer  to  stay   way  from  the  xml  of  msdeploy  manifest  or   the  equivalent  command  line  madness.   ¡  Use  it  just  to  push  files  (firewall  friendly)  and   run  powershell.  
  6. SQL   Web   SQL   Passive   Node  

    Web   App   SQL  Active   Node   Web  &   App   Production   UAT   Web,   App,  SQL   Development  
  7. ¡  Install  on  a  single  server  and  manually  do  the

      one  time  setup   ¡  When  (or  If)  the  application  deploys;  we  can   write  some  documents  and  spend  time  on  the   phone  with  the  administrators  who  setup  and   deploy  your  software.  
  8. ¡  Developers  could  write  the  code  for   deploying  bits?

      ¡  Administrators  could  configure  each   environment?   What  If  
  9. deploy-­‐package  dev  C:\code\oss\codecampserver-­‐tip\build\package   Loading  Config  from  .\pstrami.config.ps1   Deploying

     to  localhost  Roles:  Web  Db  Application   Install-­‐RemoteServer   Sending  Files  to  localhost  :  c:\installs\codecampserver_dev   Total  changes:  1  (1  added,  0  deleted,  0  updated,  0  parameters  …   Info:  Updating  runCommand  (bootstrap.bat).   Info:     Info:  Loading  Config  from  .\pstrami.config.ps1   Info:     Info:  Executing  Role:  Web   Info:     Info:  Installing  the  website   Info:     Info:  445  File(s)  copied   Info:  Updating  C:\inetpub\CodeCampServer_dev_website\bin\hibe…   Info:     Info:  Executing  Role:  Db   Info:     Info:  Installing  the  Database   Info:     Info:  Update  CodeCampServer_dev  on  .\SqlExpress  using  scripts  from   database   Info:  Skipping  (already  executed):  0001_AddDatabaseUser.sql   Info:  Skipping  (already  executed):  0002_Version1Schema.sql   Skipping  (already  executed):  0003_AddConferenceIDToSpeaker.sql   Skipping  (already  executed):  0004_ChangeUserGroupHtmlToTextType.sql   Skipping  (already  executed):  0005_ChangeConferenceHtmlToTextType.sql   Skipping  (already  executed):  0006_AddHasRegistrationToConference.sql   Skipping  (already  executed):  0007_ChangeTheUserAdminJoinTable.sql   Skipping  (already  executed):  0008_AutoGeneratedMigration.sql   Skipping  (already  executed):  0009_AutoGeneratedMigration.sql   Skipping  (already  executed):  0010_AddVoteToProposal.sql   Skipping  (already  executed):  0010_AutoGeneratedMigration.sql   Skipping  (already  executed):  0011_ConferenceTimeZone.sql   Skipping  (already  executed):  0012_ConferenceURL.sql   Skipping  (already  executed):  0013_AutoGeneratedMigration.sql   Skipping  (already  executed):  0013_Event.sql   Skipping  (already  executed):  0014_MigrateConferenceData.sql   Skipping  (already  executed):  0015_ExtendMeetingStringLengths.sql   Skipping  (already  executed):  0016_ExtendMeetingStringLengthsSomeMore.sql   Skipping  (already  executed):  0017_EventDescriptionChangeLengthTo500.sql   Skipping  (already  executed):  0018_MakeSponsorAOneToMany.sql   Skipping  (already  executed):  0019_MigrateTheTables.sql   Skipping  (already  executed):  0020_ChangeAuditInfo.sql   Skipping  (already  executed):  0021_AddKeys.sql   Skipping  (already  executed):  0022_MakeSponsorIdInt32.sql   Skipping  (already  executed):  0023_AddHeartbeat.sql   Skipping  (already  executed):  0024_ModifyHeartbeat.sql   Info:  usdDatabaseVersion:  26   Info:  Executing  Role:  Application   Info:     Info:  Installing  the  Batch  Application   Info:     Info:  60  File(s)  copied   Info:  Deployment  Succeded   Info:     Total  changes:  1  (0  added,  0  deleted,  1  updated,  0  parameters  changed,  0  bytes  co Install-­‐RemoteServer  Succeeded      
  10. Environment  Name   Server  Roles   Server  Name   Multiple

     Servers  with  different   Roles  
  11. ¡  Powershell  2   §  Windows  Server  2008  R2  (Preinstalled)

      §  Windows  7  (Preinstalled)   §  Windows  Server  2008  with  Service  Pack  1     §  Windows  Server  2008  with  Service  Pack  2     §  Windows  Server  2003  with  Service  Pack  2     §  Windows  Vista  with  Service  Pack  2     §  Windows  Vista  with  Service  Pack  1     §  Windows  XP  with  Service  Pack  3     ¡  Msdeploy  1.1   §  .Net  2  Framework  sp1