auser-poolparty 0.2.76 → 0.2.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +3 -0
- data/Manifest.txt +3 -0
- data/PostInstall.txt +1 -1
- data/bin/server-clean-cert-for +15 -0
- data/lib/erlang/messenger/src/pm_master.erl +5 -0
- data/lib/poolparty/base_packages/heartbeat.rb +57 -43
- data/lib/poolparty/base_packages/poolparty.rb +9 -9
- data/lib/poolparty/helpers/binary.rb +1 -0
- data/lib/poolparty/helpers/provisioner_base.rb +7 -0
- data/lib/poolparty/helpers/provisioners/master.rb +2 -2
- data/lib/poolparty/helpers/provisioners/slave.rb +2 -1
- data/lib/poolparty/helpers/ruberl.rb +33 -0
- data/lib/poolparty/net/remote_bases/ec2.rb +0 -3
- data/lib/poolparty/poolparty/cloud.rb +4 -2
- data/lib/poolparty/poolparty/resource.rb +1 -1
- data/lib/poolparty/templates/authkeys +1 -1
- data/lib/poolparty/templates/ha.cf +9 -11
- data/lib/poolparty/templates/haresources +1 -1
- data/lib/poolparty/templates/logd.cf +42 -0
- data/lib/poolparty/templates/puppet.conf +0 -1
- data/lib/poolparty/templates/puppetcleaner +9 -4
- data/lib/poolparty/templates/puppetrerun +9 -2
- data/lib/poolparty/templates/puppetrunner +1 -1
- data/lib/poolparty/version.rb +1 -1
- data/poolparty.gemspec +7 -3
- metadata +7 -3
    
        data/History.txt
    CHANGED
    
    
    
        data/Manifest.txt
    CHANGED
    
    | @@ -30,6 +30,7 @@ bin/pool-init | |
| 30 30 | 
             
            bin/pool-list
         | 
| 31 31 | 
             
            bin/pool-start
         | 
| 32 32 | 
             
            bin/server-build-messenger
         | 
| 33 | 
            +
            bin/server-clean-cert-for
         | 
| 33 34 | 
             
            bin/server-fire-cmd
         | 
| 34 35 | 
             
            bin/server-get-load
         | 
| 35 36 | 
             
            bin/server-list-active
         | 
| @@ -203,6 +204,7 @@ lib/poolparty/helpers/optioner.rb | |
| 203 204 | 
             
            lib/poolparty/helpers/provisioner_base.rb
         | 
| 204 205 | 
             
            lib/poolparty/helpers/provisioners/master.rb
         | 
| 205 206 | 
             
            lib/poolparty/helpers/provisioners/slave.rb
         | 
| 207 | 
            +
            lib/poolparty/helpers/ruberl.rb
         | 
| 206 208 | 
             
            lib/poolparty/modules/cloud_dsl.rb
         | 
| 207 209 | 
             
            lib/poolparty/modules/cloud_resourcer.rb
         | 
| 208 210 | 
             
            lib/poolparty/modules/configurable.rb
         | 
| @@ -284,6 +286,7 @@ lib/poolparty/templates/gem | |
| 284 286 | 
             
            lib/poolparty/templates/ha.cf
         | 
| 285 287 | 
             
            lib/poolparty/templates/haproxy.conf
         | 
| 286 288 | 
             
            lib/poolparty/templates/haresources
         | 
| 289 | 
            +
            lib/poolparty/templates/logd.cf
         | 
| 287 290 | 
             
            lib/poolparty/templates/messenger/client/log-run.erb
         | 
| 288 291 | 
             
            lib/poolparty/templates/messenger/client/run.erb
         | 
| 289 292 | 
             
            lib/poolparty/templates/messenger/master/log-run.erb
         | 
    
        data/PostInstall.txt
    CHANGED
    
    
| @@ -0,0 +1,15 @@ | |
| 1 | 
            +
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
            $:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
         | 
| 3 | 
            +
            require "poolparty"
         | 
| 4 | 
            +
            require "poolpartycl"
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            o = PoolParty::Optioner.new(ARGV) do |opts, optioner|
         | 
| 7 | 
            +
              opts.on('-n name', '--name name', 'For cloud name')    { |c| optioner.cloudname c }
         | 
| 8 | 
            +
              opts.on('-f name', '--for name', 'Clear the cert for')    { |f| optioner.for f }
         | 
| 9 | 
            +
            end
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            o.loaded_clouds.each do |cloud|
         | 
| 12 | 
            +
              # @nodes = cloud.messenger_send!("get_current_nodes")
         | 
| 13 | 
            +
              # @nodes = @nodes.split(" ").map {|a| a.split(/@/)[-1] }  
         | 
