Skip to content

Example for using dependency information in configure #10

@ghost

Description

Can you post an example for how to use the dependency information from the cluster in the configure(self, cluster) method?

I know I can do something like this.

def configure(self, cluster):
    pod = cluster.pods[cluster.key]
    return "java -jar $ARTIFACT_TARGET_PATH", { 'SEED_NODE': pod['ip'] }

Does the dependencies dict work the same way?

def configure(self, cluster):
    contactPoints = []
    for k in cluster.dependencies:
        if k == 'cassandra':
            contactPoints.append(cluster.dependencies[k]['ip'])
    contactPointsStr = "[" + ",".join(contactPoints) + "]"
    return "java -jar $ARTIFACT_TARGET_PATH", { 'CONTACT_POINTS': contactPointsStr }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions