'Deploy and configure spinnaker.
The deployment configuration is specified via the bound options.
The runtime configuration is passed to the call.
Args:
config_script: [list] The sequence of bash commands to run in order
to configure spinnaker.
file_to_upload: [set] A set of file paths to upload to the deployed
instance before running the config_script. Presumably these will
be referenced by the script.'

def deploy(self, config_script, files_to_upload):

    platform = self.options.deploy_hal_platform
    logging.info('Deploying    with    hal    on    %s...', platform)
    script = []
    self.add_install_hal_script_statements(script)
    self.add_platform_deploy_script_statements(script)
    script.append('hal    -q    --log=info    config    version    edit    --version    {version}'.format(version=self.options.deploy_version))
    script.extend(config_script)
    self.add_hal_deploy_script_statements(script)
    script.append('hal    -q    --log=info    config')
    script.append('sudo    hal    -q    --log=info    deploy    apply')
    self.add_post_deploy_statements(script)
    if (not self.options.deploy_deploy):
        logging.warning('Skipping    deployment    because    --deploy_deploy=false\n')
        return
    self.do_deploy(script, files_to_upload)
    logging.info('Finished    deploying    to    %s', platform)
