Wednesday, November 2, 2016

Intro to DevOps

To create value, first you need an idea for a product or service. But having an idea isn’t nearly enough. Customers don’t pay for just ideas. They want to see something that does what they need, a functioning product, a working service. An idea that you don’t actually ship is nothing but vapor water.
Classic organizational structure has strict borders between development, QA and operations. No matter how efficient the process within single departments, if there are high walls in between them, problems and inefficiencies creep in. All too often, there’s not a lot of communication between departments. The attitude might be, throw it over the wall it’s not our problem anymore, we met our deadline. But if the customer throw back, saying this is not I want. then a nasty cycle of blame can start:
  • lazy technical staff
  • unrealistic project deadline
  • inadequate server budget
  • sloppy coding practices
results in :
  • unhappy
  • slow and ineffective at delivery
  • can’t learn from failure (people blame each other!)
  • hard to make changes
  • operation problems stack up
In 2009, a grassroots movement of practitioners started, which known as DevOps.
The scariest phase in English language is we’ve always done it that way. With the advancement of hardware and software, the pace of innovation has only accelerated. Old methodologies simply can’t keep pace.
People just expect new features and fixes to happen quickly without disruption to their daily lives. A development process with a long detail design phase, and a planning phase, and then another long implementation phase is slow, inefficient and error-prone.
Agile development: constant feedback with an iterative approach allows to find problems between plan, code and test. But it’s not enough, like in deploy, operate.
One of agile’s key points: people > process> tools. If you have the best teams, but there’s no feedback or collaboration between teams, it can lead to a huge waste of time and resources.
hurry up and wait.
Everyone needs to have a shared view on what the current situation is. What are the goals? shared input generally creates shared responsibility and ownership. People are willing to work together if their thoughts and opinions are being heard. It’s important to have a shared view and identify and eliminate bottlenecks. The bottlenecks can be inside or between department. It’s not really important as long as they’re being addressed. It’s also important to have shared benefits among them. You can’t improve what you can’t measure.

roles and perspectives

Developer role: implement feature requests, fix bugs. feature-oriented. Building new features might be dependent on exploring new technologies or approaches that have not been used before. take new risks.
Operations people: run services. maintain services, troubleshooting/diagnosis. stability-oriented.usually invisible to the company, when everything works fine. Ops is noticed when something doesn’t work.
Conflicting interests.
  • Dev can feel like ops is blocking their work by not providing resources fast enough or not being supportive of new cutting edge tech.
  • Ops can feel like devs are being irresponsible and reckless and just implement new features without thinking about performance and security.
  • Product managers may be even more feature oriented than devs.
  • Security team more in the fear of introducing new, unknown vulnerabilities.
  • business managers: cost-benefit.

prepare development environment

brew install packer
git clone devops
follow in the repo.
  • Run packer build -only=virtualbox-iso application-server.json It took me 3 hours to finish this step.
  • Run cd virtualbox
  • Run vagrant box add --name devops-appserver
  • Run vagrant up
  • Run vagrant ssh to connect to the server
the most popular cloud providers that have free trials:
  • Google Cloud Platform
  • Amazon Web Services
  • Microsoft Azure.


  1. When I in lesson 2 “using the image locally”, run vagrant up could not get through.
  2. In lesson 2”choose a cloud provider”, I could not follow through.
  3. In lesson 3” quiz: setting up Jenkins”, this is a following task


packer can create golden images for different build targets, like VirtualBox and VMware or use on your workstation, also for cloud provider like AWS.
A template is a JSON file that defines one or more builds by configuring the various components of Packer. Packer use these information to create multiple machine images.
  • variables
  • builders
  • provisioners
  • post-processors

continuous integration