def start(self, unique_id, configs=None):
<EOL>if configs is None:<EOL><INDENT>configs = {}<EOL><DEDENT>tmp = self.default_configs.copy()<EOL>tmp.update(configs)<EOL>configs = tmp<EOL>logger.debug("<STR_LIT>" + unique_id)<EOL>if self.get_pid(unique_id, configs) is not constants.PROCESS_NOT_RUNNING_PID:<EOL><INDENT>return None<EOL><DEDENT>if unique_id not in self.processes:<EOL><INDENT>self.install(unique_id, configs)<EOL><DEDENT>hostname = self.processes[unique_id].hostname<EOL>install_path = self.processes[unique_id].install_path<EOL>start_command = configs.get('<STR_LIT>') or self.processes[unique_id].start_command or self.default_configs.get('<STR_LIT>')<EOL>pid_file = configs.get('<STR_LIT>') or self.default_configs.get('<STR_LIT>')<EOL>if start_command is None:<EOL><INDENT>logger.error("<STR_LIT>" + unique_id)<EOL>raise DeploymentError("<STR_LIT>" + unique_id)<EOL><DEDENT>args = configs.get('<STR_LIT:args>') or self.processes[unique_id].args or self.default_configs.get('<STR_LIT:args>')<EOL>if args is not None:<EOL><INDENT>full_start_command = "<STR_LIT>".format(start_command, '<STR_LIT:U+0020>'.join(args))<EOL><DEDENT>else:<EOL><INDENT>full_start_command = start_command<EOL><DEDENT>command = "<STR_LIT>".format(install_path, full_start_command)<EOL>env = configs.get("<STR_LIT>", {})<EOL>with get_ssh_client(hostname, username=runtime.get_username(), password=runtime.get_password()) as ssh:<EOL><INDENT>exec_with_env(ssh, command, msg="<STR_LIT>", env=env, sync=configs.get('<STR_LIT>', False))<EOL><DEDENT>self.processes[unique_id].start_command = start_command<EOL>self.processes[unique_id].args = args<EOL>if self.processes[unique_id].pid_file is None:<EOL><INDENT>self.processes[unique_id].pid_file = pid_file<EOL><DEDENT>if '<STR_LIT>' in configs:<EOL><INDENT>time.sleep(configs['<STR_LIT>'])<EOL><DEDENT>
Start the service.  If `unique_id` has already been installed the deployer will start the service on that host.
Otherwise this will call install with the configs. Within the context of this function, only four configs are
considered
'start_command': the command to run (if provided will replace the default)
'args': a list of args that can be passed to the command
'sync': if the command is synchronous or asynchronous defaults to asynchronous
'delay': a delay in seconds that might be needed regardless of whether the command returns before the service can
be started

:param unique_id:
:param configs:
:return: if the command is executed synchronously return the underlying paramiko channel which can be used to get the stdout
otherwise return the triple stdin, stdout, stderr