Skip to content

Instantly share code, notes, and snippets.

@rds13
rds13 / __readme.md
Created October 17, 2018 08:37 — forked from maxivak/__readme.md
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

#!/usr/bin/ruby
require 'socket'
PROCESS_METRICS = {
'Uptime_sec' => %w(uptime seconds),
'ConnRate' => %w(connection_rate connections rate),
'SessRate' => %w(session_rate sessions rate),
'SslFrontendKeyRate' => %w(sslkey_rate lookups rate),
'SslCacheLookups' => %w(sslcache_lookups lookups counter),