<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkEHR3w5fip7ImA9WhBaFEw.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874</id><updated>2013-05-24T18:50:36.226+03:00</updated><category term="provisioning" /><category term="puppet" /><category term="redhat" /><category term="monitoringsucks" /><category term="oVirt" /><category term="packaging" /><category term="cli" /><category term="uuid" /><category term="ec2" /><category term="debian" /><category term="community" /><category term="foreman" /><category term="VNC" /><category term="virtualizaition" /><category term="fosdem" /><category term="aws" /><category term="API" /><title>The Foreman Blog</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.theforeman.org/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.theforeman.org/" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/theforeman/MaSy" /><feedburner:info uri="theforeman/masy" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CEcEQn8-fCp7ImA9WhNUFUU.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-769250569979977829</id><published>2013-01-07T20:06:00.001+02:00</published><updated>2013-01-07T20:06:43.154+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-07T20:06:43.154+02:00</app:edited><title>Screencast: Locations &amp; Organizations</title><content type="html">&lt;div class="separator" style="clear: both; text-align: left;"&gt;
One of the most important features that will be released soon as part of Foreman 1.1 is locations &amp;amp; organizations. We will probably do a deep dive (which will get recorded) pretty soon, but I recorded a quick screencast to show how they work. Enjoy!&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
The volume in the recording is low, but it gets very degraded when I try to increase the gain so make sure to crank up your output.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/aB0Ek-aKmZw/0.jpg"&gt;&lt;param name="movie" value="http://www.youtube.com/v/aB0Ek-aKmZw?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/aB0Ek-aKmZw?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/5XpLOTwwis4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/769250569979977829/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2013/01/screencast-locations-organizations.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/769250569979977829?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/769250569979977829?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/5XpLOTwwis4/screencast-locations-organizations.html" title="Screencast: Locations &amp; Organizations" /><author><name>Sam Kottler</name><uri>https://plus.google.com/114136083839242601048</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-OBq2mocWtyQ/AAAAAAAAAAI/AAAAAAAAABw/pe8JoHczQek/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.theforeman.org/2013/01/screencast-locations-organizations.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUCRHY4fip7ImA9WhNQGU4.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-8485465307878080476</id><published>2012-11-26T14:34:00.000+02:00</published><updated>2012-11-26T14:34:25.836+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-26T14:34:25.836+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="puppet" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Parameterized Class Support in Foreman</title><content type="html">We've got Parameterized Class support in Foreman now, and it'll be in the next release! I've recorded a small screencast demonstrating its use:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/Ksr0tilbmcc/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Ksr0tilbmcc?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/Ksr0tilbmcc?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;br /&gt;
You can find the mentioned wiki page at&amp;nbsp;&lt;a href="http://theforeman.org/projects/foreman/wiki/Parameterized_class_support"&gt;wiki:Parameterized_class_support&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/JuVdjdkEDaI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/8485465307878080476/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/11/parameterized-class-support-in-foreman.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/8485465307878080476?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/8485465307878080476?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/JuVdjdkEDaI/parameterized-class-support-in-foreman.html" title="Parameterized Class Support in Foreman" /><author><name>Greg Sutcliffe</name><uri>https://plus.google.com/110970604608301856139</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-85AEuXUkTDY/AAAAAAAAAAI/AAAAAAAACPk/_1Oc32NVc4w/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/11/parameterized-class-support-in-foreman.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4MRn0zcCp7ImA9WhNSF0Q.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-497357445063370416</id><published>2012-11-01T20:17:00.000+02:00</published><updated>2012-11-01T20:19:47.388+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-01T20:19:47.388+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="packaging" /><category scheme="http://www.blogger.com/atom/ns#" term="debian" /><category scheme="http://www.blogger.com/atom/ns#" term="community" /><title>Debian Packaging, the Transparent way</title><content type="html">
&lt;br /&gt;
So I've been managing the Debian packages for about 8 months now, and every so often I get asked if there's anything people can&amp;nbsp;do to help. I have to answer "Not really" because the way we're building the Debian&amp;nbsp;packages is somewhat arcane.&lt;br /&gt;
&lt;br /&gt;
At least, it was. This blog is to tell you all about how it's now much more open.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Packaging in the open&lt;/h3&gt;
The first piece of the puzzle starts with our foreman-rpms repo (&lt;a href="http://github.com/theforeman/foreman-rpms"&gt;github.com/theforeman/foreman-rpms&lt;/a&gt;)&lt;br /&gt;
in this repo we store all the packaging data for the foreman packages, both deb and rpm.&amp;nbsp;In the case of Debian, you'll see a structure like:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; debian/&amp;lt;distro&amp;gt;/&amp;lt;type&amp;gt;/&amp;lt;package&amp;gt;&lt;/package&gt;&lt;/type&gt;&lt;/distro&gt;&lt;br /&gt;
&lt;br /&gt;
For example, the foreman-proxy nightly package for squeeze is at:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;a href="https://github.com/theforeman/foreman-rpms/tree/master/debian/squeeze/nightly/foreman-proxy" target="_blank"&gt;debian/squeeze/nightly/foreman-proxy&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now, the eagle-eyed and quick-witted among you will already have thought "That's&amp;nbsp;quite a lot of code duplication". You're absolutely correct, but this method allows&amp;nbsp;us to package each distro in it's own way, if need be. At the moment, it's all very&amp;nbsp;similar, but it might not stay that way. It also makes it trivial to add in more&amp;nbsp;distributions later (say, quantal or wheezy).&lt;br /&gt;
&lt;br /&gt;
So, now you know where our package data is, you'll want to know; how does it get&amp;nbsp;used? Well, here we turn to the king of automation - Jenkins.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Jenkins&lt;/h3&gt;
You can find our Jenkins server at &lt;a href="http://ci.theforeman.org/"&gt;ci.theforeman.org&lt;/a&gt;. In there, you will find a&amp;nbsp;set of interesting packaging jobs, specifically:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; packaging_build_foreman-proxy_matrix&lt;br /&gt;
&amp;nbsp; &amp;nbsp; packaging_build_foreman_matrix&lt;br /&gt;
&amp;nbsp; &amp;nbsp; packaging_build_foreman-proxy_individual&lt;br /&gt;
&amp;nbsp; &amp;nbsp; packaging_build_foreman_individual&lt;br /&gt;
&lt;br /&gt;
There's two types of jobs here. Let's start with the "individual" jobs. These are&amp;nbsp;what they sound like - they take a set of parameters about what package the are&amp;nbsp;building and build the required&amp;nbsp;package(s). For example, if I feed it the options&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; arch = 64bit&lt;br /&gt;
&amp;nbsp; &amp;nbsp; distro = squeeze&lt;br /&gt;
&amp;nbsp; &amp;nbsp; type = nightly&lt;br /&gt;
&lt;br /&gt;
Then it checks out the foreman-rpms repo, and changes to the appropriate directory&amp;nbsp;in the repo, according to those options. It then runs 'build.sh' found in the packaging&amp;nbsp;directory, which uses &lt;a href="http://www.netfort.gr.jp/~dancer/software/pbuilder-doc/pbuilder-doc.html" target="_blank"&gt;Pbuilder&lt;/a&gt;&amp;nbsp;to build the package for the requested settings. At the end of the job (if it built&amp;nbsp;successfully) the package is uploaded to our Debian repository at &lt;a href="http://deb.theforeman.org/"&gt;deb.theforeman.org&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The matrix jobs, as you can guess, call the individual jobs many times over - once&amp;nbsp;for all the possible combinations of the options. Thus we can have the matrix job&amp;nbsp;track the Foreman git repo, and rebuild the devel packages whenever a commit is made.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
How to get involved&lt;/h3&gt;
Now that things are more open, it's easy to get involved. Here's a workflow you could&lt;br /&gt;
use:&lt;br /&gt;
&lt;h4&gt;
1. Get a build box&lt;/h4&gt;
You don't have to go through the trouble we did of configuring pbuilder. Just build a&lt;br /&gt;
machine with the OS you'd like to run the packages on&lt;br /&gt;
&lt;h4&gt;
2. Install basic packages&lt;/h4&gt;
You'll need 'build-essential' and 'devscripts' as a minimum (well, on Squeeze&lt;br /&gt;
anyway :P)&lt;br /&gt;
&lt;h4&gt;
3. Check out the repo&lt;/h4&gt;
Fork the foreman-rpms repo and check it out to your buildbox. If you're not trying&lt;br /&gt;
to update an existing distro, copy the closest match to a new repo.&lt;br /&gt;
&lt;h4&gt;
4. Build the package&lt;/h4&gt;
You don't need to use 'build.sh' for this (that's crafted towards pbuilder and other&lt;br /&gt;
small automated task we need to do in the final packages). Just run "debuild -us -uc"&lt;br /&gt;
and see if it builds. If it doesn't either&lt;br /&gt;
&amp;nbsp; a. Install the missing build-dependencies, or&lt;br /&gt;
&amp;nbsp; b. Fix the broken packaging&lt;br /&gt;
&lt;h4&gt;
5. Test&lt;/h4&gt;
You can either test on your buildbox, or for best results, on another machine with&lt;br /&gt;
the same OS installed. Hopefully the package will install and work ;)&lt;br /&gt;
&lt;h4&gt;
6. Contribute&lt;/h4&gt;
Commit your changes to your repo and send us a pull request on foreman-rpms. We'll&lt;br /&gt;
test your changes and merge if it looks good.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Conclusion&lt;/h3&gt;
Hopefully that demystifies our package building architecure a bit. If nothing else,&lt;br /&gt;
this blog serves to remind me how we set it all up when I can't remember in six&lt;br /&gt;
months time ;)&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Epilogue&lt;/h3&gt;
If anyone is interested in replicating the whole chain, you can get our pbuilder&lt;br /&gt;
puppet configuration from our infrstructure repo at &lt;a href="http://github.com/theforeman/foreman-infra"&gt;github.com/theforeman/foreman-infra&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This repo contains the puppet code we use to build the various parts of our&lt;br /&gt;
infrastructure, including the Debian build slaves for Jenkins. The only thing you won't&lt;br /&gt;
find there is the GPG key to sign the packages, for obvious reasons ;)&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/HkX2zUEAEGc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/497357445063370416/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/11/debian-packaging-transparent-way.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/497357445063370416?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/497357445063370416?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/HkX2zUEAEGc/debian-packaging-transparent-way.html" title="Debian Packaging, the Transparent way" /><author><name>Greg Sutcliffe</name><uri>https://plus.google.com/110970604608301856139</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-85AEuXUkTDY/AAAAAAAAAAI/AAAAAAAACPk/_1Oc32NVc4w/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/11/debian-packaging-transparent-way.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcESX07fip7ImA9WhNTGUQ.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-2158819999662401007</id><published>2012-10-23T14:35:00.000+02:00</published><updated>2012-10-23T14:56:48.306+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-23T14:56:48.306+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="community" /><category scheme="http://www.blogger.com/atom/ns#" term="puppet" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Open source infrastructure for the Foreman project.</title><content type="html">&lt;h3&gt;
Overview&lt;/h3&gt;
We started working on a new project to create build and test pipelines for releasing code and running tests, and small, but dense infrastructure arose from working on that project. Instead of keeping the Puppet code locked up, we decided specifically to make it public. There are lots of benefits of doing this, but it made sense specifically for us so others can help manage the infrastructure on an unfettered basis. Lots of other benefits come with &lt;a href="http://github.com/theforeman/foreman-infra"&gt;public Puppet code&lt;/a&gt;, too, like thinking more acutely about storing private information in the repositories and reducing the ability of manual changes to cause issues in the test environment.&lt;br /&gt;
&lt;h3&gt;
The tools&lt;/h3&gt;
Jenkins lives in the center of the infrastructure and is key to the development process; ensuring our tests pass, building packages, and validating our installer. We had been using &lt;a href="http://www.travisci.org/"&gt;Travis CI&lt;/a&gt;, a great project that is changing the way open source projects test their code. There were a few issues with Travis; Foreman isn't a "standard" Rails application in that it requires some gems with native extensions that were hard to get installed on Travis. Additionally, the ability to run tests on different operating systems is key, and Travis only supports Ubuntu right now. Lastly, it's not possible to run builds without pushing to the repository, which makes testing out new configurations a burden. We wanted to be able to build more complex pipelines like building development packages after tests pass. That's certainly possible on Travis, but Jenkins provides a central place to build flexible jobs and provides facilities like build slaves, which are great for building Debian packages and RPM's and testing across different platforms and databases.&lt;br /&gt;
&lt;br /&gt;
Here's a complete rundown of the different tools we are using right now:&lt;br /&gt;
&lt;br /&gt;
- Puppet &amp;amp; the Foreman (of course)&lt;br /&gt;
- Jenkins&lt;br /&gt;
- pbuilder&lt;br /&gt;
- reprepo&lt;br /&gt;
- mock&lt;br /&gt;
- Redmine &amp;amp; friends (for theforeman.org)&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
The implementation&lt;/h3&gt;
We currently have less than a dozen machines; several builders, a few testing machines, Jenkins (only runs the interface, no builds), and a server that runs &lt;a href="http://www.theforeman.org/"&gt;the website&lt;/a&gt;. The CI infrastructure runs on a physical box with KVM &amp;amp; libvirt for virtualization, provisioned via the Foreman. Servers are grouped via the "hostgroup" feature in Foreman and given the appropriate classes via the ENC. Despite the low number of instances, being able to dynamically provision new builders in a few minutes is endlessly convenient.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
What's left?&lt;/h3&gt;
&lt;h4&gt;
Sensitive data&lt;/h4&gt;
There is still a lot of different pieces the need to be addressed as the project grows. One of them is that we don't have an easy way to store sensitive data in the public repository. One option to handle that is GPG encyrption and then storage in the public repo using some variation of &lt;a href="http://www.craigdunn.org/2011/10/secret-variables-in-puppet-with-hiera-and-gpg/"&gt;this technique&lt;/a&gt;, with Foreman as the provider of the parameters. Most of the files that need to remain private, like the private key for accessing slaves, are stored on the Jenkins master; we don't need to distribute them too widely so manual placement works for now.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Contribution&lt;/h4&gt;
It's really easy to contribute to the infrastructure codebase right now; fork the repo, make your changes, submit a pull request. What's not so easy is getting those changes out onto the puppet master - this is still a manual task that I run each time a change gets made. Ultimately the deployment to the master will probably be handled via Capistrano and Jenkins on a post-receive hook from the Github repository which will completely alleviate this problem. Using Capistrano is also great because it allows easy rollback should a deployment to the master go sideways.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
The takeaway&lt;/h3&gt;
As far as I'm concerned we're just getting started! There is a lot more work to do on both the infrastructure and automation sides. Now that most of the initial work to get the project off the ground is &amp;nbsp;complete, incremental changes will be in order to keep the dependencies of the builders up to date and ensure things running smoothly. Spending the time to think through the architecture and build a system that will work as the community around Foreman grows has absolutely been a worthwhile use of time.&lt;br /&gt;
&lt;br /&gt;
More posts to come soon about the work that the team has been doing on automated package building and repository promotion - keep an eye out!&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/9xWjD8TZzcI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/2158819999662401007/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/10/open-source-infrastructure-for-foreman.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/2158819999662401007?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/2158819999662401007?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/9xWjD8TZzcI/open-source-infrastructure-for-foreman.html" title="Open source infrastructure for the Foreman project." /><author><name>Sam Kottler</name><uri>https://plus.google.com/114136083839242601048</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-OBq2mocWtyQ/AAAAAAAAAAI/AAAAAAAAABw/pe8JoHczQek/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/10/open-source-infrastructure-for-foreman.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ABR3c7eip7ImA9WhJRFko.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-5887235979167259717</id><published>2012-07-19T09:33:00.002+03:00</published><updated>2012-07-19T09:35:56.902+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-07-19T09:35:56.902+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="redhat" /><category scheme="http://www.blogger.com/atom/ns#" term="puppet" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Foreman 1.0 Demo talk</title><content type="html">Last week I had the pleasure of presenting Foreman 1.0 at redhat offices in Brno, CZ.&lt;br /&gt;
&lt;br /&gt;
It was done during our lunch and learn sessions (people like it becuase you get free pizza or so) &amp;nbsp;which could explain a few of the interesting background noises during the talk.&lt;br /&gt;
&lt;br /&gt;
as usually, demos don't work out as planned, but I decided to leave it all, so you can enjoy for yourself.&lt;br /&gt;
&lt;br /&gt;
this by no means its a complete demo of 1.0 features, but maybe a more general overview and its features in 1.0.&lt;br /&gt;
&lt;br /&gt;
many thanks to inecas and lzap for taking care for the details and capturing the talk on video.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="270" src="http://www.youtube.com/embed/2uerwTQscdE?fs=1" width="480"&gt;&lt;/iframe&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/TiNqeFjoSJQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/5887235979167259717/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/07/foreman-10-demo-talk.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/5887235979167259717?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/5887235979167259717?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/TiNqeFjoSJQ/foreman-10-demo-talk.html" title="Foreman 1.0 Demo talk" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/2uerwTQscdE/default.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/07/foreman-10-demo-talk.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIMSXY_eip7ImA9WhVbFEs.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-7871075604990928685</id><published>2012-05-31T12:09:00.000+03:00</published><updated>2012-05-31T15:49:48.842+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-31T15:49:48.842+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="uuid" /><category scheme="http://www.blogger.com/atom/ns#" term="puppet" /><category scheme="http://www.blogger.com/atom/ns#" term="virtualizaition" /><category scheme="http://www.blogger.com/atom/ns#" term="provisioning" /><category scheme="http://www.blogger.com/atom/ns#" term="ec2" /><category scheme="http://www.blogger.com/atom/ns#" term="aws" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>EC2 provisioning using Foreman</title><content type="html">One of foreman goals, is to provide a simple and familiar process to provision systems, regardless of where they are located.&lt;br /&gt;
&lt;br /&gt;
We've now added the ability to provision systems in EC2, alongside with the existing virtualization providers such as RHEVM, libvirt, VMWare etc.&lt;br /&gt;
&lt;br /&gt;
In this blog, I'll try to describe step by step what is required in order to provision a new instance in EC2.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;






