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

Development Best Practices for Continuous Deplo...

Development Best Practices for Continuous Deployment Environment

Akhyar Amarullah

March 18, 2015
Tweet

More Decks by Akhyar Amarullah

Other Decks in Programming

Transcript

  1. Development Best Practices
 for Continuous Deployment Environment! Presented by Akhyar

    Amarullah
 at Engineering Brownbag Session in Onebit
 on Wednesday, March 17th 2015"
  2. Why does it matter?" Centralized source.! Being lazy, automate repetitive

    tasks. 
 Engineers love automation!! Deploying clean build is a must, 
 but often requires extra time.! Reduce silly mistakes in manual steps.! Higher quality delivery with confidence.!
  3. But that’s devops engineer’s job, right? 
 Why should I

    even care? ! Fine fine, I have heard it before. !
  4. Why should I even care?" •  Code requires huge efforts

    to maintain more than to write.! •  Projects change a lot. Sometimes beyond your sanity can handle.! •  Make changing configurations a breeze.! •  Your code is your responsibility. Continuous Deployment compliance is a standard.!
  5. Everything on branch “master” (or equivalents) 
 should works and

    deployable.
 ! •  Incremental/small changes are done on feature branches.! •  Version tag your released commits.! •  Commit in small chunks. But not too small.!
  6. Don’t commit files containing 
 sensitive information." •  configs/email.php • 

    onebit.keystore •  DatabaseConfigs.java •  PASSWORD.txt •  Etc. Basically, files with credentials.! •  These configuration files are kept in your own machine. !
  7. Use .gitignore •  Environment-specific configuration files! •  Generated files! – *.apk,

    *.class, build/, gen/, etc! •  Log files! •  OS’ generated craps! – Thumbs.db! – .DS_Store! •  Tip: Use http://gitignore.io to generate one!!
  8. Configuration Files! Separate between different environment
 Local VS staging VS

    production! Your favorite frameworks might have supported it already. Find it out!! Avoid committing sensitive credentials 
 to public repository.!
  9. Configuration! •  Must be injectable via either:! –  Configuration files!

    –  Environment variables (e.g. $SERVER_HOST)! •  Don’t forget to document how to configure your projects!!
  10. Recaps" Everything on “master” (or equivalents) should works and deployable."

    Don’t commit files containing sensitive information.! Use .gitignore Separate configuration based on environments.! Document how to configure the project.!