Puppet git hooks

Puppet git hooks is a tool that helps and guide you during the development of puppet modules. Basically, it allows you to do a lot of tests and validations of your code before to commit to your git repository. Features: Puppet manifest syntax Puppet epp template syntax Erb template syntax Puppet-lint Rspec-puppet Yaml (hiera data) syntax r10k puppetfile syntax Usage In your git repository you can symlink the pre-commit file from this repository to the .git/hooks/pre-commit of your repository you want to implement this feature. $ ln -s /path/…

Keep reading

Inspecting UDP protocol with iperf tool

Sometimes we have to do some troubleshooting to inspect UDP traffic and make sure that there is no issue on the operational system layer. This task is so common nowadays because a lot of applications uses multicast IP and UDP protocol for clustering and replications. There is a nice networking tool to help: iperf. For this setup, let's imagine that I have an application clusterized running on several machines, using UDP protocol, multicast and listening on port 48000. However, I wanna make sure and check the network traffic is working…

Keep reading

Ansible Ad-Hoc commands

Ad-hoc commands in Ansible allow you to execute simple tasks at the command line against one or all of your hosts. An ad-hoc command consists of two parameters: the host group that defines on what machines to run the task against and the Ansible module to run. These parameters are passed to the ansible binary for invocation. Running ad-hoc commands ping all hosts ansible all -m ping execute the command "uptime" on all hosts ansible all -m shell -a 'uptime' run the command disk usage using the inventory…

Keep reading

Ansible inventory

Inventory is a list of servers that Ansible uses to manage the resources. There are two different type of inventories: Static Manual inventory that we manage. Dynamic The inventory source is imported automatically from cloud providers as EC2, Azure, OpenStack, and more. How to use the inventory file? There are many ways to setup the inventory file on your controller machine. Inventory file location level path note root /etc/ansible/hosts user $USER/.ansible/hosts recommended If you are using a different path, you must to specify the inventory file…

Keep reading

Ansible introduction

Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs. Highlights Human readable and simple to understand Agent less Access is done with SSH Large support community Many roles and modules available Host inventory handles and defines the infrastructure Free and Open Source Software (FOSS) Ansible core components Controller Machine The machine where Ansible is installed, responsible for running the provisioning on the servers you are managing.InventoryAn initialization file that contains information about the servers you…

Keep reading