| 14 | 
            +
              PoolParty::Ruberl::Base.new(cloud.master, Base.messenger_client_port).messenger_send!("clear_cert_for #{cloud.for}")
         | 
| 15 | 
            +
            end
         | 
| @@ -105,6 +105,11 @@ handle_call({get_current_load, Types}, _From, State) -> | |
| 105 105 | 
             
            	LoadForType = [utils:average_of_list(get_load_for_type(Type, State)) || Type <- Types],
         | 
| 106 106 | 
             
            	?TRACE("LoadForType: ",[LoadForType]),
         | 
| 107 107 | 
             
            	{reply, LoadForType, State};
         | 
| 108 | 
            +
            % Handle puppet needs
         | 
| 109 | 
            +
            handle_call({clear_cert_for, Name}, _From, State) ->
         | 
| 110 | 
            +
            	String = string:concat(". /etc/profile && /usr/bin/puppetcleaner ",Name),
         | 
| 111 | 
            +
            	os:cmd(String),
         | 
| 112 | 
            +
            	{reply, ok, State};
         | 
| 108 113 | 
             
            handle_call({get_current_nodes, _Args}, _From, State) ->
         | 
| 109 114 | 
             
            	{reply, get_live_nodes(State), State}.
         | 
| 110 115 |  | 
| @@ -2,57 +2,71 @@ module PoolParty | |
| 2 2 | 
             
              class Base
         | 
| 3 3 | 
             
                plugin :heartbeat do
         | 
| 4 4 |  | 
| 5 | 
            -
                  # TODO: Reimplement heartbeat
         | 
| 6 5 | 
             
                  def enable
         | 
| 7 | 
            -
                    #  | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
                     | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
                     | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 6 | 
            +
                    # execute_on_master do
         | 
| 7 | 
            +
                      has_package(:name => "heartbeat") do
         | 
| 8 | 
            +
                        has_service(:name => "heartbeat", :hasstatus => true, :hasrestart => true)
         | 
| 9 | 
            +
                        has_directory(:name => "/etc/ha.d")
         | 
| 10 | 
            +
                        
         | 
| 11 | 
            +
                        has_remotefile(:name => "/etc/ha.d/ha.cf") do
         | 
| 12 | 
            +
                          mode 444
         | 
| 13 | 
            +
                          notify service(:name => "heartbeat")
         | 
| 14 | 
            +
                          template File.join(File.dirname(__FILE__), "..", "templates/ha.cf")
         | 
| 15 | 
            +
                        end
         | 
| 16 | 
            +
                        
         | 
| 17 | 
            +
                        has_remotefile(:name => "/etc/ha.d/logd.cf") do
         | 
| 18 | 
            +
                          mode 600
         | 
| 19 | 
            +
                          notify service(:name => "heartbeat")
         | 
| 20 | 
            +
                          template File.join(File.dirname(__FILE__), "..", "templates/logd.cf")
         | 
| 21 | 
            +
                        end
         | 
| 22 | 
            +
                        
         | 
| 23 | 
            +
                        has_exec(:name => "heartbeat-update-cib", :command => "/usr/sbin/cibadmin -R -x /etc/ha.d/cib.xml", :refreshonly => true)
         | 
| 24 | 
            +
                    
         | 
| 25 | 
            +
                        has_remotefile(:name => "/etc/ha.d/authkeys") do
         | 
| 26 | 
            +
                          mode 600
         | 
| 27 | 
            +
                          notify service(:name => "heartbeat")
         | 
| 28 | 
            +
                          template File.join(File.dirname(__FILE__), "..", "templates/authkeys")
         | 
| 29 | 
            +
                        end
         | 
| 30 | 
            +
                    
         | 
| 31 | 
            +
                        has_remotefile(:name => "/etc/ha.d/cib.xml") do
         | 
| 32 | 
            +
                          mode 444
         | 
| 33 | 
            +
                          notify exec(:name => "heartbeat-update-cib")
         | 
| 34 | 
            +
                          template File.join(File.dirname(__FILE__), "..", "templates/cib.xml")
         | 
| 35 | 
            +
                        end
         | 
| 36 | 
            +
                        
         | 
| 37 | 
            +
                        has_remotefile(:name => "/etc/ha.d/haresources") do
         | 
| 38 | 
            +
                          mode 644
         | 
| 39 | 
            +
                          template File.join(File.dirname(__FILE__), "..", "templates/haresources")
         | 
| 40 | 
            +
                        end
         | 
| 41 | 
            +
                      # end
         | 
| 42 | 
            +
                      
         | 
| 43 | 
            +
                      # variables for the templates
         | 