Requirements&lt;/h3&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;You should be using a recent version of foreman, either directly from &lt;a href="http://theforeman.org/projects/foreman/wiki/Installing_latest_code"&gt;git&lt;/a&gt;, or using the nightly, see  for git instruction, or use the &lt;a href="http://theforeman.org/projects/foreman/wiki/Installing_latest_code" target="_blank"&gt;debian&lt;/a&gt;,&lt;a href="http://people.redhat.com/jmontleo/foreman/" target="_blank"&gt; redhat or fedora&lt;/a&gt; nightly packages.&lt;/li&gt;
&lt;li&gt;Have a working foreman server, this should include operating system&amp;nbsp;definitions and unattended mode enabled In addition storeconfigs data must not be stored in the foreman database.&lt;/li&gt;
&lt;li&gt;Amazon valid EC2 access and secret keys.&lt;/li&gt;
&lt;li&gt;Security Group which allows foreman to SSH to the instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;





&lt;/h3&gt;
&lt;h3&gt;






Configuring AWS&lt;/h3&gt;
&lt;br /&gt;
Click on the &lt;b&gt;more&lt;/b&gt; tab, and select &lt;b&gt;Compute Resources&lt;/b&gt;.&lt;br /&gt;
&lt;b&gt;Compute Resources&lt;/b&gt;&amp;nbsp;are services that can generate a host, e.g. VMWare, libvirt, openstack etc.&lt;br /&gt;
&lt;br /&gt;
Click on&amp;nbsp;&lt;b&gt;New Compute Resource&lt;/b&gt;&amp;nbsp;and fill in the information about your new compute resource, normally the name should represent something meaningful to you, such as a combination of the ec2 region and the account used.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-bxwQuKsWoGE/T8chC1rZQkI/AAAAAAAABG0/zgCrBGb_Xks/s1600/s2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-bxwQuKsWoGE/T8chC1rZQkI/AAAAAAAABG0/zgCrBGb_Xks/s640/s2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
if everything is entered correctly, you should be able to get back a list of regions and select the region that you would like to deploy to.&lt;br /&gt;
&lt;br /&gt;
Foreman would then&amp;nbsp;automatically&amp;nbsp;create a new set of SSH keypairs, which would be used in order to configure the instance (you may remove them later on).&lt;br /&gt;
&lt;br /&gt;
Then, the next step is to define which images are allowed to use and assign them to Foreman Operation systems / architectures.&lt;br /&gt;
&lt;br /&gt;
Click on the &lt;b&gt;image &lt;/b&gt;tab and select &lt;b&gt;New Image&lt;/b&gt;.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-6_KRlE2ihJA/T8ckea2uHYI/AAAAAAAABHk/WEgvBstMRgs/s1600/s1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="428" src="http://1.bp.blogspot.com/-6_KRlE2ihJA/T8ckea2uHYI/AAAAAAAABHk/WEgvBstMRgs/s640/s1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since foreman would SSH to the instance (at least for now, we've decided using ssh first, cloud-init later), it is very important that you define the correct user, that is configured on the ami (normally the ubuntu user, or ec2-user) and of course, the ami id.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-qflj2Mcn9fY/T8cjoX0EpeI/AAAAAAAABHU/g8MW8PA-owI/s1600/s1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="432" src="http://4.bp.blogspot.com/-qflj2Mcn9fY/T8cjoX0EpeI/AAAAAAAABHU/g8MW8PA-owI/s640/s1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Foreman is now ready to create your instance, however, in order to automate fully puppet to load upon instance launch, we would need to create a little post script, this is where the provisioning templates comes into play.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;






