lib/poolparty/provision/boot_strapper.rb
# The commands to setup a PoolParty enviornment
The commands to setup a PoolParty enviornment
The commands to setup a PoolParty enviornment
def default_commands
        pack_the_dependencies
        ::FileUtils.rm_rf "#{Default.tmp_path}/dependencies/gems/cache"
        rsync "#{Default.tmp_path}/dependencies", '/var/poolparty'
        commands << [
          "mkdir -p /etc/poolparty",
          "mkdir -p /var/log/poolparty",
          "groupadd -f poolparty",
          'cd /var/poolparty/dependencies',
          "cp /var/poolparty/dependencies/etc/poolparty/gemrc_template /etc/poolparty",          
          "#{installer} update",
          "#{installer} install -y ruby ruby1.8-dev libopenssl-ruby1.8 build-essential wget",  
          "tar -zxvf packages/rubygems-1.3.1.tgz",
          "cd rubygems-1.3.1",
          "ruby setup.rb --no-ri --no-rdoc",
          "ln -sfv /usr/bin/gem1.8 /usr/bin/gem", 
          "cd ../ && rm -rf rubygems-1.3.1*",
          "gem source --add http://gems.github.com",
          "cd /var/poolparty/dependencies/gems/",
          "gem install --no-rdoc --no-ri -y *.gem",
          "cd /var/poolparty/dependencies",
          "cp /var/poolparty/dependencies/etc/poolparty/* /etc/poolparty/",
          'touch /var/poolparty/POOLPARTY.PROGRESS',
          "mkdir -p /root/.ssh",
          "cp /var/poolparty/dependencies/keys/* /root/.ssh/",
          "chmod 600 /root/.ssh/#{::File.basename(@cloud.keypair.full_filepath)}",
          "mkdir -p /var/log/poolparty/",
          "thin -R /etc/poolparty/monitor.ru -p 8642 --pid /var/run/stats_monitor.pid --daemon -l /var/log/poolparty/monitor.log start 2>/dev/null",
          'echo "bootstrap" >> /var/poolparty/POOLPARTY.PROGRESS']
        commands << self.class.class_commands unless self.class.class_commands.empty?
      end
def default_commands pack_the_dependencies :: FileUtils . rm_rf "#{Default.tmp_path}/dependencies/gems/cache" rsync "#{Default.tmp_path}/dependencies" , '/var/poolparty' commands << [ "mkdir -p /etc/poolparty" , "mkdir -p /var/log/poolparty" , "groupadd -f poolparty" , 'cd /var/poolparty/dependencies' , "cp /var/poolparty/dependencies/etc/poolparty/gemrc_template /etc/poolparty" , "#{installer} update" , "#{installer} install -y ruby ruby1.8-dev libopenssl-ruby1.8 build-essential wget" , "tar -zxvf packages/rubygems-1.3.1.tgz" , "cd rubygems-1.3.1" , "ruby setup.rb --no-ri --no-rdoc" , "ln -sfv /usr/bin/gem1.8 /usr/bin/gem" , "cd ../ && rm -rf rubygems-1.3.1*" , "gem source --add http://gems.github.com" , "cd /var/poolparty/dependencies/gems/" , "gem install --no-rdoc --no-ri -y *.gem" , "cd /var/poolparty/dependencies" , "cp /var/poolparty/dependencies/etc/poolparty/* /etc/poolparty/" , 'touch /var/poolparty/POOLPARTY.PROGRESS' , "mkdir -p /root/.ssh" , "cp /var/poolparty/dependencies/keys/* /root/.ssh/" , "chmod 600 /root/.ssh/#{::File.basename(@cloud.keypair.full_filepath)}" , "mkdir -p /var/log/poolparty/" , "thin -R /etc/poolparty/monitor.ru -p 8642 --pid /var/run/stats_monitor.pid --daemon -l /var/log/poolparty/monitor.log start 2>/dev/null" , 'echo "bootstrap" >> /var/poolparty/POOLPARTY.PROGRESS' ] commands << self . class . class_commands unless self . class . class_commands . empty? end
The commands to setup a PoolParty enviornment
The commands to setup a PoolParty enviornment
# "useradd poolparty  --home-dir /var/poolparty  --groups poolparty  --create-home", #optional, but nice to have #TODO: check if this is really needed # "god -c /etc/poolparty/monitor.god",