PuppetCamp London fall 2014
Martin Alfke - Can you upgrade to Puppet 4.x?
My talk at PuppetCamp London 2014 taking care on best practices and bad examples and an outlook to Puppet 4.
Presentation on how Puppet has been introduced in Seat Pagine Gialle to automate system administration tasks and easy the cooperation between Ops and Others.
Puppi is a Puppet modules that drives Puppet's knowledge of the Systems to a command line tool that you can use to check services availability, gather info on the system and deploy application with a single command.
Watch along with the video at https://www.youtube.com/watch?v=_oP1pFsOyDw
Oliver Hookins on "A Puppet Approach to Application Deployment and Automation in Nokia" at PuppetCamp Europe '11. Learn more: http://www.puppetlabs.com
Amsterdam, Netherlands, 2011.
Puppet Labs
Presentation on how Puppet has been introduced in Seat Pagine Gialle to automate system administration tasks and easy the cooperation between Ops and Others.
Puppi is a Puppet modules that drives Puppet's knowledge of the Systems to a command line tool that you can use to check services availability, gather info on the system and deploy application with a single command.
Watch along with the video at https://www.youtube.com/watch?v=_oP1pFsOyDw
Oliver Hookins on "A Puppet Approach to Application Deployment and Automation in Nokia" at PuppetCamp Europe '11. Learn more: http://www.puppetlabs.com
Amsterdam, Netherlands, 2011.
Puppet Labs
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Robert Nelson
Let's describe the process for upgrading from Puppet 3 to 4, list some common pitfalls and how to avoid them, and be sure to enjoy ourselves in the process!
perl often doesn't get updated because people don't have a way to know if their current code works with the new one. The problem is that they lack unit tests. This talk describes how simple it is to generate unit tests with Perl and shell, use them to automate solving problems like missing modules, and test a complete code base.
A book for learning puppet by real example and by building code. Second chapters takes you through all basics of Puppet and enough ruby to work with Puppet.
Puppet is a configuration management tool which allows easy deployment and configuration ranging from 1 to 1 thousand servers (and even more). Even though its common knowledge for devops, puppet is still a strange piece of software for developers. How does it work and what can it do for you as a developer?
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Robert Nelson
Let's describe the process for upgrading from Puppet 3 to 4, list some common pitfalls and how to avoid them, and be sure to enjoy ourselves in the process!
perl often doesn't get updated because people don't have a way to know if their current code works with the new one. The problem is that they lack unit tests. This talk describes how simple it is to generate unit tests with Perl and shell, use them to automate solving problems like missing modules, and test a complete code base.
A book for learning puppet by real example and by building code. Second chapters takes you through all basics of Puppet and enough ruby to work with Puppet.
Puppet is a configuration management tool which allows easy deployment and configuration ranging from 1 to 1 thousand servers (and even more). Even though its common knowledge for devops, puppet is still a strange piece of software for developers. How does it work and what can it do for you as a developer?
PuppetConf 2016 Moving from Exec to Types and ProvidesMartin Alfke
"We want to automate this application rollout and configuration by using Puppet DSL." The task is clear, the tool is clear. But how to proceed? Installation is delivered as tarball, configuration is done by running cli commands. This talk will give an overview on how we started using commands within exec resources, the difficulties and problems that rose up, and the process of moving to Types and Providers.
Puppet Camp Duesseldorf 2014: Martin Alfke - Can you upgrade to puppet 4.x?NETWAYS
PuppetLabs takes care on the Puppet software stack and they provide regular updates of their software.
But how about your Puppet DSL code? How can you ensure that your code will also work fine on newer Puppet versions?
This talks shows basic steps and actions which should be done to ensure fully functional Puppet DSL code on newer Puppet versions.
I will show common old practices, which have been replaced by more modern ways in using Puppet and how to migrate to the new solution. Additionally I want you to learn how you can test your Puppet DSL code prior putting it onto a new Puppet master.
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T Puppet
Here are the slides from Rob Nelson's PuppetConf 2016 presentation called Enjoying the Journey from Puppet 3.x to 4.x. Watch the videos at https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa
Puppet getting started will show the different components used in puppet environments, starting with facter and puppet to different webinterfaces like puppet enterprise console and foreman. It will also cover an exemplary design for scaling the puppet master and for development livecycle of modules. Furthermore an example for design of modules will be given.
Loops and Unicorns - The Future of the Puppet Language - PuppetConf 2013Puppet
"Loops and Unicorns - The Future of the Puppet Language" by Henrik Lindberg, Platform Engineer, Puppet Labs.
Presentation Overview: Loops, Unicorns and other magical animals lives in your puppet since Puppet 3.2. This is the first version to ship with the future just a setting away! In this talk you will see the new features at work; we are talking loops, lambdas, puppet templates and other unicorns! In addition to learning how loops work, we will present the background to the new parser and the future capabilities this enables such as being able to support multiple language compliance levels, provide better error messages, and much more. Parts of this talk will touch on advanced topics such has to use lambdas in your custom functions.
Speaker Bio: Henrik has 30 years of experience architecting and developing software. Past positions include CTO of Cloudsmith Inc, leadership of BEA’s Java Run-Time Group (JRockit) and CTO and/or technical founder of several publicly and privately held software companies. Henrik works on the Platform team at Puppet Labs with special focus on the Puppet Language. He is also a committer and leader of several Eclipse projects, and leads the Puppet IDE Geppetto project.
This is story of our journey from SaltStack to Puppet and beyond. This talk will answer following questions:
- why we moved from SaltStack
- why Puppet was chosen
- how to use Puppet OpenSource in painless way
- which orchestration tool to use with Puppet
- what is next
Bootstrapping Puppet and Application Deployment - PuppetConf 2013Puppet
"Bootstrapping Puppet and Application Deployment" by Robert de Macedo Soares, Application Security Engineer, BusinessWire.
Presentation Overview: A dive into the problems faced when first launching Puppet across existing, heterogeneous servers, outlining possible solutions using our experience as an example. In addition, this session will touch on application management and deployment using subversion and rake tasks, what works and what is a little rough around the edges.
Speaker Bio: Robert is an engineer who has spent the past several years attempting to automate away the need for the work that he does. Focusing on server automation and security work for BusinessWire, Robert also develops web services such as tee.ms, a chat service, and designs and develops games. Trism, which he co-designed, was nominated for Cellular Game of the Year by the Academy of Interactive Arts & Sciences in the 2009 Interactive Achievement Awards.
Puppet Camp Berlin 2015: Martin Alfke | The Power of Puppet 4NETWAYS
The talk will guide you through the major changes which are brought by Puppet 4.x.
We will dig through deprecations and how to migrate and we will show new functionality like the built in data type validation and many more.
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Puppet
"Testing for Ops: Going Beyond the Manifest" by Christopher Webber, Infrastructure Engineer, Demand Media.
Presentation Overview: This talk aims to show the value of rspec-puppet for those who come from a more Ops-centric background. The focus will be on using tests to go beyond just rewriting manifests in rspec. Instead the focus will be on scenarios like: - Are the baseline security measures in place? - Do the differences between dev and prod get reflected? - Are the config elements that are core to the application present? In addition, tests will help to be a place to help document the oddities of our configurations and ensuring that minor changes don't result in catastrophe.
Speaker Bio: After beginning his career at UC Riverside supporting enterprise operations and bioinformatics research, Chris is now rocking being an infrastructure engineer at Demand Media in Santa Monica. He currently supports large high-traffic sites like eHow.com, LiveSTRONG.com, and Cracked.com. Chris enjoys attending local meetups, writing new Puppet modules, and creating small tools to make his team's lives a little easier. Find him on Twitter as @cwebber.
Learning Puppet is hard.
But: You can use Puppet by using YAML only.
In this talk I am going to explain the YAML/Hiera based node classification and the possibility to manage systems by using YAML only.
HashiTalksDACH-Terraform-Managing training instances in the CloudMartin Alfke
Cloud automation is important. When we have a need for a training instance, we use terraform for VM provisioning.
But: each setup has slight differences (SW Versions, Number of VMs needed, ...)
We decided to build the terraform code as abstract as possible and use a per setup data based approach to provide information on numbers of VMs and deployment order.
All data are then used in combination with terraform and Puppet Bolt.
ADDO 2019 DevOps in a containerized worldMartin Alfke
"We don't do DevOps anymore, we do containers"
Are containers the death to DevOps?
Why do we still need DevOps when doing containers?
DevOps KATA ((K)Culture, Automation, Transparency, Agility)
“Docker, Docker, Docker, Docker,…” developers really love Docker. Usually one sees the no longer need for configuration management, the easy way to spin up a platform on a laptop, the low resource footprint. But how do you deploy laptops in data centers?
This talk will give you an insight how we (more Ops then Dev) started to learn (and love) containers, the issues we saw when running them in larger scale and how Ops people should start dealing with Container technologies.
Puppet User Group Berlin Q1 meetup:
Introduction to the new, experimental puppet parser
http://www.meetup.com/Puppet-User-Group-Berlin/events/145643562/
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBrad Spiegel Macon GA
Brad Spiegel Macon GA’s journey exemplifies the profound impact that one individual can have on their community. Through his unwavering dedication to digital inclusion, he’s not only bridging the gap in Macon but also setting an example for others to follow.
Instagram has become one of the most popular social media platforms, allowing people to share photos, videos, and stories with their followers. Sometimes, though, you might want to view someone's story without them knowing.
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC
Ellisha Heppner, Grant Management Lead, presented an update on APNIC Foundation to the PNG DNS Forum held from 6 to 10 May, 2024 in Port Moresby, Papua New Guinea.
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfFlorence Consulting
Quattordicesimo Meetup di Milano, tenutosi a Milano il 23 Maggio 2024 dalle ore 17:00 alle ore 18:30 in presenza e da remoto.
Abbiamo parlato di come Axpo Italia S.p.A. ha ridotto il technical debt migrando le proprie APIs da Mule 3.9 a Mule 4.4 passando anche da on-premises a CloudHub 1.0.
Gen Z and the marketplaces - let's translate their needsLaura Szabó
The product workshop focused on exploring the requirements of Generation Z in relation to marketplace dynamics. We delved into their specific needs, examined the specifics in their shopping preferences, and analyzed their preferred methods for accessing information and making purchases within a marketplace. Through the study of real-life cases , we tried to gain valuable insights into enhancing the marketplace experience for Generation Z.
The workshop was held on the DMA Conference in Vienna June 2024.
Understanding User Behavior with Google Analytics.pdfSEO Article Boost
Unlocking the full potential of Google Analytics is crucial for understanding and optimizing your website’s performance. This guide dives deep into the essential aspects of Google Analytics, from analyzing traffic sources to understanding user demographics and tracking user engagement.
Traffic Sources Analysis:
Discover where your website traffic originates. By examining the Acquisition section, you can identify whether visitors come from organic search, paid campaigns, direct visits, social media, or referral links. This knowledge helps in refining marketing strategies and optimizing resource allocation.
User Demographics Insights:
Gain a comprehensive view of your audience by exploring demographic data in the Audience section. Understand age, gender, and interests to tailor your marketing strategies effectively. Leverage this information to create personalized content and improve user engagement and conversion rates.
Tracking User Engagement:
Learn how to measure user interaction with your site through key metrics like bounce rate, average session duration, and pages per session. Enhance user experience by analyzing engagement metrics and implementing strategies to keep visitors engaged.
Conversion Rate Optimization:
Understand the importance of conversion rates and how to track them using Google Analytics. Set up Goals, analyze conversion funnels, segment your audience, and employ A/B testing to optimize your website for higher conversions. Utilize ecommerce tracking and multi-channel funnels for a detailed view of your sales performance and marketing channel contributions.
Custom Reports and Dashboards:
Create custom reports and dashboards to visualize and interpret data relevant to your business goals. Use advanced filters, segments, and visualization options to gain deeper insights. Incorporate custom dimensions and metrics for tailored data analysis. Integrate external data sources to enrich your analytics and make well-informed decisions.
This guide is designed to help you harness the power of Google Analytics for making data-driven decisions that enhance website performance and achieve your digital marketing objectives. Whether you are looking to improve SEO, refine your social media strategy, or boost conversion rates, understanding and utilizing Google Analytics is essential for your success.
5. Poll
!
!
• Using Puppet 2.x?
• Using Puppet 3.x?
6. Why do I need to bother?
• Fast releases
• Best Practices
• Changing functionality
• Removing deprecated stuff
• Puppet 4 is coming
7. Why should I upgrade
Puppet at all?
• Do you want security updates?
• Do you want to make use of new functionality?
(e.g. automatic data bindings, environmentpath,
future parser)
• Do you want to get support (community or
enterprise)?
8. Is my Puppet DSL code still
working on new versions?
• Your code was developed some years
ago and is still running unmodified
• Your code was written on old best
practices and does not follow new
style guide
• You do not check your Puppet runs
for deprecation warnings (or do
you?)
10. BAD
Best practice
• Do you inherit from inherited
classes?
• Do you still use import?
• Do you modify remote modules?
• Do you access non-local variables
without scope names?
11. BAD
Best practice
Stop doing multiple levels of inheritance
!
class foo {
}
!
class foo::bar inherits foo {
}
!
class foo::baz inherits foo::bar {
}
!
class foo::foobar inherits foo::baz {
}
12. BAD
Best practice
Stop doing inheritance
!
class foo {
}
!
class foo::bar inherits foo {
}
!
class foo::baz inherits foo {
}
!
class foo::foobar inherits foo {
}
13. Best practice
Restrict Inheritance
!
In most cases you can use parameterised classes instead.
Only one kind of inheritance is proven good practice: inherit from
module params.pp
!
class ssh (
$server = $ssh::params::server,
$client = $ssh::params::client,
$x11fwd = false,
) inherits ssh::params {
}
!
class { ::ssh::params::
server => false,
x11fwd => true,
}
BETTER
14. BAD
Best practice
Stop importing
!
# ssh/manifests/init.pp
class ssh {
import ‘server.pp’
}
!
# ssh/manifests/server.pp
class ssh::secure {
}
!
# ssh/manifests/secure.pp
class ssh::secure {
}
!
Which class ssh::secure will be used?
15. Best practice
Use include
!
In most cases you can make use of the puppet autoloader and
you can use include.
!
# ssh/manifests/init.pp
class ssh {
include ::ssh::server
}
BETTER
!
# ssh/manifests/server.pp
class ssh::server {
}
!
16. BAD
Best practice
Stop modifying remote modules
!
Take “remote modules” as a software
provided by others.
Are you also patching apache?
17. Best practice
Co-Work on remote
modules
!
Do a PR if you want
improvements.
!
Keep your remote modules
upgradeable.
BETTER
18. BAD
Best practice
Stop using non-local variables
without scope
!
class ssh (
$server = ‘baz’
) {
}
!
class ssh::server {
notify { $server: }
}
19. Best practice
Start using non-local variables with
scope
!
class ssh (
$server = true
) {
}
!
class ssh::server {
notify { $ssh::server: }
}
BETTER
20. BAD
Best practice
Stop using un-scoped variables
in templates
!!
key = <%= server %>
!
!
!
21. Best practice
Start using scoped variables in
templates
!!
BETTER
key = <%= @server %>
!
or
!
key = <%= scope.lookupvar(‘ssh::server’) %>
!
or
!
key = <%= scope[‘ssh::server’]
22. BAD
Best practice
Stop using factor variables without top-scope
!
class ssh {
notify { “We are on OS: $operatingsystem”: }
}
!
class ssh::server {
if $is_virtual {
notify { “We are running on $virtual virtualisation”: }
} else {
notify { “We are running on hardware: $productname”: }
}
23. Best practice
Start using factor variables with top-scope
!
class ssh {
notify { “We are on OS: ${::operatingsystem}”: }
}
!
class ssh::server {
if $::is_virtual {
notify { “We are running on ${::virtual} virtualisation”: }
} else {
notify { “We are running on hardware: ${::productname}”: }
}
BETTER
24. BAD
Best practice
Stop not doing data validation
!
class ssh (
$server = hiera(‘server’, ‘localhost’)
){
notify { “We will use Server: ${server}”: }
}
!
25. Best practice
BETTER
Start doing data validation
!
class ssh (
$server = hiera(‘server’, ‘localhost’)
){
# validate_string is a function from stdlib
validate_string($server)
notify { “We will use Server: ${server}”: }
}
!
26. Remote modules
• Do foreign modules support
your version?
• Newer Puppet versions have
new function attributes (arity)
• New foreign module versions
might need newer modules
not supported by your
Puppet version
27. Remote modules
• Check Puppetfile /
metadata.json for
requirements
• Test prior upgrading in
production
29. How can I test my actual
Puppet DSL code?
• Syntax/Semantic check
• puppet parser validate / puppet-syntax / puppet-lint
• Unit test
• rspec-puppet
• Integration test
• beaker, vagrant, serverspec,…
31. Simple rspec upgrade check
• Add rspec tests to all your modules and run them
locally
• Use rvm or rbenv to choose between ruby
versions
• Provide puppet version to verify in Gemfile
• Run spec tests locally and verify results
35. Simple Puppet upgrade test
• Install Puppet tarball in a separate directory on
your master
• Start puppet master manually using RUBYLIB or
ruby -I on another port (—masterport 8141)
• Test run from a single node with —noop against
the new port
36. Simple Puppet upgrade test
Example: additional Puppet Master process:
!
tar zxf puppet-3.7.1.tar.gz -C /opt/puppet-3.7.1
!
ruby1.8 -I /opt/puppet-3.7.1/lib /opt/puppet-3.7.1/bin/puppet master
—nodaemonize —masterport=8150 —pidfile=/tmp/puppetmaster.pid
!!
Example: Agent run against additional Puppet Master process:
!
puppet agent —test —masterport 8150
38. Puppet 4
• Major update
• Removes deprecated
functionality
• New language features
39. Puppet 4
• Deprecated in Puppet 4:
• node inheritance - use roles/profiles instead
• upper case variable names
• variable with underscore in first position
• references to classes using upper case name/title
• hypens and periods in names
• Ruby DSL
40. Puppet 4
• New in Puppet 4:
• Strict variable naming and lookup (will become
mandatory in Puppet 5)
• Variable type validation
• Boolean conversion (“” -> true instead of false)
• Environmentpath
• Functions in Puppet
• New function API
41. Puppet 4
• Further reading
• https://github.com/puppetlabs/puppet-specifications
• http://puppet-on-the-edge.blogspot.co.uk/
42.
43. You can upgrade to
Puppet 4.x!
!
Thank you.
!
Martin Alfke
<martin.alfke@buero20.org>