Slides from 10/21 talk at PuppetConf 2016 in San Diego.
The Design Patterns book is more than just a collection of elegant solutions to common problems, it provides us with a vocabulary and framework for analyzing those problems. Discussing and applying design patterns helps shift the focus from the immediate problem to design. As the Puppet community converged on an idea of what "good" code looks like, Puppet design patterns began to emerge and design became more important. With more and more complex software being modeled in Puppet, those design patterns are more relevant than ever before. As the Puppet language takes on more general purpose and orchestration features, the need for good design patterns only grows with every release. This talk will discuss some of those design patterns and the problems that they solve.
The Design Patterns book is more than just a collection of elegant solutions to common problems, it provides us with a vocabulary and framework for analyzing those problems. Discussing and applying design patterns helps shift the focus from the immediate problem to design. As the Puppet community converged on an idea of what "good" code looks like, Puppet design patterns began to emerge and design became more important. With more and more complex software being modeled in Puppet, those design patterns are more relevant than ever before. As the Puppet language takes on more general purpose and orchestration features, the need for good design patterns only grows with every release. This talk will discuss some of those design patterns and the problems that they solve.
Drupal 8 Theme System: The Backend of FrontendAcquia
If you develop with Drupal, chances are you've worked with Drupal's theme system, whether you knew it or not. With Drupal 8 out, what better time to learn more about the Drupal 8 theme system?
The theme system in Drupal spans both module development and theme development. The main responsibilities of the theme system are to prepare and output markup and other data, and to allow for overrides. The Drupal 8 theme system brings many changes including the Twig templating engine, automatically escaped markup for increased security, changes to theme suggestions, new base themes in core, and more.
Scott Reeves, Team Lead at Digital Echidna, and Drupal 8 theme system co-maintainer and provisional core committer will guide you through Drupal 8’s theme system. The webinar will cover important differences from Drupal 7 and also walk through the internals of different aspects of the theme system and how they might affect your day-to-day work with Drupal.
Topics will include:
-An overview of the important changes to the theme system from Drupal 7 to Drupal 8
-How to use theme hook suggestions to cut down on custom code and create more flexible and reusable components
-Phases of the theme and render systems and where you can step in to alter things
-Debugging tips and Twig magic
The document discusses Debian packaging and provides instructions for creating Debian packages. It introduces Debian packaging tools like debhelper, dpkg-dev, and lintian. It then walks through the steps to generate a package including creating the package directory structure, files like control, rules, and copyright. It also discusses collaborating with Debian through documentation, translations, packaging software, and bug reporting.
Pavlenko Sergey. Drush: using and creating custom commands. DrupalCamp Kyiv 2011Vlad Savitsky
Drush - это интерфейс командной строки для доступа к вашему сайту на Drupal.
С помощью данного инструмента вы можете выполнять рутинные действия не прибегая к вебинтерфейсу Друпала, что значительно упрощает работу веб-разработчика.
1. Будут рассмотрены основные команды при работе с сайтом на базе Друпал;
2. Установка под Linux и особенности при установке в Windows;
3. Использование при работе с популярными модулями.
4. Возможности использования следуя принципам Coding drive development-а.
5. Drush4 API
6. Пример разработки своих команд для работы с Друпал сайтом.
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, PuppetPuppet
Here are the slides from Gary Larizza's PuppetConf 2016 presentation called Puppet Best Practices: Roles and Profiles. Watch the videos at https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa
This document discusses theming in Drupal 8. It begins by explaining how template engines like Twig have replaced PHPTemplate for separating markup and logic. It then covers creating a Drupal theme with Twig templates and libraries, and registering templates in modules. Finally, it provides an overview of Twig syntax for variables, control structures, filters/functions, inheritance and an example block template.
The document discusses how immutable infrastructure can be achieved through Puppet by treating systems configuration as code. Puppet allows defining systems in code and enforcing that state through automatic idempotent runs, compensating for inherent system mutability. This brings predictability to infrastructure and allows higher level operations by establishing a foundation of reliable, known states.
The Design Patterns book is more than just a collection of elegant solutions to common problems, it provides us with a vocabulary and framework for analyzing those problems. Discussing and applying design patterns helps shift the focus from the immediate problem to design. As the Puppet community converged on an idea of what "good" code looks like, Puppet design patterns began to emerge and design became more important. With more and more complex software being modeled in Puppet, those design patterns are more relevant than ever before. As the Puppet language takes on more general purpose and orchestration features, the need for good design patterns only grows with every release. This talk will discuss some of those design patterns and the problems that they solve.
Drupal 8 Theme System: The Backend of FrontendAcquia
If you develop with Drupal, chances are you've worked with Drupal's theme system, whether you knew it or not. With Drupal 8 out, what better time to learn more about the Drupal 8 theme system?
The theme system in Drupal spans both module development and theme development. The main responsibilities of the theme system are to prepare and output markup and other data, and to allow for overrides. The Drupal 8 theme system brings many changes including the Twig templating engine, automatically escaped markup for increased security, changes to theme suggestions, new base themes in core, and more.
Scott Reeves, Team Lead at Digital Echidna, and Drupal 8 theme system co-maintainer and provisional core committer will guide you through Drupal 8’s theme system. The webinar will cover important differences from Drupal 7 and also walk through the internals of different aspects of the theme system and how they might affect your day-to-day work with Drupal.
Topics will include:
-An overview of the important changes to the theme system from Drupal 7 to Drupal 8
-How to use theme hook suggestions to cut down on custom code and create more flexible and reusable components
-Phases of the theme and render systems and where you can step in to alter things
-Debugging tips and Twig magic
The document discusses Debian packaging and provides instructions for creating Debian packages. It introduces Debian packaging tools like debhelper, dpkg-dev, and lintian. It then walks through the steps to generate a package including creating the package directory structure, files like control, rules, and copyright. It also discusses collaborating with Debian through documentation, translations, packaging software, and bug reporting.
Pavlenko Sergey. Drush: using and creating custom commands. DrupalCamp Kyiv 2011Vlad Savitsky
Drush - это интерфейс командной строки для доступа к вашему сайту на Drupal.
С помощью данного инструмента вы можете выполнять рутинные действия не прибегая к вебинтерфейсу Друпала, что значительно упрощает работу веб-разработчика.
1. Будут рассмотрены основные команды при работе с сайтом на базе Друпал;
2. Установка под Linux и особенности при установке в Windows;
3. Использование при работе с популярными модулями.
4. Возможности использования следуя принципам Coding drive development-а.
5. Drush4 API
6. Пример разработки своих команд для работы с Друпал сайтом.
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, PuppetPuppet
Here are the slides from Gary Larizza's PuppetConf 2016 presentation called Puppet Best Practices: Roles and Profiles. Watch the videos at https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa
This document discusses theming in Drupal 8. It begins by explaining how template engines like Twig have replaced PHPTemplate for separating markup and logic. It then covers creating a Drupal theme with Twig templates and libraries, and registering templates in modules. Finally, it provides an overview of Twig syntax for variables, control structures, filters/functions, inheritance and an example block template.
The document discusses how immutable infrastructure can be achieved through Puppet by treating systems configuration as code. Puppet allows defining systems in code and enforcing that state through automatic idempotent runs, compensating for inherent system mutability. This brings predictability to infrastructure and allows higher level operations by establishing a foundation of reliable, known states.
The document discusses various techniques for optimizing a multisite WordPress architecture for a high-traffic music website including: using caching (APC, Memcached, Batcache), output buffering, CDNs, regionalized content/caching, shared content across sites, custom post types, web services, and configuration files. It also covers database scaling, PHP optimizations, and using Amazon services like EC2 and S3.
The document discusses how ActiveRecord was extracted in Rails 3 into ActiveModel and ActiveRelation. This reduced friction in building data layers and made it easier to focus on building better APIs. ActiveSupport was also trimmed down but still provides useful functionality like caching that can be cherry-picked. Methods are demonstrated for extracting caching logic into a concern module to keep domain object classes clean and readable. ActiveModel validations are also shown to work independently of ActiveRecord.
Czym jest webpack i dlaczego chcesz go używać?Marcin Gajda
Podczas tworzenia frontendu aplikacji internetowych często odkrywamy, że nasza baza kodu JavaScript dość szybko się rozrasta i lawinowo przybywa nam zależności. Oczywistym rozwiązaniem wydaje się wtedy dzielenie kodu na mniejsze moduły, ale jak to robić mądrze? Tu z pomocą przychodzi nam webpack. Podczas tej prezentacji dowiemy się, w jaki sposób działa to narzędzie, jak konfiguruje się w nim kompilację assetów oraz jakie dodatkowe możliwości ono w sobie kryje.
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011camp_drupal_ua
Drush is a command line shell and scripting interface for Drupal. It provides many commands to help with development and site management tasks from the command line. Drush comes with core commands, and more functionality can be added through extensions like Devel, Drush Make, Module Builder, and Backup and Migrate. Drush helps the development process by allowing developers to download Drupal, install modules, clear caches, run SQL commands, and generate modules from the command line.
Little documentation and few base themes with 8.x branches - what's a front end developer to do? I'll show you what's changing in Drupal theming between D7 and D8 and how to create a custom theme based on the Classy base theme, step by step. We'll go over Twig basics and Twig debugging.
Drupal theming - a practical approach (European Drupal Days 2015)Eugenio Minardi
This document discusses best practices for Drupal theming. It covers topics like directory layout, basic theme elements, render arrays, hooks, overriding templates and functions, common mistakes, and more. Tools like VirtualBox and Vagrant are recommended for local development. Templates should be used for display only and advanced logic should be moved to preprocess functions. Security risks can arise from directly editing core/module files or using global variables.
Chef is an infrastructure configuration management platform that allows users to define infrastructure as code. It uses a client-server architecture with components like Ohai for data collection, Chef Server as a code repository, Chef Client software, Knife as a CLI, and roles, cookbooks, recipes and resources as basic units of configuration. Users define configurations through cookbooks containing recipes written in Ruby code, templates, attributes and other components. Chef enforces configurations through its client-server model and provides tools for testing, deployment and management of infrastructure through code.
Puppet is an open source tool for server configuration management and application deployment. It allows users to define the desired state of IT infrastructure and automatically enforces that state. Key features include enforcing consistent configurations across thousands of nodes, increased productivity through automation, and visibility into infrastructure changes. Puppet works by defining resources like packages, files, and services using a declarative language and enforcing that configuration through an agent-master architecture.
Hadoop installation on windows using virtual box and also hadoop installation on ubuntu
http://logicallearn2.blogspot.in/2018/01/hadoop-installation-on-ubuntu.html
The document discusses the Features module in Drupal, which allows site configuration to be exported from the database into code. Features separates site configuration from content and allows functionality to be packaged and reused across multiple sites. It also enables version control and easier deployment. The document provides examples of how to create, export, import, update, and revert features using the module and Drush commands. It discusses some common usage cases and debugging strategies for overridden features.
Ansible : what's ansible & use case by REXSaewoong Lee
The document discusses using Ansible to upgrade MySQL from version 3.10 to 3.12 across 1000 servers. It provides steps to create backups and run upgrade scripts on each server using Ansible playbooks and bash scripts in a loop. It also asks how to make the deployment easier, safer and more comfortable. Later sections explain Ansible concepts like installation, modules, playbooks, tags, inventory, variables and demonstrate usage through examples.
The document discusses the development of RuHL, a Ruby library for simplifying views by removing code from templates and handling logic and data formatting in presenters instead. Some key points:
- RuHL started as attributes on HTML elements but later used a data-ruhl syntax to enable conditional display, iteration, and parameter passing without writing code in templates.
- It encourages using the presenter pattern to move all code out of views and into presenter classes, keeping templates focused on display.
- In Rails, presenters inherit from Ruhl::Rails::Presenter and are loaded automatically, making data and methods available to templates through a local object.
- Controllers call "present
The document discusses Drupal's transition from PHPTemplate to Twig as its templating language in Drupal 8. It outlines several pain points with Drupal 7's theming system, such as mixed data types, insecure code, and complexity. Twig addresses many of these issues by standardizing variable output, automatically sanitizing variables, and having a syntax that is less Drupal-specific. The document argues that Twig can help simplify theming by removing theme functions entirely and consolidating templates. It also notes potential performance gains from Twig's compiled templates and the ability to safely edit templates in-browser.
Given at zendcon 2007 unconference. My first "talk" ever given. Had a live demo. Note that although some of the information here is still pertinent, a lot is now outdated and most of the links no longer work. This is here for archival reasons
This document discusses various troubles and problems that can occur when deploying Drupal, along with solutions. It covers issues with PHP settings, memory limits, error reporting, module disabling, cron jobs, and more. Tips are provided for using Drush, checking log files, overriding PHP configurations, and ensuring Drupal is configured properly for a new hosting environment. The document emphasizes being prepared before deployment and having solutions in place to fix common post-deployment issues.
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!
Test Driven Development with Puppet - PuppetConf 2014Puppet
The document discusses test driven development (TDD) approaches for Puppet modules. It recommends writing tests before code using tools like RSpec and guard. The document provides examples of unit testing Puppet code and definitions using rspec-puppet. It also discusses acceptance testing Puppet code and modules using Beaker against real systems. Overall, the document promotes writing tests for Puppet code to ensure quality and prevent regressions across different operating systems and versions.
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...Puppet
Here are the slides from David Lutterkort's PuppetConf 2016 presentation called The Challenges with Container Configuration. Watch the videos at https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa
Self Improvement, filter, Back Biting, useless talks, real friends
Courtesy to SlideShare and other software hardware designers, developers, producers, managers and investors directly or indirectly linked to development of presentation
Data Science (Informatics) Programs at GMU - Kirk Borne - RDAP12ASIS&T
Data Science (Informatics) Programs at GMU
Kirk Borne
Training Data Management Practitioners Panel
Presentation at Research Data Access & Preservation Summit
22 March 2012
The document discusses various techniques for optimizing a multisite WordPress architecture for a high-traffic music website including: using caching (APC, Memcached, Batcache), output buffering, CDNs, regionalized content/caching, shared content across sites, custom post types, web services, and configuration files. It also covers database scaling, PHP optimizations, and using Amazon services like EC2 and S3.
The document discusses how ActiveRecord was extracted in Rails 3 into ActiveModel and ActiveRelation. This reduced friction in building data layers and made it easier to focus on building better APIs. ActiveSupport was also trimmed down but still provides useful functionality like caching that can be cherry-picked. Methods are demonstrated for extracting caching logic into a concern module to keep domain object classes clean and readable. ActiveModel validations are also shown to work independently of ActiveRecord.
Czym jest webpack i dlaczego chcesz go używać?Marcin Gajda
Podczas tworzenia frontendu aplikacji internetowych często odkrywamy, że nasza baza kodu JavaScript dość szybko się rozrasta i lawinowo przybywa nam zależności. Oczywistym rozwiązaniem wydaje się wtedy dzielenie kodu na mniejsze moduły, ale jak to robić mądrze? Tu z pomocą przychodzi nam webpack. Podczas tej prezentacji dowiemy się, w jaki sposób działa to narzędzie, jak konfiguruje się w nim kompilację assetów oraz jakie dodatkowe możliwości ono w sobie kryje.
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011camp_drupal_ua
Drush is a command line shell and scripting interface for Drupal. It provides many commands to help with development and site management tasks from the command line. Drush comes with core commands, and more functionality can be added through extensions like Devel, Drush Make, Module Builder, and Backup and Migrate. Drush helps the development process by allowing developers to download Drupal, install modules, clear caches, run SQL commands, and generate modules from the command line.
Little documentation and few base themes with 8.x branches - what's a front end developer to do? I'll show you what's changing in Drupal theming between D7 and D8 and how to create a custom theme based on the Classy base theme, step by step. We'll go over Twig basics and Twig debugging.
Drupal theming - a practical approach (European Drupal Days 2015)Eugenio Minardi
This document discusses best practices for Drupal theming. It covers topics like directory layout, basic theme elements, render arrays, hooks, overriding templates and functions, common mistakes, and more. Tools like VirtualBox and Vagrant are recommended for local development. Templates should be used for display only and advanced logic should be moved to preprocess functions. Security risks can arise from directly editing core/module files or using global variables.
Chef is an infrastructure configuration management platform that allows users to define infrastructure as code. It uses a client-server architecture with components like Ohai for data collection, Chef Server as a code repository, Chef Client software, Knife as a CLI, and roles, cookbooks, recipes and resources as basic units of configuration. Users define configurations through cookbooks containing recipes written in Ruby code, templates, attributes and other components. Chef enforces configurations through its client-server model and provides tools for testing, deployment and management of infrastructure through code.
Puppet is an open source tool for server configuration management and application deployment. It allows users to define the desired state of IT infrastructure and automatically enforces that state. Key features include enforcing consistent configurations across thousands of nodes, increased productivity through automation, and visibility into infrastructure changes. Puppet works by defining resources like packages, files, and services using a declarative language and enforcing that configuration through an agent-master architecture.
Hadoop installation on windows using virtual box and also hadoop installation on ubuntu
http://logicallearn2.blogspot.in/2018/01/hadoop-installation-on-ubuntu.html
The document discusses the Features module in Drupal, which allows site configuration to be exported from the database into code. Features separates site configuration from content and allows functionality to be packaged and reused across multiple sites. It also enables version control and easier deployment. The document provides examples of how to create, export, import, update, and revert features using the module and Drush commands. It discusses some common usage cases and debugging strategies for overridden features.
Ansible : what's ansible & use case by REXSaewoong Lee
The document discusses using Ansible to upgrade MySQL from version 3.10 to 3.12 across 1000 servers. It provides steps to create backups and run upgrade scripts on each server using Ansible playbooks and bash scripts in a loop. It also asks how to make the deployment easier, safer and more comfortable. Later sections explain Ansible concepts like installation, modules, playbooks, tags, inventory, variables and demonstrate usage through examples.
The document discusses the development of RuHL, a Ruby library for simplifying views by removing code from templates and handling logic and data formatting in presenters instead. Some key points:
- RuHL started as attributes on HTML elements but later used a data-ruhl syntax to enable conditional display, iteration, and parameter passing without writing code in templates.
- It encourages using the presenter pattern to move all code out of views and into presenter classes, keeping templates focused on display.
- In Rails, presenters inherit from Ruhl::Rails::Presenter and are loaded automatically, making data and methods available to templates through a local object.
- Controllers call "present
The document discusses Drupal's transition from PHPTemplate to Twig as its templating language in Drupal 8. It outlines several pain points with Drupal 7's theming system, such as mixed data types, insecure code, and complexity. Twig addresses many of these issues by standardizing variable output, automatically sanitizing variables, and having a syntax that is less Drupal-specific. The document argues that Twig can help simplify theming by removing theme functions entirely and consolidating templates. It also notes potential performance gains from Twig's compiled templates and the ability to safely edit templates in-browser.
Given at zendcon 2007 unconference. My first "talk" ever given. Had a live demo. Note that although some of the information here is still pertinent, a lot is now outdated and most of the links no longer work. This is here for archival reasons
This document discusses various troubles and problems that can occur when deploying Drupal, along with solutions. It covers issues with PHP settings, memory limits, error reporting, module disabling, cron jobs, and more. Tips are provided for using Drush, checking log files, overriding PHP configurations, and ensuring Drupal is configured properly for a new hosting environment. The document emphasizes being prepared before deployment and having solutions in place to fix common post-deployment issues.
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!
Test Driven Development with Puppet - PuppetConf 2014Puppet
The document discusses test driven development (TDD) approaches for Puppet modules. It recommends writing tests before code using tools like RSpec and guard. The document provides examples of unit testing Puppet code and definitions using rspec-puppet. It also discusses acceptance testing Puppet code and modules using Beaker against real systems. Overall, the document promotes writing tests for Puppet code to ensure quality and prevent regressions across different operating systems and versions.
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...Puppet
Here are the slides from David Lutterkort's PuppetConf 2016 presentation called The Challenges with Container Configuration. Watch the videos at https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa
Self Improvement, filter, Back Biting, useless talks, real friends
Courtesy to SlideShare and other software hardware designers, developers, producers, managers and investors directly or indirectly linked to development of presentation
Data Science (Informatics) Programs at GMU - Kirk Borne - RDAP12ASIS&T
Data Science (Informatics) Programs at GMU
Kirk Borne
Training Data Management Practitioners Panel
Presentation at Research Data Access & Preservation Summit
22 March 2012
Lynx Vermogensbeheer organiseerde op 16 oktober het seminar dividendbeleggen op Beursplein 5 in Amsterdam. Karel Mercx vertelde over zijn favoriete Nederlandse dividendaandeel.
Over 4000 healthcare providers worldwide rely on NetApp solutions to manage their data. NetApp offers certified solutions that allow healthcare providers to securely share data through private clouds for scale. NetApp also partners with key vendors to provide clinically neutral digital archives that enable safe sharing of images within and between healthcare organizations.
Pasar uang adalah tempat pertemuan pemilik dana jangka pendek dan calon pemakai dana untuk melakukan transaksi secara langsung atau melalui perantara. Pasar uang berfungsi untuk memudahkan masyarakat memperoleh dana jangka pendek, pengendalian moneter, dan memungkinkan partisipasi masyarakat dalam pembangunan. Instrumen pasar uang meliputi interbank call money, treasury bills, sertifikat bank Indonesia, surat berh
The document discusses several issues impacting the global healthcare sector, including demographics, financial pressures, changes in the health industry, regulatory issues, medical advances, and emerging technologies. It notes that an aging population, rising rates of chronic diseases, and increasing consumerism are driving changes in healthcare. Healthcare costs continue to rise globally due to these factors, putting financial pressure on governments, insurers, and consumers. The healthcare industry is also transforming as physicians take on new roles, technology companies enter the space, and alternative payment models emerge. The document outlines some of the key regulatory issues around patient safety, cybersecurity, and fraud prevention. Finally, it briefly highlights several medical advances and how technologies like 3D printing, digital health apps,
Presentation at the Dutch Sterilisation Association annual meeting about how the new EU Medical Devices Regulation affects the sterilisation industry specifically.
Candidatos para comisionados presentados por universidadesGrupo Promotor LAIP
Hojas de vida de los candidatos a comisionado propietario y suplente para el Instituto de Acceso a la Información Pública presentados por las Universidades.
Cultivating Wonder: Using Picture Books to Explore STEAM ConceptsRobin L. Gibson
This document discusses the importance of cultivating a sense of wonder in children. It argues that most children lose their innate sense of wonder and clear-eyed vision of the world by adulthood. If the author had influence, their gift to each child would be a sense of wonder that lasts throughout life to combat boredom and disenchantment in later years. For a child to keep their sense of wonder, they need the companionship of at least one adult who can share in rediscovering the joy, excitement, and mystery of the world.
Este documento critica duramente a Dalas por su comportamiento manipulador, irrespetuoso e hipócrita. Argumenta que Dalas manipula a su público joven, insulta a quien piensa distinto, bloquea debates y critica a otros por lo mismo que él hace. Concluye que Dalas es una mala influencia para los jóvenes y no muestra valores de respeto.
modern module development - Ken Barber 2012 Edinburgh Puppet CampPuppet
The document provides information on modern Puppet module development best practices. It discusses what modules are and common patterns like package, config, service that address 80% of module needs. It also covers validation of module parameters using Kwalify schemas, testing modules with rspec-puppet, and packaging modules for release on the Puppet Forge using the puppet-module tool. The document emphasizes the importance of coding style, linting with puppet-lint, and following patterns and best practices to create high quality, reusable modules.
This document compares the content management systems Drupal and WordPress. It provides statistics showing WordPress has more installations than Drupal in Europe. It outlines some of the key differences between the two platforms, such as Drupal using hooks while WordPress uses object-oriented programming, and how they handle content, themes, extensions, and user management. Development aspects like documentation, translations, and code repositories are also contrasted.
This document provides an overview of Ansible including:
- What Ansible is and how it compares to other configuration management tools like Chef and Puppet
- How Ansible works in an agentless manner over SSH and ensures idempotency
- The basic components of Ansible like playbooks, tasks, modules, variables, and roles
- How to install and configure Ansible including installing on control and managed nodes and using Ansible inventory
- Examples of using Ansible playbooks including tasks, modules, handlers, templates, conditionals, and loops
- Common Ansible commands like ansible-playbook, ansible-inventory, ansible-galaxy and how to use them
Building and Maintaining a Distribution in Drupal 7 with FeaturesNuvole
Drupal 7 allows to easily build and maintain distributions, i.e. repeatable website templates; you can benefit from this in all cases, whether you aim at large-scale deployments or even at maintaining a single website.
We will show how to package core and contributed modules in a distribution by using a Makefile and a profile and keeping them up-to-date during the whole development cycle.
Then you will learn how to use Code-Driven Development to store all settings in a sustainable way: use the Features module to easily describe configuration in code, a proper separation between Features to make your code reusable and extendible, a well-thought design of Features to create easier development patterns, CTools and Exportables to put your configuration in code even when a module does not support it natively.
Last, we will see how the distributions update mechanism allows you to create a new version of your distribution for easy and painless configuration updates of a live site.
This document discusses using Puppet to manage infrastructure as code with Apache CloudStack. It describes how Puppet types and providers were developed to allow defining CloudStack instances and entire application stacks in Puppet manifests. This enables automated deployment and configuration of infrastructure along with software configuration. Examples are given of using Puppet to define CloudStack instances, groups of instances that make up an application stack, and setting defaults for attributes. Resources mentioned include the CloudStack and Puppet GitHub pages.
The document discusses Puppet modules, including what they are, best practices for structuring modules, parameters, dependencies, testing modules, and documenting modules. It provides examples of module directory structure, class structure within modules, using parameters and dynamic data, module inheritance, ordering and anchoring classes, and the Modulefile.
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stacknuppla
This document summarizes a presentation about decoupling Drupal with the Lupus Nuxt.js stack using custom elements. It discusses:
1. The goals of decoupling the frontend for independent development and reusable components.
2. Using custom elements to render Drupal content on the frontend while still utilizing Drupal features like routing, authentication, and caching.
3. The architecture involves a Nuxt.js frontend that communicates with a Drupal backend via custom elements, allowing both parallel development and server-side rendering or static sites.
More info at http://blog.carlossanchez.eu/2011/11/15/from-dev-to-devops-slides-from-apachecon-na-vancouver-2011/
The DevOps movement aims to improve communication between developers and operations teams to solve critical issues such as fear of change and risky deployments. But the same way that Agile development would likely fail without continuous integration tools, the DevOps principles need tools to make them real, and provide the automation required to actually be implemented. Most of the so called DevOps tools focus on the operations side, and there should be more than that, the automation must cover the full process, Dev to QA to Ops and be as automated and agile as possible. Tools in each part of the workflow have evolved in their own silos, and with the support of their own target teams. But a true DevOps mentality requires a seamless process from the start of development to the end in production deployments and maintenance, and for a process to be successful there must be tools that take the burden out of humans.
Apache Maven has arguably been the most successful tool for development, project standardization and automation introduced in the last years. On the operations side we have open source tools like Puppet or Chef that are becoming increasingly popular to automate infrastructure maintenance and server provisioning.
In this presentation we will introduce an end-to-end development-to-production process that will take advantage of Maven and Puppet, each of them at their strong points, and open source tools to automate the handover between them, automating continuous build and deployment, continuous delivery, from source code to any number of application servers managed with Puppet, running either in physical hardware or the cloud, handling new continuous integration builds and releases automatically through several stages and environments such as development, QA, and production.
Ansible new paradigms for orchestrationPaolo Tonin
- Ansible provides a simple way to automate application deployment, server configuration management, and provisioning using SSH. It uses YAML files called playbooks to define tasks that are executed across multiple servers.
- Playbooks allow users to define infrastructure as code and configure servers in an idempotent way. They contain ordered lists of tasks that can install packages, copy files, start services, and more using simple YAML syntax.
- Ansible is agentless and communicates to servers over SSH, requiring only Python to be installed on managed nodes. It has a wide range of core modules and supports provisioning on cloud platforms like AWS.
1. The document discusses moving from a Dev to DevOps model by addressing issues like siloization between development and operations teams and embracing concepts like infrastructure as code.
2. It recommends several DevOps tools for infrastructure automation including Puppet, Vagrant, and VeeWee which allow developers to define infrastructure in code and provision environments.
3. The Puppet Domain Specific Language (DSL) is demonstrated for declaring resources like users, files, packages, and services with attributes and relationships between them in a declarative way.
"Puppet and Apache CloudStack" by David Nalley, Citrix, at Puppet Camp San Francisco 2013. Find a Puppet Camp near you: puppetlabs.com/community/puppet-camp/
Infrastructure as code with Puppet and Apache CloudStackke4qqq
Puppet can now be used to define not only the configuration of machines, but also the machines themselves and entire collections of machines when using CloudStack. New Puppet types and providers allow defining CloudStack instances, groups of instances, and entire application stacks that can then be deployed on CloudStack. This brings infrastructure as code to a new level by allowing Puppet to define and manage the entire CloudStack infrastructure.
This document discusses using Puppet and infrastructure as code to manage Apache CloudStack infrastructure. It introduces the cloudstack_resources Puppet module which allows defining CloudStack instances and entire application stacks in Puppet manifests. This enables treating infrastructure like code where Puppet can deploy and configure entire environments on CloudStack. Examples are given of classifying servers and deploying a Hadoop cluster with a single Puppet resource definition. Links are provided to resources for using Puppet with CloudStack and videos that further explain the concepts.
The document discusses debugging techniques in Drupal 8. It begins by outlining some basic configuration options like PHP error reporting and the Devel module. It then covers specific debugging tools like Xdebug, Drupal Console, and the Web Profiler module. Various code examples demonstrate debugging problems like class not found errors and accessing protected properties. Continuous integration with Probo CI and pull requests are presented as solutions for testing and client approval workflows. The key steps for debugging are identified as thinking through code logically, identifying goals, finding the right tool to solve problems, and testing fixes.
This document discusses using document databases like CouchDB with TYPO3 Flow. It provides an overview of persistence basics in Flow and Doctrine ORM. It then covers using CouchDB as a document database, including its REST API, basics, and the TYPO3.CouchDB package. It notes limitations and introduces alternatives like Radmiraal.CouchDB that support multiple backends. Finally, it discusses future support for multiple persistence backends in Flow.
Any developer who has worked in team will have to face the activity of setting up their local work environment to start contributing to the project. Whether you are working remotely or onsite, this kind of activity is often time consuming due to the personal configurations of your workstation. This "time wasting" is not predictable and even justifiable to the customer, that is the issue. I think the only way to fix that it's to find a reproducible process which takes the same time to be completed, indipendently by the operating system and configurations. This is why, starting from the last project I've been involved in, I started to lay the groundwork to build it using Docker, Config Split, Drupal Console and Drush.
My session is aimed at programmers and project managers looking for a way to bring new developers on board and make them operational in a given time. It will be a good starting point to discuss about that.
Practical Chef and Capistrano for Your Rails AppSmartLogic
This document discusses using Chef and Capistrano together to automate the deployment and management of a Rails application. Chef is used to configure the infrastructure and shared components, while Capistrano handles application-specific deployment tasks. Key steps include defining Chef recipes, roles, and node attributes; setting up Capistrano configuration and custom tasks; and integrating the two systems so that Capistrano deployments trigger Chef provisioning tasks.
This document provides an overview of module development in Drupal. It introduces the presenters Ipsita Mishra and Siva Kumar Epari and their experience with Drupal. It then discusses the different types of modules in Drupal including core modules, contrib modules, and custom modules. For each type, it provides brief descriptions and examples. It also covers best practices for writing custom modules including file and code structure. Finally, it discusses various Drupal APIs and hooks that are useful for module development like hook_menu(), hook_block(), and tools that can assist with development like Drush, Devel, and Coder.
Drupal Module Development - OSI Days 2010Siva Epari
This document provides an overview of module development in Drupal. It introduces the presenters Ipsita Mishra and Siva Kumar Epari and their experience with Drupal. It then discusses the different types of modules in Drupal including core modules, contrib modules, and custom modules. For each type, it provides brief descriptions and examples. It also covers best practices for writing a custom module including file and directory structure. Finally, it discusses several developer tools that can help with module development like Drush, Devel, Devel Themer, and Coder.
Similar to Puppet Design Patterns - PuppetConf (20)
Most important New features of Oracle 23c for DBAs and Developers. You can get more idea from my youtube channel video from https://youtu.be/XvL5WtaC20A
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
When it is all about ERP solutions, companies typically meet their needs with common ERP solutions like SAP, Oracle, and Microsoft Dynamics. These big players have demonstrated that ERP systems can be either simple or highly comprehensive. This remains true today, but there are new factors to consider, including a promising new contender in the market that’s Odoo. This blog compares Odoo ERP with traditional ERP systems and explains why many companies now see Odoo ERP as the best choice.
What are ERP Systems?
An ERP, or Enterprise Resource Planning, system provides your company with valuable information to help you make better decisions and boost your ROI. You should choose an ERP system based on your company’s specific needs. For instance, if you run a manufacturing or retail business, you will need an ERP system that efficiently manages inventory. A consulting firm, on the other hand, would benefit from an ERP system that enhances daily operations. Similarly, eCommerce stores would select an ERP system tailored to their needs.
Because different businesses have different requirements, ERP system functionalities can vary. Among the various ERP systems available, Odoo ERP is considered one of the best in the ERp market with more than 12 million global users today.
Odoo is an open-source ERP system initially designed for small to medium-sized businesses but now suitable for a wide range of companies. Odoo offers a scalable and configurable point-of-sale management solution and allows you to create customised modules for specific industries. Odoo is gaining more popularity because it is built in a way that allows easy customisation, has a user-friendly interface, and is affordable. Here, you will cover the main differences and get to know why Odoo is gaining attention despite the many other ERP systems available in the market.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
UI5con 2024 - Bring Your Own Design SystemPeter Muessig
How do you combine the OpenUI5/SAPUI5 programming model with a design system that makes its controls available as Web Components? Since OpenUI5/SAPUI5 1.120, the framework supports the integration of any Web Components. This makes it possible, for example, to natively embed own Web Components of your design system which are created with Stencil. The integration embeds the Web Components in a way that they can be used naturally in XMLViews, like with standard UI5 controls, and can be bound with data binding. Learn how you can also make use of the Web Components base class in OpenUI5/SAPUI5 to also integrate your Web Components and get inspired by the solution to generate a custom UI5 library providing the Web Components control wrappers for the native ones.
What to do when you have a perfect model for your software but you are constrained by an imperfect business model?
This talk explores the challenges of bringing modelling rigour to the business and strategy levels, and talking to your non-technical counterparts in the process.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
Unveiling the Advantages of Agile Software Development.pdfbrainerhub1
Learn about Agile Software Development's advantages. Simplify your workflow to spur quicker innovation. Jump right in! We have also discussed the advantages.
Malibou Pitch Deck For Its €3M Seed Roundsjcobrien
French start-up Malibou raised a €3 million Seed Round to develop its payroll and human resources
management platform for VSEs and SMEs. The financing round was led by investors Breega, Y Combinator, and FCVC.
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
Top 9 Trends in Cybersecurity for 2024.pptxdevvsandy
Security and risk management (SRM) leaders face disruptions on technological, organizational, and human fronts. Preparation and pragmatic execution are key for dealing with these disruptions and providing the right cybersecurity program.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
2. ➤ Cloud Architect at Kovarus
➤ Previously at Constant Contact, Sandia
National Laboratories, and a few other
places you’ve never heard of
➤ Operations background, but more of a
developer these days
➤ Member of Vox Pupuli
➤ Organizer of the Boston Puppet User
Group
ABOUT ME
3.
4. CONTACT INFO
➤ @djdanzilio on Twitter
➤ danzilio on Freenode and Slack (you can
usually find me in #voxpupuli, #puppet-
dev, and #puppet)
➤ danzilio on GitHub and The Forge
➤ ddanzilio (at) kovarus (dot) com
➤ blog.danzil.io
➤ www.kovarus.com
7. GANG OF FOUR
➤ Gang of Four (GoF) book introduced the
concept for Object Oriented
programming
➤ 23 patterns with examples written in
C++ and SmallTalk
➤ Published in 1994, more than 500,000
copies sold
➤ One of the best selling software
engineering books in history
➤ Influenced an entire generation of
developers, languages, and tools
8. DESIGN PATTERNS
➤ Can be highly contextual and language dependent, but a lot can be learned from all
of them
➤ The GoF focused on statically-typed, object oriented, compiled languages
➤ Some languages have implemented primitives for these patterns
➤ Not many of the GoF patterns directly apply to Puppet
➤ All of the GoF patterns focus on reinforcing a set of design principles
19. SIX PATTERNS
➤ Resource Wrapper: adding functionality to code you don’t own
➤ Package, File, Service: breaking up monolithic classes
➤ Params: delegating parameter defaults
➤ Strategy: doing the same thing differently
➤ Roles and Profiles: organizing your code for modularity
➤ Factory: creating resources on the fly
21. ABOUT THE WRAPPER PATTERN
➤ Problem: resources you don’t own are missing some functionality or feature
necessary to implement your requirements
➤ Solution: use composition to add your required functionality without modifying the
code you don’t own
22. ABOUT THE WRAPPER PATTERN
➤ Use the resource wrapper pattern when you need to add functionality to an
existing resource
➤ When you feel the need to write your own resources, or to make changes to Forge
modules, think about whether you should really be using the wrapper pattern
➤ You can do this in Puppet 3 and Puppet 4, but it’s much cleaner in Puppet 4
➤ This pattern forms the basis of many other patterns you’ll see today
23. EXAMPLE: MANAGING USERS
➤ We want to manage our employee user accounts
➤ Requirements:
➤ The user’s UID should be set to their employee ID
➤ All employees need to be members of the ‘employees’ group
➤ We should manage a user’s bash profile by default, but users may opt out of this
upon request
24. EXAMPLE: MANAGING USERS
define mycompany::user (
$employee_id,
$gid,
$groups = ['employees'],
$username = $title,
$manage_profile = true,
) {
if $manage_profile {
file { "/home/${username}/.bash_profile":
ensure => file,
owner => $username,
require => User[$username],
}
}
user { $username:
uid => $employee_id,
gid => $gid,
groups => $groups,
}
}
All employees should be in the ‘employees’ group
Employee ID is used for the user ID
Feature flag to manage your user’s bash profile
Manage ~/.bash_profile with a file resource
Pass your parameters to the user resource
25. EXAMPLE: MANAGING USERS
mycompany::user { 'bob':
employee_id => '1093',
gid => 'wheel',
manage_profile => false,
}
“We have a new employee
named Bob. He’s employee
1093 and he needs to be a
member of the wheel group so
he can sudo. He wants to
manage his own bash
profile.”
26. EXAMPLE: MANAGING USERS
“Hey, I’d like to have my
shell set to /bin/zsh, can you
do that for me?”
mycompany::user { 'bob':
employee_id => '1093',
gid => 'wheel',
shell => '/bin/zsh',
manage_profile => false,
}
Could not retrieve catalog:
Invalid parameter ‘shell’ for
type ‘mycompany::user’
27. EXAMPLE: MANAGING USERS define mycompany::user (
$employee_id,
$gid,
$groups = ['employees'],
$username = $title,
$manage_profile = true,
) {
if $manage_profile {
file { "/home/${username}/.bash_profile":
ensure => file,
owner => $username,
require => User[$username],
}
}
user { $username:
uid => $employee_id,
gid => $gid,
groups => $groups,
}
}
Problem
You must maintain these parameters.
28. EXAMPLE: MANAGING USERS (PUPPET 3)
define mycompany::user (
$username = $title,
$manage_profile = true,
$user = {}
) {
if $manage_profile {
file { "/home/${username}/.bash_profile":
ensure => file,
owner => $username,
require => User[$username],
}
}
$user_defaults = { ‘groups’ => [‘employees’] }
$user_params = merge($user, $user_defaults)
create_resources(‘user’, $username, $user_params)
}
Much more flexible interface
Enforce business rules
Create the user resource by passing
the hash to create_resources
29. EXAMPLE: MANAGING USERS (PUPPET 4)
define mycompany::user (
String $username = $title,
Boolean $manage_profile = true,
Hash $user = {}
) {
if $manage_profile {
file { "/home/${username}/.bash_profile":
ensure => file,
owner => $username,
require => User[$username],
}
}
$user_defaults = { 'groups' => [‘employees’] }
user { $username:
* => $user_defaults + $user,
}
}
Much more flexible interface
Enforce business rules
Use splat operator to pass hash keys
as parameters to the user resource
30. EXAMPLE: MANAGING USERS
mycompany::user { 'bob':
employee_id => '1093',
gid => 'wheel',
manage_profile => false,
}
“Hey, I’d like to have my
shell set to /bin/zsh, can you
do that for me?”
mycompany::user { 'bob':
manage_profile => false,
user => {
'uid' => '1093',
'gid' => 'wheel',
}
}
31. EXAMPLE: MANAGING USERS
mycompany::user { 'bob':
employee_id => '1093',
gid => 'wheel',
manage_profile => false,
}
mycompany::user { 'bob':
manage_profile => false,
user => {
'uid' => '1093',
'gid' => 'wheel',
'shell' => '/bin/zsh',
}
}
“Hey, I’d like to have my
shell set to /bin/zsh, can you
do that for me?”
33. ABOUT THE PACKAGE/FILE/SERVICE PATTERN
➤ Problem: your module’s init.pp is getting too cluttered because all of your code’s
functionality (concerns) live in that one file
➤ Solution: break out the basic functions of your module into separate classes, usually
into a package, config, and service class
34. ABOUT THE PACKAGE/FILE/SERVICE PATTERN
➤ This is one of the first patterns you see when learning Puppet
➤ This is the embodiment of the Single Responsibility and Separation of Concerns
principles
➤ Most modules can be broken down into some form of Package, Config File, and
Service management
➤ Use this specific pattern any time you write a module that manages these things
➤ Keep the spirit of this pattern in mind whenever you write a module that is more
than a few lines long
➤ This has the added benefit of allowing us to utilize class containment for cleaner
resource ordering
35. EXAMPLE: NTP
class ntp {
case $::osfamily {
'Solaris': {
$package_name = ['SUNWntpr', 'SUNWntpu']
$config_file = '/etc/inet/ntp.conf'
$service_name = 'network/ntp'
}
'RedHat': {
$package_name = 'ntp'
$config_file = '/etc/ntp.conf'
$service_name = 'ntpd'
}
}
package { $package_name:
ensure => installed,
}
file { $config_file:
ensure => file,
content => template('ntp/ntpd.conf.erb'),
require => Package[$package_name],
notify => Service[$service_name],
}
service { $service_name:
ensure => running
}
}
Installs the ntp package for that platform
Places the ntp config file
Ensures that the package is installed first
Notifies the ntp service of changes to the file
Manages the ntp service
Set some variables based on the osfamily fact
36. class ntp {
case $osfamily {
'Solaris': {
$package_name = ['SUNWntpr', 'SUNWntpu']
$config_file = '/etc/inet/ntp.conf'
$service_name = 'network/ntp'
}
'RedHat': {
$package_name = 'ntp'
$config_file = '/etc/ntp.conf'
$service_name = 'ntpd'
}
}
class { 'ntp::install': } ->
class { 'ntp::config': } ~>
class { 'ntp::service': }
}
EXAMPLE: NTP
Installs the ntp package
Places the ntp config file
Package is installed first
Manages the ntp service
Notifies the service of changes
37. class ntp::install {
package { $ntp::package_name:
ensure => installed,
}
}
class ntp::config {
file { $ntp::config_file:
ensure => file,
content => template('ntp/ntpd.conf.erb'),
}
}
class ntp::service {
service { $ntp::service_name:
ensure => running,
}
}
EXAMPLE: NTP
39. ABOUT THE PARAMS PATTERN
➤ Problem: hard-coded data makes modules fragile, verbose parameter default and
variable setting logic make classes hard to read
➤ Solution: convert embedded data to parameters and move that data to a separate
class where it can be used as parameter defaults
40. ABOUT THE PARAMS PATTERN
➤ The params pattern breaks out your variable assignment and parameter defaults
into a separate class, typically named params
➤ Makes classes easier to read by moving the default setting logic into a purpose-built
class
➤ Delegates responsibility for setting defaults to the params class
➤ Module data is a new feature designed to eliminate the params pattern by moving
this logic into Hiera
➤ Until module data becomes ubiquitous, you’ll see params in use in almost every
module
➤ Use this pattern any time you have data that must live in your module
41. EXAMPLE: NTP
Problems
Only supports Solaris and RedHat
~70% of this class is devoted to data
class ntp {
case $osfamily {
'Solaris': {
$package_name = ['SUNWntpr', 'SUNWntpu']
$config_file = '/etc/inet/ntp.conf'
$service_name = 'network/ntp'
}
'RedHat': {
$package_name = 'ntp'
$config_file = '/etc/ntp.conf'
$service_name = 'ntpd'
}
}
class { 'ntp::install': } ->
class { 'ntp::config': } ~>
class { 'ntp::service': }
}
42. EXAMPLE: NTP
class ntp::params {
case $::osfamily {
'Solaris': {
$package_name = ['SUNWntpr', 'SUNWntpu']
$config_file = '/etc/inet/ntp.conf'
$service_name = 'network/ntp'
}
'RedHat': {
$package_name = 'ntp'
$config_file = '/etc/ntp.conf'
$service_name = 'ntpd'
}
}
}
Create a purpose-built class
to store your module’s data
These variables become the default
values for your class parameters
43. EXAMPLE: NTP
class ntp (
$package_name = $ntp::params::package_name,
$config_file = $ntp::params::config_file,
$service_name = $ntp::params::service_name,
) inherits ntp::params {
class { 'ntp::install': } ->
class { 'ntp::config': } ~>
class { 'ntp::service': }
}
Inheriting the params class ensures
that it is evaluated first
Convert the variables to parameters, and set
their defaults to the corresponding variables
in the params class
45. ABOUT THE STRATEGY PATTERN
➤ Problem: you have multiple ways to achieve basically the same thing in your
module, but you need to choose one way based on some criteria (usually a fact)
➤ Solution: break each approach into separate classes and let your caller decide which
to include
46. ABOUT THE STRATEGY PATTERN
➤ This is a GoF pattern
➤ Use this pattern when you have lots of logic doing effectively the same thing but
with different details under certain conditions
➤ The Strategy Pattern uses composition to assemble complex behavior from smaller
classes
47. EXAMPLE: MYSQL
class mysql {
...
case $::osfamily {
'Debian': {
apt::source { 'mysql':
comment => 'MySQL Community APT repository',
location => "http://repo.mysql.com/apt/${::operatingsystem}",
release => $::lsbdistcodename,
repos => 'mysql-5.7',
include => { src => false },
}
}
'RedHat': {
yumrepo { 'mysql':
descr => 'MySQL Community YUM repository',
baseurl => "http://repo.mysql.com/yum/mysql-5.7-community/el/${::lsbmajdistrelease}/${::architecture}",
enabled => true,
}
}
}
...
}
Both managing a package repository
48. EXAMPLE: MYSQL
class mysql::repo::redhat {
yumrepo { 'mysql':
descr => 'MySQL Community YUM repository',
baseurl => "http://repo.mysql.com/yum/mysql-5.7-community/el/${::lsbmajdistrelease}/${::architecture}",
enabled => true,
}
}
class mysql::repo::debian {
apt::source { 'mysql':
comment => 'MySQL Community APT repository',
location => "http://repo.mysql.com/apt/${::operatingsystem}",
release => $::lsbdistcodename,
repos => 'mysql-5.7',
include => { src => false },
}
}
Strategy Classes
49. EXAMPLE: MYSQL
class mysql {
...
case $::osfamily {
'Debian': { include mysql::repo::debian }
'RedHat': { include mysql::repo::redhat }
}
...
}
Context Class
Case statement determines
which strategy class to include
51. ABOUT THE ROLES AND PROFILES PATTERN
➤ Problem: large node statements with many classes, lots of inherited node
statements, difficulty identifying what a server’s purpose is in your environment
➤ Solution: add an extra layer of abstraction between your node and your modules
52. ABOUT THE ROLES AND PROFILES PATTERN
➤ The Roles and Profiles pattern was described by Craig Dunn in his blog post
Designing Puppet - Roles and Profiles
➤ This is one of the most comprehensive design patterns for Puppet
➤ It is the “official” way to structure your Puppet code
➤ You should always use Roles and Profiles
➤ Craig does an excellent job describing these concepts in depth, you should read his
blog post here: http://www.craigdunn.org/2012/05/239/
53. WITHOUT ROLES AND PROFILES node base {
include mycompany::settings
}
node www inherits base {
include apache
include mysql
include php
include nagios::web_server
}
node ns1 inherits base {
include bind
include nagios::bind
bind::zone { ‘example.com': type => master }
}
node ns2 inherits base {
include bind
include nagios::bind
bind::zone { ‘example.com': type => slave }
}
Base node includes common modules
Nodes inherit the base to get common functionality
More specific functionality is added in each node statement
Problems
This file can get really long, really fast
Can violate DRY when you have lots of similar nodes
Edge cases are hard to manage
Node ModulesModules ResourcesResources
54. ROLES AND PROFILES TERMINOLOGY
➤ Module: implements one piece of software or functionality
➤ Profile: combines modules to implement a stack (i.e. “A LAMP stack includes the
apache, mysql, and php modules”)
➤ Role: combine profiles to implement your business rules (i.e. “This server is a web
server”)
➤ A node can only ever include one role
➤ If you think you need to include two roles, you’ve probably just identified another
role
Node ModulesModules ResourcesResourcesRole ModulesProfiles
55. CONVERTING TO ROLES AND PROFILES
class roles::base {
include profiles::base
}
class roles::web_server {
include profiles::base
include profiles::lamp
}
class roles::nameserver::master inherits roles::base {
include profiles::bind::master
}
class roles::nameserver::slave inherits roles::base {
include profiles::bind::slave
}
class profiles::base {
include mycompany::settings
}
class profiles::lamp {
include apache
include mysql
include php
include nagios::web_server
}
class profiles::bind ($type = master) {
include bind
bind::zone { 'example.com':
type => $type,
}
}
class profiles::bind::master {
include profiles::bind
}
class profiles::bind::slave {
class { 'profiles::bind':
type => slave,
}
}
56. CONVERTING TO ROLES AND PROFILES
node www {
include roles::web_server
}
node ns1 {
include roles::nameserver::master
}
node ns2 {
include roles::nameserver::slave
}
node base {
include mycompany::settings
}
node www inherits base {
include apache
include mysql
include php
include nagios::web_server
}
node ns1 inherits base {
include bind
include nagios::bind
bind::zone { ‘example.com': type => master }
}
node ns2 inherits base {
include bind
include nagios::bind
bind::zone { ‘example.com': type => slave }
}
58. ABOUT THE FACTORY PATTERN
➤ Problem: your module has to create a lot of resources of the same type, or you want
to control how resources are created with your module
➤ Solution: create the resources in your class based on data passed to your parameters
59. ABOUT THE FACTORY PATTERN
➤ This is also known as the create_resources pattern
➤ Emerged early on as crude iteration support in older Puppet versions
➤ We already saw this in action in the Resource Wrapper Pattern example
➤ Use this pattern when you want your module to have a single entry point, even for
creating your own resources
60. EXAMPLE: MANAGING CONFIGURATION WITH INI_SETTING
class puppet (
$ca_server = 'puppet-ca.example.com',
$master = 'puppet.example.com',
$pluginsync = true,
$noop = false,
) {
$defaults = { 'path' => '/etc/puppet/puppet.conf' }
$main_section = {
'main/ca_server' => { 'setting' => 'ca_server', 'value' => $ca_server },
'main/server' => { 'setting' => 'server', 'value' => $master },
}
$agent_section = {
'agent/pluginsync' => { 'setting' => 'pluginsync', 'value' => $pluginsync },
'agent/noop' => { 'setting' => 'noop', 'value' => $noop },
}
create_resources('ini_setting', $main_section, merge($defaults, { section => 'main' }))
create_resources('ini_setting', $agent_section, merge($defaults, { section => 'agent' }))
}
Get data from params
Organize the data so
we can consume it
with create_resources
Pass the munged data
to create_resources
61. EXAMPLE: MANAGING CONFIGURATION WITH INI_SETTING (PUPPET 4)
class puppet (
String $path = '/etc/puppet/puppet.conf',
Hash $main_section = {
'ca_server' => 'puppet-ca.example.com',
'server' => 'puppet.example.com'
},
Hash $agent_section = {
'pluginsync' => true,
'noop' => false,
},
) {
['agent', 'main'].each |$section| {
$data = getvar("${section}_section")
$data.each |$key,$val| {
ini_setting { "${section}/${key}":
path => $path,
section => $section,
setting => $key,
value => $val,
}
}
}
}
Pass a hash for each section
Iterate over each section name
Fetch the variable that holds that section’s data
Iterate over that data, passing it to an
ini_setting resource
64. CONTACT INFO
➤ @djdanzilio on Twitter
➤ danzilio on Freenode and Slack (you can
usually find me in #voxpupuli, #puppet-
dev, and #puppet)
➤ danzilio on GitHub and The Forge
➤ ddanzilio (at) kovarus (dot) com
➤ blog.danzil.io
➤ www.kovarus.com