| 44 | 
            +
                      has_variable(:name => "ha_nodenames", :value => "generate('/usr/bin/env', '/usr/bin/server-list-active', '-c', 'name', '-n', '#{cloud.name}')")
         | 
| 45 | 
            +
                      has_variable(:name => "ha_node_ips",  :value => "generate('/usr/bin/env', '/usr/bin/server-list-active', '-c', 'ip', '-n', '#{cloud.name}')")
         | 
| 46 | 
            +
                      
         | 
| 47 | 
            +
                      has_variable({:name => "ha_timeout",  :value => (self.respond_to?(:timeout) ? timeout : "5s")})
         | 
| 48 | 
            +
                      has_variable({:name => "ha_port", :value => (self.respond_to?(:port) ? port : Base.port)})
         | 
| 49 | 
            +
                      
         | 
| 50 | 
            +
                      # Finally, let's set a few options and start it
         | 
| 51 | 
            +
            #           has_exec(:name => "set and start") do
         | 
| 52 | 
            +
            #             refreshonly true
         | 
| 53 | 
            +
            #             command <<-EOC
         | 
| 54 | 
            +
            # crm_mon -i5            
         | 
| 55 | 
            +
            #             EOC
         | 
| 56 | 
            +
            #           end
         | 
| 57 | 
            +
                      
         | 
| 58 | 
            +
                    end
         | 
| 59 | 
            +
                    
         | 
| 60 | 
            +
                    # execute_on_master do
         | 
| 48 61 | 
             
                    #   if list_of_node_names.size > 1
         | 
| 49 62 | 
             
                    #     has_exec(:name => "update pem for heartbeat", :refreshonly => true) do
         | 
| 50 | 
            -
                    #       command "scp /etc/puppet/ssl/ca/ca_crl.pem #{user || Base.user}@#{list_of_node_ips[1]} | 
| 63 | 
            +
                    #       command "scp /etc/puppet/ssl/ca/ca_crl.pem #{user || Base.user}@#{list_of_node_ips[1]}:#{Base.base_config_directory}/ssl/ca"
         | 
| 51 64 | 
             
                    #     end
         | 
| 52 65 | 
             
                    #   end
         | 
| 53 66 | 
             
                    # end
         | 
| 54 67 |  | 
| 55 68 | 
             
                  end
         | 
| 69 | 
            +
             | 
| 56 70 | 
             
                end  
         | 
| 57 71 | 
             
              end
         | 
| 58 72 | 
             
            end
         | 
| @@ -68,6 +68,15 @@ module PoolParty | |
| 68 68 |  | 
| 69 69 | 
             
                    # Custom run puppet to minimize footprint
         | 
| 70 70 | 
             
                    # TODO: Update the offsetted times
         | 
| 71 | 
            +
                    has_remotefile(:name => "/usr/bin/puppetrerun") do
         | 
| 72 | 
            +
                      mode 744
         | 
| 73 | 
            +
                      template File.join(File.dirname(__FILE__), "..", "templates/puppetrerun")
         | 
| 74 | 
            +
                    end
         | 
| 75 | 
            +
                    has_remotefile(:name => "/usr/bin/puppetcleaner") do
         | 
| 76 | 
            +
                      mode 744
         | 
| 77 | 
            +
                      template File.join(File.dirname(__FILE__), "..", "templates/puppetcleaner")
         | 
| 78 | 
            +
                    end
         | 
| 79 | 
            +
                    
         | 
| 71 80 | 
             
                    execute_on_master do
         | 
| 72 81 | 
             
                      has_exec(:name => "update_hosts", :command => ". /etc/profile && server-update-hosts -n #{cloud.name}")
         | 
| 73 82 |  | 
| @@ -93,15 +102,6 @@ module PoolParty | |
| 93 102 |  | 
| 94 103 | 
             
                      has_cron({:name => "maintain script", :command => ". /etc/profile && cloud-maintain -n #{cloud.name}", :minute => "*/3", :requires => [get_gempackage("poolparty"), get_cron("puppetd runner"), get_cron("Load handler"), get_service("haproxy")]})
         | 
| 95 104 |  | 
| 96 | 
            -
                      has_remotefile(:name => "/usr/bin/puppetcleaner") do
         | 
| 97 | 
            -
                        mode 744
         | 
| 98 | 
            -
                        template File.join(File.dirname(__FILE__), "..", "templates/puppetcleaner")
         | 
| 99 | 
            -
                      end
         | 
| 100 | 
            -
                      
         | 
| 101 | 
            -
                      has_remotefile(:name => "/usr/bin/puppetrerun") do
         | 
| 102 | 
            -
                        mode 744
         | 
