AI project components: Facter and Hiera

Slides:



Advertisements
Similar presentations
26/05/2004HEPIX, Edinburgh, May Lemon Web Monitoring Miroslav Šiket CERN IT/FIO
Advertisements

Puppet for GENI Experiments
Unveiling ProjectWise V8 XM Edition. ProjectWise V8 XM Edition An integrated system of collaboration servers that enable your AEC project teams, your.
Computing Facilities CERN IT Department CH-1211 Geneva 23 Switzerland t CF Post-C5 Lemon-web 2.0 Daniel Lenkes and Ivan Fedorko.
Resource Discovery Module DigiTool Version 3.0. Resource Discovery 2 Deposit Approval Search & Index Dispatcher & Viewers Single & Bulk Web Services DigiTool.
L. Granado Cardoso, F. Varela, N. Neufeld, C. Gaspar, C. Haen, CERN, Geneva, Switzerland D. Galli, INFN, Bologna, Italy ICALEPCS, October 2011.
CERN IT Department CH-1211 Genève 23 Switzerland t Integrating Lemon Monitoring and Alarming System with the new CERN Agile Infrastructure.
Getting Started with GIT. Basic Navigation cd means change directory cd.. moves you up a level cd dir_name moves you to the folder named dir_name A dot.
Module 13: Configuring Availability of Network Resources and Content.
CERN IT Department CH-1211 Geneva 23 Switzerland t CF Messaging System Ivan, Omar, Sergio 14 march 2012.
HBase A column-centered database 1. Overview An Apache project Influenced by Google’s BigTable Built on Hadoop ▫A distributed file system ▫Supports Map-Reduce.
Operating Systems & Information Services CERN IT Department CH-1211 Geneva 23 Switzerland t OIS Working with Windows 7 at CERN Michał Budzowski.
Revolutionizing enterprise web development Searching with Solr.
Puppet with vSphere Workshop Install, configure and use Puppet on your laptop for vSphere DevOps Billy Lieberman August 1, 2015.
The Art and Zen of Managing Nagios with Puppet Michael Merideth - VictorOps
BASIC FUNCTIONALITY. Page 2 Agenda Main topics Policy Manager Communication Understanding communication Information flow Communication modules F-Secure.
CERN IT Department CH-1211 Genève 23 Switzerland t Experiences running a production Puppet Ben Jones HEPiX Bologna Spring.
BW Know-How Call : Performance Tuning dial-in phone numbers! U.S. Toll-free: (877) International: (612) Passcode: “BW”
Configuration Management with Cobbler and Puppet Kashif Mohammad University of Oxford.
Technical Workshops | Esri International User Conference San Diego, California Creating Geoprocessing Services Kevin Hibma, Scott Murray July 25, 2012.
1 Week #10Business Continuity Backing Up Data Configuring Shadow Copies Providing Server and Service Availability.
Quattor-for-Castor Jan van Eldik Sept 7, Outline Overview of CERN –Central bits CDB template structure SWREP –Local bits Updating profiles.
Platform & Engineering Services CERN IT Department CH-1211 Geneva 23 Switzerland t PES AI’s user access, OpenStack security groups and firewall.
ClearCase Concepts and Terminology
Lemon Monitoring Miroslav Siket, German Cancio, David Front, Maciej Stepniewski CERN-IT/FIO-FS LCG Operations Workshop Bologna, May 2005.
1 PUPPET AND DSC. INTRODUCTION AND USAGE IN CONTINUOUS DELIVERY PROCESS. VIKTAR VEDMICH PAVEL PESETSKIY AUGUST 1, 2015.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
Oracle Data Integrator Agents. 8-2 Understanding Agents.
CERN IT Department CH-1211 Geneva 23 Switzerland t CF Computing Facilities Agile Infrastructure Monitoring CERN IT/CF.
Computing Facilities CERN IT Department CH-1211 Geneva 23 Switzerland t CF Lemon for Quattor I.Fedorko CERN CF/IT 16 March 2011.
CERN IT Department CH-1211 Genève 23 Switzerland PES 1 Ermis service for DNS Load Balancer configuration HEPiX Fall 2014 Aris Angelogiannopoulos,
CERN IT Department CH-1211 Genève 23 Switzerland t IT Configuration Activities Gavin McCance Online Cross-experiment Meeting, 14 June 2012.
1 CERN IT Department CH-1211 Genève 23 Switzerland t Puppet in the CERN CC Tomas Karasek Steve Traylen Oct
Computing Facilities CERN IT Department CH-1211 Geneva 23 Switzerland t CF Agile Infrastructure Monitoring HEPiX Spring th April.
Platform & Engineering Services CERN IT Department CH-1211 Geneva 23 Switzerland t PES Development Workflow of the Configuration Management.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
Computing Facilities CERN IT Department CH-1211 Geneva 23 Switzerland t CF CF Monitoring: Lemon, LAS, SLS I.Fedorko(IT/CF) IT-Monitoring.
Operating Systems & Information Services CERN IT Department CH-1211 Geneva 23 Switzerland t OIS Drupal at CERN Juraj Sucik Jarosław Polok.
Computing Facilities CERN IT Department CH-1211 Geneva 23 Switzerland t CF Alarming with GNI VOC WG meeting 12 th September.
CERN IT Department CH-1211 Genève 23 Switzerland t Migration from ELFMs to Agile Infrastructure CERN, IT Department.
Computing Facilities CERN IT Department CH-1211 Geneva 23 Switzerland t CF Lemon monitoring and Lemon Alarm System (sensors, exception, alarm)
: Information Retrieval อาจารย์ ธีภากรณ์ นฤมาณนลิณี
Platform & Engineering Services CERN IT Department CH-1211 Geneva 23 Switzerland t PES AI Images, flavours and partitions Vítor Gouveia,
Platform & Engineering Services CERN IT Department CH-1211 Geneva 23 Switzerland t PES Migration of the ITCM workflow from Remedy to Service-Now.
Computing Facilities CERN IT Department CH-1211 Geneva 23 Switzerland t CF CC Monitoring I.Fedorko on behalf of CF/ASI 18/02/2011 Overview.
Computing Facilities CERN IT Department CH-1211 Geneva 23 Switzerland t CF SINDES Secure INformation DElivery System CERN IT/CF-ASI.
CERN AI Config Management 16/07/15 AI for INFN visit2 Overview for INFN visit.
Computing Facilities CERN IT Department CH-1211 Geneva 23 Switzerland t CF Cluman: Advanced Cluster Management for Large-scale Infrastructures.
Cloud Installation & Configuration Management. Outline  Definitions  Tools, “Comparison”  References.
Platform & Engineering Services CERN IT Department CH-1211 Geneva 23 Switzerland t PES Agile Infrastructure Project Overview : Status and.
Configuration Services at CERN HEPiX fall Ben Jones, HEPiX Fall 2014.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
Experiment Support CERN IT Department CH-1211 Geneva 23 Switzerland t DBES Author etc Alarm framework requirements Andrea Sciabà Tony Wildish.
INFSO-RI Enabling Grids for E-sciencE Running reliable services: the LFC at CERN Sophie Lemaitre
Platform & Engineering Services CERN IT Department CH-1211 Geneva 23 Switzerland t PES GIT Service in the Agile Infrastructure Project Vítor.
CERN IT Department CH-1211 Geneva 23 Switzerland t OIS Operating Systems & Information Services CERN IT Department CH-1211 Geneva 23 Switzerland.
Lightweight inventory management with Pallet Jack
Configuration & Registry Microservice Deep Dive
Renewal of Puppet for Australia-ATLAS
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
@ Bucharest DevOps Hacker Meetup
AI How to: System Update and Additional Software
Discussion #11 11/21/16.
How to open source your Puppet configuration
Version Control overview
CHAPTER 3 Architectures for Distributed Systems
Intro to Config Management Using Salt Open Source
Scaling Puppet and Foreman for HPC
Introduction to Ansible
Web DB Programming: PHP
Presentation transcript:

