SlideShare uma empresa Scribd logo
1 de 19
Baixar para ler offline
Automatic Kamailio
Deployments with Puppet
Giacomo Vacca
Senior Network Applications Developer
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
“He’s seen more SIP transactions than some SBCs in
the market” (cit.)
- Leads Network Dev Team at Truphone Labs
- Hacking Kamailio, Asterisk, FreeSWITCH for 10+ ys
- Hacking ejabberd, more recently
@giavac
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Truphone
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
labs.truphone.com
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
“You know you’re in trouble when...
you realize you’ve become good at 3-way diffs”
The Problem
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
• Deploy and customize in-place
• Extract variables into included defines file
• A debian package with config per host
No (automatic) documentation!
The Problem – in the past
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
• Open Source configuration management tool
• Defines the final status (‘what’, not ‘how’)
• Idempotent (i.e. safely run multiple times)
puppetlabs.com
The Solution - Puppet
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
• Puppet code is contained in MANIFESTS
• Puppet functionalities are organized in MODULES
• “Compiled” manifests are CATALOGUES
The Solution - Puppet
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Master/Slave vs Standalone
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
# nodes.pp
node ‘k01.domain.com’ {
include ‘kamailio’
}
• As many environments as you want
–Each environment defines a Site
•A Site defines a group of Nodes
– Every host is a Node
Puppet
Environments, Sites, Nodes
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
• Simple manifests
• Independent from data
• Extract data into nodes definition
Puppet
Separate logic from data
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
https://github.com/trulabs/puppet-kamailio
1. Deploy pre-requisites
2. Install packages (deb, rpm)
3. Set configuration files (kamailio.cfg, tls.cfg)
4. Define ‘service’ (“should be running”)
Kamailio with Puppet
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Kamailio with Puppet
The system around Kamailio
Other areas (see 3rd party modules at PuppetForge):
• apt/yum
• TCP keepalives
• Firewall (iptables)
• monit
• nagios
• fail2ban
• logrotate
• sec
• SSL certificates
• Swappiness
» What else? Tell me at the Q&A session.
Useful tools:
Check your modules against Best
Practices with ‘puppet-lint’.
http://puppet-lint.com/
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Video: http://vimeo.com/giavac/akdp
1. Build VM
2. SSH into VM
3. git clone Puppet repo
4. Run Puppet NOOP mode
5. Run Puppet
Build and deploy a new instance
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Summary
Automation is easy
Deployments MUST be automated
Deployments SHOULD be boring
Deployments MAY be fun
Puppet does the job
(Diagram source: http://info.puppetlabs.com/2013-state-of-devops-report.html)
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Q&A
@giavac
labs@truphone.com *
https://labs.truphone.com/about/
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
ADDITIONAL SLIDES
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Kamailio with Puppet
Kamailio module – repo/apt.pp
class kamailio::repo::apt inherits kamailio::repo {
include '::apt'
# Note the 40!
apt::source { 'kamailio40_wheezy':
location => 'http://deb.kamailio.org/kamailio40',
release => 'wheezy',
repos => 'main',
required_packages => 'debian-keyring debian-archive-keyring',
key => '07D5C01D',
key_server => 'http://deb.kamailio.org/kamailiodebkey.gpg',
include_src => true,
}
Apt::Source['kamailio40_wheezy'] -> Package<|tag == 'kamailio'|>
}
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Kamailio with Puppet
Kamailio module – config.pp
• Manages configuration files
• Can install from files or templates
Example: templatize a kamailio.cfg define
<% if with_tls %>#!define WITH_TLS<% end %>

Mais conteúdo relacionado

Mais procurados

How automated cloud infrastructure setups can help with Continuous Delivery
How automated cloud infrastructure setups can help with Continuous DeliveryHow automated cloud infrastructure setups can help with Continuous Delivery
How automated cloud infrastructure setups can help with Continuous Delivery
Edmund Siegfried Haselwanter
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
andymccurdy
 

Mais procurados (20)

Cobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioningCobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioning
 
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
 
One
OneOne
One
 
CoreOS @Codetalks Hamburg
CoreOS @Codetalks HamburgCoreOS @Codetalks Hamburg
CoreOS @Codetalks Hamburg
 
Automating Mendix application deployments with Nix
Automating Mendix application deployments with NixAutomating Mendix application deployments with Nix
Automating Mendix application deployments with Nix
 
NkSIP: The Erlang SIP application server
NkSIP: The Erlang SIP application serverNkSIP: The Erlang SIP application server
NkSIP: The Erlang SIP application server
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
How automated cloud infrastructure setups can help with Continuous Delivery
How automated cloud infrastructure setups can help with Continuous DeliveryHow automated cloud infrastructure setups can help with Continuous Delivery
How automated cloud infrastructure setups can help with Continuous Delivery
 
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
 
IPTABLES Introduction
IPTABLES IntroductionIPTABLES Introduction
IPTABLES Introduction
 
A Universe From Nothing
A Universe From NothingA Universe From Nothing
A Universe From Nothing
 
OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27
 
Salting new ground one man ops from scratch
Salting new ground   one man ops from scratchSalting new ground   one man ops from scratch
Salting new ground one man ops from scratch
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
Infrastructure as Code with Chef / Puppet
Infrastructure as Code with Chef / PuppetInfrastructure as Code with Chef / Puppet
Infrastructure as Code with Chef / Puppet
 
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
 
Fake IT, until you make IT
Fake IT, until you make ITFake IT, until you make IT
Fake IT, until you make IT
 
London HUG 12/4
London HUG 12/4London HUG 12/4
London HUG 12/4
 
Refactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
Refactoring Katello Installer modules - Ewoud Kohl van WijngaardenRefactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
Refactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
 
Webinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and moreWebinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and more
 

Semelhante a Automatic Kamailio Deployments With Puppet

How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)
Jose Hernandez
 
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docxSEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
jeffreye3
 
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docxSEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
edgar6wallace88877
 
