SlideShare a Scribd company logo
Does Your Configuration Code
Smell?
Tushar Sharma
“Smells”
Code Smell
…certain structures in the code
that suggest (sometimes they
scream for) the possibility of
refactoring.
“Smells”
Design Smells
“Design smells are certain
structures in the design that
indicate violation of fundamental
design principles and negatively
impact design quality.”
“Smells”
Configuration Smells
“Infrastructure as Code” (IaC)
Puppet example
package { 'apache2':
require => Exec['apt-update'],
ensure => installed,
}
service { 'apache2':
ensure => running,
}
user { 'tushar':
ensure => present,
uid => '1000',
gid => '1000',
shell => '/bin/bash',
home => '/home/tushar'
}
Configuration management tools:
Ansible, Chef, CFEngine, Puppet
Software System
IaC and Traditional SE
Production code
Infrastructure,
configuration
code, tools and
services
Apply
traditional
software
engineering
practices
Configuration smells
“Configuration smells are the characteristics of a
configuration program or script that violate the
recommended best practices and potentially
affect the program’s quality in a negative way.”
Implementation configuration smells
Implementation configuration smells
import 'classes/*'
# TODO: fix deprecated statement
class app-studio (String $version = ‘latest')
{
$primary_config_file = 'config'
$source_config = 'config.source'
if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version ==
‘4.9’{
case $::operatingsystem {
'debian': {
apt::source { 'packages.dotdeb.org-repo.app':
location => 'http://repo.app.com/dotdeb/',
release => $::lsbdistcodename,
repos => 'all',
include_src => true
include_src => true
}
}
Deprecated Statement Usage
Implementation configuration smells
import 'classes/*'
# TODO: fix deprecated statement
class app-studio (String $version = ‘latest')
{
$primary_config_file = 'config'
$source_config = 'config.source'
if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version ==
‘4.9’{
case $::operatingsystem {
'debian': {
apt::source { 'packages.dotdeb.org-repo.app':
location => 'http://repo.app.com/dotdeb/',
release => $::lsbdistcodename,
repos => 'all',
include_src => true
include_src => true
}
}
Incomplete Task
Implementation configuration smells
import 'classes/*'
# TODO: fix deprecated statement
class app-studio (String $version = ‘latest')
{
$primary_config_file = 'config'
$source_config = 'config.source'
if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version ==
‘4.9’{
case $::operatingsystem {
'debian': {
apt::source { 'packages.dotdeb.org-repo.app':
location => 'http://repo.app.com/dotdeb/',
release => $::lsbdistcodename,
repos => 'all',
include_src => true
include_src => true
}
}
Long Statement
Complex Expression
Implementation configuration smells
import 'classes/*'
# TODO: fix deprecated statement
class app-studio (String $version = ‘latest')
{
$primary_config_file = 'config'
$source_config = 'config.source'
if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version ==
‘4.9’{
case $::operatingsystem {
'debian': {
apt::source { 'packages.dotdeb.org-repo.app':
location => 'http://repo.app.com/dotdeb/',
release => $::lsbdistcodename,
repos => 'all',
include_src => true
include_src => true
}
}
Missing Default Case
Implementation configuration smells
import 'classes/*'
# TODO: fix deprecated statement
class app-studio (String $version = ‘latest')
{
$primary_config_file = 'config'
$source_config = 'config.source'
if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version ==
‘4.9’{
case $::operatingsystem {
'debian': {
apt::source { 'packages.dotdeb.org-repo.app':
location => 'http://repo.app.com/dotdeb/',
release => $::lsbdistcodename,
repos => 'all',
include_src => true
include_src => true
}
}
Duplicate Entity
Implementation configuration smells
elsif $version in ['33', '3.3'] {
}
if $::kernelversion =~ /^(2.2)/ {
$appversion = '3.5'
} elsif $::kernelversion =~ /^(2.1)/ {
exec {"download_app_studio":
command => "wget $url",
timeout => 0,
}
}
$version = '3.4' ? {undef => $primary_config_file, default => $source_config}
file { "/root/.app":
mode => '644',
ensure => present
}
}
Missing Conditional
Implementation configuration smells
elsif $version in ['33', '3.3'] {
}
if $::kernelversion =~ /^(2.2)/ {
$appversion = '3.5'
} elsif $::kernelversion =~ /^(2.1)/ {
exec {"download_app_studio":
command => "wget $url",
timeout => 0,
}
}
$version = '3.4' ? {undef => $primary_config_file, default => $source_config}
file { "/root/.app":
mode => '644',
ensure => present
}
}
Improper Quote Usage
Implementation configuration smells
elsif $version in ['33', '3.3'] {
}
if $::kernelversion =~ /^(2.2)/ {
$appversion = '3.5'
} elsif $::kernelversion =~ /^(2.1)/ {
exec {"download_app_studio":
command => "wget $url",
timeout => 0,
}
}
$version = '3.4' ? {undef => $primary_config_file, default => $source_config}
file { "/root/.app":
mode => '644',
ensure => present
}
}
Unguarded Variable
Implementation configuration smells
elsif $version in ['33', '3.3'] {
}
if $::kernelversion =~ /^(2.2)/ {
$appversion = '3.5'
} elsif $::kernelversion =~ /^(2.1)/ {
exec {"download_app_studio":
command => "wget $url",
timeout => 0,
}
}
$version = '3.4' ? {undef => $primary_config_file, default => $source_config}
file { "/root/.app":
mode => '644',
ensure => present
}
}
Improper Alignment
Implementation configuration smells
elsif $version in ['33', '3.3'] {
}
if $::kernelversion =~ /^(2.2)/ {
$appversion = '3.5'
} elsif $::kernelversion =~ /^(2.1)/ {
exec {"download_app_studio":
command => "wget $url",
timeout => 0,
}
}
$version = '3.4' ? {undef => $primary_config_file, default => $source_config}
file { "/root/.app":
mode => '644',
ensure => present
}
}
Invalid Property Value
Implementation configuration smells
elsif $version in ['33', '3.3'] {
}
if $::kernelversion =~ /^(2.2)/ {
$appversion = '3.5'
} elsif $::kernelversion =~ /^(2.1)/ {
exec {"download_app_studio":
command => "wget $url",
timeout => 0,
}
}
$version = '3.4' ? {undef => $primary_config_file, default => $source_config}
file { "/root/.app":
mode => '644',
ensure => present
}
}
Misplaced Attribute
Design configuration smells
class package::web {
…
}
class package::mail {
…
}
class package::environment {
…
}
class package::user {
…
}
package.pp
class apache {
package { 'apache2':
…
}
service { 'apache2':
…
}
service { 'mysql':
…
}
package { 'php5':
…
}
file { ‘/etc/apache2/ports.conf':
…
}
user { ‘mitchell':
…
}
}
apache.pp
Multifaceted Abstraction
• 

Each abstraction should be designed to specify the properties of a
single piece of software.
class web {
}
init.pp
Unnecessary Abstraction
A class, ‘define’, or module must contain declarations or
statements specifying the properties of a desired system.
class web {
exec { ‘hadoop-yarn’:
…
}
exec { ‘apache-util-set’:
…
}
exec { ‘smail-invoke’:
…
}
exec { ‘postfix-set’:
…
}
}
init.pp
Imperative Abstraction
An abstraction containing numerous imperative
statements suffers from imperative abstraction smell.
package { 'apache2':
…
}
service { 'apache2':
…
}
service { 'mysql':
…
}
package { 'php5':
…
}
file { ‘/etc/apache2/ports.conf':
…
}
user { ‘mitchell':
…
}
init.pp
Missing Abstraction
A module suffers from the missing abstraction smell when
resources and language elements are declared and used
without encapsulating them in an abstraction.
class apache {
package { 'apache2':
…
}
service { 'apache2':
…
}
file { ‘/etc/apache2/ports.conf':
…
}
…
}
web.pp
class apache {
package { 'apache2':
…
}
service { 'apache2':
…
}
file { ‘/etc/apache2/ports.conf':
…
}
…
}
server.pp
Duplicate Block
A duplicate block of statements more than a threshold
indicates that probably a suitable abstraction definition is
missing.
package { 'apache2':
…
}
service { 'apache2':
…
}
service { 'mysql':
…
}
package { 'php5':
…
}
file { ‘/etc/apache2/ports.conf':
…
}
user { ‘mitchell':
…
}
package { 'apache2':
…
}
service { 'apache2':
…
}
service { 'mysql':
…
}
package { 'php5':
…
}
file { ‘/etc/apache2/ports.conf':
…
}
user { ‘mitchell':
…
}
package { 'apache2':
…
}
service { 'apache2':
…
}
service { 'mysql':
…
}
package { 'php5':
…
}
file { ‘/etc/apache2/ports.conf':
…
}
user { ‘mitchell':
…
}
init.pp
Insufficient Modularisation
An abstraction suffers from this smell when it is large or
complex and thus can be modularized further.
Unstructured Module
Each module in a configuration repository must have a
well-defined and consistent module structure.
RepoName
Manifests
Modules
README
…
Apache
Adobe
…
files
lib
manifests
spec
templates
tests
README
…
Dense Structure
This smell arises when a configuration code repository
has excessive and dense dependencies.
Weekend Modularity
This smell arises when a module exhibits high
coupling and low cohesion.
Modularity ratio (A) =
Cohesion(A)
Coupling(A)
Implications of smells
The straw that broke the camel's back
Detecting configuration smells
Implementation configuration smells
• Puppet-lint [1]
• Additional custom rules in Puppeteer
Design configuration smells
• Puppeteer [2] — an open source tool
1. http://puppet-lint.com/
2. https://github.com/tushartushar/Puppeteer
Mining GitHub Repositories
Repositories 4,621
Puppet files 142,662
Class declarations 132,323
Define declarations 39,263
File resources 117,286
Package resources 49,841
Service resources 18,737
Exec declarations 43,468
Lines of code (Puppet only) 8,948,611
http://www.tusharma.in/research/does-your-configuration-code-smell-msr-2016/
Let us summarize
M
E
L
S
U
P
E
E
R
II
P
T
U
I NM Y
I
IA A BN
C
Let us summarize
M
E
L
S
U
P
E
E
R
II
P
T
U
IA NM Y
I
IA A BN
C
Let us summarize
S
M
E
L
S
U
P
E
E
R
L II
P
T
U
IA NM Y
I
IA A BN
C
Let us summarize
S
M
E
L
S
U
P
P
E
E
R
L II
P
T
U
IA NM Y
I
IT A A BN
C
Thank you!!
Courtesy: spikedmath.com
Tushar Sharma
tusharsharma@ieee.org
@Sharma__Tushar

More Related Content

What's hot

Hacking ansible
Hacking ansibleHacking ansible
Hacking ansible
bcoca
 
Troubleshooting Puppet
Troubleshooting PuppetTroubleshooting Puppet
Troubleshooting Puppet
Thomas Howard Uphill
 
Symfony2 Service Container: Inject me, my friend
Symfony2 Service Container: Inject me, my friendSymfony2 Service Container: Inject me, my friend
Symfony2 Service Container: Inject me, my friendKirill Chebunin
 
Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6
Workhorse Computing
 
Php version 5
Php version 5Php version 5
Php version 5
Mar Rubio Rubio
 
With a Mighty Hammer
With a Mighty HammerWith a Mighty Hammer
With a Mighty Hammer
Ben Scofield
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统yiditushe
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
Alessandro Franceschi
 
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suite
Bram Vogelaar
 
Refactor Dance - Puppet Labs 'Best Practices'
Refactor Dance - Puppet Labs 'Best Practices'Refactor Dance - Puppet Labs 'Best Practices'
Refactor Dance - Puppet Labs 'Best Practices'
Gary Larizza
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0
bcoca
 
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
Puppet
 
Symfony Cache Component: speed up your application with a new layer of cache
Symfony Cache Component: speed up your application with a new layer of cacheSymfony Cache Component: speed up your application with a new layer of cache
Symfony Cache Component: speed up your application with a new layer of cache
Simone D'Amico
 
Lesson 9. The Apache Web Server
Lesson 9. The Apache Web ServerLesson 9. The Apache Web Server
Lesson 9. The Apache Web Serverwebhostingguy
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
Fernando Hamasaki de Amorim
 
Memory Manglement in Raku
Memory Manglement in RakuMemory Manglement in Raku
Memory Manglement in Raku
Workhorse Computing
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
Workhorse Computing
 
8 Minutes On Rack
8 Minutes On Rack8 Minutes On Rack
8 Minutes On Rack
danwrong
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr PasichPiotr Pasich
 

What's hot (20)

Hacking ansible
Hacking ansibleHacking ansible
Hacking ansible
 
Troubleshooting Puppet
Troubleshooting PuppetTroubleshooting Puppet
Troubleshooting Puppet
 
Symfony2 Service Container: Inject me, my friend
Symfony2 Service Container: Inject me, my friendSymfony2 Service Container: Inject me, my friend
Symfony2 Service Container: Inject me, my friend
 
Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6
 
Php version 5
Php version 5Php version 5
Php version 5
 
With a Mighty Hammer
With a Mighty HammerWith a Mighty Hammer
With a Mighty Hammer
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
 
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suite
 
Refactor Dance - Puppet Labs 'Best Practices'
Refactor Dance - Puppet Labs 'Best Practices'Refactor Dance - Puppet Labs 'Best Practices'
Refactor Dance - Puppet Labs 'Best Practices'
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0
 
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
 
Symfony Cache Component: speed up your application with a new layer of cache
Symfony Cache Component: speed up your application with a new layer of cacheSymfony Cache Component: speed up your application with a new layer of cache
Symfony Cache Component: speed up your application with a new layer of cache
 
Lesson 9. The Apache Web Server
Lesson 9. The Apache Web ServerLesson 9. The Apache Web Server
Lesson 9. The Apache Web Server
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
 
Memory Manglement in Raku
Memory Manglement in RakuMemory Manglement in Raku
Memory Manglement in Raku
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
 
8 Minutes On Rack
8 Minutes On Rack8 Minutes On Rack
8 Minutes On Rack
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr Pasich
 

Viewers also liked

A Catalogue of Code Smell Visualizations
A Catalogue of Code Smell VisualizationsA Catalogue of Code Smell Visualizations
A Catalogue of Code Smell Visualizations
Chris Parnin
 
When and Why Your Code Starts to Smell Bad
When and Why Your Code Starts to Smell BadWhen and Why Your Code Starts to Smell Bad
When and Why Your Code Starts to Smell Bad
Carlos Eduardo
 
Do Code Smell Hamper Novice Programmers?
Do Code Smell Hamper Novice Programmers?Do Code Smell Hamper Novice Programmers?
Do Code Smell Hamper Novice Programmers?
Felienne Hermans
 
Bad Code Smells
Bad Code SmellsBad Code Smells
Bad Code Smells
kim.mens
 
Code Smell Research: History and Future Directions
Code Smell Research: History and Future DirectionsCode Smell Research: History and Future Directions
Code Smell Research: History and Future DirectionsNikolaos Tsantalis
 
A Textual-based Technique for Smell Detection
A Textual-based Technique for Smell DetectionA Textual-based Technique for Smell Detection
A Textual-based Technique for Smell Detection
Fabio Palomba
 
PhD Symposium 2014
PhD Symposium 2014PhD Symposium 2014
PhD Symposium 2014
Fabio Palomba
 
Code Smell, Software Engineering
Code Smell, Software EngineeringCode Smell, Software Engineering
Code Smell, Software Engineering
Anshul Vinayak
 
Detecting Bad Smells in Source Code using Change History Information
Detecting Bad Smells in Source Code using Change History InformationDetecting Bad Smells in Source Code using Change History Information
Detecting Bad Smells in Source Code using Change History Information
Fabio Palomba
 
Code smells
Code smellsCode smells
App Prototype Presentation
App Prototype PresentationApp Prototype Presentation
App Prototype Presentation
Sonia Sarao
 
How to Develop VR Applications and Publish from Phone to Dome - Nils Andersson
How to Develop VR Applications and Publish from Phone to Dome - Nils AnderssonHow to Develop VR Applications and Publish from Phone to Dome - Nils Andersson
How to Develop VR Applications and Publish from Phone to Dome - Nils Andersson
WithTheBest
 
Code Smells and Its type (With Example)
Code Smells and Its type (With Example)Code Smells and Its type (With Example)
Code Smells and Its type (With Example)
Anshul Vinayak
 
Ruby用の静的コード解析ツールざくっと紹介 by SideCI #omotesandorb
Ruby用の静的コード解析ツールざくっと紹介 by SideCI #omotesandorbRuby用の静的コード解析ツールざくっと紹介 by SideCI #omotesandorb
Ruby用の静的コード解析ツールざくっと紹介 by SideCI #omotesandorb
Koichiro Sumi
 
Denial Of Service Attack
Denial Of Service AttackDenial Of Service Attack
Denial Of Service Attack
Vishnuvardhan Reddy
 

Viewers also liked (16)

A Catalogue of Code Smell Visualizations
A Catalogue of Code Smell VisualizationsA Catalogue of Code Smell Visualizations
A Catalogue of Code Smell Visualizations
 
When and Why Your Code Starts to Smell Bad
When and Why Your Code Starts to Smell BadWhen and Why Your Code Starts to Smell Bad
When and Why Your Code Starts to Smell Bad
 
Do Code Smell Hamper Novice Programmers?
Do Code Smell Hamper Novice Programmers?Do Code Smell Hamper Novice Programmers?
Do Code Smell Hamper Novice Programmers?
 
Bad Code Smells
Bad Code SmellsBad Code Smells
Bad Code Smells
 
Code Smell Research: History and Future Directions
Code Smell Research: History and Future DirectionsCode Smell Research: History and Future Directions
Code Smell Research: History and Future Directions
 
A Textual-based Technique for Smell Detection
A Textual-based Technique for Smell DetectionA Textual-based Technique for Smell Detection
A Textual-based Technique for Smell Detection
 
PhD Symposium 2014
PhD Symposium 2014PhD Symposium 2014
PhD Symposium 2014
 
Code Smell, Software Engineering
Code Smell, Software EngineeringCode Smell, Software Engineering
Code Smell, Software Engineering
 
Detecting Bad Smells in Source Code using Change History Information
Detecting Bad Smells in Source Code using Change History InformationDetecting Bad Smells in Source Code using Change History Information
Detecting Bad Smells in Source Code using Change History Information
 
Code smells
Code smellsCode smells
Code smells
 
App Prototype Presentation
App Prototype PresentationApp Prototype Presentation
App Prototype Presentation
 
How to Develop VR Applications and Publish from Phone to Dome - Nils Andersson
How to Develop VR Applications and Publish from Phone to Dome - Nils AnderssonHow to Develop VR Applications and Publish from Phone to Dome - Nils Andersson
How to Develop VR Applications and Publish from Phone to Dome - Nils Andersson
 
Code Smells and Its type (With Example)
Code Smells and Its type (With Example)Code Smells and Its type (With Example)
Code Smells and Its type (With Example)
 
Ruby用の静的コード解析ツールざくっと紹介 by SideCI #omotesandorb
Ruby用の静的コード解析ツールざくっと紹介 by SideCI #omotesandorbRuby用の静的コード解析ツールざくっと紹介 by SideCI #omotesandorb
Ruby用の静的コード解析ツールざくっと紹介 by SideCI #omotesandorb
 
API Over HTTP
API Over HTTPAPI Over HTTP
API Over HTTP
 
Denial Of Service Attack
Denial Of Service AttackDenial Of Service Attack
Denial Of Service Attack
 

Similar to Does your configuration code smell?

Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
Carlos Sanchez
 
Tutorial Puppet
Tutorial PuppetTutorial Puppet
Tutorial Puppet
Daniel Sobral
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
Carlos Sanchez
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
Lindsay Holmwood
 
Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014
Puppet
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
Alessandro Franceschi
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
SmartLogic
 
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
Puppet
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Carlos Sanchez
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
Carlos Sanchez
 
PM : code faster
PM : code fasterPM : code faster
PM : code fasterPHPPRO
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
Alan Pinstein
 
PuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetPuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with Puppet
OlinData
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slidesharetomcopeland
 
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersDocker & CoreOS at Utah Gophers
Docker & CoreOS at Utah Gophers
Josh Braegger
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
Achieve Internet
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
Puppet
 
Augeas @RMLL 2012
Augeas @RMLL 2012Augeas @RMLL 2012
Augeas @RMLL 2012
Raphaël PINSON
 

Similar to Does your configuration code smell? (20)

Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
 
Tutorial Puppet
Tutorial PuppetTutorial Puppet
Tutorial Puppet
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
 
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
EC2
EC2EC2
EC2
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
 
PM : code faster
PM : code fasterPM : code faster
PM : code faster
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
PuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetPuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with Puppet
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersDocker & CoreOS at Utah Gophers
Docker & CoreOS at Utah Gophers
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
 
Augeas @RMLL 2012
Augeas @RMLL 2012Augeas @RMLL 2012
Augeas @RMLL 2012
 

More from Tushar Sharma

House of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# RepositoriesHouse of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# Repositories
Tushar Sharma
 
The tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiencesThe tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiences
Tushar Sharma
 
Designite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# RepositoriesDesignite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# Repositories
Tushar Sharma
 
Writing Maintainable Code
Writing Maintainable Code Writing Maintainable Code
Writing Maintainable Code
Tushar Sharma
 
FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?
Tushar Sharma
 
Achieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design SmellsAchieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design Smells
Tushar Sharma
 
Designite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment ToolDesignite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment Tool
Tushar Sharma
 
Does Your Configuration Code Smell?
Does Your Configuration Code Smell?Does Your Configuration Code Smell?
Does Your Configuration Code Smell?
Tushar Sharma
 
Technical debt - The elephant in the room
Technical debt - The elephant in the roomTechnical debt - The elephant in the room
Technical debt - The elephant in the room
Tushar Sharma
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metrics
Tushar Sharma
 
Pragmatic Technical Debt Management
Pragmatic Technical Debt ManagementPragmatic Technical Debt Management
Pragmatic Technical Debt Management
Tushar Sharma
 
Tools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical DebtTools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical Debt
Tushar Sharma
 
Infographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt ManagementInfographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt Management
Tushar Sharma
 
Applying Design Principles in Practice
Applying Design Principles in PracticeApplying Design Principles in Practice
Applying Design Principles in Practice
Tushar Sharma
 
Why care about technical debt?
Why care about technical debt?Why care about technical debt?
Why care about technical debt?
Tushar Sharma
 
Does your design smell?
Does your design smell?Does your design smell?
Does your design smell?
Tushar Sharma
 
A Checklist for Design Reviews
A Checklist for Design ReviewsA Checklist for Design Reviews
A Checklist for Design Reviews
Tushar Sharma
 
Tools for refactoring
Tools for refactoringTools for refactoring
Tools for refactoring
Tushar Sharma
 
Towards a Principle-based Classification of Structural Design Smells
Towards a Principle-based Classification of Structural Design SmellsTowards a Principle-based Classification of Structural Design Smells
Towards a Principle-based Classification of Structural Design Smells
Tushar Sharma
 
PHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
PHAME: Principles of Hierarchy Abstraction Modularization and EncapsulationPHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
PHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
Tushar Sharma
 

More from Tushar Sharma (20)

House of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# RepositoriesHouse of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# Repositories
 
The tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiencesThe tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiences
 
Designite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# RepositoriesDesignite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# Repositories
 
Writing Maintainable Code
Writing Maintainable Code Writing Maintainable Code
Writing Maintainable Code
 
FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?
 
Achieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design SmellsAchieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design Smells
 
Designite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment ToolDesignite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment Tool
 
Does Your Configuration Code Smell?
Does Your Configuration Code Smell?Does Your Configuration Code Smell?
Does Your Configuration Code Smell?
 
Technical debt - The elephant in the room
Technical debt - The elephant in the roomTechnical debt - The elephant in the room
Technical debt - The elephant in the room
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metrics
 
Pragmatic Technical Debt Management
Pragmatic Technical Debt ManagementPragmatic Technical Debt Management
Pragmatic Technical Debt Management
 
Tools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical DebtTools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical Debt
 
Infographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt ManagementInfographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt Management
 
Applying Design Principles in Practice
Applying Design Principles in PracticeApplying Design Principles in Practice
Applying Design Principles in Practice
 
Why care about technical debt?
Why care about technical debt?Why care about technical debt?
Why care about technical debt?
 
Does your design smell?
Does your design smell?Does your design smell?
Does your design smell?
 
A Checklist for Design Reviews
A Checklist for Design ReviewsA Checklist for Design Reviews
A Checklist for Design Reviews
 
Tools for refactoring
Tools for refactoringTools for refactoring
Tools for refactoring
 
Towards a Principle-based Classification of Structural Design Smells
Towards a Principle-based Classification of Structural Design SmellsTowards a Principle-based Classification of Structural Design Smells
Towards a Principle-based Classification of Structural Design Smells
 
PHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
PHAME: Principles of Hierarchy Abstraction Modularization and EncapsulationPHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
PHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
 

Recently uploaded

Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
vrstrong314
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
abdulrafaychaudhry
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 

Recently uploaded (20)

Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 

Does your configuration code smell?

  • 1. Does Your Configuration Code Smell? Tushar Sharma
  • 2. “Smells” Code Smell …certain structures in the code that suggest (sometimes they scream for) the possibility of refactoring.
  • 3.
  • 4. “Smells” Design Smells “Design smells are certain structures in the design that indicate violation of fundamental design principles and negatively impact design quality.”
  • 7. Puppet example package { 'apache2': require => Exec['apt-update'], ensure => installed, } service { 'apache2': ensure => running, } user { 'tushar': ensure => present, uid => '1000', gid => '1000', shell => '/bin/bash', home => '/home/tushar' } Configuration management tools: Ansible, Chef, CFEngine, Puppet
  • 8. Software System IaC and Traditional SE Production code Infrastructure, configuration code, tools and services Apply traditional software engineering practices
  • 9. Configuration smells “Configuration smells are the characteristics of a configuration program or script that violate the recommended best practices and potentially affect the program’s quality in a negative way.”
  • 11. Implementation configuration smells import 'classes/*' # TODO: fix deprecated statement class app-studio (String $version = ‘latest') { $primary_config_file = 'config' $source_config = 'config.source' if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version == ‘4.9’{ case $::operatingsystem { 'debian': { apt::source { 'packages.dotdeb.org-repo.app': location => 'http://repo.app.com/dotdeb/', release => $::lsbdistcodename, repos => 'all', include_src => true include_src => true } } Deprecated Statement Usage
  • 12. Implementation configuration smells import 'classes/*' # TODO: fix deprecated statement class app-studio (String $version = ‘latest') { $primary_config_file = 'config' $source_config = 'config.source' if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version == ‘4.9’{ case $::operatingsystem { 'debian': { apt::source { 'packages.dotdeb.org-repo.app': location => 'http://repo.app.com/dotdeb/', release => $::lsbdistcodename, repos => 'all', include_src => true include_src => true } } Incomplete Task
  • 13. Implementation configuration smells import 'classes/*' # TODO: fix deprecated statement class app-studio (String $version = ‘latest') { $primary_config_file = 'config' $source_config = 'config.source' if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version == ‘4.9’{ case $::operatingsystem { 'debian': { apt::source { 'packages.dotdeb.org-repo.app': location => 'http://repo.app.com/dotdeb/', release => $::lsbdistcodename, repos => 'all', include_src => true include_src => true } } Long Statement Complex Expression
  • 14. Implementation configuration smells import 'classes/*' # TODO: fix deprecated statement class app-studio (String $version = ‘latest') { $primary_config_file = 'config' $source_config = 'config.source' if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version == ‘4.9’{ case $::operatingsystem { 'debian': { apt::source { 'packages.dotdeb.org-repo.app': location => 'http://repo.app.com/dotdeb/', release => $::lsbdistcodename, repos => 'all', include_src => true include_src => true } } Missing Default Case
  • 15. Implementation configuration smells import 'classes/*' # TODO: fix deprecated statement class app-studio (String $version = ‘latest') { $primary_config_file = 'config' $source_config = 'config.source' if $version == ’44’ or $version == ‘4.2’ or $version != ‘4.5’ or $version == ‘4.9’{ case $::operatingsystem { 'debian': { apt::source { 'packages.dotdeb.org-repo.app': location => 'http://repo.app.com/dotdeb/', release => $::lsbdistcodename, repos => 'all', include_src => true include_src => true } } Duplicate Entity
  • 16. Implementation configuration smells elsif $version in ['33', '3.3'] { } if $::kernelversion =~ /^(2.2)/ { $appversion = '3.5' } elsif $::kernelversion =~ /^(2.1)/ { exec {"download_app_studio": command => "wget $url", timeout => 0, } } $version = '3.4' ? {undef => $primary_config_file, default => $source_config} file { "/root/.app": mode => '644', ensure => present } } Missing Conditional
  • 17. Implementation configuration smells elsif $version in ['33', '3.3'] { } if $::kernelversion =~ /^(2.2)/ { $appversion = '3.5' } elsif $::kernelversion =~ /^(2.1)/ { exec {"download_app_studio": command => "wget $url", timeout => 0, } } $version = '3.4' ? {undef => $primary_config_file, default => $source_config} file { "/root/.app": mode => '644', ensure => present } } Improper Quote Usage
  • 18. Implementation configuration smells elsif $version in ['33', '3.3'] { } if $::kernelversion =~ /^(2.2)/ { $appversion = '3.5' } elsif $::kernelversion =~ /^(2.1)/ { exec {"download_app_studio": command => "wget $url", timeout => 0, } } $version = '3.4' ? {undef => $primary_config_file, default => $source_config} file { "/root/.app": mode => '644', ensure => present } } Unguarded Variable
  • 19. Implementation configuration smells elsif $version in ['33', '3.3'] { } if $::kernelversion =~ /^(2.2)/ { $appversion = '3.5' } elsif $::kernelversion =~ /^(2.1)/ { exec {"download_app_studio": command => "wget $url", timeout => 0, } } $version = '3.4' ? {undef => $primary_config_file, default => $source_config} file { "/root/.app": mode => '644', ensure => present } } Improper Alignment
  • 20. Implementation configuration smells elsif $version in ['33', '3.3'] { } if $::kernelversion =~ /^(2.2)/ { $appversion = '3.5' } elsif $::kernelversion =~ /^(2.1)/ { exec {"download_app_studio": command => "wget $url", timeout => 0, } } $version = '3.4' ? {undef => $primary_config_file, default => $source_config} file { "/root/.app": mode => '644', ensure => present } } Invalid Property Value
  • 21. Implementation configuration smells elsif $version in ['33', '3.3'] { } if $::kernelversion =~ /^(2.2)/ { $appversion = '3.5' } elsif $::kernelversion =~ /^(2.1)/ { exec {"download_app_studio": command => "wget $url", timeout => 0, } } $version = '3.4' ? {undef => $primary_config_file, default => $source_config} file { "/root/.app": mode => '644', ensure => present } } Misplaced Attribute
  • 23. class package::web { … } class package::mail { … } class package::environment { … } class package::user { … } package.pp
  • 24. class apache { package { 'apache2': … } service { 'apache2': … } service { 'mysql': … } package { 'php5': … } file { ‘/etc/apache2/ports.conf': … } user { ‘mitchell': … } } apache.pp
  • 25. Multifaceted Abstraction • 
 Each abstraction should be designed to specify the properties of a single piece of software.
  • 27. Unnecessary Abstraction A class, ‘define’, or module must contain declarations or statements specifying the properties of a desired system.
  • 28. class web { exec { ‘hadoop-yarn’: … } exec { ‘apache-util-set’: … } exec { ‘smail-invoke’: … } exec { ‘postfix-set’: … } } init.pp
  • 29. Imperative Abstraction An abstraction containing numerous imperative statements suffers from imperative abstraction smell.
  • 30. package { 'apache2': … } service { 'apache2': … } service { 'mysql': … } package { 'php5': … } file { ‘/etc/apache2/ports.conf': … } user { ‘mitchell': … } init.pp
  • 31. Missing Abstraction A module suffers from the missing abstraction smell when resources and language elements are declared and used without encapsulating them in an abstraction.
  • 32. class apache { package { 'apache2': … } service { 'apache2': … } file { ‘/etc/apache2/ports.conf': … } … } web.pp class apache { package { 'apache2': … } service { 'apache2': … } file { ‘/etc/apache2/ports.conf': … } … } server.pp
  • 33. Duplicate Block A duplicate block of statements more than a threshold indicates that probably a suitable abstraction definition is missing.
  • 34. package { 'apache2': … } service { 'apache2': … } service { 'mysql': … } package { 'php5': … } file { ‘/etc/apache2/ports.conf': … } user { ‘mitchell': … } package { 'apache2': … } service { 'apache2': … } service { 'mysql': … } package { 'php5': … } file { ‘/etc/apache2/ports.conf': … } user { ‘mitchell': … } package { 'apache2': … } service { 'apache2': … } service { 'mysql': … } package { 'php5': … } file { ‘/etc/apache2/ports.conf': … } user { ‘mitchell': … } init.pp
  • 35. Insufficient Modularisation An abstraction suffers from this smell when it is large or complex and thus can be modularized further.
  • 36.
  • 37. Unstructured Module Each module in a configuration repository must have a well-defined and consistent module structure. RepoName Manifests Modules README … Apache Adobe … files lib manifests spec templates tests README …
  • 38.
  • 39. Dense Structure This smell arises when a configuration code repository has excessive and dense dependencies.
  • 40.
  • 41. Weekend Modularity This smell arises when a module exhibits high coupling and low cohesion. Modularity ratio (A) = Cohesion(A) Coupling(A)
  • 42. Implications of smells The straw that broke the camel's back
  • 43. Detecting configuration smells Implementation configuration smells • Puppet-lint [1] • Additional custom rules in Puppeteer Design configuration smells • Puppeteer [2] — an open source tool 1. http://puppet-lint.com/ 2. https://github.com/tushartushar/Puppeteer
  • 44. Mining GitHub Repositories Repositories 4,621 Puppet files 142,662 Class declarations 132,323 Define declarations 39,263 File resources 117,286 Package resources 49,841 Service resources 18,737 Exec declarations 43,468 Lines of code (Puppet only) 8,948,611 http://www.tusharma.in/research/does-your-configuration-code-smell-msr-2016/
  • 47. Let us summarize S M E L S U P E E R L II P T U IA NM Y I IA A BN C
  • 48. Let us summarize S M E L S U P P E E R L II P T U IA NM Y I IT A A BN C
  • 49. Thank you!! Courtesy: spikedmath.com Tushar Sharma tusharsharma@ieee.org @Sharma__Tushar