{"id":810,"date":"2012-09-13T22:28:03","date_gmt":"2012-09-13T22:28:03","guid":{"rendered":"http:\/\/www.cloudcomp.ch\/?p=810"},"modified":"2012-09-13T22:28:03","modified_gmt":"2012-09-13T22:28:03","slug":"a-quick-performance-boost-tip-for-foreman","status":"publish","type":"post","link":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/","title":{"rendered":"A Quick Performance Boost Tip for Foreman"},"content":{"rendered":"<p>It doesn&#8217;t make sense to continually download the same operating system packages when you can cache them along side your Foreman installation. Assuming you use a debian based OS, in order to do this and have a cached copy of all packages you use within your infrastructure simply install apt-cacher or apt-cacher-ng. Our preference is for apt-cacher-ng but we&#8217;ll show you how to install both.<\/p>\n<p># Installing apt-cacher-ng<\/p>\n<p>[gist id=3720930]<\/p>\n<p>You shouldn&#8217;t have to adjust the configuration of apt-cacher-ng for the basic functionality it offers, however if you need to adjust settings in `\/etc\/apt-cacher-ng\/acng.conf`.<\/p>\n<p># Installing apt-cacher<\/p>\n<p>[gist id=3718168]<\/p>\n<p>Then set the contents of `apt-cacher-conf` to:<\/p>\n<p>[gist id=3718171]<\/p>\n<p>***Note:*** you might want to change the hostname of the ubuntu mirror and interface (eth1 is specific to previous articles on Foreman)<\/p>\n<p>Reports are created every 24 hours, which can be accessed at `http:\/\/$FOREMAN:3241\/report`. To force the creation run:<\/p>\n<p>[gist id=3718175]<\/p>\n<p># Configuring Foreman<br \/>\nOnce you have setup apt-cacher you can then create a new Foreman &#8220;Installation Media Source&#8221;. Simply supply a sensible name and importantly set the URL of that installation media source to `http:\/\/$FOREMAN:3241\/ubuntu`, where $FOREMAN is either the IP or FQDN of your Foreman host.<\/p>\n<div class=\"pt-sm\">Schlagw\u00f6rter: <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/apt-cacher\/\">apt-cacher<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/apt-cacher-ng\/\">apt-cacher-ng<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/automation\/\">automation<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/cache\/\">cache<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/foreman\/\">foreman<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/infrastructure\/\">infrastructure<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/packages\/\">packages<\/a><br><\/div>","protected":false},"excerpt":{"rendered":"<p>It doesn&#8217;t make sense to continually download the same operating system packages when you can cache them along side your Foreman installation. Assuming you use a debian based OS, in order to do this and have a cached copy of all packages you use within your infrastructure simply install apt-cacher.<\/p>\n","protected":false},"author":72,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[5],"tags":[43,44,51,61,148,192,247],"features":[],"class_list":["post-810","post","type-post","status-publish","format-standard","hentry","category-articles","tag-apt-cacher","tag-apt-cacher-ng","tag-automation","tag-cache","tag-foreman","tag-infrastructure","tag-packages"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>A Quick Performance Boost Tip for Foreman - Service Engineering (ICCLab &amp; SPLab)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Quick Performance Boost Tip for Foreman\" \/>\n<meta property=\"og:description\" content=\"It doesn&#039;t make sense to continually download the same operating system packages when you can cache them along side your Foreman installation. Assuming you use a debian based OS, in order to do this and have a cached copy of all packages you use within your infrastructure simply install apt-cacher.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Engineering (ICCLab &amp; SPLab)\" \/>\n<meta property=\"article:published_time\" content=\"2012-09-13T22:28:03+00:00\" \/>\n<meta name=\"author\" content=\"Andy Edmonds\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andy Edmonds\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/\"},\"author\":{\"name\":\"Andy Edmonds\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684\"},\"headline\":\"A Quick Performance Boost Tip for Foreman\",\"datePublished\":\"2012-09-13T22:28:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/\"},\"wordCount\":209,\"commentCount\":0,\"keywords\":[\"apt-cacher\",\"apt-cacher-ng\",\"automation\",\"cache\",\"foreman\",\"infrastructure\",\"packages\"],\"articleSection\":[\"Articles\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/\",\"name\":\"A Quick Performance Boost Tip for Foreman - Service Engineering (ICCLab &amp; SPLab)\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\"},\"datePublished\":\"2012-09-13T22:28:03+00:00\",\"author\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\/\/blog.zhaw.ch\/icclab\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Quick Performance Boost Tip for Foreman\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/\",\"name\":\"Service Engineering (ICCLab &amp; SPLab)\",\"description\":\"A Blog of the ZHAW Zurich University of Applied Sciences\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684\",\"name\":\"Andy Edmonds\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g\",\"caption\":\"Andy Edmonds\"},\"sameAs\":[\"http:\/\/andy.edmonds.be\"],\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/author\/edmo\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"A Quick Performance Boost Tip for Foreman - Service Engineering (ICCLab &amp; SPLab)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/","og_locale":"en_US","og_type":"article","og_title":"A Quick Performance Boost Tip for Foreman","og_description":"It doesn't make sense to continually download the same operating system packages when you can cache them along side your Foreman installation. Assuming you use a debian based OS, in order to do this and have a cached copy of all packages you use within your infrastructure simply install apt-cacher.","og_url":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/","og_site_name":"Service Engineering (ICCLab &amp; SPLab)","article_published_time":"2012-09-13T22:28:03+00:00","author":"Andy Edmonds","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andy Edmonds","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/#article","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/"},"author":{"name":"Andy Edmonds","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684"},"headline":"A Quick Performance Boost Tip for Foreman","datePublished":"2012-09-13T22:28:03+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/"},"wordCount":209,"commentCount":0,"keywords":["apt-cacher","apt-cacher-ng","automation","cache","foreman","infrastructure","packages"],"articleSection":["Articles"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/","url":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/","name":"A Quick Performance Boost Tip for Foreman - Service Engineering (ICCLab &amp; SPLab)","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#website"},"datePublished":"2012-09-13T22:28:03+00:00","author":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684"},"breadcrumb":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.zhaw.ch\/icclab\/a-quick-performance-boost-tip-for-foreman\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/blog.zhaw.ch\/icclab\/"},{"@type":"ListItem","position":2,"name":"A Quick Performance Boost Tip for Foreman"}]},{"@type":"WebSite","@id":"https:\/\/blog.zhaw.ch\/icclab\/#website","url":"https:\/\/blog.zhaw.ch\/icclab\/","name":"Service Engineering (ICCLab &amp; SPLab)","description":"A Blog of the ZHAW Zurich University of Applied Sciences","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684","name":"Andy Edmonds","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g","caption":"Andy Edmonds"},"sameAs":["http:\/\/andy.edmonds.be"],"url":"https:\/\/blog.zhaw.ch\/icclab\/author\/edmo\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/users\/72"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/comments?post=810"}],"version-history":[{"count":0,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/810\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/media?parent=810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/categories?post=810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/tags?post=810"},{"taxonomy":"features","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/features?post=810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}