How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)
Jose Hernandez
 
Intro To Linux
Intro To LinuxIntro To Linux
Intro To Linux
techlug
 
Nagios 3
Nagios 3Nagios 3
Nagios 3
zmoly
 
Hack.lu 09 ip-morph
Hack.lu 09 ip-morphHack.lu 09 ip-morph
Hack.lu 09 ip-morph
Steph Cliche
 

Semelhante a Automatic Kamailio Deployments With Puppet (20)

Automatic Configuration Management for Kamailio and Asterisk in the era of Pu...
Automatic Configuration Management for Kamailio and Asterisk in the era of Pu...Automatic Configuration Management for Kamailio and Asterisk in the era of Pu...
Automatic Configuration Management for Kamailio and Asterisk in the era of Pu...
 
How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)
 
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docxSEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
 
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docxSEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
 
How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)
 
Deep inside TOMOYO Linux
Deep inside TOMOYO LinuxDeep inside TOMOYO Linux
Deep inside TOMOYO Linux
 
Wissbi osdc pdf
Wissbi osdc pdfWissbi osdc pdf
Wissbi osdc pdf
 
Dealing with pervasive monitoring - Networkshop44
Dealing with pervasive monitoring - Networkshop44Dealing with pervasive monitoring - Networkshop44
Dealing with pervasive monitoring - Networkshop44
 
Scalable Systems Management with Puppet
Scalable Systems Management with PuppetScalable Systems Management with Puppet
Scalable Systems Management with Puppet
 
Scalable systems management with puppet
Scalable systems management with puppetScalable systems management with puppet
Scalable systems management with puppet
 
How We Protected Our Router
How We Protected Our RouterHow We Protected Our Router
How We Protected Our Router
 
Technical note Miro automatic ftp uploads - r 30 sep 16
Technical note   Miro automatic ftp uploads - r 30 sep 16Technical note   Miro automatic ftp uploads - r 30 sep 16
Technical note Miro automatic ftp uploads - r 30 sep 16
 
Intro To Linux
Intro To LinuxIntro To Linux
Intro To Linux
 
Nagios 3
Nagios 3Nagios 3
Nagios 3
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]
 
Gluster Cloud Night in Tokyo 2013 -- Tips for getting started
Gluster Cloud Night in Tokyo 2013 -- Tips for getting startedGluster Cloud Night in Tokyo 2013 -- Tips for getting started
Gluster Cloud Night in Tokyo 2013 -- Tips for getting started
 
Hack.lu 09 ip-morph
Hack.lu 09 ip-morphHack.lu 09 ip-morph
Hack.lu 09 ip-morph
 
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
 
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
 
Launch and Environment Constraints Overview
Launch and Environment Constraints OverviewLaunch and Environment Constraints Overview
Launch and Environment Constraints Overview
 

Mais de Giacomo Vacca

Mais de Giacomo Vacca (12)

STUN protocol
STUN protocolSTUN protocol
STUN protocol
 