| 103 | 
            -
                        template File.join(File.dirname(__FILE__), "..", "templates/puppetrerun")
         | 
| 104 | 
            -
                      end
         | 
| 105 105 | 
             
                    end        
         | 
| 106 106 | 
             
                    # has_host(:name => "puppet", :ip => (self.respond_to?(:master) ? self : parent).master.ip)
         | 
| 107 107 | 
             
                  end
         | 
| @@ -38,6 +38,7 @@ module PoolParty | |
| 38 38 | 
             
                        "#{Base.default_specfile_name}",
         | 
| 39 39 | 
             
                        ENV["POOL_SPEC"],            
         | 
| 40 40 | 
             
                        "#{Base.storage_directory}/#{Base.default_specfile_name}",
         | 
| 41 | 
            +
                        "#{Base.base_config_directory}/#{Base.default_specfile_name}",
         | 
| 41 42 | 
             
                        "#{Base.default_project_specfile_name}"
         | 
| 42 43 | 
             
                    ].reject {|a| a.nil?}.reject do |f|
         | 
| 43 44 | 
             
                      f unless ::File.readable?(f)
         | 
| @@ -347,6 +347,13 @@ fi | |
| 347 347 | 
             
                      cp #{Base.remote_storage_path}/poolparty.pp /etc/puppet/manifests/classes
         | 
| 348 348 | 
             
                    EOS
         | 
| 349 349 | 
             
                  end
         | 
| 350 | 
            +
                  def setup_system_for_poolparty
         | 
| 351 | 
            +
                    <<-EOS
         | 
| 352 | 
            +
                      mkdir -p #{Base.base_config_directory}/ssl/private_keys
         | 
| 353 | 
            +
                      mkdir -p #{Base.base_config_directory}/ssl/certs
         | 
| 354 | 
            +
                      mkdir -p #{Base.base_config_directory}/ssl/public_keys
         | 
| 355 | 
            +
                    EOS
         | 
| 356 | 
            +
                  end
         | 
| 350 357 | 
             
                end
         | 
| 351 358 | 
             
              end  
         | 
| 352 359 | 
             
            end
         | 
| @@ -89,7 +89,7 @@ echo "*" > /etc/puppet/autosign.conf | |
| 89 89 |  | 
| 90 90 | 
             
                  def setup_poolparty
         | 
| 91 91 | 
             
                    <<-EOS
         | 
| 92 | 
            -
            echo "Setting the poolparty configuration" | 
| 92 | 
            +
            echo "Setting the poolparty configuration"
         | 
| 93 93 | 
             
            cp #{Base.remote_storage_path}/#{Base.key_file_locations.first} "#{Base.base_config_directory}/.ppkeys"
         | 
| 94 94 | 
             
            cp #{Base.remote_storage_path}/#{Base.default_specfile_name} #{Base.base_config_directory}/#{Base.default_specfile_name}
         | 
| 95 95 | 
             
                    EOS
         | 
| @@ -184,7 +184,7 @@ cp #{Base.remote_storage_path}/poolparty.pp /etc/puppet/manifests/classes/poolpa | |
| 184 184 | 
             
                  def restart_puppetd
         | 
| 185 185 | 
             
                    <<-EOS
         | 
| 186 186 | 
             
            echo "Running puppet manifest"
         | 
| 187 | 
            -
            /usr/bin/ | 
| 187 | 
            +
            /usr/bin/puppetrerun
         | 
| 188 188 | 
             
                    EOS
         | 
| 189 189 | 
             
                  end
         | 
| 190 190 | 
             
                end
         | 
| @@ -35,7 +35,8 @@ chmod +x /usr/bin/puppetrunner | |
| 35 35 | 
             
                    <<-EOS          
         | 
| 36 36 | 
             
                      echo "#{open(File.join(template_directory, "puppet.conf")).read}" > /etc/puppet/puppet.conf
         | 
| 37 37 | 
             
                      /etc/init.d/puppetmaster stop #{unix_hide_string}
         | 
| 38 | 
            -
                       | 
| 38 | 
            +
                      mkdir -p #{Base.base_config_directory}
         | 
| 39 | 
            +
                      # rm -rf /etc/puppet/ssl
         | 
| 39 40 | 
             
                      # /usr/bin/puppetrerun
         | 
| 40 41 | 
             
                    EOS
         | 
| 41 42 | 
             
                  end
         | 
| @@ -0,0 +1,33 @@ | |
| 1 | 
            +
            require "socket"
         | 
| 2 | 
            +
            module PoolParty
         | 
| 3 | 
            +
              module Ruberl
         | 
| 4 | 
            +
                class Base
         | 
| 5 | 
            +
                  attr_accessor :host, :port
         | 