Configuring Provisioning Templates&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Add or edit a new provisioning template, &lt;b&gt;More =&amp;gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;Provisioning Templates =&amp;gt; New&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-DncQ_Wnjn2I/T8csAiJEFBI/AAAAAAAABHw/fyQv9Z-uwZU/s1600/finish.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="http://4.bp.blogspot.com/-DncQ_Wnjn2I/T8csAiJEFBI/AAAAAAAABHw/fyQv9Z-uwZU/s640/finish.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Select Finish and paste the following content in&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2841883.js"&gt;
 
&lt;/script&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Don't forget to associate the template, (in the association tab) and set a default per OS (in the OS settings)&lt;br /&gt;
&lt;br /&gt;
and then add a the snippets too&lt;br /&gt;
&lt;h4&gt;






etc-hosts&lt;/h4&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2841937.js"&gt;
 
&lt;/script&gt;
&lt;br /&gt;
&lt;h4&gt;






puppet.conf&lt;/h4&gt;
&lt;script src="https://gist.github.com/2841950.js"&gt;
 
&lt;/script&gt;
&lt;br /&gt;
&lt;h4&gt;





&lt;span style="font-weight: normal;"&gt;An important note about&lt;/span&gt; UUID's for certnames&lt;span style="font-weight: normal;"&gt;, if you want to use this feature, please make sure that you enable&amp;nbsp;&lt;/span&gt;use_uuid_for_certificates&lt;span style="font-weight: normal;"&gt; under more =&amp;gt; settings, if not, you can simply use &amp;lt;%= @host.name %&amp;gt; for the certname.&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
additionally, it is not&amp;nbsp;compatible&amp;nbsp;with storeconfigs at this time.&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h4&gt;






