SlideShare a Scribd company logo
1 of 17
Download to read offline
Exporting Resources
There and Back Again
About the WFU Linux Environment
• ~160 servers
• RHEL5, 6, and 7
• Puppet Open Source (3.8)
• Lots of virtualization
• App/DB pairs w/multiple environments
• Some Apps load balanced
• Oracle Active Data Guard
• Moving towards containerization, not there yet (more "pets")
Goals
What I intend with this presentation:
• to share our successes and failures
• to provide information to help you prevent some of our failures
• to learn what others have done in this area
What I do NOT intend with this presentation:
• to convince you to use (or not use) exported resources
• to convince you to use our naming conventions
• to tell you you are doing it wrong
About WFU environments
University environments are lifecycle stages:
• DEVL
• TEST
• PPRD
• PROD
Puppet environments must encompass all University environments:
• master (production)
• feature development branches
Where it all began...
Starting out with Puppet:
• Puppet Open Source
• No existing Puppet code base
• No PuppetDB (no exported/collected resources)
• extlookup, no hiera
• No firewall module
• Rolled our own
How to manage firewall rules?
How do you manage firewall rules?
Some firewall rules have specific IPs and ports that need to be allowed.
What we have here is an information problem:
• node that allows traffic knows what port to open
• node that allows traffic does not know what IP to allow
How can we tell the nodes which addresses need to be allowed?
Managing Firewall Rules: Attempt #1
Hardcode all values:
class mysql_server {
iptables::rule {
"allow SERVER_NAME to access ${fqdn} (added by ${module_name})":
source => [ '192.168.10.101' ],
dport => 3306,
}
}
Managing Firewall Rules: Attempt #1
Results
• Easy to configure - in the beginning
• Hard to update
• Duplication of data
• Adding/Decommissioning servers
Managing Firewall Rules: Attempt #2
Export explicitly to a service:
class webapp_server {
@@iptables::rule {
"allow web/app server ($ipaddress) to mysql server (added by ${module_name})":
source => $ipaddress,
tag => 'mysql_server::iptables::webapp_name',
}
}
Collect all rules related to my service, overriding port:
class mysql_server {
Iptables::Rule <<| tag == 'mysql_server::iptables::webapp_name' |>> {
dport => '3306',
}
}
Managing Firewall Rules: Attempt #2
Results
• Naming of resources and tags is crucial
• Exported resources cross Puppet environments
• Resources exported during noop Puppet runs
• Can't be collected twice
• Virtual resources allow 'plusignment' and multiple realizations
• Cleanup is messy
• Require multiple Puppet runs
• Adding a firewall rule to a node requires modification of 2 nodes' manifests
Managing Firewall Rules: Attempt #2.5
Only export one rule per service:
class webapp_server {
@@iptables::rule {
'allow webapp to access mysql':
source => $ipaddress,
tag => "webapp_server::iptables::i_am_webapp_name_${univ_env}",
}
}
Collect anywhere you need to allow that service access, overriding port:
class mysql_server {
Iptables::Rule <<| tag == "webapp_server::iptables::i_am_webapp_name_${univ_env}" |>> {
dport => '3306',
}
}
Attempt #2 vs Attempt #2.5
Attempt #2:
@@iptables::rule {
"allow web/app server ($ipaddress) to mysql server (added by ${module_name})":
source => $ipaddress,
tag => 'mysql_server::iptables::webapp_name',
}
Attempt #2.5:
@@iptables::rule {
'allow webapp to access mysql':
source => $ipaddress,
tag => "webapp_server::iptables::i_am_webapp_name_${univ_env}",
}
Managing Firewall Rules: Attempt #2.5
Results
• Exported rule should be available for each server
• Hard to know where rules come from/are going
• Naming of resources and tags is still crucial
• Multiple services on one server are problematic
• Multiple collection/plusignment issue again
• Node definitions are critical
• Edge case - duplicate node definition causes nodes to lose iptables rules
Managing Firewall Rules: Attempt #3
Don't export or collect rules, use hiera for data storage as required:
class mysql_server ( {
iptables::rule {
'allow webapp server - linux::devl::app_name::ip':
source => hiera('linux::devl::app_name::ip'),
dport => hiera('linux::devl::mysql_server::port'),
;
}
Managing Firewall Rules: Attempt #3
hiera.yaml
:hierarchy:
...
- "%{::environment}/hieradata/rdbms"
- "%{::environment}/hieradata/servers"
- "%{::environment}/hieradata/common"
:yaml:
:datadir: /etc/puppet/environments/
hieradata/servers.yaml
linux::devl::app_name::ip:
- '192.168.10.11'
- '192.168.10.12'
linux::devl::mysql_server::port: '3306'
Managing Firewall Rules: Attempt #3
Results
• Naming
• Still figuring it out
• Still crucial
• Hiera works
• Adding a server is easy
• Changing an IP address is easy
• Environments are supported
• Plan well for go-live
Our naming convention:
os::university_environment::service_name::sub_service::ip
os::university_environment::service_name::ip
Questions/Comments?
Q&A

More Related Content

What's hot

A One-Stop Solution for Puppet and OpenStack
A One-Stop Solution for Puppet and OpenStackA One-Stop Solution for Puppet and OpenStack
A One-Stop Solution for Puppet and OpenStack
Puppet
 

What's hot (20)

Cloudinit
CloudinitCloudinit
Cloudinit
 
CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStack
 
Apache Cassandra and Go
Apache Cassandra and GoApache Cassandra and Go
Apache Cassandra and Go
 
A One-Stop Solution for Puppet and OpenStack
A One-Stop Solution for Puppet and OpenStackA One-Stop Solution for Puppet and OpenStack
A One-Stop Solution for Puppet and OpenStack
 
Network Automation: Ansible 101
Network Automation: Ansible 101Network Automation: Ansible 101
Network Automation: Ansible 101
 
Move Over, Rsync
Move Over, RsyncMove Over, Rsync
Move Over, Rsync
 
Developing Terraform Modules at Scale - HashiTalks 2021
Developing Terraform Modules at Scale - HashiTalks 2021Developing Terraform Modules at Scale - HashiTalks 2021
Developing Terraform Modules at Scale - HashiTalks 2021
 
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
 
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment WorkshopAtlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
 
London HUG 12/4
London HUG 12/4London HUG 12/4
London HUG 12/4
 
Building Distributed System with Celery on Docker Swarm
Building Distributed System with Celery on Docker SwarmBuilding Distributed System with Celery on Docker Swarm
Building Distributed System with Celery on Docker Swarm
 
Deploying OpenStack with Chef
Deploying OpenStack with ChefDeploying OpenStack with Chef
Deploying OpenStack with Chef
 
How to deploy spark instance using ansible 2.0 in fiware lab v2
How to deploy spark instance using ansible 2.0 in fiware lab v2How to deploy spark instance using ansible 2.0 in fiware lab v2
How to deploy spark instance using ansible 2.0 in fiware lab v2
 
Improving Operations Efficiency with Puppet
Improving Operations Efficiency with PuppetImproving Operations Efficiency with Puppet
Improving Operations Efficiency with Puppet
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
 
Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28
 
CloudInit Introduction
CloudInit IntroductionCloudInit Introduction
CloudInit Introduction
 
Building Distributed System with Celery on Docker Swarm - PyCon JP 2016
Building Distributed System with Celery on Docker Swarm - PyCon JP 2016Building Distributed System with Celery on Docker Swarm - PyCon JP 2016
Building Distributed System with Celery on Docker Swarm - PyCon JP 2016
 

Similar to Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again

Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
Akshaya Mahapatra
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
yiditushe
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
guoqing75
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
Carlos Sanchez
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Carlos Sanchez
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
Carlos Sanchez
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag
garrett honeycutt
 

Similar to Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again (20)

Puppet getting started by Dirk Götz
Puppet getting started by Dirk GötzPuppet getting started by Dirk Götz
Puppet getting started by Dirk Götz
 
Writing & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp BostonWriting & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp Boston
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
 
8 Minutes On Rack
8 Minutes On Rack8 Minutes On Rack
8 Minutes On Rack
 
Rack
RackRack
Rack
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
 
DevOps in PHP environment
DevOps in PHP environment DevOps in PHP environment
DevOps in PHP environment
 
6. centos networking
6. centos networking6. centos networking
6. centos networking
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
 
Writing & Sharing Great Modules on the Puppet Forge
Writing & Sharing Great Modules on the Puppet ForgeWriting & Sharing Great Modules on the Puppet Forge
Writing & Sharing Great Modules on the Puppet Forge
 
Getting to know Laravel 5
Getting to know Laravel 5Getting to know Laravel 5
Getting to know Laravel 5
 
Php summary
Php summaryPhp summary
Php summary
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloud
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 

More from Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
Puppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
Puppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
Puppet
 

More from Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Recently uploaded

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 

Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again

  • 2. About the WFU Linux Environment • ~160 servers • RHEL5, 6, and 7 • Puppet Open Source (3.8) • Lots of virtualization • App/DB pairs w/multiple environments • Some Apps load balanced • Oracle Active Data Guard • Moving towards containerization, not there yet (more "pets")
  • 3. Goals What I intend with this presentation: • to share our successes and failures • to provide information to help you prevent some of our failures • to learn what others have done in this area What I do NOT intend with this presentation: • to convince you to use (or not use) exported resources • to convince you to use our naming conventions • to tell you you are doing it wrong
  • 4. About WFU environments University environments are lifecycle stages: • DEVL • TEST • PPRD • PROD Puppet environments must encompass all University environments: • master (production) • feature development branches
  • 5. Where it all began... Starting out with Puppet: • Puppet Open Source • No existing Puppet code base • No PuppetDB (no exported/collected resources) • extlookup, no hiera • No firewall module • Rolled our own How to manage firewall rules?
  • 6. How do you manage firewall rules? Some firewall rules have specific IPs and ports that need to be allowed. What we have here is an information problem: • node that allows traffic knows what port to open • node that allows traffic does not know what IP to allow How can we tell the nodes which addresses need to be allowed?
  • 7. Managing Firewall Rules: Attempt #1 Hardcode all values: class mysql_server { iptables::rule { "allow SERVER_NAME to access ${fqdn} (added by ${module_name})": source => [ '192.168.10.101' ], dport => 3306, } }
  • 8. Managing Firewall Rules: Attempt #1 Results • Easy to configure - in the beginning • Hard to update • Duplication of data • Adding/Decommissioning servers
  • 9. Managing Firewall Rules: Attempt #2 Export explicitly to a service: class webapp_server { @@iptables::rule { "allow web/app server ($ipaddress) to mysql server (added by ${module_name})": source => $ipaddress, tag => 'mysql_server::iptables::webapp_name', } } Collect all rules related to my service, overriding port: class mysql_server { Iptables::Rule <<| tag == 'mysql_server::iptables::webapp_name' |>> { dport => '3306', } }
  • 10. Managing Firewall Rules: Attempt #2 Results • Naming of resources and tags is crucial • Exported resources cross Puppet environments • Resources exported during noop Puppet runs • Can't be collected twice • Virtual resources allow 'plusignment' and multiple realizations • Cleanup is messy • Require multiple Puppet runs • Adding a firewall rule to a node requires modification of 2 nodes' manifests
  • 11. Managing Firewall Rules: Attempt #2.5 Only export one rule per service: class webapp_server { @@iptables::rule { 'allow webapp to access mysql': source => $ipaddress, tag => "webapp_server::iptables::i_am_webapp_name_${univ_env}", } } Collect anywhere you need to allow that service access, overriding port: class mysql_server { Iptables::Rule <<| tag == "webapp_server::iptables::i_am_webapp_name_${univ_env}" |>> { dport => '3306', } }
  • 12. Attempt #2 vs Attempt #2.5 Attempt #2: @@iptables::rule { "allow web/app server ($ipaddress) to mysql server (added by ${module_name})": source => $ipaddress, tag => 'mysql_server::iptables::webapp_name', } Attempt #2.5: @@iptables::rule { 'allow webapp to access mysql': source => $ipaddress, tag => "webapp_server::iptables::i_am_webapp_name_${univ_env}", }
  • 13. Managing Firewall Rules: Attempt #2.5 Results • Exported rule should be available for each server • Hard to know where rules come from/are going • Naming of resources and tags is still crucial • Multiple services on one server are problematic • Multiple collection/plusignment issue again • Node definitions are critical • Edge case - duplicate node definition causes nodes to lose iptables rules
  • 14. Managing Firewall Rules: Attempt #3 Don't export or collect rules, use hiera for data storage as required: class mysql_server ( { iptables::rule { 'allow webapp server - linux::devl::app_name::ip': source => hiera('linux::devl::app_name::ip'), dport => hiera('linux::devl::mysql_server::port'), ; }
  • 15. Managing Firewall Rules: Attempt #3 hiera.yaml :hierarchy: ... - "%{::environment}/hieradata/rdbms" - "%{::environment}/hieradata/servers" - "%{::environment}/hieradata/common" :yaml: :datadir: /etc/puppet/environments/ hieradata/servers.yaml linux::devl::app_name::ip: - '192.168.10.11' - '192.168.10.12' linux::devl::mysql_server::port: '3306'
  • 16. Managing Firewall Rules: Attempt #3 Results • Naming • Still figuring it out • Still crucial • Hiera works • Adding a server is easy • Changing an IP address is easy • Environments are supported • Plan well for go-live Our naming convention: os::university_environment::service_name::sub_service::ip os::university_environment::service_name::ip