| 6 | 
            +
                  def initialize(host="localhost", port=7050)
         | 
| 7 | 
            +
                    @host = host
         | 
| 8 | 
            +
                    @port = port
         | 
| 9 | 
            +
                  end
         | 
| 10 | 
            +
                  def with_socket(&block)
         | 
| 11 | 
            +
                    begin
         | 
| 12 | 
            +
                      socket = TCPSocket.open(@host, @port)
         | 
| 13 | 
            +
                      out = yield(socket)
         | 
| 14 | 
            +
                      socket.close
         | 
| 15 | 
            +
                      out
         | 
| 16 | 
            +
                    rescue Exception => e
         | 
| 17 | 
            +
                    end
         | 
| 18 | 
            +
                  end
         | 
| 19 | 
            +
                  def messenger_send!(msg="get_current_load cpu")
         | 
| 20 | 
            +
                    with_socket do |sock|
         | 
| 21 | 
            +
                      sock.send(msg, 0)
         | 
| 22 | 
            +
                      @str = sock.recv(2000)      
         | 
| 23 | 
            +
                    end
         | 
| 24 | 
            +
                    @str
         | 
| 25 | 
            +
                  end
         | 
| 26 | 
            +
                  def messenger_cast!(msg="force_reconfig")
         | 
| 27 | 
            +
                    with_socket do |sock|
         | 
| 28 | 
            +
                      sock.send(msg, 0)
         | 
| 29 | 
            +
                    end
         | 
| 30 | 
            +
                  end
         | 
| 31 | 
            +
                end
         | 
| 32 | 
            +
              end
         | 
| 33 | 
            +
            end
         | 
| @@ -140,9 +140,6 @@ begin | |
| 140 140 | 
             
                  def custom_install_tasks_for(o)
         | 
| 141 141 | 
             
                    arr = if has_cert_and_key?
         | 
| 142 142 | 
             
                      [ 
         | 
| 143 | 
            -
                        "mkdir -p #{Base.base_config_directory}/ssl/private_keys",
         | 
| 144 | 
            -
                        "mkdir -p #{Base.base_config_directory}/ssl/certs",
         | 
| 145 | 
            -
                        "mkdir -p #{Base.base_config_directory}/ssl/public_keys",
         | 
| 146 143 | 
             
                        "mv #{::File.basename(pub_key)} #{Base.base_config_directory}/ssl/public_keys/#{o.name}.pem", 
         | 
| 147 144 | 
             
                        "mv #{::File.basename(private_key)} #{Base.base_config_directory}/ssl/private_keys/#{o.name}.pem"
         | 
| 148 145 | 
             
                      ]
         | 
| @@ -54,7 +54,9 @@ module PoolParty | |
| 54 54 | 
             
                    # set_parent(parent) if parent && !@parent
         | 
| 55 55 | 
             
                    # self.run_in_context parent, &block if block
         | 
| 56 56 | 
             
                    setup_defaults
         | 
| 57 | 
            -
                     | 
| 57 | 
            +
                    realize_plugins!
         | 
| 58 | 
            +
                    reset! # reset the clouds
         | 
| 59 | 
            +
                    reset_remoter_base!
         | 
| 58 60 | 
             
                  end
         | 
| 59 61 |  | 
| 60 62 | 
             
                  def setup_defaults
         | 
| @@ -216,7 +218,7 @@ module PoolParty | |
| 216 218 | 
             
                    haproxy
         | 
| 217 219 | 
             
                    ruby
         | 
| 218 220 | 
             
                    poolparty_base_packages
         | 
| 219 | 
            -
                    realize_plugins!
         | 
| 221 | 
            +
                    realize_plugins!(true) # Force realizing of the plugins
         | 
| 220 222 | 
             
                  end
         | 
| 221 223 |  | 
| 222 224 | 
             
                  def other_clouds
         | 
| @@ -258,7 +258,7 @@ module PoolParty | |
| 258 258 | 
             
                      @full_allowed_options ||= allowed_options.reject {|ele| disallowed_options.include?(ele) }
         | 
| 259 259 | 
             
                      @modified_options = opts.reject do |k,v|
         | 
| 260 260 | 
             
                        !@full_allowed_options.include?(k) || 
         | 
| 261 | 
            -
                          @parent && @parent.respond_to?(:options) && @parent.options.has_key?(k) && @parent.options[k] == options[k]
         | 
| 261 | 
            +
                          @parent && @parent.respond_to?(:options) && @parent != self && @parent.options.has_key?(k) && @parent.options[k] == options[k]
         | 
| 262 262 | 
             
                      end
         | 
| 263 263 | 
             
                    end
         | 
