예제 #1
0
파일: status.py 프로젝트: ashwinaj/paasta
def missing_deployments_message(service):
    jenkins_url = PaastaColors.cyan(
        'https://jenkins.yelpcorp.com/view/services-%s' % service)
    message = "%s No deployments in deployments.json yet.\n  " \
              "Has Jenkins run?\n  " \
              "Check: %s" % (x_mark(), jenkins_url)
    return message
예제 #2
0
def missing_deployments_message(service):
    jenkins_url = PaastaColors.cyan(
        'https://jenkins.yelpcorp.com/view/services-%s' % service)
    message = "%s No deployments in deployments.json yet.\n  " \
              "Has Jenkins run?\n  " \
              "Check: %s" % (x_mark(), jenkins_url)
    return message
예제 #3
0
파일: check.py 프로젝트: ashwinaj/paasta
def marathon_deployments_check(service):
    """Checks for consistency between deploy.yaml and the marathon yamls"""
    the_return = True
    pipeline_deployments = get_pipeline_config(service)
    pipeline_steps = [step["instancename"] for step in pipeline_deployments]
    pipeline_steps = [step for step in pipeline_steps if step not in DEPLOY_PIPELINE_NON_DEPLOY_STEPS]
    marathon_steps = get_marathon_steps(service)
    in_marathon_not_deploy = set(marathon_steps) - set(pipeline_steps)
    if len(in_marathon_not_deploy) > 0:
        print "%s There are some instance(s) you have asked to run in marathon that" % x_mark()
        print "  do not have a corresponding entry in deploy.yaml:"
        print "  %s" % PaastaColors.bold(", ".join(in_marathon_not_deploy))
        print "  You should probably add entries to deploy.yaml for them so they"
        print "  are deployed to those clusters."
        the_return = False
    in_deploy_not_marathon = set(pipeline_steps) - set(marathon_steps)
    if len(in_deploy_not_marathon) > 0:
        print "%s There are some instance(s) in deploy.yaml that are not referenced" % x_mark()
        print "  by any marathon instance:"
        print "  %s" % PaastaColors.bold((", ".join(in_deploy_not_marathon)))
        print "  You should probably delete these deploy.yaml entries if they are unused."
        the_return = False
    if the_return is True:
        print success("All entries in deploy.yaml correspond to a marathon entry")
        print success("All marathon instances have a corresponding deploy.yaml entry")
    return the_return
예제 #4
0
def marathon_deployments_check(service):
    """Checks for consistency between deploy.yaml and the marathon yamls"""
    the_return = True
    pipeline_deployments = get_pipeline_config(service)
    pipeline_steps = [step['instancename'] for step in pipeline_deployments]
    pipeline_steps = [step for step in pipeline_steps if step not in DEPLOY_PIPELINE_NON_DEPLOY_STEPS]
    marathon_steps = get_marathon_steps(service)
    in_marathon_not_deploy = set(marathon_steps) - set(pipeline_steps)
    if len(in_marathon_not_deploy) > 0:
        print "%s There are some instance(s) you have asked to run in marathon that" % x_mark()
        print "  do not have a corresponding entry in deploy.yaml:"
        print "  %s" % PaastaColors.bold(", ".join(in_marathon_not_deploy))
        print "  You should probably add entries to deploy.yaml for them so they"
        print "  are deployed to those clusters."
        the_return = False
    in_deploy_not_marathon = set(pipeline_steps) - set(marathon_steps)
    if len(in_deploy_not_marathon) > 0:
        print "%s There are some instance(s) in deploy.yaml that are not referenced" % x_mark()
        print "  by any marathon instance:"
        print "  %s" % PaastaColors.bold((", ".join(in_deploy_not_marathon)))
        print "  You should probably delete these deploy.yaml entries if they are unused."
        the_return = False
    if the_return is True:
        print success("All entries in deploy.yaml correspond to a marathon entry")
        print success("All marathon instances have a corresponding deploy.yaml entry")
    return the_return