Deploying Foreman in Enterprise Environments 2.0. best practices and lessons learned. Nils Domrose Cologne, August, 4 2014



Similar documents
NOC PS manual. Copyright Maxnet All rights reserved. Page 1/45 NOC-PS Manuel EN version 1.3

F-Secure Messaging Security Gateway. Deployment Guide

VMware vsphere 5.0 Evaluation Guide

Configuration Management Evolution at CERN. Gavin

Guide to the LBaaS plugin ver for Fuel

How To Install Eucalyptus (Cont'D) On A Cloud) On An Ubuntu Or Linux (Contd) Or A Windows 7 (Cont') (Cont'T) (Bsd) (Dll) (Amd)

v7.8.2 Release Notes for Websense Content Gateway

Security Provider Integration Kerberos Authentication

App Orchestration 2.5

1Y0-250 Implementing Citrix NetScaler 10 for App and Desktop Solutions Practice Exam

Release Notes for Fuel and Fuel Web Version 3.0.1

VMware Identity Manager Connector Installation and Configuration

Deployment Guide: Unidesk and Hyper- V

vsphere Upgrade vsphere 6.0 EN

Web Application Firewall

"Charting the Course... Implementing Citrix NetScaler 11 for App and Desktop Solutions CNS-207 Course Summary

ovirt self-hosted engine seamless deployment

CNS-207 Implementing Citrix NetScaler 10.5 for App and Desktop Solutions

Installing and Configuring vcenter Support Assistant

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP Edge Gateway for Layered Security and Acceleration Services

Installing and Configuring vcloud Connector

Cisco Prime Network Services Controller. Sonali Kalje Sr. Product Manager Cloud and Virtualization, Cisco Systems

A central continuous integration platform

SUSE Cloud Installation: Best Practices Using an Existing SMT and KVM Environment

OS Installation Guide Red Hat Linux 9.0

Virtual Web Appliance Setup Guide

Apache CloudStack 4.x (incubating) Network Setup: excerpt from Installation Guide. Revised February 28, :32 pm Pacific

Deploying Baremetal Instances with OpenStack

Deploy XenApp 7.5 and 7.6 and XenDesktop 7.5 and 7.6 with Amazon VPC

Installing RHEL 6.x from beginning to end using PXE and Kickstart

Secure Linux Administration Conference Bernd Strößenreuther

Virtual Managment Appliance Setup Guide

WEBTITAN CLOUD. User Identification Guide BLOCK WEB THREATS BOOST PRODUCTIVITY REDUCE LIABILITIES

BlackBerry Enterprise Service 10. Version: Configuration Guide

Installing and Using the vnios Trial

Citrix XenServer Workload Balancing Quick Start. Published February Edition

ovirt Introduction James Rankin Product Manager Red Hat Virtualization Management the ovirt way

Is Hadoop Enterprise ready?

DIGIPASS Authentication for Microsoft ISA 2006 Single Sign-On for Outlook Web Access

Load Balancing Trend Micro InterScan Web Gateway

Deployment of Private, Hybrid & Public Clouds with OpenNebula

Citrix Desktop Virtualization Fast Track

SolarWinds Log & Event Manager

vcloud Director User's Guide

Cloud.com CloudStack Community Edition 2.1 Beta Installation Guide

VMware vcenter Log Insight Getting Started Guide

Kickstart & Booking. Kristian Köhntopp, booking.com

Lesson Plans Managing a Windows 2003 Network Infrastructure

VDCF - Virtual Datacenter Control Framework for the Solaris TM Operating System

Load Balancing Microsoft AD FS. Deployment Guide

F5 BIG-IP V9 Local Traffic Management EE Demo Version. ITCertKeys.com

Required Ports and Protocols. Communication Direction Protocol and Port Purpose Enterprise Controller Port 443, then Port Port 8005

Moving to Plesk Automation 11.5

OS Installation: CentOS 5.8

How to Configure an Initial Installation of the VMware ESXi Hypervisor

Availability Digest. Redundant Load Balancing for High Availability July 2013

WorldSkills Competition 2011 Austrian Championship. IT Network Systems Administrator Day 1

developing sysadmin - sysadmining developers

Deskpool Quick Start. Version: V2.1.x. Based on Hyper-V Server 2012 R2. Shenzhen Jieyun Technology Co., Ltd (

VELOCITY. Quick Start Guide. Citrix XenServer Hypervisor. Server Mode (Single-Interface Deployment) Before You Begin SUMMARY OF TASKS

Smoothwall Web Filter Deployment Guide

Hosting more than one FortiOS instance on. VLANs. 1. Network topology

Implementing Core Cisco ASA Security (SASAC)

How to Deploy a Secure, Highly-Available Hadoop Platform

Note: This case study utilizes Packet Tracer. Please see the Chapter 5 Packet Tracer file located in Supplemental Materials.

Smart Card Authentication Client. Administrator's Guide

Cloud on TIEN Part I: OpenStack Cloud Deployment. Vasinee Siripoonya Electronic Government Agency of Thailand Kasidit Chanchio Thammasat

OnCommand Performance Manager 1.1

Deploying F5 with Microsoft Active Directory Federation Services

VMware Auto Deploy Administrator s Guide

Quick Start Guide for VMware and Windows 7

Deploying the BIG-IP System with Microsoft Lync Server 2010 and 2013 for Site Resiliency

Configuring the Edgewater 4550 for use with the Bluestone Hosted PBX

Connection Broker Managing User Connections to Workstations, Blades, VDI, and More. Quick Start with Microsoft Hyper-V

CMB-207-1I Citrix Desktop Virtualization Fast Track

Event Listener based UCS Integration with OpenStack

Load Balancing Sophos Web Gateway. Deployment Guide

Lifecycle Manager Installation and Configuration Guide

Introduction to Endpoint Security

FUJITSU Cloud IaaS Trusted Public S5 Setup and Configure yum Software Package Manager with CentOS 5.X/6.X VMs

Citrix Training. Course: Citrix Training. Duration: 40 hours. Mode of Training: Classroom (Instructor-Led)

How to Scale out SharePoint Server 2007 from a single server farm to a 3 server farm with Microsoft Network Load Balancing on the Web servers.

Installation Guide Avi Networks Cloud Application Delivery Platform Integration with Cisco Application Policy Infrastructure

vrealize Air Compliance OVA Installation and Deployment Guide

Citrix XenServer 5.6 OpenSource Xen 2.6 on RHEL 5 OpenSource Xen 3.2 on Debian 5.0(Lenny)

Chapter 15: Advanced Networks

Scalable System Operations. Joshua Hoffman

Comodo MyDLP Software Version 2.0. Installation Guide Guide Version Comodo Security Solutions 1255 Broad Street Clifton, NJ 07013

User Guide. Cloud Gateway Software Device

HP CloudSystem Enterprise

Overview of WebMux Load Balancer and Live Communications Server 2005

70-417: Upgrading Your Skills to MCSA Windows Server 2012

Basic IPv6 WAN and LAN Configuration

Load Balancing McAfee Web Gateway. Deployment Guide

CounterACT 7.0 Single CounterACT Appliance

Secure Web Appliance. Reverse Proxy

Load Balancing Smoothwall Secure Web Gateway

Configuration Guide BES12. Version 12.3

PZVM1 Administration Guide. V1.1 February 2014 Alain Ganuchaud. Page 1/27

Transcription:

Deploying Foreman in Enterprise Environments 2.0 best practices and lessons learned Nils Domrose Cologne, August, 4 2014

About me senior linux systems engineer at inovex GmbH worked as a network engineer, software developer and systems engineer using foreman for about 1 year using bare-metal deployment for ages life is short let s focus on interesting stuff! #irc endy @endyman https://plus.google.com/+nilsdomrose2

About inovex We use technology to make our customers happy. And ourselves. http://www.inovex.de offices in [ Pforzheim, Karlsruhe, Cologne, Munich ] we have open positions... 1 SHAPE Consulting 2 BUILD Application Development 3 RUN IT Engineering & Operations 4 TRACK Business Intelligence 5 TEACH Academy 3

Agenda the chicken & egg problem foreman components we are the borg fail! foreman HA best practices 4

The Chicken & Egg Problem...deploying your deployment infrastructure Create an foreman-installeranswers.yaml somewhere Setup a foreman system(i.e.) a vm including required rpms (or debs) Copy you foreman-installeranswers.yaml to the target system and run the installer with the yaml file. Or use packer.io to build a vm image. Later we can use the foremaninstaller-answers.yaml in a custom puppet module as template to install additional nodes

The Chicken & Egg Problem...deploying your deployment infrastructure $foreman_answersfile = /etc/foreman/foreman-installer-answers.yaml file {$foreman_answersfile: owner => root, group => root, mode => 0600, content => template( foreman/foreman-installer-answers.yaml.erb ), } exec { foreman-installer : command => /usr/bin/foreman-installer d logoutput => on_failure, require => File[$foreman_answersfile],...

The Chicken & Egg Problem Or use kafo... kafo? kafo! - imagine master-less puppet plus config data in yaml (like hiera) can t tell whether it s the chicken or the egg or both but it s cool stores parameters for your modules in answers.yaml simply copy your modules into the installer s modules directory or even use puppet-librarian to manage your modules (poor man s git-submodules) https://github.com/rodjek/librarian-puppet https://github.com/theforeman/kafo

The Chicken & Egg Problem kafo - getting started Create a new installer project: `--> i=my-installer; mkdir $i; cd $i; kafofy -n $i using./config/my-installer.yaml as default config file... creating config file./config/my-installer.yaml... creating bin/my-installer Your directory was kafofied Now you should: 1. upload your puppet modules to modules directory (you can use librarian-puppet project) 2. create default./config/answers.yaml or modify./config/my-installer.yaml to load another answer file 3. run bin/my-installer to install your modules

The Chicken & Egg Problem get the modules delete the modules directory root@foreman:/var/tmp/my-installer# rm -Rf modules/ create a Puppetfile root@foreman:/var/tmp/my-installer# cat Puppetfile forge "http://forge.puppetlabs.com" mod 'puppetlabs/stdlib' mod 'ntp', :git => 'git://github.com/puppetlabs/puppetlabs-ntp.git' run the librarian root@foreman:/var/tmp/my-installer# librarian-puppet install --clean root@foreman:/var/tmp/my-installer# ll modules total 16 drwxr-xr-x 4 root root 4096 Jan 29 12:25./ drwxr-xr-x 7 root root 4096 Jan 29 12:17../ drwxr-xr-x 7 root root 4096 Jan 29 12:25 ntp/ drwxr-xr-x 6 root root 4096 Jan 29 12:24 stdlib/ next: package it, install it

Foreman Components foreman rails application apache mod_passenger Webinterface REST API unattended resources rendered templates REST API database unattended resources foreman frontend apache mod_passenger Port 80 HTTP Port 443 HTTPS 10

Foreman Components smart-proxy WEBrick based REST server to manage supporting infrastructure Port 8443 HTTPS WEBrick server puppet CA puppet BMC DHCP TFTP DNS apache mod_passenger ipmitool ISC dhcpd tftpd nsupdate Port 8140 HTTPS Port 67 UDP Port 69 UDP 11

Installation process using the foreman...let s deploy some boxes 1 create new host DHCP 2 request lease 3 create DNS entries 4 request kernel & initrd OS Repo 5 provision TFTP & PXE 6 create auto sign entry 7 create compute instance (optional) 4 2 3 DNS Puppet Master 8 8 DHCP request 9 PXE Boot 10 query unattended Resources 11 request puppet certificate 12 5 TFTP 9 12 12 13 GET ENC & catalog, upload facts notify finish Smart- Proxy 6 Puppet CA 11 1 10 13 unattended Resources 7 compute Resource 10 13 virtual / physical Instances 12

Foreman Components placement of foreman components flows at each side to local puppet and smart proxy all VLANs directly access puppet ca all VLANs directly access foreman unattended resources we need DNS only once (so let s limit TSIG key distribution) mgmt VLAN2 Smartproxy, puppet, DHCP fw VLAN D Site2 VLAN C Site2 mgmt VLAN1 Foreman Smartproxy, puppet, CA, DNS, DHCP fw VLAN A Site1 VLAN B Site1 13

Foreman Components optimizing comms flows limit access to the smartproxy and foreman to local clients only open dedicate flow from proxy to foreman and puppet mgmt VLAN2 smartproxy, puppet, DHCP, Proxy fw VLAN D Site2 VLAN C Site2 mgmt VLAN1 Foreman smartproxy, puppet, CA, DNS, DHCP fw VLAN A Site1 VLAN B Site1 14

Foreman Components optimizing comms flows install apache mod_rewrite on remote smartproxy rewrite/proxy unattended resources rewrite/proxy puppet CA resources (already implemented in foreman installer puppet-puppet module via $server_ca_proxy:: by ewoud)... rewrite_rule => [ ^/unattended/(.*)$ http://foreman.mysite.com/unattended/$1 [P], ] rewrite_rule => [ ^/([^/]+/certificate.*)$ https://puppetca.mysite.com:8140/$1, ]... 15

Foreman Components foreman customization we must identify proxied servers foreman url must be customized templates must be adapted enable tokens (default in 1.4) create parameter in hostgroups for each segment (unattended_url in 1.4 does not seam to help here ) adapt templates 16

Resistance is futile Integrating foreman into corporate infrastructure Integrating foreman into corporate infrastructure is: not a technical issue mostly even not a security issue It s about convincing people to do things differently It s about responsibilities It s about fear It s about laziness 17

Resistance is futile Let s assimilate the corporate DHCP The corporate DHCP does not provide a proper API and changes are distributed across the DHCP infrastructure in a slow, asynchronous manner Use a stub ISC-DHCP to manage your pools (I need some time to write+submit a stub dhcp module ) Ask for a small dynamic pxe-boot range in every subnet Ask for a next-server entry in the pxe-boot range Create a subnet on your Stub server an a range to assign addresse from 18

Resistance is futile Let s assimilate the corporate DHCP Foreman default linux label linux kernel boot/centos-7-x86_64-vmlinuz append initrd=boot/centos-7-x86_64-initrd.img ks=http://foreman.local.venv.de:80/unattended/provision ks.device=bootif ip=192.168.192.100::192.168.192.2:255.255.255.0:::n one dns=192.168.122.1 network ks.sendmac Dummy DHCP Server/VM To be installed Client VLAN Corporate DHCP 19

Resistance is futile Let s assimilate the corporate DHCP You must adapt you PXE templates in order to provide a static network config to darcut! default linux label linux kernel <%= @kernel %> append initrd=<%= @initrd %> ks=<%= foreman_url("provision")%> ks.device=bootif ip=<%= @host.ip %>::<%= @host.subnet.gateway %>:<%= @host.subnet.mask %>:::none dns=<%= @host.subnet.dns_primary %> network ks.sendmac 20

Resistance is futile The one with static DNS You kindly ask for TSIG keys to create your A and PTR records automatically but the DNS is managed manually and there is no TSIG key although dynamic updates are enabled Make a deal: you won t talk about the missing TSIG keys and get your key or keytab and permissions right after the guy fixed the security issue. Ask for dedicated zones and for credentials which allow you to manage your zones using nsupdate - Alternatively ask for delegation of your zones and setup a dedicated DNS server (protected by keys) 21

FAIL! Foreman HA At least two nodes, each one running postgresql database If you scale out, you might setup a nice pg-pool2 cluster HA IP(s) keepalived puppetdb HA IP(s) keepalived puppetdb puppetmasters could be ran active active as well as the foreman rails application and puppetdb (keep memcached in mind) In addition to keepalived you can setup a software loadbalancer (i.e. ha-proxy) to balance traffic and utilize both servers for puppet and foreman traffice Apache mod_passenger postgresql master ISC DHCP master Apache mod_passenger postgresql slave ISC DHCP slave DO NOT use VIPs as ip-helper most firewalls don t like async DHCP traffic! node1 node2 22

Best practices use separate IP addresses for each service so you can split up stuff later on If you can t use DHCP use the bootdisk plugin LDAP or kerberos5 for user authentication use Locations or Organizations for filtering use the column plugin for better overview ENC and smart variables are nice ever configured dhcp pool as yaml hash? Use smart variables as switches, and for simple datatypes only - do the complex stuff in service modules. 23

The big picture Virtual Network Physical Network 24 Hosted Virtual Real CMDB Deployment Foreman REST API Lifecycle Mgmt.

Centos 7...secret guide to world domination Can be deployed using the community templates. Or by adapting custom templates Currently not yet running out of the box on CentOS 7 - support will be added in 1.6.0 Some minor problems around selinux setting permissive mode allows foreman to run Foreman Installer relies on facts, facter relies on host and ifconfig binaries both not installed by default. https://github.com/theforeman/communitytemplates/ 25

Centos 7...secret guide to world domination Mind firewalld `--> firewall-cmd --zone=public --add-port=8140/tcp `--> firewall-cmd --zone=public --add-port=8140/tcp --permanent 26

Wishlist...secret guide to world domination integrate the reverse proxy feature into smart-proxy (there is a ticket for that somewhere) implement iso image provisioning based vm installation in conjunction with the bootdisk plugin support more configuration management stacks better support for discovery, ipmi and hardware provisioning (like HW-Raid) on-going 27

Thank You! Contact Nils Domrose Senior Systems Engineer inovex GmbH Office cologne Schanzenstr. 6-20 51063 Köln nils.domrose@inovex.de 28