| 264 264 | 
             
                    @modified_options
         | 
| @@ -1,2 +1,2 @@ | |
| 1 1 | 
             
            auth 1
         | 
| 2 | 
            -
            1  | 
| 2 | 
            +
            1 sha1 PasswordForpoolpartyClusterApplicationButItIsOnlyADefault
         | 
| @@ -1,19 +1,17 @@ | |
| 1 1 | 
             
            # Heartbeat
         | 
| 2 | 
            -
            keepalive  | 
| 3 | 
            -
            deadtime 32 # wait  | 
| 2 | 
            +
            keepalive 5 # Time inbetween heartbeats
         | 
| 3 | 
            +
            deadtime 32 # wait 10 seconds before declaring dead
         | 
| 4 4 | 
             
            warntime 16 # issue a warning halfway through
         | 
| 5 5 | 
             
            initdead 60 # Don't boot instances between 60 seconds of each other
         | 
| 6 6 | 
             
            logfacility daemon         # Log to syslog as facility "daemon"
         | 
| 7 | 
            -
            auto_failback  | 
| 7 | 
            +
            auto_failback on
         | 
| 8 8 | 
             
            use_logd yes
         | 
| 9 | 
            -
             | 
| 10 | 
            -
            crm on
         | 
| 11 | 
            -
            logfile /var/log/ha.log
         | 
| 9 | 
            +
            crm yes
         | 
| 12 10 |  | 
| 13 11 | 
             
            <% ha_node_ips.chomp.split(/\t/).each_with_index do |ip,index| -%>
         | 
| 14 | 
            -
              <% if  | 
| 15 | 
            -
             | 
| 16 | 
            -
              <% end  | 
| 17 | 
            -
            <% end  | 
| 12 | 
            +
              <% if hostname != ha_nodenames.chomp.split(/\t/)[index] -%>
         | 
| 13 | 
            +
            ucast eth0 <%= ip %>
         | 
| 14 | 
            +
              <% end -%>
         | 
| 15 | 
            +
            <% end -%>
         | 
| 18 16 |  | 
| 19 | 
            -
            node <%= ha_nodenames %>
         | 
| 17 | 
            +
            node <%= ha_nodenames.chomp.split(/\t/).join(" ") %>
         | 
| @@ -0,0 +1,42 @@ | |
| 1 | 
            +
            #	File to write debug messages to
         | 
| 2 | 
            +
            #	Default: /var/log/ha-debug
         | 
| 3 | 
            +
            #debugfile /var/log/ha-debug
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            #
         | 
| 6 | 
            +
            #
         | 
| 7 | 
            +
            # 	File to write other messages to
         | 
| 8 | 
            +
            #	Default: /var/log/ha-log
         | 
| 9 | 
            +
            #logfile	/var/log/ha-log
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            #
         | 
| 12 | 
            +
            #
         | 
| 13 | 
            +
            #	Facility to use for syslog()/logger 
         | 
| 14 | 
            +
            #	Default: daemon
         | 
| 15 | 
            +
            logfacility	daemon
         | 
| 16 | 
            +
             | 
| 17 | 
            +
             | 
| 18 | 
            +
            #	Entity to be shown at beginning of a message
         | 
| 19 | 
            +
            # 	for logging daemon
         | 
| 20 | 
            +
            # 	Default: "logd"
         | 
| 21 | 
            +
            #entity logd
         | 
| 22 | 
            +
             | 
| 23 | 
            +
             | 
| 24 | 
            +
            #	Do we register to apphbd
         | 
| 25 | 
            +
            #	Default: no
         | 
| 26 | 
            +
            #useapphbd no
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            #	There are two processes running for logging daemon
         | 
| 29 | 
            +
            #  		1. parent process which reads messages from all client channels 
         | 
| 30 | 
            +
            #  		and writes them to the child process 
         | 
| 31 | 
            +
            #  
         | 
| 32 | 
            +
            #  		2. the child process which reads messages from the parent process through IPC
         | 
| 33 | 
            +
            #  		and writes them to syslog/disk
         | 
| 34 | 
            +
             | 
| 35 | 
            +
             | 
| 36 | 
            +
            #	set the send queue length from the parent process to the child process
         | 
| 37 | 
            +
            #
         | 
| 38 | 
            +
            #sendqlen 256 
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            #	set the recv queue length in child process
         | 
| 41 | 
            +
            #
         | 
| 42 | 
            +
            #recvqlen 256
         | 
| @@ -1,7 +1,12 @@ | |
| 1 1 | 
             
            #!/usr/bin/env bash
         | 
| 2 2 |  | 
| 3 | 
            -
            #  | 