master_bootstrap&lt;/h4&gt;
and if you want to provision a whole puppet master in EC2, you can use the following snippet to get it up and running
&lt;script src="https://gist.github.com/2841952.js"&gt;
 
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now if you ask your self how variables like &lt;b&gt;ntp-server&lt;/b&gt; get resolved, they are simply Foreman smart vars
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-OmFZwbYLmbI/T8cua0nKuUI/AAAAAAAABH4/MPLMi4dh5RM/s1600/smartvars-ntp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="496" src="http://3.bp.blogspot.com/-OmFZwbYLmbI/T8cua0nKuUI/AAAAAAAABH4/MPLMi4dh5RM/s640/smartvars-ntp.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;





Actual instance launch&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Goto to the &lt;b&gt;Hosts&lt;/b&gt;&amp;nbsp;tab, click on &lt;b&gt;New Host&lt;/b&gt;, among other settings, make sure you select your compute resource, &amp;nbsp;image and hardware profile&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-lQF9AuqlsVU/T8cyZ1nJmmI/AAAAAAAABIU/mHeTU83bYWE/s1600/pri-tab.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="488" src="http://3.bp.blogspot.com/-lQF9AuqlsVU/T8cyZ1nJmmI/AAAAAAAABIU/mHeTU83bYWE/s640/pri-tab.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Primary tab&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-_mEnEvRAeu8/T8cyYfQ3UnI/AAAAAAAABIE/Mc8svtQ_XLM/s1600/os-tab.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="488" src="http://2.bp.blogspot.com/-_mEnEvRAeu8/T8cyYfQ3UnI/AAAAAAAABIE/Mc8svtQ_XLM/s640/os-tab.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Operating System Tab&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-E9-xJTFHfVg/T8cyasFc2UI/AAAAAAAABIc/qxLPwsc9m6g/s1600/vm-tab.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="492" src="http://3.bp.blogspot.com/-E9-xJTFHfVg/T8cyasFc2UI/AAAAAAAABIc/qxLPwsc9m6g/s640/vm-tab.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Add caption&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-PQK3zAKUouQ/T8cyZYg0GsI/AAAAAAAABIM/xn6-0hQ2p5s/s1600/pbar.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="494" src="http://2.bp.blogspot.com/-PQK3zAKUouQ/T8cyZYg0GsI/AAAAAAAABIM/xn6-0hQ2p5s/s640/pbar.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Progress Bar&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-qvcZQWU3RH0/T8daaR1NlLI/AAAAAAAABIo/8jHvjib8n4Q/s1600/show.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="498" src="http://1.bp.blogspot.com/-qvcZQWU3RH0/T8daaR1NlLI/AAAAAAAABIo/8jHvjib8n4Q/s640/show.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-iDNUjwySPFU/T8dabqssmeI/AAAAAAAABIw/ZGZtl3sOBko/s1600/console.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="332" src="http://4.bp.blogspot.com/-iDNUjwySPFU/T8dabqssmeI/AAAAAAAABIw/ZGZtl3sOBko/s640/console.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;EC2 console&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
As always, since this is a new feature, any feedback, comments etc are welcomed!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/MJ2FvNUJ6pE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/7871075604990928685/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/05/ec2-provisioning-using-foreman.html#comment-form" title="29 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/7871075604990928685?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/7871075604990928685?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/MJ2FvNUJ6pE/ec2-provisioning-using-foreman.html" title="EC2 provisioning using Foreman" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-bxwQuKsWoGE/T8chC1rZQkI/AAAAAAAABG0/zgCrBGb_Xks/s72-c/s2.png" height="72" width="72" /><thr:total>29</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/05/ec2-provisioning-using-foreman.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEHR3Yyfip7ImA9WhVWGEU.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-433138637596669436</id><published>2012-05-01T17:12:00.000+03:00</published><updated>2012-05-01T17:30:36.896+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-01T17:30:36.896+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="puppet" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Foreman demonstration and breakdown at NYC puppet usergroup</title><content type="html">A couple of weeks ago, I had the pleasure of visiting NYC puppet user group.

Here is a video of the recorded talk, many thanks to Brian Gupta for making it all happen!

