Documente Academic
Documente Profesional
Documente Cultură
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing
process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and
many iterations to get reader feedback, pivot until you have the right book and build traction once
you do.
2015 - 2016 Aymen El Amri / eon01
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . .
Assumptions . . . . . . . . . . . . . . . . . . . . .
To Whom This Book Is Addressed . . . . . . . . .
Conventions used in this book . . . . . . . . . . .
How to Properly Read And Benefit From This Book
How To Contribute . . . . . . . . . . . . . . . . .
About The Author . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
1
1
1
2
2
2
3
4
4
4
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6
6
6
6
7
8
9
10
10
11
13
13
14
14
14
15
15
15
16
16
16
17
CONTENTS
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
18
18
19
19
Preface
1
2
3
4
5
\
\
^__^
(oo)\_______
(__)\
)\/\
||----w |
||
||
Assumptions
The digital world is alive and dynamic, it will not stop making global transformations. Today
companies and startups have to follow a challenging technical pace to achieve good results, to
convince potential customers, keep current customers and overcome competitors. Competition is
tough, two similar products or services can lead to two different outcomes. One may fail while the
other can have a huge success.
In a world of rapid change, the antonym of innovation is disappearance. When developing your ideas
to softwares, how innovative is my product is not more important than how I am developing it,
how efficient is my development process or how my software factory should be built ..
According to a study developers and engineers need at least 60 minutes a week to make technology
watch in order to keep some credibility in the job market. Today the IT community is busy with all
of the information flow, the new technologies and all of these methodologies, philosophies and tools
- coming most of the time with blurring definitions: Agile, DevOps, ITIL, Lean, Cloud, Containers,
Micro Services, QA, Continuous Integration and Deployment and more words are added every day
to our jargon.
Preface
the technical transformation, if you would like to modernize you infrastructure, your development
and operation procedures this book is for you.
The digital world is changing its formula, this book tries to introduce and standardize a formula for
change.
How To Contribute
This work is always in progress. I am an adopter of the lean philosophy so the book will be
continuously improved in function of many criteria, but the most important one is your feedback.
Preface
If you have any suggestions please contact me, you can find me on Twitter or you can use my blog
contact page.
If you want a better tracking of issues and recommendations about this book, I recommend using
this github repository.
This book is not perfect, so you can find typo, punctuation errors or missing words.
https://twitter.com/eon01
http://eon01.com/blog
\
\
^__^
(oo)\_______
(__)\
)\/\
||----w |
||
||
an organization to another but lets be clear that human not technologies are the most important
element in every process.
One of the most important goals of the actual digital chagne is unlocking productivity gains, thats
why technology enabled business transformation is one on the most important trends nowadays.
The world is becoming a cloud of connected services and outsourced management. Succesfull
entrepreneurs learnt that they should focus on one product because time is precious, they adopted
business and development methodologies known for their success, they are more focusing on core
value while sprinting their planning.
Technologies, methodologies and enterprise cultures like DevOps, Cloud Computing, Lean Startup
and Agility are not arbitrarily born but they are the results of several transformations in business
models and an evolution of the manner of thinkings.
IT organizations have commons problems like :
But the real problem is not using the best solutions in the best time, because as you can see, most of
IT organizations have encountred those problems, this is why having a wide view on methodologies,
technologies and the new uprising entreprise cultures is important.
Were not saying that every trending subject should be blindly followed but having enough
knowledge about what things are would help you take its advantages and avoid its drawbacks thats
why your CTO (chief technical officer) should be or should cooperate with another CTO (chief
transformation officer).
\
\
^__^
(oo)\_______
(__)\
)\/\
||----w |
||
||
What Is DevOps
DevOps means a lot of things. People talks about it from many different point of views, different
organization sizes and different approaches. IT engineers could consider it as techniques to simplify
development and operations, managers could look at this as a culture to increase productivity and
recruiters could call it a job.
I am not considering any of those definitions alone but I prefer having a global view on the culture,
the business and the technological aspects of DevOps.
May be the best way to define DevOps to use parallel understandings levels of how things are build.
Consider DevOps as a philosophy that comes with values, principles, methods, practices and tools.
DevOps Values
As you know, when developing softwares business needs developers. To deploy their code and run
it in a production environment, developers need operations team. The fact that those teams works
with different manners has created a waterfall. DevOps urge the dev & ops collaboration. DevOps is
the reaction to the absence or the poorness of the communication between the different stakeholders:
people over process. DevOps create transparency and visibility between dev & ops while setting
up a continuous improvement and feedback.
DevOps Principles
DevOps is about creating a culture that adopts some lean principles like continuous experimentation,
continuous learning and continuous improvement. In DevOps philosophy everything is a chain:
Improvements are the result of learning and learning is a the result of experimentation.
DevOps is about the continuity of processes creating a loop-back (feedback from ops to dev). In
organizations where DevOps is deep-rooted, ops teams consider infrastructure as code and would
consider setting up automation plus an infrastructure self service for developers.
Those principles would not be possible to adopt without some advanced technologies and tool chains.
6
DevOps Methods
DevOps is a reaction to the waterfall of traditional IT, like Agile is to the traditional development
processes. DevOps followed Agile: it is the agility applied to systems, operations and infrastructure.
Furthermore the term agile operations is sometimes used instead of DevOps, thus giving another
definition for DevOps intending to connect Agile development teams to deployments and highlighting the value of fast and recurring delivery.
However Agile development environment are not required to have a DevOps team or to adopt a
DevOps culture: You can do DevOps without without doing Agile.
In general there are two technical teams in an organization: development teams and system administrators/operations teams. Both teams works differently, have different visions on informations
systems and different priorities, developers would not have a real problems to switch to Agile
(Scrum, XP ..etc) but it could be very complicated to system administrators and operation teams. In
reality the latter team is not only working on deployments, they have many other focal areas: storage,
networking, architecture, incidents and production problems. They usually works on stressful
environments where every detail is important and they adopts a work model based or similar to
on build/run iterations with flexible schedule due to the importance of prioritizing in their work.
Sysadmin Build/Run
Kanban is one of most known methodologies, and apart from being one of the most compatible
methodologies for operations and sysadmin teams, may be the majority of sysadmin, if asked,
will choose Kanban among all the other methodologies, but some other teams adopted different
methodologies and others found that a mix of two methodologies is a good fit (scrumban =
scrum+kanban, lean Kanban ..etc).
This diversity of choices depends on several factors like the understanding of DevOps, whether it is
considered as a role/team or not.
https://en.wikipedia.org/wiki/Kanban
In all cases, dont forget that developers and operations teams works differently and that adopting
a methodology is not evident, it should grow your own organization and come from operation
teams to embrace the agility on the development side while keeping a focus on the stability of your
infrastructure and your production software factory.
Some definitions are not detailed in this part but this book will detail them in the next chapters.
DevOps Practices
DevOps practices are the utilized procedures to execute the above ideas. Setting up a DevOps culture
needs giving more time and effort to observations in order to find the best solutions and then act.
DevOps is a process of continuous learning and improvements powered by measurements that can
be done during an iteration. As one of the most important things in setting up a DevOps culture
is communication between dev and ops teams, feedback from ops to dev (and vice versa) is an
important practice. We will focus more on this in the DevOps Feedback Loop section, but the
following schema shows how an iteration with an infinite loop from code to operations to feedbacks
should be done.
Despite the different definitions that organizations can give to DevOps, Eric Riess definition that
he gave to the Lean Startup or the Running Lean, applies largely to DevOps practices.
Lean methodology is based on the creation of learning cycles to validate ideas and then learning
again by collecting customers feedback and son on.
DevOps Culture incorporate the same principles: A cycle based on learning and ideas, development,
validation (QA), operations (integration, deployment), and finally retrieving technical metrics of the
same developed software running on production environments in order to provide feedback to the
development teams. Those valuable feedback will helpful for developers in order to ameliorate their
products and fit them to business and information system needs.
The DevOps practices are not based on technical tools, though the technical part is not to be
underestimated, the main goal is not the technical choices but improving time-to-market and
adapting technical development challenges to the business.
With new technologies such as the cloud computing, scalability and the infrastructure on demand
(dynamic infrastructure), often ops teams have fewer problems in relation with operating system,
networking and infrastructure incidents which reduces some burden on developers and gives the
equivalent of a self-service infrastructure which gives them more time to focus on the product or
the service of the organization and to collaborate more with dev teams.
While the new emerging technologies and the evolution of software development changes the focus
of ops teams, also this gives the dev teams more visibility on how their products are running at
larger scale and helps them focus on ameliorating the development process.
DevOps Tools
Let me say it again: DevOps is a culture, a philosophy .. but the rise of DevOps and the emergence
of its culture was accompanied by a considerable number of tools. Some of them are old tools that
have been modernized and many others are recent or very recent.
Most of the the tools used in DevOps environments similar to what a sysadmin and ops teams use
but with more focus on automation and collaboration between dev and ops.
DevOps teams use both developers and system engineers softwares and this is a list of the type of
tools they use. Two examples are provided for each type.
10
A Cross-Functional Team
A cross-functional team is a group of people with different functional expertise (marketing,
operations, development, QA, account managers ..etc) working for the same goals and projects.
A group of individuals of various backgrounds and expertises are assembled to collaborate in better
manners and solve problems faster.
As said in Wikipedia: The growth of self-directed cross-functional teams has influenced decisionmaking processes and organizational structures. Although management theory likes to propound
that every type of organizational structure needs to make strategic, tactical, and operational
decisions, new procedures have started to emerge that work best with teams.
In DevOps context, the dev and ops teams should not live in separate silos. Each team should provide
support and advices in order to take advantage of the skills of everyone.
According to some management studies, like Peter Druckers on management by objectives, crossfunctional teams are less goal dominated and less unidirectional which stimulates the productivity
and the capability of dealing with fuzzy logic.
11
12
The Smiley Board is also called the Niko-niko Calendar (or Smiley Calendar). It is a Japanese creation
where each member shall put a smiley on his own schedule at the end of the day, before leaving the
office. This gives a view about the well-being and motivation of each member of the project.
Playing Games: Game playing is a good way to create a good communication behavior. A good
example is the Kanban simulation game simulates variable work flow for a SaaS company
The getKanban Board Game is a physical game designed to teach the concepts and mechanics
of Kanban for software development in a class or workshop setting.
Hackathons: A hackathon, hackfest, codefest or hackday is an event in which individuals
involved in software or hardware development, design, UX, project management, collaborate
intensively on software/hardware projects. Hackathons tend to have a specific focus on a
technology, a theme or a project but some hackathons are open and participants have the full
freedom. Hackathons are a great way to build communications and allow people from the
same organization to work together and have the same goal. Internal Hackathons are also a
way that some companies like Netflix, Facebook, Google, Microsoft, Hewlett Packard organize
to promote new product innovation by the engineering staff. For example, Facebooks Like
button was conceived during a hackathon.
Open & shared spaces
Open spaces done right are a key to valuable communications and collaboration.
Chat Rooms: Internal chat applications are widely used in many organizations, generally chat
rooms are specific to a team or a project. Adding chatbots in tools like Hipchat, Slack or
any of their alternatives, helps teams to communicate on several recurring events and being
transparent about:
Deployments
Incidents
Builds
Developers commit to the enterprise git repository
In my company I have even set up bots to post daily motivational quotes, we have also some chat
rooms where we talk about non-work related stuff.
Team building: Or helping a team to make it more efficient in terms of operability, more
cohesive, consistent in its results and competent. This type of accompaniment is particularly
relevant when the professional situation is internally complex during a process of reorganization or profound change in the business, or when the situation is externally complex during
a competitive pressure or a changing market. It helps the team to co-build the solution and
develop their collective intelligence and autonomy.
Outlets, group outing, Friday drinks, team building
http://getkanban.com/
13
Customer-Oriented Culture
Product-centric culture will not work in most cases, especially if you are a startup with an MVP or
even more and trying to be competitive in the market. No one know how a product should be better
than the customer himself.
To build a customer-oriented culture:
- You should not build the best product but create the best solution for your customer. - Stop worrying
about creating new products or features and instead of that search for your customers new needs
to fill. - Hire people who fit and reward people having deep insights into customers instead of
rewarding new features or product development. - Share your customers needs explicitly with your
developers and operation engineers. Being transparent about business needs and customers needs
is the first step to create a customer-oriented culture.
Actually, being focused on customers is the best way to align teams towards the same valuable goals
without creating an inter-department war. The DevOps feedback loop is also a good way to keep
your systems stable and scalable in the same time, customers need this: stability and scalability.
14
Infrastructure As Code
Infrastructure management and provisioning is moving to the next big thing: Infrastructure As Code.
Infrastructure as Code (IaC) is the usage of definition and configuration files to create, start, stop,
delete, terminate and restart virtual or bare-metal machines. When mastering IaC organizations
can reduce costs and time of infrastructure management in order to focus more on the product
development.
With the rise of DevOps movement the fact of enabling the Continuous Configuration Automation
approach is becoming a key step in the life cycle of a product.
I published a post on medium where I explain how Infrastructure As Code can work using a
configuration management tool.
Routine Automation
The DevOps philosophy could be described in different manners, but I saw once on Twitter a
good point of view about defining DevOps from an automation perspective: Using Things You Can
Program, and Programing the Things You Use.
Automation in the DevOps philosophy is about making faster tasks in order to interface things and
create automated pipelines. Almost everthing could be done manually, but in order to focus on
product development and to create a continuous pipelines (continuous integration, delivery, testing,
deployment ..etc) and feedback loops, everything starts with automation:
Automate infrastructure
Automate integration
Automate delivery
Automate feedbacks
Automate scalability
Automate bugs hunting
..etc
Self-Service Configuration
Using cloud technologies with configuration management software allows automated provisioning
of infrastructure and services. Generally the operation engineers after listening to developers need
for product development, install and configure software on production-like servers. Using tools like
https://medium.com/@eon01/automating-aws-infrastructure-using-saltstack-2b40aeadc7a9
https://twitter.com/U_tad/status/517603911570829312
15
Chef, Puppet, Ansible or SaltStack, cloud infrastructure like AWS and Digital Ocean, versioning
systems like Github or Bitbucket, containers technologies like Docker, continuous integration and
deployment servers like Jenkins or Rundeck.
You system configuration should be always into a source control service/servers
Developers should be able to create systems with production-like configurations and data.
Developers should have access to continuous integration tasks to build softwares and test
artifacts in a short period: I prefer working with git hooks, where an automatic build is
launched right when a developer push a change to development branch.
In a stage of maturity, Developers could be able to deploy a change to production: This can
be complex to achieve, in some cases it is preferred to keep operation engineers deploy to
production.
Automated Builds
With the increasing number of Jenkins plugin, automating builds is becoming easier. An example
For web applications is using automated build tools like Ant with package managers like npm and
dependencies managers like php composer.
The main types of automated builds are:
On-demand automated builds where the user run a script to launch the build if it is needed:
This is not really fully automated and it is used in the cases where scheduled and triggered
builds are complex or useless.
Scheduled automated builds like it is the case with the continuous integration servers (such
as Jenkins) running nightly builds
Triggered automated builds where builds in a continuous integration server are launched just
after commit to a git repository.
Continuous Integration
Continuous integration use automated build to create a process where the integration server build
a project if any changes were made or periodically. The process could also include automated tests
and automated delivery.
Continuous Delivery
Continuous delivery is a use both the continuous integration and automated builds to deliver
software to other teams as fast as possible, ideally after a code change. The product is then delivered
in an artifact server or at least a FTP server. As an example, QA teams cloud access to the last
delivery to do their tests. If the transition from the test phase to the production deployment phase
is automatic, we call this continuous deployment. The big difference between continuous is the
automated deployment.
16
17
Time-to-market (TTM) is the length of time it takes from the conception stage to the product being
deployed and running in production servers. TTM is important in all industries where products are
outmoded quickly as it happens in organization working on web applications, SaaS or PaaS products.
In order to know the existent and improve it, measuring the time-to-market is a good practice, one
of the simplest approaches to measure it is counting days from the conception of a feature to the the
deployment of the stable release containing the feature to the production.
Agile methodologies and DevOps culture advocates working in developments sprint, while routine
tasks are automated, integration and tests are continuous, a sprint may take from one to two weeks
and so the time-to-market.
evaluation
diagnostic
communication
information
motivation
continuous progress
18
System Thinking
System thinking highlights in the first place the performance of the entire system so that no more
departmental goals will be considered as more important as the global goals. The focus is on all
business value streams that are enabled by IT.
19
This way is about creating a feedback loop in order to achieve improvements while amplifying
the loops and this helps understanding customers needs and responding to all the the internal needs
(both developers and system administrators ..etc). Amplifying the feedback loop is a way to increase
the global degradation caused by local changes. Some local changes are just optimizations intended
to achieve an individual or a local goal and putting the amplified feedback in work will never pass
a defect to downstream work centers.
Culture Of Continual Experimentation And Learning
This way is about continuous experimentation, taking risks and continuous learning. The repetition
in this way is the prerequisite to mastery and the experimentation is a path towards improvements
which is daily work. Feedback could be done in a shorter time.