| 3 | 
            +
            ARGS=1        # Number of arguments expected.
         | 
| 4 | 
            +
            E_BADARGS=85  # Exit value if incorrect number of args passed.
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            test $# -ne $ARGS && echo "Usage: `basename $0` requires $ARGS argument(s)" && exit $E_BADARGS
         | 
| 7 | 
            +
             | 
| 4 8 | 
             
            . /etc/profile
         | 
| 5 | 
            -
            HN | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 9 | 
            +
            HN=$1
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            echo "Cleaning $1 signed certs"
         | 
| 12 | 
            +
            rm /etc/poolparty/ssl/ca/signed/$HN.*
         | 
| @@ -4,6 +4,13 @@ | |
| 4 4 | 
             
            if [ $(/usr/sbin/puppetd --onetime --no-daemonize --logdest syslog --server master)]; then
         | 
| 5 5 | 
             
              echo "Run successfully"
         | 
| 6 6 | 
             
              else
         | 
| 7 | 
            -
               | 
| 8 | 
            -
               | 
| 7 | 
            +
              echo "Clearing old certs"
         | 
| 8 | 
            +
              HN=`hostname`
         | 
| 9 | 
            +
              if [[ $HN == "master" ]]; then
         | 
| 10 | 
            +
                  ps aux | grep puppetmaster | awk '{print $2}' | xargs kill;rm -rf /etc/poolparty/ssl;puppetmasterd --verbose
         | 
| 11 | 
            +
                  /etc/init.d/puppetmaster start
         | 
| 12 | 
            +
                  /usr/sbin/puppetd --onetime --no-daemonize --logdest syslog --server master
         | 
| 13 | 
            +
                else
         | 
| 14 | 
            +
                  cd /etc/poolparty/ssl && rm -rf *;/usr/sbin/puppetd --onetime --no-daemonize --logdest syslog --server master
         | 
| 15 | 
            +
              fi
         | 
| 9 16 | 
             
            fi
         | 
| @@ -4,5 +4,5 @@ | |
| 4 4 | 
             
            if [ $(/usr/sbin/puppetd --onetime --no-daemonize --logdest syslog --server master)]; then
         | 
| 5 5 | 
             
              echo "Run successfully"
         | 
| 6 6 | 
             
              else
         | 
| 7 | 
            -
              /usr/sbin/puppetd --onetime --no-daemonize --logdest syslog --server master
         | 
| 7 | 
            +
              /usr/bin/puppetrerun;/usr/sbin/puppetd --onetime --no-daemonize --logdest syslog --server master
         | 
| 8 8 | 
             
            fi
         | 
    
        data/lib/poolparty/version.rb
    CHANGED
    
    
    
        data/poolparty.gemspec
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: poolparty
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.77
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Ari Lerner
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2008-12- | 
| 12 | 
            +
            date: 2008-12-05 00:00:00 -08:00
         | 
| 13 13 | 
             
            default_executable: 
         | 
| 14 14 | 
             
            dependencies: 
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -82,6 +82,7 @@ executables: | |
| 82 82 | 
             
            - pool-list
         | 
| 83 83 | 
             
            - pool-start
         | 
| 84 84 | 
             
            - server-build-messenger
         | 
| 85 | 
            +
            - server-clean-cert-for
         | 
| 85 86 | 
             
            - server-fire-cmd
         | 
| 86 87 | 
             
            - server-get-load
         | 
| 87 88 | 
             
            - server-list-active
         | 
| @@ -140,6 +141,7 @@ files: | |
| 140 141 | 
             
            - bin/pool-list
         | 
| 141 142 | 
             
            - bin/pool-start
         | 
| 142 143 | 
             
            - bin/server-build-messenger
         | 
| 144 | 
            +
            - bin/server-clean-cert-for
         | 
| 143 145 | 
             
            - bin/server-fire-cmd
         | 
| 144 146 | 
             
            - bin/server-get-load
         | 
| 145 147 | 
             
            - bin/server-list-active
         | 
| @@ -313,6 +315,7 @@ files: | |
| 313 315 | 
             
            - lib/poolparty/helpers/provisioner_base.rb
         | 
| 314 316 | 
             
            - lib/poolparty/helpers/provisioners/master.rb
         | 
| 315 317 | 
             
            - lib/poolparty/helpers/provisioners/slave.rb
         | 
| 318 | 
            +
            - lib/poolparty/helpers/ruberl.rb
         | 
| 316 319 | 
             
            - lib/poolparty/modules/cloud_dsl.rb
         | 
| 317 320 | 
             
            - lib/poolparty/modules/cloud_resourcer.rb
         | 
| 318 321 | 
             
            - lib/poolparty/modules/configurable.rb
         | 
