def scaleup(comp_name=nil)
result_io = ResultIO.new
if not self.scalable
raise OpenShift::UserException.new("Cannot scale a non-scalable application", 255, result_io)
end
comp_name = "web" if comp_name.nil?
prof = @profile_name_map[@default_profile]
cinst = ComponentInstance::find_component_in_cart(prof, self, comp_name, self.get_name_prefix)
raise OpenShift::NodeException.new("Cannot find #{comp_name} in app #{self.name}.", 1, result_io) if cinst.nil?
ginst = self.group_instance_map[cinst.group_instance_name]
raise OpenShift::NodeException.new("Cannot find group #{cinst.group_instance_name} for #{comp_name} in app #{self.name}.", 1, result_io) if ginst.nil?
raise OpenShift::UserException.new("Cannot scale up beyond maximum gear limit in app #{self.name}.", 104, result_io) if ginst.gears.length >= ginst.max and ginst.max > 0
raise OpenShift::UserException.new("Cannot scale up beyond gear limit '#{user.max_gears}'", 104, result_io) if user.consumed_gears >= user.max_gears
result, new_gear = ginst.add_gear(self)
result_io.append result
result_io.append self.configure_dependencies
self.execute_connections
result_io
end