AI project components: Facter and Hiera Vítor Gouveia, vitor.gouveia@cern.ch IT-PES-PS

Agenda Recap: AI configuration components Future life cycle development What is Facter? How to write custom facts Distribute additional facts What is Hiera? Hiera in action Questions?? 2

Recap: AI Configuration Components Foreman – Web front-end organizes the AI configuration infrastructure Hostgroups Essentially the same as a cdb cluster / customization templates Several features aggregated together Hostgroups manifests are inside the hostgroups directory of each branch of the AI GIT repository hg_<hostgroupname> Environments Possibility to have: machines with different configurations or different states Different modules associated to each environment Each environment maps to a git branch of the AI GIT repository vocs_devel -> temporary branch for VOCs tests

Future life cycle development Ai configuration components structure Core Modules Shared Modules Individual Modules AI Golden Branches of the AI GIT repo Devel Testing Master Custom branches should be used for particular developments and contributions only. 4

Future life cycle development If you have individual modules ( not shared among other groups), you will be able to push them directly into the master branch without the intervention of the RMT 5

Future life cycle development Service Managers are responsible for the hostgroup manifests and the hostgroup hieradata of their service More about the life cycle development in future meetings http://cern.ch/go/8ZGQ 6

What is Facter? Cross-platform Ruby library designed to gather information on all the nodes you will be managing with Puppet Ex: Hardware, OS ( version information, IP Address, etc…) executed on the puppet node and every time puppet agent runs To see a list of facts, and those defined for use in puppet, open a shell session on a puppet node and execute facter -p System information provided in “key => value” pairs Exposed to puppet manifests as global variables Ex: “$::operatingsystem” If the defaults facts are not enough you can write your own custom facts 7