| @@ -394,6 +397,7 @@ files: | |
| 394 397 | 
             
            - lib/poolparty/templates/ha.cf
         | 
| 395 398 | 
             
            - lib/poolparty/templates/haproxy.conf
         | 
| 396 399 | 
             
            - lib/poolparty/templates/haresources
         | 
| 400 | 
            +
            - lib/poolparty/templates/logd.cf
         | 
| 397 401 | 
             
            - lib/poolparty/templates/messenger/client/log-run.erb
         | 
| 398 402 | 
             
            - lib/poolparty/templates/messenger/client/run.erb
         | 
| 399 403 | 
             
            - lib/poolparty/templates/messenger/master/log-run.erb
         | 
| @@ -507,7 +511,7 @@ files: | |
| 507 511 | 
             
            has_rdoc: true
         | 
| 508 512 | 
             
            homepage: http://poolparty.rubyforge.org
         | 
| 509 513 | 
             
            post_install_message: |-
         | 
| 510 | 
            -
              Get ready to jump in the pool, you just installed PoolParty! (Updated at  | 
| 514 | 
            +
              Get ready to jump in the pool, you just installed PoolParty! (Updated at 08:35 12/05/08)
         | 
| 511 515 |  | 
| 512 516 | 
             
              To get started, run the generator:
         | 
| 513 517 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: auser-poolparty
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.77
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Ari Lerner
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2008-12- | 
| 12 | 
            +
            date: 2008-12-05 00:00:00 -08:00
         | 
| 13 13 | 
             
            default_executable: 
         | 
| 14 14 | 
             
            dependencies: 
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -82,6 +82,7 @@ executables: | |
| 82 82 | 
             
            - pool-list
         | 
| 83 83 | 
             
            - pool-start
         | 
| 84 84 | 
             
            - server-build-messenger
         | 
| 85 | 
            +
            - server-clean-cert-for
         | 
| 85 86 | 
             
            - server-fire-cmd
         | 
| 86 87 | 
             
            - server-get-load
         | 
| 87 88 | 
             
            - server-list-active
         | 
| @@ -140,6 +141,7 @@ files: | |
| 140 141 | 
             
            - bin/pool-list
         | 
| 141 142 | 
             
            - bin/pool-start
         | 
| 142 143 | 
             
            - bin/server-build-messenger
         | 
| 144 | 
            +
            - bin/server-clean-cert-for
         | 
| 143 145 | 
             
            - bin/server-fire-cmd
         | 
| 144 146 | 
             
            - bin/server-get-load
         | 
| 145 147 | 
             
            - bin/server-list-active
         | 
| @@ -313,6 +315,7 @@ files: | |
| 313 315 | 
             
            - lib/poolparty/helpers/provisioner_base.rb
         | 
| 314 316 | 
             
            - lib/poolparty/helpers/provisioners/master.rb
         | 
| 315 317 | 
             
            - lib/poolparty/helpers/provisioners/slave.rb
         | 
| 318 | 
            +
            - lib/poolparty/helpers/ruberl.rb
         | 
| 316 319 | 
             
            - lib/poolparty/modules/cloud_dsl.rb
         | 
| 317 320 | 
             
            - lib/poolparty/modules/cloud_resourcer.rb
         | 
| 318 321 | 
             
            - lib/poolparty/modules/configurable.rb
         | 
| @@ -394,6 +397,7 @@ files: | |
| 394 397 | 
             
            - lib/poolparty/templates/ha.cf
         | 
| 395 398 | 
             
            - lib/poolparty/templates/haproxy.conf
         | 
| 396 399 | 
             
            - lib/poolparty/templates/haresources
         | 
| 400 | 
            +
            - lib/poolparty/templates/logd.cf
         | 
| 397 401 | 
             
            - lib/poolparty/templates/messenger/client/log-run.erb
         | 
| 398 402 | 
             
            - lib/poolparty/templates/messenger/client/run.erb
         | 
| 399 403 | 
             
            - lib/poolparty/templates/messenger/master/log-run.erb
         | 
| @@ -507,7 +511,7 @@ files: | |
| 507 511 | 
             
            has_rdoc: true
         | 
| 508 512 | 
             
            homepage: http://poolparty.rubyforge.org
         | 
| 509 513 | 
             
            post_install_message: |-
         | 
| 510 | 
            -
              Get ready to jump in the pool, you just installed PoolParty! (Updated at  | 
| 514 | 
            +
              Get ready to jump in the pool, you just installed PoolParty! (Updated at 08:35 12/05/08)
         | 
| 511 515 |  | 
| 512 516 | 
             
              To get started, run the generator:
         | 
| 513 517 |  |