43
MIXED ENVIRONMENTS CONFIGURATION & LIFECYCLE: 1

Configuration and lifecycle in Mixed environments

Embed Size (px)

Citation preview

Page 1: Configuration and lifecycle in Mixed environments

MIXED ENVIRONMENTSCONFIGURATION & LIFECYCLE:

1

Page 2: Configuration and lifecycle in Mixed environments

KIREEVDMITRY

2github.com/kireevco

DevOps, Tinkerer, Hacker

Page 3: Configuration and lifecycle in Mixed environments

WE HAVE TO BE SUPERHEROES

We have no choice…

3

Page 4: Configuration and lifecycle in Mixed environments

WORLDIDEAL

4

Page 5: Configuration and lifecycle in Mixed environments

WORLD(LESS) IDEAL

5

Page 6: Configuration and lifecycle in Mixed environments

REALITYBITTER

6

Page 7: Configuration and lifecycle in Mixed environments

CONFIGURATION & LIFECYCLE: MIXED ENVIRONMENTS

LINUX VS WINDOWS: SO DIFFERENT

▸ ls vs dir

▸ bash vs cmd

▸ cat vs type

▸ $PATH vs %PATH%

▸ /boot vs C:\Windows

▸ ext4 vs NTFS

▸ apt-get vs ???

7

Page 8: Configuration and lifecycle in Mixed environments

CAN THEY LIVE TOGETHER?

8

Page 9: Configuration and lifecycle in Mixed environments

WE MUST LEARN TO LIVE TOGETHER AS BROTHERS OR PERISH TOGETHER AS FOOLS

Martin Luther King, Jr.

CONFIGURATION & LIFECYCLE: MIXED ENVIRONMENTS 9

Page 10: Configuration and lifecycle in Mixed environments

- CONFIGURATION MANAGEMENT - LIFECYCLE MANAGEMENT

YES.We just need something that would make sense for both worlds:

10

Page 11: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

11

Page 12: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

WHEN IT IS MORE OF SPAGHETTI

▸ Scripts are hard to re-use

▸ High code duplication

▸ High entry point for new staff

▸ Low documentation quality

▸ No clear standards

▸ No business behind provision.sh

12

Page 13: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

BENEFITS OF CONFIGURATION MANAGEMENT

▸ Improved Efficiency (no more duplication and golden image maintenance. Almost like in Hollywood)

▸ Visibility

▸ Confidence (if a change is made it is made to a right range of systems)

▸ Auditability (source control and reports allow you to track all changes down)

▸ Predictability (rolling out a change is similar to a software release)

▸ Configuration Drift Remediation (two or more entities are identical)

▸ Living Documentation (configurations serve as a «source of truth» and are up-to-date)

▸ Captured Effort (two or more entities are identical)

13

Page 14: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

CROSS-PLATFORM

▸ Puppet

▸ Chef

▸ Ansible

▸ Salt

▸ CFEngine

WINDOWS PROPRIETARY

▸ PowerShell DSC

▸ SCCM

▸ WDS

▸ Dell KACE

14

Page 15: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

PUPPET: MULTI-PLATFORM SUPPORT

▸ Linux

▸ RHEL, Debian, Ubuntu, Fedora, SUSE, Gentoo, Arch

▸ BSD

▸ FreeBSD, OpenBSD

▸ Other Unix

▸ MacOS X, Solaris, AIX, HP-UX

▸ Microsoft Windows

15

Page 16: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

PUPPET: WINDOWS & LINUX SUPPORT

▸ IIS

▸ Powershell

▸ Windows Registry

▸ NewRelic Agent

▸ Apt-Get

▸ Nginx

▸ Bash

▸ Augeas

▸ NewRelic Agent

▸ Chocolatey

16

Page 17: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

PUPPET: DEFINED STATE OF RESOURCES

▸ Define

▸ Test

▸ Enforce

▸ Report

17

Page 18: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

WINDOWS

LINUX

FILE RESOURCE

18

Page 19: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

IIS CONFIG EXAMPLE

▸ Install IIS form scratch

▸ Site directory

▸ Hosts file entry

▸ IIS App Pool

▸ IIS Site

▸ IIS Application

▸ IIS Virtual Directory

▸ Includes SSL configuration

19

Page 20: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

NGINX CONFIG EXAMPLE

▸ Install and configure Nginx

▸ Set up reverse proxy

▸ Configure root location

20

Page 21: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

SOURCE CONTROL

21

