This document discusses common anti-patterns, pitfalls, and bad practices when using Puppet, including: using boolean facts ambiguously, expecting C-like values for parameters, excessively using "if defined()" checks, relying on large numbers of exec resources, and depending on dynamic scoping. The author recommends avoiding these practices in favor of more deterministic approaches like using Hiera for shared values and parameters, creating wrapper classes for shared dependencies, using single robust scripts instead of many exec resources, and avoiding dynamic scoping which can cause unpredictable behavior.
Puppet is a configuration management tool that allows systems to be declared and maintained in a desired state. It uses a declarative domain-specific language to describe system configuration. Resources are used to model system components like packages, services, files and users. Modules bundle related manifests, files and templates. A Puppet master stores configurations and agents pull configurations from the master to make necessary changes. After runs, agents report back metrics and logs to provide visibility into infrastructure changes.
This document discusses automated testing of Puppet code. It describes using RSpec-puppet for unit testing Puppet manifests and ensuring resources are properly configured. It also discusses performing "after testing" by executing tests in the user environment to check the final configuration and catch issues not found by Puppet reports. Post-provision checks (PPC) is presented as a framework for writing these types of integration tests and automating their execution after Puppet runs via tools like TeamCity.
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.
The document discusses monitoring and analyzing memory usage in Raku processes. It describes using the getrusage(2) system call to retrieve resident set size (RSS) and other memory statistics for a process. It then presents the ProcStats module, which allows periodically sampling getrusage(2) data over time to track RSS and detect changes from an initial baseline. The module outputs differences in memory statistics compared to the first sample, ignoring unchanged values. This provides a concise way to monitor for increases in a process's memory footprint over time.
Presentation on how Puppet has been introduced in Seat Pagine Gialle to automate system administration tasks and easy the cooperation between Ops and Others.
Short introduction to the basics of Perl testing and some resources for further reading. Includes basics of Test::Simple, Test::More, using Inline for multi-language testing, testing coverage, testing tests.
The document describes a project to build a website called PerkyProfiler that retrieves user profile information from different services like GitHub, Flickr, and Twitter by taking URLs as input. It will use Perl and several Perl modules. The project will be built using the Catalyst web framework and Moose/MooseX for object-oriented programming. It describes using Moose roles, custom types, declarative class definitions, and functional programming techniques in Perl. The goal is to generate a unified user profile by combining data from different services for a given URL.
Oliver Hookins presents on Nokia's use of Puppet for application deployment and automation. Some key points:
- Nokia uses Puppet to deploy diverse applications across environments in a consistent way and reduce errors.
- The initial Puppet system led to new problems around node definitions and lack of testing. They aimed to improve with BDD, better versioning, and more testing.
- Their goals included taking a more traditional software development approach, improving developer tools, and enabling easier deployments.
- Current work includes improving testing with Jenkins, moving to an API approach to remove host/role specifics, and developing an ENC.
A reusable Puppet module should provide options and flexibility for configuration through parameters rather than being overly prescriptive. This allows users to customize the module for their specific needs. Parameters can control things like file management, package/service options, additional resources, and application configuration. Using patterns like default parameters, options hashes, and templates helps keep modules reusable and configurable.
Face it, backticks are a pain. BASH $() construct provides a simpler, more effective approach. This talk uses examples from automating git branches and command line processing with getopt(1) to show how $() works in shell scripts.
This document discusses Puppet modules and provides examples of how to structure modules to allow for customization and reuse. It outlines 10 design rules for Example42 modules, including separating configuration data from module logic, providing choices for configuration file supply, configuring with defaults but allowing customization, and allowing management of general module behavior. The document provides code examples demonstrating how to implement these rules in Puppet modules.
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.
Object Trampoline: Why having not the object you want is what you need.Workhorse Computing
Overview of Trampoline Objects in Perl with examples for lazy construction, lazy module use, added sanity checks. This version includes corrections from the original presented at OSCON 2013 and comments.
This document provides tips and tricks for using Ansible more effectively. It discusses best practices for inventory structure and variable organization. The key points are:
- Inventory structure and variable organization should make sense for your environment rather than following a "one size fits all" approach. Context is important.
- Variables can be defined in many places like inventory files, group variables, host variables, role defaults etc. and Ansible has a precedence order for variables.
- Playbooks can be made to run tasks in parallel using tools like parallel or by running tasks asynchronously to improve performance for non-serial tasks.
Variable interpolation is a standard way to BASH your head. This talk looks at interpolation, eval, ${} handling and "set -vx" to debug basic variable handling.
This document discusses using an HTTP proxy to load specific web pages for testing purposes. It explains that many web pages contain resources from multiple domains that cannot be saved locally. An HTTP proxy can be used to intercept requests and redirect local URLs to a test server, while passing through external URLs to the actual web server. The document provides code examples for setting up an HTTP proxy using HTTP::Proxy and modifying the LWP user agent to handle local and remote URLs differently. Using this approach allows a test loop to load repeatable web page content from both local and external sources.
This document discusses an approach to data-driven testing of objects using Object::Exercise. Key points include:
- Object::Exercise standardizes repetitive test code into a reusable framework.
- Tests are defined declaratively as data, replacing hardwired test code. This avoids issues like testing the tests.
- Tests can validate return values, check for exceptions, and perform more complex checks using regular expressions and code references.
- The approach also allows overriding parts of an object under test by replacing methods that initialize test data. This enables flexible testing of different configurations.
An introduction to message queues with PHP. We'll focus on RabbitMQ and how to leverage queuing scenarios in your applications. The talk will cover the main concepts of RabbitMQ server and AMQP protocol and show how to use it in PHP. The RabbitMqBundle for Symfony2 will be presented and we'll see how easy you can start to use message queuing in minutes.
Presented at Symfony User Group Belgium: http://www.meetup.com/Symfony-User-Group-Belgium/events/169953362/
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupKacper Gunia
Slides from my talk at Symfony UK Meetup. London, 20 Aug 2014. http://twitter.com/cakper
Video: https://www.youtube.com/watch?v=cha92Og9M5A
More Domain-Driven Design related content at: https://domaincentric.net/
Tatsumaki is a non-blocking web framework for Perl built on Plack and AnyEvent. It allows building asynchronous applications that can handle thousands of concurrent connections. Tatsumaki uses psgi.streaming to enable asynchronous responses. It includes a non-blocking HTTP client and pure Perl message queue for building real-time applications like chat and comet. The framework is in a beta stage but plans include services for XMPP/IRC bots and a standard comet interface.
Supercharging WordPress Development in 2018Adam Tomat
Slide links:
- PHP-FIG: https://www.php-fig.org/psr
- Timber: https://www.upstatement.com/timber/
- Bedrock: https://roots.io/bedrock/
- Lumberjack: https://github.com/Rareloop/lumberjack
- Lumberjack Core: https://github.com/Rareloop/lumberjack-core
- Collections: https://laravel.com/docs/5.6/collections
- PHP-DI: http://php-di.org/
- Lumberjack Validation: https://github.com/Rareloop/lumberjack-validation
- Sessions: https://github.com/Rareloop/lumberjack-core/tree/ft-session
- Lumberjack Example Repo: https://github.com/Rareloop/lumberjack-example
- Laravel Responsable: https://laravel-news.com/laravel-5-5-responsable
Towards the end of 2015 Rareloop launched their WordPress starter theme Lumberjack, which built on open source tools such as Bedrock and Timber. We wanted to move Lumberjack forward inline with everything we have learnt over the years of using it - which meant completely re-writing it from the ground up. The new Lumberjack is now stable and ready for use!
This talk is aimed at anyone involved in working with WordPress, regardless of how technical you are. The beauty of Lumberjack is that you can use as much or as little as you like, so whether you’re new to web development or a seasoned software engineer there will be something here for you.
Test-Driven Puppet Development - PuppetConf 2014Puppet
This document discusses testing driven development of Puppet modules. It covers using puppet-lint to check style, puppet-syntax to validate code, and rspec-puppet to test catalogs and verify relationships. Packer is used to build consistent virtual machine images, Vagrant manages virtual environments for testing, and Beaker runs acceptance tests across multiple platforms. The goal is to create a virtuous cycle of testing, validation, and development feedback to continuously improve module quality.
This document provides an overview of a PuppetCamp presentation on using Puppet for system administrators. The presenter, Stephen Wallace, has 20 years of experience in system administration roles. He will discuss how Puppet can help achieve goals like reusability, reduced support workload, improved monitoring, and documentation for system administrators. He will also cover topics like getting started with Puppet without programming experience, using tools like Hiera and Augeas, and how Puppet can help with provisioning, documentation, and disaster recovery.
Plack is an interface for web request handlers that simplifies the interface and makes code more portable. It allows developers to focus on request handling rather than API specifics. Plack addresses issues with traditional CGI and mod_perl approaches by running handlers outside of servers in a standardized way. This encapsulation improves performance, debugging, and code reuse across different server implementations. Plack includes modules for common tasks like routing, middleware, and running PSGI applications on various web servers.
This document discusses using PHP for both web and desktop applications. It introduces PHP-GTK, which allows PHP to create graphical desktop applications with a native look and feel across platforms. It provides examples of creating windows, containers, working with signals and the main loop. The document also discusses installing PHP-GTK, some key considerations for desktop applications, and examples of creating widgets like trees and working with models.
This document provides an overview of Puppet, an open source configuration management tool. It discusses key Puppet concepts like infrastructure as code, reproducible setups, and aligned environments. It also describes Puppet's architecture including the Puppet master, agent nodes, catalogs, resources, and the lifecycle of a Puppet run. The Puppet language is declarative and node-based. Resources are defined and organized into classes. Relationships between resources can be specified.
Puppet is a configuration management tool that uses a client-server model. The puppet master stores node configurations in a declarative domain-specific language (DSL). Puppet agents on nodes retrieve their configuration from the master and enforce it locally. Modules define reusable components for configuring packages, files, services, and other resources. Puppet supports environments for separate dev/qa workflows and uses external node classifiers and databases for scaling to large infrastructures.
The document describes a project to build a website called PerkyProfiler that retrieves user profile information from different services like GitHub, Flickr, and Twitter by taking URLs as input. It will use Perl and several Perl modules. The project will be built using the Catalyst web framework and Moose/MooseX for object-oriented programming. It describes using Moose roles, custom types, declarative class definitions, and functional programming techniques in Perl. The goal is to generate a unified user profile by combining data from different services for a given URL.
Oliver Hookins presents on Nokia's use of Puppet for application deployment and automation. Some key points:
- Nokia uses Puppet to deploy diverse applications across environments in a consistent way and reduce errors.
- The initial Puppet system led to new problems around node definitions and lack of testing. They aimed to improve with BDD, better versioning, and more testing.
- Their goals included taking a more traditional software development approach, improving developer tools, and enabling easier deployments.
- Current work includes improving testing with Jenkins, moving to an API approach to remove host/role specifics, and developing an ENC.
A reusable Puppet module should provide options and flexibility for configuration through parameters rather than being overly prescriptive. This allows users to customize the module for their specific needs. Parameters can control things like file management, package/service options, additional resources, and application configuration. Using patterns like default parameters, options hashes, and templates helps keep modules reusable and configurable.
Face it, backticks are a pain. BASH $() construct provides a simpler, more effective approach. This talk uses examples from automating git branches and command line processing with getopt(1) to show how $() works in shell scripts.
This document discusses Puppet modules and provides examples of how to structure modules to allow for customization and reuse. It outlines 10 design rules for Example42 modules, including separating configuration data from module logic, providing choices for configuration file supply, configuring with defaults but allowing customization, and allowing management of general module behavior. The document provides code examples demonstrating how to implement these rules in Puppet modules.
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.
Object Trampoline: Why having not the object you want is what you need.Workhorse Computing
Overview of Trampoline Objects in Perl with examples for lazy construction, lazy module use, added sanity checks. This version includes corrections from the original presented at OSCON 2013 and comments.
This document provides tips and tricks for using Ansible more effectively. It discusses best practices for inventory structure and variable organization. The key points are:
- Inventory structure and variable organization should make sense for your environment rather than following a "one size fits all" approach. Context is important.
- Variables can be defined in many places like inventory files, group variables, host variables, role defaults etc. and Ansible has a precedence order for variables.
- Playbooks can be made to run tasks in parallel using tools like parallel or by running tasks asynchronously to improve performance for non-serial tasks.
Variable interpolation is a standard way to BASH your head. This talk looks at interpolation, eval, ${} handling and "set -vx" to debug basic variable handling.
This document discusses using an HTTP proxy to load specific web pages for testing purposes. It explains that many web pages contain resources from multiple domains that cannot be saved locally. An HTTP proxy can be used to intercept requests and redirect local URLs to a test server, while passing through external URLs to the actual web server. The document provides code examples for setting up an HTTP proxy using HTTP::Proxy and modifying the LWP user agent to handle local and remote URLs differently. Using this approach allows a test loop to load repeatable web page content from both local and external sources.
This document discusses an approach to data-driven testing of objects using Object::Exercise. Key points include:
- Object::Exercise standardizes repetitive test code into a reusable framework.
- Tests are defined declaratively as data, replacing hardwired test code. This avoids issues like testing the tests.
- Tests can validate return values, check for exceptions, and perform more complex checks using regular expressions and code references.
- The approach also allows overriding parts of an object under test by replacing methods that initialize test data. This enables flexible testing of different configurations.
An introduction to message queues with PHP. We'll focus on RabbitMQ and how to leverage queuing scenarios in your applications. The talk will cover the main concepts of RabbitMQ server and AMQP protocol and show how to use it in PHP. The RabbitMqBundle for Symfony2 will be presented and we'll see how easy you can start to use message queuing in minutes.
Presented at Symfony User Group Belgium: http://www.meetup.com/Symfony-User-Group-Belgium/events/169953362/
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupKacper Gunia
Slides from my talk at Symfony UK Meetup. London, 20 Aug 2014. http://twitter.com/cakper
Video: https://www.youtube.com/watch?v=cha92Og9M5A
More Domain-Driven Design related content at: https://domaincentric.net/
Tatsumaki is a non-blocking web framework for Perl built on Plack and AnyEvent. It allows building asynchronous applications that can handle thousands of concurrent connections. Tatsumaki uses psgi.streaming to enable asynchronous responses. It includes a non-blocking HTTP client and pure Perl message queue for building real-time applications like chat and comet. The framework is in a beta stage but plans include services for XMPP/IRC bots and a standard comet interface.
Supercharging WordPress Development in 2018Adam Tomat
Slide links:
- PHP-FIG: https://www.php-fig.org/psr
- Timber: https://www.upstatement.com/timber/
- Bedrock: https://roots.io/bedrock/
- Lumberjack: https://github.com/Rareloop/lumberjack
- Lumberjack Core: https://github.com/Rareloop/lumberjack-core
- Collections: https://laravel.com/docs/5.6/collections
- PHP-DI: http://php-di.org/
- Lumberjack Validation: https://github.com/Rareloop/lumberjack-validation
- Sessions: https://github.com/Rareloop/lumberjack-core/tree/ft-session
- Lumberjack Example Repo: https://github.com/Rareloop/lumberjack-example
- Laravel Responsable: https://laravel-news.com/laravel-5-5-responsable
Towards the end of 2015 Rareloop launched their WordPress starter theme Lumberjack, which built on open source tools such as Bedrock and Timber. We wanted to move Lumberjack forward inline with everything we have learnt over the years of using it - which meant completely re-writing it from the ground up. The new Lumberjack is now stable and ready for use!
This talk is aimed at anyone involved in working with WordPress, regardless of how technical you are. The beauty of Lumberjack is that you can use as much or as little as you like, so whether you’re new to web development or a seasoned software engineer there will be something here for you.
Test-Driven Puppet Development - PuppetConf 2014Puppet
This document discusses testing driven development of Puppet modules. It covers using puppet-lint to check style, puppet-syntax to validate code, and rspec-puppet to test catalogs and verify relationships. Packer is used to build consistent virtual machine images, Vagrant manages virtual environments for testing, and Beaker runs acceptance tests across multiple platforms. The goal is to create a virtuous cycle of testing, validation, and development feedback to continuously improve module quality.
This document provides an overview of a PuppetCamp presentation on using Puppet for system administrators. The presenter, Stephen Wallace, has 20 years of experience in system administration roles. He will discuss how Puppet can help achieve goals like reusability, reduced support workload, improved monitoring, and documentation for system administrators. He will also cover topics like getting started with Puppet without programming experience, using tools like Hiera and Augeas, and how Puppet can help with provisioning, documentation, and disaster recovery.
Plack is an interface for web request handlers that simplifies the interface and makes code more portable. It allows developers to focus on request handling rather than API specifics. Plack addresses issues with traditional CGI and mod_perl approaches by running handlers outside of servers in a standardized way. This encapsulation improves performance, debugging, and code reuse across different server implementations. Plack includes modules for common tasks like routing, middleware, and running PSGI applications on various web servers.
This document discusses using PHP for both web and desktop applications. It introduces PHP-GTK, which allows PHP to create graphical desktop applications with a native look and feel across platforms. It provides examples of creating windows, containers, working with signals and the main loop. The document also discusses installing PHP-GTK, some key considerations for desktop applications, and examples of creating widgets like trees and working with models.
This document provides an overview of Puppet, an open source configuration management tool. It discusses key Puppet concepts like infrastructure as code, reproducible setups, and aligned environments. It also describes Puppet's architecture including the Puppet master, agent nodes, catalogs, resources, and the lifecycle of a Puppet run. The Puppet language is declarative and node-based. Resources are defined and organized into classes. Relationships between resources can be specified.
Puppet is a configuration management tool that uses a client-server model. The puppet master stores node configurations in a declarative domain-specific language (DSL). Puppet agents on nodes retrieve their configuration from the master and enforce it locally. Modules define reusable components for configuring packages, files, services, and other resources. Puppet supports environments for separate dev/qa workflows and uses external node classifiers and databases for scaling to large infrastructures.
Writing and Publishing Puppet Modules - PuppetConf 2014Puppet
The document discusses best practices for writing and publishing Puppet modules. It covers module structure, writing manifests and templates, testing modules, publishing to the Forge, and maintaining modules over time. The overall goal is to create reusable modules that are portable, configurable and well-tested.
Puppet is a tool that allows users to declaratively configure systems. It provides abstraction through defined resources like packages and files, ensures configurations are idempotent, and converges systems to the desired state declaratively rather than imperatively through scripts. Puppet code is organized into reusable modules and managed through version control. Modules should include tests, be validated with tools like puppet-lint, and tested in automated environments like Travis CI to ensure high quality.
From Dev to DevOps - Apache Barcamp Spain 2011Carlos Sanchez
UPDATE: updated slides at http://www.slideshare.net/carlossg/from-dev-to-devops-conferencia-agile-spain-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.
Puppet for Java developers - JavaZone NO 2012Carlos Sanchez
Example code at https://github.com/carlossg/puppet-for-java-devs
More info at http://blog.carlossanchez.eu/tag/devops
Video at http://vimeo.com/49483627
Puppet is an infrastructure-as-code tool that allows easy and automated provisioning of servers, defining the packages, configuration, services,... in code. Enabling DevOps culture, tools like Puppet help drive Agile development all the way to operations and systems administration, and along with continuous integration tools like Jenkins, it is a key piece to accomplish repeatability and continuous delivery, automating the operations side during development, QA or production, and enabling testing of systems configuration.
Traditionally a field for system administrators, Puppet can empower developers, allowing both to collaborate coding the infrastructure needed for their developments, whether it runs in hardware, virtual machines or cloud. Developers and sysadmins can define what JDK version must be installed, application server, version, configuration files, war and jar files,... and easily make changes that propagate across all nodes.
Using Vagrant, a command line automation layer for VirtualBox, they can also spin off virtual machines in their local box, easily from scratch with the same configuration as production servers, do development or testing and tear them down afterwards.
We’ll show how to install and manage Puppet nodes with JDK, multiple application server instances with installed web applications, database, configuration files and all the supporting services. Including getting up and running with Vagrant and VirtualBox for quickstart and Puppet experiments, as well as setting up automated testing of the Puppet 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.
Integrating icinga2 and the HashiCorp suiteBram Vogelaar
We all love infrastructure as code, we automate everything ™ but how many
of us can really say we could destroy and recreate our core infrastructure
without human intervention. Can you be sure there isnt a DNS problem or
that all the things ™ are done in the right order This talk walks the
audience through a green fields exercise that sets up service discovery
using Consul, infrastructure as code using terraform, using images build
with packer and configured using puppet.
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.
More info at http://blog.carlossanchez.eu/tag/devops
Video en español: http://youtu.be/E_OE4l3t5BA
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.
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014Puppet
This document provides a guide to Puppet through the use of types. It discusses Dijkstra's view on organizing complexity and NOOPing. It then covers differences between the DSL and RAL approaches, defined types, symmetry between resources and types, and implementing types and providers correctly through examples for trafficserver records and git configurations.
This document provides an overview of PL/Proxy, a database partitioning system implemented as a PostgreSQL procedural language extension. PL/Proxy allows applications to perform database operations like inserts, updates, deletes and queries across multiple PostgreSQL database partitions in a transparent manner. It works by routing operations to the appropriate partition based on the value of a partitioning key. The document discusses PL/Proxy concepts, areas of application, example usage, installation, backend and frontend functions, configuration options and more.
This document introduces Ansible, an open source tool for automating software provisioning, configuration management, and application deployment. It discusses how Ansible works using YAML files and modules to define tasks and plays. Key concepts covered include inventories, modules, playbooks, tasks, facts and variables, templates, and roles. The document provides examples of using Ansible to deploy WordPress and manage systems.
PM is a command line tool that can be used to speed up development processes. It provides shortcuts and aliases for common commands, packages code, generates code templates, and loads external dependencies. PM works with all types of PHP projects, including those not using PHP 5.3+. It can customize commands for specific users, environments, and based on conditional logic. Some features of PM include unit testing execution, database migration scripts, and code auditing.
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.
The document summarizes an advanced Perl training course covering new features in Perl 5.10 like defined-or operator, switch statement, smart matching and say(), as well as testing with modules like Test::MockObject, profiling with Devel::Cover, and benchmarking code with Benchmark.pm. The one-day course will quickly cover many Perl topics and point to additional online resources for further learning.
Slides from DevOps Pro, Vilnius, Lithuania.
Abstract: The wide adoption of configuration management and the increasing size and complexity of the associated code, prompt for assessing, maintaining, and improving the configuration code’s quality. We can leverage traditional software engineering knowledge and best practices to develop and maintain high quality configuration code. This talk brings the smell metaphor to configuration domain. This talk introduces configuration smells, their types with various examples, tools to detect them, and suggestions to refactor them.
Regular expressions, modules, and scripts for pentesting with Perl are covered. Key points include using regular expressions for tasks like validation and extraction, useful modules like CGI and Net::DNS, and example scripts for port scanning, getting the WordPress version, and saving entries from the Google Hacking Database. The document concludes with future applications of Perl and resources for learning more.
Puppet is an open source configuration management tool that can be used to automate the configuration and management of infrastructure and applications. It uses a client-server architecture and declarative language to define and enforce the desired state of systems. Other HashiCorp tools like Packer, Terraform, Vault and Nomad can integrate with Puppet for tasks like infrastructure provisioning, secrets management and workload orchestration. Bolt is a task orchestration tool from Puppet that can be used to automate operational tasks across infrastructure defined by tools like Terraform. Consul provides service discovery and configuration for the Puppet infrastructure.
Puppet Community Day: Planning the Future TogetherPuppet
Puppet Community Day at ConfigMgmtCamp Ghent 2025 is a chance for Puppet staff, community contributors and users to get together and talk about all things Puppet, Bolt, and the open source development tools used to develop and maintain code.
The Evolution of Puppet: Key Changes and Modernization TipsPuppet
A lot of people ask me about what's changed in Puppet since older versions. This short Ignite presentation highlights how Puppet has changed since 3.x and 4.x and provide quick tips on what to look for as you modernize to Puppet 8 and beyond.
Can You Help Me Upgrade to Puppet 8? Tips, Tools & Best Practices for Your Up...Puppet
With each generation of Puppet, we have worked hard to improve upon it and increase its ease of use. But with this comes the need to upgrade — this time from Puppet 7 to Puppet 8!
From removing legacy facts, to updating Rubocop rules, to updating your dependencies and beyond, we'll take you through a step-by-step process to ensuring that your modules are fully up to date and ready for Puppet 8.
Bolt Dynamic Inventory: Making Puppet EasierPuppet
This talk illustrates how we setup our own local dynamic Bolt inventory plugins to help with our automated Puppet development and testing.
It's very common for developers to code and test their applications on VMs, either locally hosted or on the cloud. As individuals have editor preferences (nvim, vscode, etc), so they have hypervisor. Once you create a Bolt inventory file listing the server or servers, then Bolt can easily configure those servers using custom Puppet code. Instead of manually creating the Bolt inventory, it is easy to create a dynamic inventory plugin — if it doesn't already exist — to suit your particular use case.
Customizing Reporting with the Puppet Report ProcessorPuppet
The Puppet Report Processor is a component in Open Source Puppet that collects data about nodes during Puppet runs and processes the information into reports. Puppet can send this data to dashboards, but sometimes, customized handling of this data is needed. Writing a custom report processor allows you to tailor reports for specific use cases, such as logging specific metrics, integrating with other monitoring tools, or alerting based on custom-defined conditions. Custom processors enable deeper, more targeted insights into your infrastructure.
The State of Puppet in 2025: A Presentation from Developer Relations Lead Dav...Puppet
In this talk, Developer Relations Lead David Sandilands explains recent changes in Puppet's open source product releases, developer tooling, community, and more.
Let Red be Red and Green be Green: The Automated Workflow Restarter in GitHub...Puppet
Re-kicking failed pipelines and workflows can become tedious particularly when these are transient failures, impacting performance and costing resources. In this talk we will show you how you can improve the reliability of your pipelines, through the use of an automated workflow re-starter which will automatically trigger a rerun of your workflows in Github Actions.
CI/CD pipelines are the backbone of your development and deployment process, however they can suffer from inefficiencies and transient failures leading to your team wasting valuable time. This talk provides a deep dive into the art of workflow restarting, a reliable approach to improving your pipelines,take back control over your pipelines and keep them running smoothly.
Attendees will gain a clear understanding of how to configure and implement the workflow restarter for better performance of there pipelines. Whether it's a failed test or job, this restarter is configurable to your GitHub CI/CD pipeline.
Puppet camp2021 testing modules and controlrepoPuppet
This document discusses testing Puppet code when using modules versus a control repository. It recommends starting with simple syntax and unit tests using PDK or rspec-puppet for modules, and using OnceOver for testing control repositories, as it is specially designed for this purpose. OnceOver allows defining classes, nodes, and a test matrix to run syntax, unit, and acceptance tests across different configurations. Moving from simple to more complex testing approaches like acceptance tests is suggested. PDK and OnceOver both have limitations for testing across operating systems that may require customizing spec tests. Infrastructure for running acceptance tests in VMs or containers is also discussed.
This document appears to be for a PuppetCamp 2021 presentation by Corey Osman of NWOPS, LLC. It includes information about Corey Osman and NWOPS, as well as sections on efficient development, presentation content, demo main points, Git strategies including single branch and environment branch strategies, and workflow improvements. Contact information is provided at the bottom.
The document discusses operational verification and how Puppet is working on a new module to provide more confidence in infrastructure health. It introduces the concept of adding check resources to catalogs to validate configurations and service health directly during Puppet runs. Examples are provided of how this could detect issues earlier than current methods. Next steps outlined include integrating checks into more resource types, fixing reporting, integrating into modules, and gathering feedback. This allows testing and monitoring to converge by embedding checks within configurations.
This document provides tips and tricks for using Puppet with VS Code, including links to settings examples and recommended extensions to install like Gitlens, Remote Development Pack, Puppet Extension, Ruby, YAML Extension, and PowerShell Extension. It also mentions there will be a demo.
- The document discusses various patterns and techniques the author has found useful when working with Puppet modules over 10+ years, including some that may be considered unorthodox or anti-patterns by some.
- Key topics covered include optimization of reusable modules, custom data types, Bolt tasks and plans, external facts, Hiera classification, ensuring resources for presence/absence, application abstraction with Tiny Puppet, and class-based noop management.
- The author argues that some established patterns like roles and profiles can evolve to be more flexible, and that running production nodes in noop mode with controls may be preferable to fully enforcing on all nodes.
Applying Roles and Profiles method to compliance codePuppet
This document discusses adapting the roles and profiles design pattern to writing compliance code in Puppet modules. It begins by noting the challenges of writing compliance code, such as it touching many parts of nodes and leading to sprawling code. It then provides an overview of the roles and profiles pattern, which uses simple "front-end" roles/interfaces and more complex "back-end" profiles/implementations. The rest of the document discusses how to apply this pattern when authoring Puppet modules for compliance - including creating interface and implementation classes, using Hiera for configuration, and tools for reducing boilerplate code. It aims to provide a maintainable structure and simplify adapting to new compliance frameworks or requirements.
This document discusses Kinney Group's Puppet compliance framework for automating STIG compliance and reporting. It notes that customers often implement compliance Puppet code poorly or lack appropriate Puppet knowledge. The framework aims to standardize compliance modules that are data-driven and customizable. It addresses challenges like conflicting modules and keeping compliance current after implementation. The framework generates automated STIG checklists and plans future integration with Puppet Enterprise and Splunk for continued compliance reporting. Kinney Group cites practical experience implementing the framework for various military and government customers.
Enforce compliance policy with model-driven automationPuppet
This document discusses model-driven automation for enforcing compliance. It begins with an overview of compliance benchmarks and the CIS benchmarks. It then discusses implementing benchmarks, common challenges around configuration drift and lack of visibility, and how to define compliance policy as code. The key points are that automation is essential for compliance at scale; a model-driven approach defines how a system should be configured and uses desired-state enforcement to keep systems compliant; and defining compliance policy as code, managing it with source control, and automating it with CI/CD helps achieve continuous compliance.
This document discusses how organizations can move from a reactive approach to compliance to a proactive approach using automation. It notes that over 50% of CIOs cite security and compliance as a barrier to IT modernization. Puppet offers an end-to-end compliance solution that allows organizations to automatically eliminate configuration drift, enforce compliance at scale across operating systems and environments, and define policy as code. The solution helps organizations improve compliance from 50% to over 90% compliant. The document argues that taking a proactive automation approach to compliance can turn it into a competitive advantage by improving speed and innovation.
Automating it management with Puppet + ServiceNowPuppet
As the leading IT Service Management and IT Operations Management platform in the marketplace, ServiceNow is used by many organizations to address everything from self service IT requests to Change, Incident and Problem Management. The strength of the platform is in the workflows and processes that are built around the shared data model, represented in the CMDB. This provides the ‘single source of truth’ for the organization.
Puppet Enterprise is a leading automation platform focused on the IT Configuration Management and Compliance space. Puppet Enterprise has a unique perspective on the state of systems being managed, constantly being updated and kept accurate as part of the regular Puppet operation. Puppet Enterprise is the automation engine ensuring that the environment stays consistent and in compliance.
In this webinar, we will explore how to maximize the value of both solutions, with Puppet Enterprise automating the actions required to drive a change, and ServiceNow governing the process around that change, from definition to approval. We will introduce and demonstrate several published integration points between the two solutions, in the areas of Self-Service Infrastructure, Enriched Change Management and Automated Incident Registration.
This document promotes Puppet as a tool for hardening Windows environments. It states that Puppet can be used to harden Windows with one line of code, detect drift from desired configurations, report on missing or changing requirements, reverse engineer existing configurations, secure IIS, and export configurations to the cloud. Benefits of Puppet mentioned include hardening Windows environments, finding drift for investigation, easily passing audits, compliance reporting, easy exceptions, and exporting configurations. It also directs users to Puppet Forge modules for securing Windows and IIS.
Simplified Patch Management with Puppet - Oct. 2020Puppet
Does your company struggle with patching systems? If so, you’re not alone — most organizations have attempted to solve this issue by cobbling together multiple tools, processes, and different teams, which can make an already complicated issue worse.
Puppet helps keep hosts healthy, secure and compliant by replacing time-consuming and error prone patching processes with Puppet’s automated patching solution.
Join this webinar to learn how to do the following with Puppet:
Eliminate manual patching processes with pre-built patching automation for Windows and Linux systems.
Gain visibility into patching status across your estate regardless of OS with new patching solution from the PE console.
Ensure your systems are compliant and patched in a healthy state
How Puppet Enterprise makes patch management easy across your Windows and Linux operating systems.
Presented by: Margaret Lee, Product Manager, Puppet, and Ajay Sridhar, Sr. Sales Engineer, Puppet.
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Impelsys Inc.
Impelsys provided a robust testing solution, leveraging a risk-based and requirement-mapped approach to validate ICU Connect and CritiXpert. A well-defined test suite was developed to assess data communication, clinical data collection, transformation, and visualization across integrated devices.
Role of Data Annotation Services in AI-Powered ManufacturingAndrew Leo
From predictive maintenance to robotic automation, AI is driving the future of manufacturing. But without high-quality annotated data, even the smartest models fall short.
Discover how data annotation services are powering accuracy, safety, and efficiency in AI-driven manufacturing systems.
Precision in data labeling = Precision on the production floor.
How Can I use the AI Hype in my Business Context?Daniel Lehner
𝙄𝙨 𝘼𝙄 𝙟𝙪𝙨𝙩 𝙝𝙮𝙥𝙚? 𝙊𝙧 𝙞𝙨 𝙞𝙩 𝙩𝙝𝙚 𝙜𝙖𝙢𝙚 𝙘𝙝𝙖𝙣𝙜𝙚𝙧 𝙮𝙤𝙪𝙧 𝙗𝙪𝙨𝙞𝙣𝙚𝙨𝙨 𝙣𝙚𝙚𝙙𝙨?
Everyone’s talking about AI but is anyone really using it to create real value?
Most companies want to leverage AI. Few know 𝗵𝗼𝘄.
✅ What exactly should you ask to find real AI opportunities?
✅ Which AI techniques actually fit your business?
✅ Is your data even ready for AI?
If you’re not sure, you’re not alone. This is a condensed version of the slides I presented at a Linkedin webinar for Tecnovy on 28.04.2025.
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...Alan Dix
Talk at the final event of Data Fusion Dynamics: A Collaborative UK-Saudi Initiative in Cybersecurity and Artificial Intelligence funded by the British Council UK-Saudi Challenge Fund 2024, Cardiff Metropolitan University, 29th April 2025
https://alandix.com/academic/talks/CMet2025-AI-Changes-Everything/
Is AI just another technology, or does it fundamentally change the way we live and think?
Every technology has a direct impact with micro-ethical consequences, some good, some bad. However more profound are the ways in which some technologies reshape the very fabric of society with macro-ethical impacts. The invention of the stirrup revolutionised mounted combat, but as a side effect gave rise to the feudal system, which still shapes politics today. The internal combustion engine offers personal freedom and creates pollution, but has also transformed the nature of urban planning and international trade. When we look at AI the micro-ethical issues, such as bias, are most obvious, but the macro-ethical challenges may be greater.
At a micro-ethical level AI has the potential to deepen social, ethnic and gender bias, issues I have warned about since the early 1990s! It is also being used increasingly on the battlefield. However, it also offers amazing opportunities in health and educations, as the recent Nobel prizes for the developers of AlphaFold illustrate. More radically, the need to encode ethics acts as a mirror to surface essential ethical problems and conflicts.
At the macro-ethical level, by the early 2000s digital technology had already begun to undermine sovereignty (e.g. gambling), market economics (through network effects and emergent monopolies), and the very meaning of money. Modern AI is the child of big data, big computation and ultimately big business, intensifying the inherent tendency of digital technology to concentrate power. AI is already unravelling the fundamentals of the social, political and economic world around us, but this is a world that needs radical reimagining to overcome the global environmental and human challenges that confront us. Our challenge is whether to let the threads fall as they may, or to use them to weave a better future.
Book industry standards are evolving rapidly. In the first part of this session, we’ll share an overview of key developments from 2024 and the early months of 2025. Then, BookNet’s resident standards expert, Tom Richardson, and CEO, Lauren Stewart, have a forward-looking conversation about what’s next.
Link to recording, presentation slides, and accompanying resource: https://bnctechforum.ca/sessions/standardsgoals-for-2025-standards-certification-roundup/
Presented by BookNet Canada on May 6, 2025 with support from the Department of Canadian Heritage.
Mobile App Development Company in Saudi ArabiaSteve Jonas
EmizenTech is a globally recognized software development company, proudly serving businesses since 2013. With over 11+ years of industry experience and a team of 200+ skilled professionals, we have successfully delivered 1200+ projects across various sectors. As a leading Mobile App Development Company In Saudi Arabia we offer end-to-end solutions for iOS, Android, and cross-platform applications. Our apps are known for their user-friendly interfaces, scalability, high performance, and strong security features. We tailor each mobile application to meet the unique needs of different industries, ensuring a seamless user experience. EmizenTech is committed to turning your vision into a powerful digital product that drives growth, innovation, and long-term success in the competitive mobile landscape of Saudi Arabia.
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul
Artificial intelligence is changing how businesses operate. Companies are using AI agents to automate tasks, reduce time spent on repetitive work, and focus more on high-value activities. Noah Loul, an AI strategist and entrepreneur, has helped dozens of companies streamline their operations using smart automation. He believes AI agents aren't just tools—they're workers that take on repeatable tasks so your human team can focus on what matters. If you want to reduce time waste and increase output, AI agents are the next move.
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveScyllaDB
Want to learn practical tips for designing systems that can scale efficiently without compromising speed?
Join us for a workshop where we’ll address these challenges head-on and explore how to architect low-latency systems using Rust. During this free interactive workshop oriented for developers, engineers, and architects, we’ll cover how Rust’s unique language features and the Tokio async runtime enable high-performance application development.
As you explore key principles of designing low-latency systems with Rust, you will learn how to:
- Create and compile a real-world app with Rust
- Connect the application to ScyllaDB (NoSQL data store)
- Negotiate tradeoffs related to data modeling and querying
- Manage and monitor the database for consistently low latencies
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Aqusag Technologies
In late April 2025, a significant portion of Europe, particularly Spain, Portugal, and parts of southern France, experienced widespread, rolling power outages that continue to affect millions of residents, businesses, and infrastructure systems.
Artificial Intelligence is providing benefits in many areas of work within the heritage sector, from image analysis, to ideas generation, and new research tools. However, it is more critical than ever for people, with analogue intelligence, to ensure the integrity and ethical use of AI. Including real people can improve the use of AI by identifying potential biases, cross-checking results, refining workflows, and providing contextual relevance to AI-driven results.
News about the impact of AI often paints a rosy picture. In practice, there are many potential pitfalls. This presentation discusses these issues and looks at the role of analogue intelligence and analogue interfaces in providing the best results to our audiences. How do we deal with factually incorrect results? How do we get content generated that better reflects the diversity of our communities? What roles are there for physical, in-person experiences in the digital world?
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell
With expertise in data architecture, performance tracking, and revenue forecasting, Andrew Marnell plays a vital role in aligning business strategies with data insights. Andrew Marnell’s ability to lead cross-functional teams ensures businesses achieve sustainable growth and operational excellence.
What is Model Context Protocol(MCP) - The new technology for communication bw...Vishnu Singh Chundawat
The MCP (Model Context Protocol) is a framework designed to manage context and interaction within complex systems. This SlideShare presentation will provide a detailed overview of the MCP Model, its applications, and how it plays a crucial role in improving communication and decision-making in distributed systems. We will explore the key concepts behind the protocol, including the importance of context, data management, and how this model enhances system adaptability and responsiveness. Ideal for software developers, system architects, and IT professionals, this presentation will offer valuable insights into how the MCP Model can streamline workflows, improve efficiency, and create more intuitive systems for a wide range of use cases.
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025BookNet Canada
Book industry standards are evolving rapidly. In the first part of this session, we’ll share an overview of key developments from 2024 and the early months of 2025. Then, BookNet’s resident standards expert, Tom Richardson, and CEO, Lauren Stewart, have a forward-looking conversation about what’s next.
Link to recording, transcript, and accompanying resource: https://bnctechforum.ca/sessions/standardsgoals-for-2025-standards-certification-roundup/
Presented by BookNet Canada on May 6, 2025 with support from the Department of Canadian Heritage.
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxAnoop Ashok
In today's fast-paced retail environment, efficiency is key. Every minute counts, and every penny matters. One tool that can significantly boost your store's efficiency is a well-executed planogram. These visual merchandising blueprints not only enhance store layouts but also save time and money in the process.
Quantum Computing Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
3. How execs can fail
$ puppet module install puppetlabs-apt
$ vim apt/manifests/key.pp
...
exec { "apt::key ${upkey} absent":
command => "apt-key del '${upkey}'",
path => '/bin:/usr/bin',
onlyif => "apt-key list | grep '${upkey}'",
user => 'root',
group => 'root',
logoutput => 'on_failure',
}
4. Convert the exec to a type/provider
'user' type
ensure
name
comment
'useradd'
shell
home provider
exists?, create, destroy
comment, comment=
useradd <user>
shell, shell=
home, home=
usermod <user>
userdel <user>
5. Types: properties and parameters
● Properties are changeable, e.g. a user's
shell or a service's start-at-boot flag
● Parameters represent other required data, e.
g. hasrestart on service
● All data can be validated and munged
● Types can be "ensurable", if the object can:
○ exist and not exist
○ be created
○ be destroyed
6. Convert the exec to a type/provider
'apt_key' type
ensure
key 'keyring' provider
key_server exists?
create apt-key list
destroy
apt-key --recv-keys..
apt-key del
7. Types: simple example
$ cat apt_key/lib/puppet/type/apt_key.rb
Puppet::Type.newtype(:apt_key) do
@doc = "Manages apt keys"
ensurable
newparam(:key) do
desc "The key ID"
isnamevar
end
newparam(:key_server) do
desc "Key server to download key form"
defaultto "pgp.mit.edu"
end
end
8. Types: known values
Puppet::Type.type(:file).newparam(:checksum) do
desc "The checksum type to use when
determining whether to replace a file's conten
ts.
The default checksum type is md5."
newvalues "md5", "md5lite", "mtime", "ctime",
"none"
defaultto :md5
end
9. Types: validation
module Puppet
newtype(:schedule) do
newparam(:repeat) do
desc "How often a given resource may be applied
in this schedule's `period`. Defaults to 1; must be an
integer."
validate do |value|
unless value.is_a?(Integer) or value =~
/^d+$/
raise Puppet::Error,
"Repeat must be a number"
end
end
10. Providers: getters/setters, ensurable
● getters and setters are implemented for each
property
● ensurable types also have exists?, create
and destroy to manage its existence
● list of commands that are required to run
● confined to certain operating systems via
facts
11. Providers: simple example
$ cat apt_key/lib/puppet/provider/apt_key/keyring.rb
Puppet::Type.type(:apt_key).provide(:keyring) do
commands :aptkey => "/usr/bin/apt-key"
def exists?
aptkey("list").include? resource[:key].upcase
end
def create
aptkey "adv", "--keyserver", resource[:key_server], "--recv-
keys", resource[:key].upcase
end
def destroy
aptkey "del", resource[:key].upcase
end
end
12. Providers: confinement
Puppet::Type.type(:group).provide :aix do
desc "Group management for AIX."
confine :operatingsystem => :aix
defaultfor :operatingsystem => :aix
Puppet::Type.type(:exec).provide :posix do
confine :feature => :posix
defaultfor :feature => :posix