lib/dev-lxc/chef-cluster.rb in dev-lxc-0.4.1 vs lib/dev-lxc/chef-cluster.rb in dev-lxc-0.5.0
- old
+ new
@@ -33,22 +33,10 @@
end
chef_servers << ChefServer.new(@analytics_server, @cluster_config) if @analytics_server
chef_servers
end
- def status
- puts "Cluster is available at https://#{@api_fqdn}"
- puts "Analytics is available at https://#{@analytics_fqdn}" if @analytics_fqdn
- chef_servers.each { |cs| cs.status }
- end
-
- def abspath(rootfs_path)
- abspath = Array.new
- chef_servers.each { |cs| abspath << cs.abspath(rootfs_path) unless cs.role == 'analytics' }
- abspath.compact
- end
-
def chef_repo
if @topology == "open-source"
puts "Unable to create a chef-repo for an Open Source Chef Server"
exit 1
end
@@ -77,32 +65,9 @@
if Dir.glob("#{chef_server.abspath('/root/chef-repo/.chef')}/*.pem").empty?
puts "The pem files can not be copied because they do not exist in '#{chef_server.server.name}' Chef Server's `/root/chef-repo/.chef` directory"
else
FileUtils.cp( Dir.glob("#{chef_server.abspath('/root/chef-repo/.chef')}/*.pem"), "./chef-repo/.chef" )
end
- end
-
- def run_command(command)
- chef_servers.each { |cs| cs.run_command(command) unless cs.role == 'analytics' }
- end
-
- def start
- puts "Starting cluster"
- chef_servers.each { |cs| cs.start }
- end
-
- def stop
- puts "Stopping cluster"
- chef_servers.reverse_each { |cs| cs.stop }
- end
-
- def destroy
- puts "Destroying cluster"
- chef_servers.reverse_each { |cs| cs.destroy }
- end
-
- def destroy_container(type)
- chef_servers.each { |cs| cs.destroy_container(type) }
end
def chef_server_config
chef_server_config = %Q(api_fqdn "#{@api_fqdn}"\n)
if @topology == 'tier'