Page 22: Configuration and lifecycle in Mixed environments

CONFIGURATION MANAGEMENT

WINDOWS PACKAGE MANAGER

22

Page 23: Configuration and lifecycle in Mixed environments

THIS?HOW DO WE USE

23

Page 24: Configuration and lifecycle in Mixed environments

LIFE CYCLE MANAGEMENT

24

Page 25: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

CROSS-PLATFORM

▸ Puppet razor

▸ Chef knife-bootstrap

▸ Foreman (GUI, foreman-cli, REST)

WINDOWS PROPRIETARY

▸ SCCM

▸ WDS

▸ Dell KACE

25

Page 26: Configuration and lifecycle in Mixed environments

LIFE CYCLE MANAGEMENT

Provisioning Configuration MonitoringProvision on bare-metal & public or private clouds all from one place with one simple process.

A complete configuration management solution including an ENC for Puppet and Salt, built-in support for parameterized classes and hierarchical parameter storage.

Collect Puppet, Chef and Salt reports and facts. Monitor host configuration, report status, distribution and trends.

THE FOREMAN

26

Page 27: Configuration and lifecycle in Mixed environments

LIFE CYCLE MANAGEMENT

THE FOREMAN

▸ Platform agnostic provisioning

▸ CLI

▸ RBAC and LDAP integration

▸ Plugins

▸ API

▸ Audits

▸ Host groups

▸ ERB Templates

▸ PXEBoot, TFTP, Kickstart

27

Page 28: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT 28

Page 29: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

HOST INFO

29

Page 30: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

HOST CONFIGURATION

30

Page 31: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

HOST CONFIGURATION

31

Page 32: Configuration and lifecycle in Mixed environments

TEMPLATESFOREMAN

32

Page 33: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

UNATTEND.XML

33

Xml kickstart for Windows

Page 34: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

JOIN DOMAIN SNIPPET

34

Page 35: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

COMMUNITY TEMPLATES

35

Page 36: Configuration and lifecycle in Mixed environments

WIMAGINGFOREMAN

36

Page 37: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

WIMAGING

▸ Linux style installation using http:// or ftp:// installation media

▸ No extra servers like WDS needed - all relevant settings can be configured in Foreman directly

▸ Official Microsoft utilities are used for all relevant setup stages making it easy to add (future) operating systems

▸ Driver installation during build time

▸ Support for localization settings (like time zone, locale, UI language)

▸ Optional domain join including target OU

▸ Optional local user creation

▸ Support for Foreman's root password using Base64 encoding

▸ Correctly report finished host building

▸ Optional software installation and user tasks at the end of the build (like installing puppet etc)

37

Page 38: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

WIMAGING: 10_INIT.CMD, CALLED FROM STARTNET.CMDDuring WinPE boot

38

Page 39: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

WIMAGING FLOW

▸ Create host (user)

▸ Download bootfiles

▸ Boot to WinPE via wimboot

▸ Partition disk

▸ Apply image

▸ Add drivers

▸ User software (Puppet)

▸ Finish script

▸ Reboot

39

Page 40: Configuration and lifecycle in Mixed environments

LIFECYCLE MANAGEMENT

WIMAGING SETUP

▸ Clone repo

▸ Setup Foreman & Templates

▸ Setup Medium

▸ Produce boot medium

▸ Produce install medium

▸ Sync medium to http/ftp

▸ Provision host

40

Page 41: Configuration and lifecycle in Mixed environments

CONFIGURATION & LIFECYCLE: MIXED ENVIRONMENTS

WHAT DO WE GET

▸ Infrastructure as a code

▸ Platform-agnostic

▸ Reusable code & templates (Puppet, ERB) that make sense

▸ Single point of entry for DevOps, Developers, APIs

▸ As much Open Source as possible (presence + contribution)

▸ Well supported (RedHat, PuppetLabs, Community)

41

Page 42: Configuration and lifecycle in Mixed environments

QUESTIONS?All trademarks, logos, characters are properties of their respective owners.

(Or maybe a quick demo)

42

Page 43: Configuration and lifecycle in Mixed environments

MIXED ENVIRONMENT

OTHER THINGS THAT I SHOULD’VE MENTIONED

▸ Foreman supports Chef, Salt Ansible

▸ profile::nginx::www_site_com vs provision.sh

▸ Chocolatey supports private repositories

▸ Puppet can also operate in server-less mode

▸ IntelliJ IDEA or RubyMine support puppet DSL

▸ Logstash is awesome

43