Modern VoIP in modern infrastructures
Modern VoIP in modern infrastructuresModern VoIP in modern infrastructures
Modern VoIP in modern infrastructures
 
RIPP Notes
RIPP NotesRIPP Notes
RIPP Notes
 
Modern VoIP in Modern Infrastructures
Modern VoIP in Modern InfrastructuresModern VoIP in Modern Infrastructures
Modern VoIP in Modern Infrastructures
 
An SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsAn SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environments
 
Kamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-testsKamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-tests
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
 
Continuous Integration and Kamailio
Continuous Integration and KamailioContinuous Integration and Kamailio
Continuous Integration and Kamailio
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To Running
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
Top 5 Challenges To Add Web Calls to Truphone VoIP Platform
Top 5 Challenges To Add Web Calls to Truphone VoIP PlatformTop 5 Challenges To Add Web Calls to Truphone VoIP Platform
Top 5 Challenges To Add Web Calls to Truphone VoIP Platform
 

Último

6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 

Automatic Kamailio Deployments With Puppet

  • 1. Automatic Kamailio Deployments with Puppet Giacomo Vacca Senior Network Applications Developer
  • 2. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 “He’s seen more SIP transactions than some SBCs in the market” (cit.) - Leads Network Dev Team at Truphone Labs - Hacking Kamailio, Asterisk, FreeSWITCH for 10+ ys - Hacking ejabberd, more recently @giavac
  • 3. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Truphone
  • 4. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 labs.truphone.com
  • 5. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 “You know you’re in trouble when... you realize you’ve become good at 3-way diffs” The Problem
  • 6. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 • Deploy and customize in-place • Extract variables into included defines file • A debian package with config per host No (automatic) documentation! The Problem – in the past
  • 7. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 • Open Source configuration management tool • Defines the final status (‘what’, not ‘how’) • Idempotent (i.e. safely run multiple times) puppetlabs.com The Solution - Puppet
  • 8. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 • Puppet code is contained in MANIFESTS • Puppet functionalities are organized in MODULES • “Compiled” manifests are CATALOGUES The Solution - Puppet
  • 9. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Master/Slave vs Standalone
  • 10. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 # nodes.pp node ‘k01.domain.com’ { include ‘kamailio’ } • As many environments as you want –Each environment defines a Site •A Site defines a group of Nodes – Every host is a Node Puppet Environments, Sites, Nodes
  • 11. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 • Simple manifests • Independent from data • Extract data into nodes definition Puppet Separate logic from data
  • 12. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 https://github.com/trulabs/puppet-kamailio 1. Deploy pre-requisites 2. Install packages (deb, rpm) 3. Set configuration files (kamailio.cfg, tls.cfg) 4. Define ‘service’ (“should be running”) Kamailio with Puppet
  • 13. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Kamailio with Puppet The system around Kamailio Other areas (see 3rd party modules at PuppetForge): • apt/yum • TCP keepalives • Firewall (iptables) • monit • nagios • fail2ban • logrotate • sec • SSL certificates • Swappiness » What else? Tell me at the Q&A session. Useful tools: Check your modules against Best Practices with ‘puppet-lint’. http://puppet-lint.com/
  • 14. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Video: http://vimeo.com/giavac/akdp 1. Build VM 2. SSH into VM 3. git clone Puppet repo 4. Run Puppet NOOP mode 5. Run Puppet Build and deploy a new instance
  • 15. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Summary Automation is easy Deployments MUST be automated Deployments SHOULD be boring Deployments MAY be fun Puppet does the job (Diagram source: http://info.puppetlabs.com/2013-state-of-devops-report.html)
  • 16. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Q&A @giavac labs@truphone.com * https://labs.truphone.com/about/
  • 17. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 ADDITIONAL SLIDES
  • 18. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Kamailio with Puppet Kamailio module – repo/apt.pp class kamailio::repo::apt inherits kamailio::repo { include '::apt' # Note the 40! apt::source { 'kamailio40_wheezy': location => 'http://deb.kamailio.org/kamailio40', release => 'wheezy', repos => 'main', required_packages => 'debian-keyring debian-archive-keyring', key => '07D5C01D', key_server => 'http://deb.kamailio.org/kamailiodebkey.gpg', include_src => true, } Apt::Source['kamailio40_wheezy'] -> Package<|tag == 'kamailio'|> }
  • 19. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Kamailio with Puppet Kamailio module – config.pp • Manages configuration files • Can install from files or templates Example: templatize a kamailio.cfg define <% if with_tls %>#!define WITH_TLS<% end %>