The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs
-
Upload
puppet-labs -
Category
Technology
-
view
283 -
download
1
description
Transcript of The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs
![Page 1: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/1.jpg)
2014
Presented by
The Grand Puppet Sub-Systems TourNick Fagerlund Technical Writer / Weird Bugs | Puppet Labs @nfagerlund
![Page 2: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/2.jpg)
Presented by
PIPES
![Page 3: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/3.jpg)
Presented by
What does Puppet DO?• Gather system information • Compile a catalog • Apply catalog • Report
![Page 4: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/4.jpg)
Presented by
What does Puppet DO?AGENT
• Gather system information
• Apply catalog • Report
MASTER • Compile a catalog
![Page 5: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/5.jpg)
Presented by
STOP 1: Command Line and the
![Page 6: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/6.jpg)
Presented by
Someone ran puppet agent
![Page 7: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/7.jpg)
Presented by
???• /opt/puppet/bin/puppet • Puppet::Util::CommandLine.new.execute • Puppet::Application.find • Puppet::Application::Agent.new • Puppet::Application::Agent#setup • Puppet::Application::Agent#run_command
![Page 8: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/8.jpg)
Presented by
#run_command# lib/puppet/application/agent.rb def run_command if options[:fingerprint] fingerprint else # It'd be nice to daemonize later, but we have to daemonize before # waiting for certificates so that we don't block daemon = daemonize_process_when(Puppet[:daemonize]) ! wait_for_certificates ! if Puppet[:onetime] onetime(daemon) else main(daemon) end
![Page 9: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/9.jpg)
Presented by
onetime() and main()# lib/puppet/application/agent.rb begin exitstatus = daemon.agent.run rescue => detail Puppet.log_exception(detail) end ! daemon.stop(:exit => false) ! if not exitstatus exit(1) elsif options[:detailed_exitcodes] then exit(exitstatus) else exit(0) end
# lib/puppet/application/agent.rb def main(daemon) if Puppet[:listen] setup_listen(daemon) end Puppet.notice "Starting Puppet client version #{Puppet.version}" ! daemon.start end
![Page 10: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/10.jpg)
Presented by
Obtaining the daemon# lib/puppet/application/agent.rb def daemonize_process_when(should_daemonize) daemon = Puppet::Daemon.new(Puppet::Util::Pidlock.new(Puppet[:pidfile])) daemon.argv = @argv daemon.agent = @agent ! daemon.daemonize if should_daemonize ! daemon end
![Page 11: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/11.jpg)
Presented by
STOP 2: The Daemon and the
![Page 12: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/12.jpg)
Presented by
DAEMON LAND?!
Nope Bye
![Page 13: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/13.jpg)
Presented by
Puppet::Agent• Run a thing
![Page 14: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/14.jpg)
Presented by
Puppet::Daemon• Run a thing that runs the other thing
![Page 15: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/15.jpg)
Presented by
Lots of layers of abstraction??• Historical reasons!
![Page 16: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/16.jpg)
Presented by
STOP 3: The Configurer
![Page 17: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/17.jpg)
Presented by
Puppet::Configurer
![Page 18: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/18.jpg)
Presented by
Puppet::Configurer#run_internal# lib/puppet/configurer.rb def run_internal(options) # We create the report pre-‐populated with default settings for # environment and transaction_uuid very early, this is to ensure # they are sent regardless of any catalog compilation failures or # exceptions. options[:report] ||= Puppet::Transaction::Report.new("apply", nil, @environment, @transaction_uuid) report = options[:report] init_storage ! Puppet::Util::Log.newdestination(report) … … …
![Page 19: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/19.jpg)
Presented by
Puppet::Configurer#run_internal# lib/puppet/configurer.rb … query_options = get_facts(options) unless query_options …
![Page 20: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/20.jpg)
Presented by
Puppet::Configurer#run_internal# lib/puppet/configurer/fact_handler.rb … facts = Puppet::Node::Facts.indirection.find(Puppet[:node_name_value], :environment => @environment) …
![Page 21: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/21.jpg)
Presented by
Puppet::Configurer#run_internal# lib/puppet/configurer.rb … unless catalog = prepare_and_retrieve_catalog(options, query_options) return nil end …
![Page 22: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/22.jpg)
Presented by
Puppet::Configurer#run_internal# lib/puppet/configurer.rb … apply_catalog(catalog, options) …
![Page 23: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/23.jpg)
Presented by
Where next?
Retrieve Apply
![Page 24: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/24.jpg)
Presented by
STOP 4: The Transaction
![Page 25: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/25.jpg)
Presented by
(Puppet::Resource::Catalog)
![Page 26: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/26.jpg)
Presented by
Puppet::Resource::Catalog
Catalog
Resource Other Stuff
![Page 27: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/27.jpg)
Presented by
Puppet::Configurer (again)# lib/puppet/configurer.rb def convert_catalog(result, duration) catalog = result.to_ral catalog.finalize catalog.retrieval_duration = duration catalog.write_class_file catalog.write_resource_file catalog end
![Page 28: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/28.jpg)
Presented by
RAL Catalog
![Page 29: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/29.jpg)
Presented by
RAL Catalog # lib/puppet/resource/catalog.rb def to_catalog(convert) result = self.class.new(self.name, self.environment_instance) result.version = self.version map = {} resources.each do |resource| next if virtual_not_exported?(resource) next if block_given? and yield resource newres = resource.copy_as_resource newres.catalog = result if convert != :to_resource newres = newres.to_ral end # We can't guarantee that resources don't munge their names # (like files do with trailing slashes), so we have to keep track # of what a resource got converted to. map[resource.ref] = newres result.add_resource newres end
![Page 30: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/30.jpg)
Presented by
RAL CatalogPuppet::Resource
!
↓ !
(something) << Puppet::Type
![Page 31: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/31.jpg)
Presented by
RAL Catalog
???
![Page 32: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/32.jpg)
Presented by
RAL Catalog# lib/puppet/configurer.rb def apply_catalog(catalog, options) report = options[:report] report.configuration_version = catalog.version ! benchmark(:notice, "Finished catalog run") do catalog.apply(options) end ! report.finalize_report report end
![Page 33: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/33.jpg)
Presented by
Puppet::Resource::Catalog#apply# lib/puppet/resource/catalog.rb def apply(options = {}) Puppet::Util::Storage.load if host_config? ! transaction = create_transaction(options) ! begin transaction.report.as_logging_destination do transaction.evaluate end rescue Puppet::Error => detail !
![Page 34: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/34.jpg)
Presented by
Transaction
???
![Page 35: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/35.jpg)
Presented by
Transaction• Ral catalog • Prioritizer • Report
![Page 36: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/36.jpg)
Presented by
Transaction• Ral catalog • Prioritizer • Report • Event manager • Resource harness • Relationship graph
![Page 37: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/37.jpg)
Presented by
Transaction• Ral catalog • Prioritizer • Report • Event manager • Resource harness • Relationship graph • relationship_graph.traverse
![Page 38: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/38.jpg)
Presented by
Transaction• Ral catalog • Prioritizer • Report • Event manager • Resource harness • Relationship graph • relationship_graph.traverse • *ollies out*
![Page 39: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/39.jpg)
Presented by
STOP 5: The Indirector
![Page 40: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/40.jpg)
Presented by
Back to Puppet::Configurer• #prepare_and_retrieve_catalog
![Page 41: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/41.jpg)
Presented by
Back to Puppet::Configurer# lib/puppet/configurer.rb result = Puppet::Resource::Catalog.indirection.find( Puppet[:node_name_value], query_options.merge(:ignore_cache => true, :environment => @environment, :fail_on_404 => true) )
![Page 42: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/42.jpg)
Presented by
The Indirector!
Puppet::Resource::Catalog.indirection.find()
![Page 43: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/43.jpg)
Presented by
The Indirector
← ↑ ↓ ?
![Page 44: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/44.jpg)
Presented by
The Indirector• Globally configured • Abstract • Gets stuff for you
![Page 45: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/45.jpg)
Presented by
The Indirector # lib/puppet/resource/catalog.rb extend Puppet::Indirector indirects :catalog, :terminus_setting => :catalog_terminus
![Page 46: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/46.jpg)
Presented by
The Indirector• find • search • save • destroy
![Page 47: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/47.jpg)
Presented by
The Indirector• find • search • save • destroy • terminus_class • cache_class • lib/puppet/indirector/…
![Page 48: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/48.jpg)
Presented by
Puppet Agent• Catalog => REST • Report => REST • Facts => Facter
![Page 49: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/49.jpg)
Presented by
Puppet Apply• Catalog => Compiler • Report => Processor • Facts => Facter
![Page 50: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/50.jpg)
Presented by
Avoiding the cache# lib/puppet/configurer.rb result = Puppet::Resource::Catalog.indirection.find( Puppet[:node_name_value], query_options.merge(:ignore_cache => true, :environment => @environment, :fail_on_404 => true) )
![Page 51: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/51.jpg)
Presented by
The Indirector• Why?
![Page 52: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/52.jpg)
Presented by
The Indirector• Why? • Global? Rigid?
![Page 53: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/53.jpg)
Presented by
The Indirector• Why? • Global? Rigid? • IT MAKES SENSE IN CONTEXT
![Page 54: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/54.jpg)
Presented by
The Indirector• …Catalog.find( <FACTS> ) • REST terminus • HTTP POST request to master
![Page 55: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/55.jpg)
Presented by
STOP 6: The Puppet Master’s
![Page 56: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/56.jpg)
Presented by
RackWeb server
↓ Rack server
↓ “App” object that responds to #call()
↓ Actual application logic
![Page 57: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/57.jpg)
Presented by
config.ru $0 = "master" !
ARGV << "-‐-‐rack" !
ARGV << "-‐-‐confdir" << "/etc/puppet" ARGV << "-‐-‐vardir" << "/var/lib/puppet" !
require 'puppet/util/command_line' run Puppet::Util::CommandLine.new.execute !
![Page 58: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/58.jpg)
Presented by
Starting master w/ Rack# lib/puppet/application/master.rb def start_rack_master require 'puppet/network/http/rack' !
announce_start_of_master !
return Puppet::Network::HTTP::Rack.new() end
![Page 59: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/59.jpg)
Presented by
The app object# lib/puppet/network/http/rack.rb class Puppet::Network::HTTP::Rack def call(env) request = Rack::Request.new(env) response = Rack::Response.new Puppet.debug 'Handling request: %s %s' % [request.request_method, request.fullpath] ! begin Puppet::Network::HTTP::RackREST.new.process(request, response) rescue => detail # Send a Status 500 Error on unhandled exceptions. response.status = 500 response['Content-‐Type'] = 'text/plain' response.write 'Internal Server Error: "%s"' % detail.message # log what happened Puppet.log_exception(detail, "Puppet Server (Rack): Internal Server Error: Unhandled Exception: \"%s\"" % detail.message) end response.finish
![Page 60: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/60.jpg)
Presented by
#process# lib/puppet/network/http/handler.rb def process(request, response) new_response = Puppet::Network::HTTP::Response.new(self, response) !
request_headers = headers(request) request_params = params(request) request_method = http_method(request) request_path = path(request) … !
![Page 61: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/61.jpg)
Presented by
#process# lib/puppet/network/http/handler.rb if route = @routes.find { |route| route.matches?(new_request) } route.process(new_request, new_response)
![Page 62: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/62.jpg)
Presented by
lib/puppet/network/http/api/v1.rb
![Page 63: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/63.jpg)
Presented by
lib/puppet/network/http/api/v1.rb• GET => indirection.find() • POST => indirection.find() (for catalogs)
• (There was an issue with some servers rejecting GET parameters that were too long. Funny story about that.)
• DELETE => indirection.destroy() • PUT => indirection.save() • GET to magical plural name => indirection.search()
![Page 64: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/64.jpg)
Presented by
BIG PICTUREConfigurer calls catalog.indirection.find()
↓ HTTP POST request to master
↓ Request handler calls catalog.indirection.find()
↓ Compiler terminus handles it
↓
![Page 65: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/65.jpg)
Presented by
STOP 7: The Compiler
![Page 66: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/66.jpg)
Presented by
MOSTLY SKIPPING THISLexer ↓
Parser ↓
AST ↓
Evaluator ↓
![Page 67: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/67.jpg)
Presented by
THIS IS THE TEST“Compiler terminus to the catalog
indirection” !
???
![Page 68: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/68.jpg)
Presented by
THIS IS THE TEST
GOOD WORK EVERYBODY!
![Page 69: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/69.jpg)
Presented by
Questions?
![Page 70: The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs](https://reader033.fdocuments.net/reader033/viewer/2022051610/549c674cac7959e22a8b4713/html5/thumbnails/70.jpg)
Presented by
THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!•Hope we’ll see you next year in
Portland!