&lt;iframe width="640" height="360" src="http://www.youtube.com/embed/CqX-heDl9VM?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

slides can be found at http://www.slideshare.net/ohadlevy/foreman-presentation-at-nyc-puppet-users&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/YTJVi0KEBls" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/433138637596669436/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/05/foreman-demonstration-and-breakdown-at.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/433138637596669436?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/433138637596669436?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/YTJVi0KEBls/foreman-demonstration-and-breakdown-at.html" title="Foreman demonstration and breakdown at NYC puppet usergroup" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/CqX-heDl9VM/default.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/05/foreman-demonstration-and-breakdown-at.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkADQn07fCp7ImA9WhVRE04.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-8565444256951587230</id><published>2012-03-21T16:00:00.003+02:00</published><updated>2012-03-21T16:06:13.304+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-21T16:06:13.304+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VNC" /><category scheme="http://www.blogger.com/atom/ns#" term="oVirt" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>VNC support built in foreman</title><content type="html">Now that oVirt&amp;nbsp;integration&amp;nbsp;is done, it was important to have a way to see the host display:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-T6LdKTNkjQg/T2ne7sSP2VI/AAAAAAAABBY/nICRIIrTZT8/s1600/s1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="96" src="http://3.bp.blogspot.com/-T6LdKTNkjQg/T2ne7sSP2VI/AAAAAAAABBY/nICRIIrTZT8/s320/s1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-7HlTa--9qbY/T2ne8F0IjuI/AAAAAAAABBc/hnDibFo-cDI/s1600/s2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="175" src="http://2.bp.blogspot.com/-7HlTa--9qbY/T2ne8F0IjuI/AAAAAAAABBc/hnDibFo-cDI/s320/s2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-KfZxFb4AR1E/T2ne8jnWpnI/AAAAAAAABBo/35qu4zjqLCA/s1600/s3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="251" src="http://1.bp.blogspot.com/-KfZxFb4AR1E/T2ne8jnWpnI/AAAAAAAABBo/35qu4zjqLCA/s320/s3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/_quQjdET_cw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/8565444256951587230/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/03/vnc-support-built-in-foreman.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/8565444256951587230?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/8565444256951587230?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/_quQjdET_cw/vnc-support-built-in-foreman.html" title="VNC support built in foreman" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-T6LdKTNkjQg/T2ne7sSP2VI/AAAAAAAABBY/nICRIIrTZT8/s72-c/s1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/03/vnc-support-built-in-foreman.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIHQn0yfSp7ImA9WhRUGUg.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-7489330083065027477</id><published>2012-01-30T22:51:00.001+02:00</published><updated>2012-01-30T23:05:33.395+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T23:05:33.395+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="virtualizaition" /><category scheme="http://www.blogger.com/atom/ns#" term="oVirt" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>oVirt Installation - part 1</title><content type="html">In this post, we'll see how to install &lt;a href="http://ovirt.org/"&gt;oVirt&lt;/a&gt;.

for those of you who ask oVirt?! well, taken from its website:

&lt;br /&gt;
&lt;blockquote&gt;
THE VIRTUAL DATACENTER MANAGEMENT PLATFORM
Provision, manage, and monitor hosts, hypervisors, virtual machines, storage, and network&lt;/blockquote&gt;
So really, oVirt is a management eco system for virtual machines, fairly similar to v-sphere, but open source and runs on the very popular KVM hypervisor, oVirt is the open source version, of the redhat's&amp;nbsp;&lt;a href="http://www.redhat.com/products/virtualization/" target="_blank"&gt;RHEV-M&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
My motivation for this series of posts, beside promoting alternative and cool open source software is the&amp;nbsp;integration&amp;nbsp;between oVirt and Foreman, so provisioning of vm's would get a whole new meaning when you have a virtual data center managed by oVirt where you could plug in puppet into the loop.&lt;br /&gt;
&lt;br /&gt;
I've tested the oVirt management (oVirts core/backend) on Fedora 16, mostly because RPM's for RHEL clones has not made by the community just yet :)&lt;br /&gt;
&lt;br /&gt;
It is&amp;nbsp;recommended&amp;nbsp;to use something with a minimum of 2GB of RAM, 4GB better, as oVirt runs under jboss, however, it is not a problem to run oVirt on a virtual machine.&lt;br /&gt;
&lt;br /&gt;
So enough about that, its awesome and open source, how do I install it? :)&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1706509.js"&gt;
 
&lt;/script&gt;

You should know be able to access the UI via http://&amp;lt;your host&amp;gt;:8080 and login using the credentials above.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.linux-kvm.com/sites/default/files/ovirt-firstrelease.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="233" src="http://www.linux-kvm.com/sites/default/files/ovirt-firstrelease.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In a follow up post I'll describe how to configure oVirt, and how to starts creates new VM's.&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/8mOVQB1bFUQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/7489330083065027477/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/01/ovirt-installation-part-1.html#comment-form" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/7489330083065027477?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/7489330083065027477?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/8mOVQB1bFUQ/ovirt-installation-part-1.html" title="oVirt Installation - part 1" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><thr:total>7</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/01/ovirt-installation-part-1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8MRn05fyp7ImA9WhRUGEo.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-4976536779190314981</id><published>2012-01-29T20:58:00.000+02:00</published><updated>2012-01-29T23:01:27.327+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-29T23:01:27.327+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Re-provision a host without PXEboot</title><content type="html">&lt;div&gt;So, yet another feature not many people know about Foreman.&lt;br /&gt;
&lt;br /&gt;
it is really easy to reprovision (reinstall, or even to a whole new os) an existing system without PXE.&lt;br /&gt;
&lt;br /&gt;
Foreman supports the following provisioning templates:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;provision - kickstart, preseed, jumpstart, yast..&lt;/li&gt;
&lt;li&gt;PXELinux - templates for syslinux / pxelinux&lt;/li&gt;
&lt;li&gt;gPXE - templates for {g,i}PXE&lt;/li&gt;
&lt;li&gt;finish - for OS's that requies a second stage script (debian, solaris)&lt;/li&gt;
&lt;li&gt;PXEGrub - templates for GRUB PXE&lt;/li&gt;
&lt;li&gt;script - custom entry for what ever you might want to do with foreman templates&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
All of these templates are available  usually at: foreman/unattended/&amp;lt;name&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
the default script template that comes with foreman does the following :&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
gets the kernel/initrd and reconfigure grub, so upon next reboot, you can provision your host.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
for example, put your host in build mode, and on your host simply execute&lt;/div&gt;
&lt;div&gt;
&lt;script src="https://gist.github.com/1700094.js"&gt;
once ready simply:&lt;br /&gt;
&lt;br /&gt;
curl http://foreman/unattended/script | sh&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;

 
&lt;/script&gt;
&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/bWjNnOUIKkI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/4976536779190314981/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/01/re-provision-host-without-pxeboot.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/4976536779190314981?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/4976536779190314981?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/bWjNnOUIKkI/re-provision-host-without-pxeboot.html" title="Re-provision a host without PXEboot" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/01/re-provision-host-without-pxeboot.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEANQ3Y_eyp7ImA9WhRVF08.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-8262621859582876813</id><published>2012-01-16T16:06:00.001+02:00</published><updated>2012-01-16T16:06:32.843+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-16T16:06:32.843+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="cli" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Recovering Lost DHCP reservations</title><content type="html">&lt;br /&gt;
Someone asked me today on IRC how to recover his dhcp reservations, as he was using foreman to create those, and his dhcp server died.&lt;br /&gt;
&lt;br /&gt;
Since we are slow on delivering &lt;a href="http://theforeman.org/issues/944" target="_blank"&gt;&amp;nbsp;#944&lt;/a&gt;, here is a short snippet that would get the job done.&lt;br /&gt;
This script validates all DHCP records, if one is missing, it would recreate it.&lt;br /&gt;
&lt;script src="https://gist.github.com/1620981.js"&gt;
 
