def init(docker_host=constants.DOCKER_HOST,
ssh_key_path=constants.SSH_KEY,
clean_image_docker_tag=constants.CLEAN_IMAGE_DOCKER_TAG,
manager_image_docker_tag=constants.MANAGER_IMAGE_DOCKER_TAG,
source_root=constants.SOURCE_ROOT,
workdir=None,
reset=False,
debug_ip=None):
ssh_key_path = path(ssh_key_path).expanduser()
if not ssh_key_path.isfile():
raise argh.CommandError(
'You need to create a key (see man ssh-keygen) first'
)
configuration.save(
docker_host=docker_host,
ssh_key_path=ssh_key_path.abspath(),
clean_image_docker_tag=clean_image_docker_tag,
manager_image_docker_tag=manager_image_docker_tag,
source_root=source_root,
workdir=workdir,
reset=reset,
debug_ip=debug_ip)
logger.info('Configuration is saved to {}. Feel free to change it to your '
'liking.'.format(configuration.conf_path))
work.init()
评论列表
文章目录