Facter and the AI The information about the nodes is resolved dynamically and exposed as facts to puppet manifest Where is the information coming from? We have several sources of truth: Ex: LanDB https://twiki.cern.ch/twiki/bin/view/AgileInfrastructure/SourcesOfTruth Significant improvement over CDB Quattor was copying information from sources into the machine’s CDB profile We had to update CDB profile if something changed now the information is retrieved dynamically from the source 8

Facter examples Landbd facts [root@vitslc6 ~]# facter -p | grep landb landb_location => 0000 0-0000 landb_network_domain => LCG landb_rackname => 0000 landb_responsible_email => vitor.gouveia@cern.ch landb_responsible_name => VITOR EMANUEL GOMES GOUVEIA 9

How to write custom facts Write customs facts with ruby and distribute them through the puppet master. Ex: File redhat_release.rb Create the folder lib/facter inside your hostgroup folder and put your rb files there. require 'facter' Facter.add(:redhat_release) do setcode do Facter::Util::Resolution.exec("cat /etc/redhat-release") end 10

How to write custom facts For the moment… Push the changes into the vocs_devel branch and wait until they are distributed by the puppet master. Once the custom fact are distributed you can test them: facter --puppet redhat_release How to use them? $::redhat_release More information about facts here: https://puppetlabs.com/blog/facter-part-1-facter-101/ 11

Hierarchical database Hiera Overview Hierarchical database Hierarchical-based lookup system Key/value lookup tool for hostgroup-specific data Why? Provide parameters/input information to (shared or individual) modules Separate data from puppet code Hostgroup-specific data will be out of your manifests 12

Hiera Overview How does it work? Puppet manifests ask for the value associated with a key hiera(<key>,[default_value]) Hiera will search an hierarchy of sources until a value is found for the key Hiera(<key>,[default_value]) returns a single value But if you want to search through ALL levels of the hierarchy and return EVERY value for a specific parameter: hiera_array(<key>,[default_value]) 13

Complete description of the YAML’s format: Hiera Overview YAML’s Format Complete description of the YAML’s format: http://www.yaml.org/ --- # array apache-packages: - apache2 - apache2-common - apache2-utils # string apache-service: apache2 # interpolated facter variable hosts_entry: sandbox.%{fqdn} # hash sshd_settings: root_allowed: "no" password_allowed: "yes“ # alternate hash notation sshd_settings: {root_allowed: "no", password_allowed: "yes"} # to return "true" or "false" sshd_settings_2: {root_allowed: no, password_allowed: yes} 14

A small part of the hiera.yaml hierarchy: Hiera in action AI Hiera Backends in the AI: YAML and GPG Hiera’s config file is usually referred to as hiera.yaml You can check the complete hierarchy inside a puppet node: /etc/puppet/hiera.yaml A small part of the hiera.yaml hierarchy: Environments -> top level location is pulled from the AI git repository. Suppose we have a host that: Is in the voatlas/webserver hostgroup Is in the puppet environment vocs_devel Contains in the apache module: $proxy_deny = hiera("apache_proxy_deny", "all") - environments/%{environment}/hieradata/hostgroups/%{encgroup_0}/%{encgroup_1} - environments/%{environment}/hieradata/hostgroups/%{encgroup_0} - environments/%{environment}/hieradata/environments/%{environment} - environments/%{environment}/hieradata/module_names/%{module_name} - environments/%{environment}/hieradata/common 15

Hiera in action Regarding only the previous hiera hierarchy. Hiera will look the following files: hieradata/hostgroups/voatlas/webserver.yaml hieradata/hostgroups/voatlas.yaml hieradata/environments/vocs_devel.yaml hieradata/module_names/apache.yaml hieradata/common.yaml - environments/%{environment}/hieradata/hostgroups/%{encgroup_0}/%{encgroup_1} - environments/%{environment}/hieradata/hostgroups/%{encgroup_0} - environments/%{environment}/hieradata/environments/%{environment} - environments/%{environment}/hieradata/module_names/%{module_name} - environments/%{environment}/hieradata/common 16

Example: configuring the high_load lemon exception Base configuration lxplus hostgroup: alarms only if load higher than 30, so in lxplus.yaml we put: While in service X we are very sensitive to high load conditions and want the alarm to be triggered earlier, so we put in serviceX.yaml: lemon_30008:   sensor: exception   metricname: exception.high_load   metricclass: alarm.exception   params:     Correlation: "20002:1 > 2"     MinOccurs: 10 lemon_30008:   params:     Correlation: "20002:1 > 30" lemon_30008:   params:     Minoccurs: 2 17

Hiera and Facter in Action 18

https://community.web.cern.ch/tutorial/how-store-secrets-hiera More info about Hiera More info about Hiera http://docs.puppetlabs.com/hiera/1/index.html How to store secrets in Hiera https://community.web.cern.ch/tutorial/how-store-secrets-hiera Ai community exchange 19

??????????????????????? 20