&lt;/script&gt;
&lt;br /&gt;
if you are using 0.5 or newer, simply change the shebang line to be something like:&lt;br /&gt;
&amp;nbsp;#!/usr/bin/env /usr/share/foreman/script/rails runner -e production&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What about conflicting records?&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In the case of a conflict, its possible to do remove the conflicting reservations and simply recreate the correct one.. however, you should be sure you can remove the old ones before..&lt;br /&gt;
&lt;br /&gt;
dhcp_record.conflicts(&amp;amp;:destroy)&lt;br /&gt;
dhcp_record.create&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/6ONhcuJg6Co" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/8262621859582876813/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/01/recovering-lost-dhcp-reservations.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/8262621859582876813?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/8262621859582876813?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/6ONhcuJg6Co/recovering-lost-dhcp-reservations.html" title="Recovering Lost DHCP reservations" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/01/recovering-lost-dhcp-reservations.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAMRno8eSp7ImA9WhRVEks.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-4262998233202487687</id><published>2012-01-11T09:23:00.000+02:00</published><updated>2012-01-11T09:26:27.471+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-11T09:26:27.471+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="cli" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Foreman CLI is now a gem</title><content type="html">&lt;div dir="rtl" style="text-align: right;" trbidi="on"&gt;
&lt;div" style="text-align: right;" trbidi="on"&gt;
&lt;/div"&gt;&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;a href="mailto:brian.gupta@brandorr.com" target="_blank"&gt;Brian Gupta&lt;/a&gt;&amp;nbsp;did a great job with coming up with &amp;nbsp;a CLI for foreman, and just released it as a gem.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
To install, simply run:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="text-align: -webkit-auto; white-space: pre-wrap;"&gt;gem install foremancli&lt;/span&gt;&lt;br /&gt;
&lt;span style="text-align: -webkit-auto; white-space: pre-wrap;"&gt;foremancli -h&lt;/span&gt;&lt;br /&gt;
&lt;pre style="text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;"&gt;Usage: foremancli [options] ...
    -d, --debug                      Output more information
    -u, --user USER                  Foreman user
    -p, --pass PASSWORD              Foreman password
    -s, --server URL                 Foreman Server URL
        --json                       JSON output
        --yaml                       YAML output
        --status                     Foreman status
        --custom COLLECTION          Custom COLLECTION string, see: http://theforeman.org/projects/foreman/wiki/API
        --architectures [filter]     Retreive a list of architectures
        --common_parameters [filter] Retreive a list of common_parameters
        --config_templates [filter]  Retreive a list of config_templates
        --domains [filter]           Retreive a list of domains
        --environments [filter]      Retreive a list of environments
        --fact_values [filter]       Retreive a list of fact_values
        --hosts [filter]             Retreive a list of hosts
        --hostgroups [filter]        Retreive a list of hostgroups
        --media [filter]             Retreive a list of media
        --puppetclasses [filter]     Retreive a list of puppetclasses
        --reports [filter]           Retreive a list of reports
        --roles [filter]             Retreive a list of roles
        --settings [filter]          Retreive a list of settings
        --lookup_keys [filter]       Retreive a list of lookup_keys
        --dashboard [filter]         Retreive a list of dashboard
        --operatingsystems [filter]  Retreive a list of operatingsystems
        --subnets [filter]           Retreive a list of subnets
        --ptables [filter]           Retreive a list of ptables
        --users [filter]             Retreive a list of users
        --auth_source_ldaps          Retreive a list of auth_source_ldaps
        --hypervisors                Retreive a list of hypervisors
        --lookup_values              Retreive a list of lookup_values
        --smart_proxies              Retreive a list of smart_proxies
        --statistics                 Retreive a list of statistics
        --usergroups                 Retreive a list of usergroups
        --audits                     Not implemented
        --bookmarks                  Not implemented
    -h, --help                       Show this message

     ENVIRONMENT VARIABLES:

     FOREMAN_SERVER                  Foreman Server URL
     FOREMAN_USER                    Foreman user
     FOREMAN_PASSWORD                Foreman password

     CLI options take precendence over ENVIRONMENT VARIABLES

     FILTERS:

     Please see:
     http://theforeman.org/projects/foreman/wiki/Search_API

     Examples:
     --hosts "domain = domain.com AND class = squid"
     --hosts "domain = domain.com AND facts.architecture = x86_64 AND \
       class = module::class
     --classes "name = squid"
     --domains "name = domain.com"&lt;/pre&gt;
