<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Mandeep</title>
 <link href="http://mandeepbal.github.io/atom.xml" rel="self"/>
 <link href="http://mandeepbal.github.io/"/>
 <updated>2015-06-13T04:17:20+00:00</updated>
 <id>http://mandeepbal.github.io</id>
 <author>
   <name>Mandeep Bal</name>
   <email></email>
 </author>

 
 <entry>
   <title>Testing code</title>
   <link href="http://mandeepbal.github.io/2015/05/08/test-code/"/>
   <updated>2015-05-08T00:00:00+00:00</updated>
   <id>http://mandeepbal.github.io/2015/05/08/test-code</id>
   <content type="html">
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;show&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@widget&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;respond_to&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# show.html.erb&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;json&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@widget&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

</content>
 </entry>
 
 <entry>
   <title>Deploying ManageIQ (Anand Release)</title>
   <link href="http://mandeepbal.github.io/2015/01/20/deploy-miq-anand/"/>
   <updated>2015-01-20T00:00:00+00:00</updated>
   <id>http://mandeepbal.github.io/2015/01/20/deploy-miq-anand</id>
   <content type="html">
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;chmod &lt;span class=&quot;m&quot;&gt;777&lt;/span&gt; /opt
useradd miqbuilder
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; &amp;gt;&amp;gt; /etc/sudoers
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; &amp;gt;&amp;gt; /etc/sudoers
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;miqbuilder ALL=(ALL) NOPASSWD: ALL&amp;quot;&lt;/span&gt; &amp;gt;&amp;gt; /etc/sudoers
yum -y install http://dl.fedoraproject.org/pub/epel/6Server/x86_64/epel-release-6-8.noarch.rpm
iptables -I INPUT -p tcp --dport &lt;span class=&quot;m&quot;&gt;3000&lt;/span&gt; -j ACCEPT
service iptables save
service iptables restart
yum -y install git libxml2-devel libxslt libxslt-devel sudo
yum -y install postgresql-server postgresql-devel memcached ruby-devel
service memcached start
chkconfig memcached on
chkconfig postgresql on
service postgresql initdb
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;local all all trust&amp;quot;&lt;/span&gt; &amp;gt; /var/lib/pgsql/data/pg_hba.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; &amp;gt;&amp;gt; /var/lib/pgsql/data/postgresql.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;listen_addresses = &amp;#39;*&amp;#39;&amp;quot;&lt;/span&gt; &amp;gt;&amp;gt; /var/lib/pgsql/data/postgresql.conf
service postgresql start

&lt;span class=&quot;c&quot;&gt;##Run as Postgres user&lt;/span&gt;
su - postgres
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; i in &lt;span class=&quot;nb&quot;&gt;test &lt;/span&gt;production development&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; createdb vmdb_&lt;span class=&quot;nv&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;
psql -c &lt;span class=&quot;s2&quot;&gt;&amp;quot;create role root login password &amp;#39;smartvm&amp;#39;&amp;quot;&lt;/span&gt;
psql -c &lt;span class=&quot;s2&quot;&gt;&amp;quot;alter database vmdb_development owner to root&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;exit&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;##Run as MIQ user&lt;/span&gt;
su - miqbuilder
&lt;span class=&quot;se&quot;&gt;\c&lt;/span&gt;url -sSL https://get.rvm.io &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; bash
. ~/.bash_profile
rvm install 1.9.3
gem uninstall bundler
gem uninstall -i /home/miqbuilder/.rvm/gems/ruby-1.9.3-p551@global bundler

&lt;span class=&quot;c&quot;&gt;##Bundler should be uninstalled&lt;/span&gt;
gem install bundler -v &lt;span class=&quot;s1&quot;&gt;&amp;#39;1.3.5&amp;#39;&lt;/span&gt;
gem install ruby-graphviz
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; /opt
git clone https://github.com/manageiq/manageiq.git
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;manageiq
git checkout anand-1
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;vmdb
bundle install --without qpid
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
vmdb/bin/rake build:shared_objects
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;vmdb
bundle install --without qpid
cp config/database.pg.yml config/database.yml
bin/rake db:migrate
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; /opt/manageiq/vmdb/
bin/rake evm:start&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

</content>
 </entry>
 
 <entry>
   <title>File Permissions</title>
   <link href="http://mandeepbal.github.io/2015/01/01/file-permissions/"/>
   <updated>2015-01-01T00:00:00+00:00</updated>
   <id>http://mandeepbal.github.io/2015/01/01/file-permissions</id>
   <content type="html">
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;---------------------------------------------------------------------------
&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;         owner          &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;        group           &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;    everyone             &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;
---------------------------------------------------------------------------
&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; write &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; execute &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; write &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; execute &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; write  &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; execute &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;
---------------------------------------------------------------------------
&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;400&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;m&quot;&gt;200&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;m&quot;&gt;100&lt;/span&gt;    &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;m&quot;&gt;40&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;m&quot;&gt;20&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;m&quot;&gt;10&lt;/span&gt;    &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;m&quot;&gt;4&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;    &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;     &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;
----------------------------------------------------------------------------&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

</content>
 </entry>
 

</feed>