&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;
happy hacking&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/3y4FTl1wvFE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/4262998233202487687/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/01/foreman-cli-is-now-gem.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/4262998233202487687?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/4262998233202487687?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/3y4FTl1wvFE/foreman-cli-is-now-gem.html" title="Foreman CLI is now a gem" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/01/foreman-cli-is-now-gem.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcHSXk5eip7ImA9WhRVEE4.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-531157952023362152</id><published>2012-01-08T16:30:00.001+02:00</published><updated>2012-01-08T16:30:38.722+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-08T16:30:38.722+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="monitoringsucks" /><category scheme="http://www.blogger.com/atom/ns#" term="fosdem" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>fosdem 2012</title><content type="html">&lt;div dir="rtl" style="text-align: right;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.fosdem.org/2012/promo/going-to" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="189" src="http://www.fosdem.org/2012/promo/going-to" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
I've finally wrapped up all my bookings, and I'll be attending both fosdem days and the following the #&lt;a href="http://www.krisbuytaert.be/blog/monitoringsucks-and-well-fix-it" target="_blank"&gt;monitoringsucks&lt;/a&gt;&amp;nbsp;hackfest.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
It looks like we have a bunch of Foreman users there as well, so I hope we could get&amp;nbsp;together, either during&amp;nbsp;Friday(unless there is a devops dinner)&amp;nbsp;or the following days (I'll get to&amp;nbsp;Brussels&amp;nbsp;during&amp;nbsp;Friday&amp;nbsp;morning).&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Anyone has a&amp;nbsp;recommendation&amp;nbsp;of for where/when we can meet?&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Hope to see you guys there!&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/UQHsb9F1QaM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/531157952023362152/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/01/fosdem-2012.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/531157952023362152?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/531157952023362152?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/UQHsb9F1QaM/fosdem-2012.html" title="fosdem 2012" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/01/fosdem-2012.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YDSHkycSp7ImA9WhRWFEk.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-6387106321044045589</id><published>2012-01-01T11:00:00.001+02:00</published><updated>2012-01-01T20:06:19.799+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-01T20:06:19.799+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="puppet" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Creating a new host using foreman API</title><content type="html">Using &lt;a href="http://theforeman.org/projects/foreman/wiki/API" target="_blank"&gt;foreman API&lt;/a&gt; is fairly simple, in here I'll show an example using curl.&lt;br /&gt;
&lt;br /&gt;
Using this simple script, you could automate your VM/Bare metal provision process + Puppet configuration in one simple step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Create a new Host&lt;/b&gt;&lt;br /&gt;
&lt;script src="https://gist.github.com/1546769.js"&gt;
&lt;/script&gt;&lt;br /&gt;
In this example, I've hidden most of the logic in the host group attribute in foreman.&lt;br /&gt;
meaning that it already knows the Provisioning and Puppet attributes, but its not a problem to define extend the script not to relay on a given hostgroup, or simply override&amp;nbsp;certain&amp;nbsp;default attributes ( such as memory size, or host operation system etc).&lt;br /&gt;
&lt;br /&gt;
Best way to figure out the additional attributes (besides &lt;a href="http://theforeman.org/projects/foreman/wiki/API"&gt;RTFM&lt;/a&gt;) is simply to look at foreman log during the creation POST command.&lt;br /&gt;
&lt;br /&gt;
a typical response from foreman, would include the ipaddress (that was&amp;nbsp;automatically&amp;nbsp;assigned), mac address (that was auto generated if its a vm), etc etc.&lt;br /&gt;
&lt;br /&gt;
Note that in order to use the hostgroup, you would need to know its ID,&amp;nbsp;that's&amp;nbsp;easily done if you simply look at the URL while you edit an existing hostgroup, for example, if your&amp;nbsp;URL&amp;nbsp;is&lt;i&gt;&amp;nbsp;https://foreman/hostgroups/1-base/edit&lt;/i&gt;, then the ID is 1.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Delete a Host&lt;br /&gt;
&lt;/b&gt;&lt;script src="https://gist.github.com/1546777.js"&gt;
 
&lt;/script&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/JcLUEG88VEM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/6387106321044045589/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/01/creating-new-host-using-foreman-api.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/6387106321044045589?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/6387106321044045589?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/JcLUEG88VEM/creating-new-host-using-foreman-api.html" title="Creating a new host using foreman API" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/01/creating-new-host-using-foreman-api.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQMQ3s_eip7ImA9WhVVFkU.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-8664636421397627110</id><published>2012-01-01T10:42:00.000+02:00</published><updated>2012-05-10T23:06:22.542+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-10T23:06:22.542+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="puppet" /><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Getting foreman search results into your Puppet manifest</title><content type="html">Lets say you want to know all of the hosts your monitoring host need to monitor, or maybe, the hosts to which your database needs to allow access to, traditionally, the solution to this problem was using Puppet storeconfigs.&lt;br /&gt;
&lt;br /&gt;
In this &lt;a href="http://blog.theforeman.org/2012/01/advance-search-tips-in-foreman.html" target="_blank"&gt;blog post&lt;/a&gt;, I mentioned how you could utilize foreman search&amp;nbsp;language&amp;nbsp;to get customized results.&lt;br /&gt;
&lt;br /&gt;
While storeconfigs is a great solution, and if it works for you, by all means, please do keep using it, but in this post I would like to show you how to use Foreman to query for similar data + foreman data as well.&lt;br /&gt;
&lt;br /&gt;
Lets say, we want to allow VPN access only to client hosts which ran puppet in the last week.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1546708.js"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
You could easily change the search conditions, for example, to get a list of hosts without any puppet failures, simply change the query to  &lt;span style="background-color: yellow;"&gt;status.failed = 0.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
we could easily search for conditions based on facts, puppet classes, owner, reports and combination of them.&lt;br /&gt;
&lt;br /&gt;
the output from the puppet function, may include complex data, such as Arrays and Hashes as well, and it depends on the query object used, for example, host lists would mostly be an Array, however, host facts would be a hash, for example:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1546750.js"&gt;
 
&lt;/script&gt;&lt;br /&gt;
which you could utilize either in templates or versions of puppet that supports hashes.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Quick start&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Install and setup foreman (&lt;a href="https://github.com/theforeman/foreman-installer" target="_blank"&gt;Foreman puppet modules&lt;/a&gt;&amp;nbsp;might be a quick starting point).&lt;/li&gt;
&lt;li&gt;If you are not using the official foreman installer, download and put the following &lt;a href="https://github.com/ohadlevy/puppet-foreman/blob/master/foreman/lib/puppet/parser/functions/foreman.rb" target="_blank"&gt;file&lt;/a&gt;&amp;nbsp;in your modules lib directory, and ensure you are using pluginsync.&lt;/li&gt;
&lt;li&gt;adjust the file to point to your foreman server.&lt;/li&gt;
&lt;li&gt;use it in your manifest.&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/qhHdS_a87rA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/8664636421397627110/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/01/getting-foreman-search-results-into.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/8664636421397627110?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/8664636421397627110?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/qhHdS_a87rA/getting-foreman-search-results-into.html" title="Getting foreman search results into your Puppet manifest" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/01/getting-foreman-search-results-into.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMFQX46fSp7ImA9WhRbEU0.&quot;"><id>tag:blogger.com,1999:blog-6789674575954398874.post-4847405917653550482</id><published>2012-01-01T10:04:00.000+02:00</published><updated>2012-02-01T15:53:30.015+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-01T15:53:30.015+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="foreman" /><title>Advance Search tips in Foreman</title><content type="html">&lt;div dir="rtl" style="text-align: right;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Foreman uses the wonderful &lt;a href="http://scopedsearch.wordpress.com/" target="_blank"&gt;scoped_search gem written by Willem van Bergen and Amos Benari&lt;/a&gt;, and while the search auto completer is pretty good, there are cases where it's worth knowing about some of the extra features.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Foreman Search&amp;nbsp;functionality&amp;nbsp;can be used both in the web interface, and via the API, in a follow up blog I'll describe how to use the API and search via puppet directly as an alternative to storeconfigs - UPDATED:&amp;nbsp;&lt;a href="http://blog.theforeman.org/2012/01/getting-foreman-search-results-into.html" target="_blank"&gt;here&lt;/a&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;b&gt;Search Per Page&lt;/b&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
First of all, each page gets its own search field, looking at page in the host tab is not the same as in the reports tab, make sure you look at the options the auto completer suggest.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;b&gt;Bookmarks&lt;/b&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Foreman supports the ability to make search bookmarks, allows users to quickly jump to&amp;nbsp;predefined&amp;nbsp;search&amp;nbsp;conditions.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Once a bookmark is saved (make sure you save it via the bookmark icon next to the search bar), it would appear as a drop down under the main tab.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
We provide a few bookmarks by default, you can try using them already by clicking on the dropdowns in the main tabs, for example under hosts or reports.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Bookmarks can be label as public, this would mean other users would see them as well.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;b&gt;Free text&lt;/b&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
If you ignore the auto completer, and just type stuff, Foreman would try searching for that attribute as free text across multiple fields.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
for example, if you just typed &lt;span style="background-color: yellow;"&gt;12&lt;/span&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;in the hosts page, that would search for all hosts with 12 in their ip address, mac address or maybe name, in general we try to keep the fields we search for to a sane list for performance reasons, if you know you are searching for an ip address, you probably want to type&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: yellow;"&gt;ip ~ 12&lt;/span&gt;&lt;span style="background-color: white;"&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;b&gt;Case sensitivity&lt;/b&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
When querying using &lt;span style="background-color: yellow;"&gt;=&lt;/span&gt; and &lt;span style="background-color: yellow;"&gt;!=&lt;/span&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;&lt;/span&gt;the we are looking for an exact match, the match is case sensitive. When running &lt;span style="background-color: yellow;"&gt;~&lt;/span&gt; (like) and &lt;span style="background-color: yellow;"&gt;!~&lt;/span&gt;&amp;nbsp;(unlike) the match is case insensitive.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;b&gt;Using quotes&lt;/b&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
In the search syntax white spaces are used as a delimiter. Here are some examples of the way a query will be interpreted:&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: center;"&gt;
&lt;/div&gt;
&lt;ul dir="ltr" style="text-align: left;"&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="background-color: yellow;"&gt;description ~ “created successfully”&lt;/span&gt; =&amp;gt; list all notifications that contains “created successfully”&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="background-color: yellow;"&gt;description ~ created successfully&lt;/span&gt; =&amp;gt; list all notifications that contains “created” and at least one of it’s text fields contains “successfully”&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="background-color: yellow;"&gt;description !~ created successfully&lt;/span&gt; =&amp;gt; list all notifications that&amp;nbsp;doesn't&amp;nbsp;contains “created” and at least one of it’s text fields contains “successfully”&lt;/li&gt;
&lt;/ul&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
In the second and third example &lt;span style="background-color: yellow;"&gt;successfully&lt;/span&gt;&amp;nbsp;is an additional term that is interpreted as a free text search&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;b&gt;Wildcard ‘&lt;span style="background-color: yellow;"&gt;_&lt;/span&gt;’, ‘&lt;span style="background-color: yellow;"&gt;%&lt;/span&gt;’ and ‘&lt;span style="background-color: yellow;"&gt;*&lt;/span&gt;’&lt;/b&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
The search terms are translated to SQL queries. ~’ -&amp;gt; LIKE ‘!~’ -&amp;gt; NOT LIKE&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
LIKE statement supports two wildcards ‘_’ and ‘%’.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&amp;nbsp;’_’ is a wildcard for a single character replacement. For example the search &lt;span style="background-color: yellow;"&gt;name ~ fo_&lt;/span&gt;&amp;nbsp;will match both ‘foo’ and ‘for’.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
The ‘%’ and ‘*’ wildcard will replace any number of characters including 0. For example the search &lt;span style="background-color: yellow;"&gt;name ~ corp%&lt;/span&gt;&amp;nbsp;will match both ‘corp’ and ‘corporation’. The more common ‘*’ wildcard is not an SQL wildcard but can be used in the search.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
When the ‘like’ or ‘unlike’ search is processed, a ‘%’ wildcard is added at the beginning and the end of a value if it isn’t there in the first place.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
For example: The search &lt;span style="background-color: yellow;"&gt;name ~ foo&lt;/span&gt;&amp;nbsp;will become “name LIKE ‘%foo%’” The search &lt;span style="background-color: yellow;"&gt;name ~ foo%&lt;/span&gt;&amp;nbsp;will become “name LIKE ‘foo%’”&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;b&gt;Date-time search query syntax&lt;/b&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
We can handle many time and date formats, here are some examples of the date  and time formats that scoped_search accepts:&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: center;"&gt;
“30 minutes ago” ,  ”1 hour ago” , ”2 hours ago”,  Today,  Yesterday&lt;/div&gt;
&lt;div dir="ltr" style="text-align: center;"&gt;
“3 weeks ago” ,  ”1 month ago” ,  ”6 days ago” , ”July 10,2011″&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
The date can have different separators, “10-July-2011″ is going to read the same as “10/July/2010″  or “10 July 2011″&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Month name could be the full name or a three letter abbreviation, Jan will read the same as January.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Many other formats are also acceptable, however it is not recommended to use ambiguous formats such as “3/4/2011″&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
The date time operators are ‘=’, ‘&amp;lt;’ and ‘&amp;gt;’ the operators should be read as ‘at’, ‘before’ and ‘after’.  This is how the search term interpeted:&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
The right hand part of a date-time condition is parsed and translated into a specific date-time, “&lt;span style="background-color: yellow;"&gt;30 minutes ago&lt;/span&gt;” is translated to “now – 30 minutes”.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;span style="background-color: yellow;"&gt;last_report&amp;nbsp;&amp;gt; "2011-07-01 12:57:18 EDT&lt;/span&gt;” should be read as created after this time.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
Note that in the same way: &lt;span style="background-color: yellow;"&gt;last_report &amp;gt; “30 minutes ago&lt;/span&gt;”, should read “created after 30 minutes ago” not “created more then 30 minutes ago”.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left;"&gt;
A search query like &lt;span style="background-color: yellow;"&gt;installed_at = Yesterday&lt;/span&gt;&amp;nbsp;is translated into a period query, it will be translated in run time to the respective dates. For example, if running on Jan 1, it could be translated into “(installed_at &amp;gt;= Jan 1,2012 00:00) and (installed_at &amp;lt; Dec 31,2011 00:00)”.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Searching for NULL values&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
if you are searching for hosts without hostgroups, you could try:&lt;br /&gt;
&lt;span style="background-color: yellow;"&gt;not has hostgroup&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/theforeman/MaSy/~4/XYLco7D9Lcg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.theforeman.org/feeds/4847405917653550482/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.theforeman.org/2012/01/advance-search-tips-in-foreman.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/4847405917653550482?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6789674575954398874/posts/default/4847405917653550482?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/theforeman/MaSy/~3/XYLco7D9Lcg/advance-search-tips-in-foreman.html" title="Advance Search tips in Foreman" /><author><name>Ohad Levy</name><uri>https://plus.google.com/101816763711061284636</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-u6KbkURGDac/AAAAAAAAAAI/AAAAAAAABOs/vPzqaocvahY/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://blog.theforeman.org/2012/01/advance-search-tips-in-foreman.html</feedburner:origLink></entry></feed>
