summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-11-24 17:02:18 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-11-24 17:02:18 -0500
commite3071fd15f70214fe9f13b847f2cc5443716d955 (patch)
tree15d4f7ee4996c279e32fc9e47be851f7ed7336dd /bin
parent31112d2b69819a20f7f5edaec2a49749559921b4 (diff)
parent05f63f022d1a42da6b5a34ae58c1eda745757b7c (diff)
downloadopenshift-e3071fd15f70214fe9f13b847f2cc5443716d955.tar.gz
openshift-e3071fd15f70214fe9f13b847f2cc5443716d955.tar.bz2
openshift-e3071fd15f70214fe9f13b847f2cc5443716d955.tar.xz
openshift-e3071fd15f70214fe9f13b847f2cc5443716d955.zip
Merge pull request #968 from detiber/fixScaleup2
Improve scaleup playbook
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cluster25
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/cluster b/bin/cluster
index a3d4b629c..9b02b4347 100755
--- a/bin/cluster
+++ b/bin/cluster
@@ -67,6 +67,21 @@ class Cluster(object):
self.action(args, inventory, env, playbook)
+ def addNodes(self, args):
+ """
+ Add nodes to an existing cluster for given provider
+ :param args: command line arguments provided by user
+ """
+ env = {'cluster_id': args.cluster_id,
+ 'deployment_type': self.get_deployment_type(args)}
+ playbook = "playbooks/{0}/openshift-cluster/addNodes.yml".format(args.provider)
+ inventory = self.setup_provider(args.provider)
+
+ env['num_nodes'] = args.nodes
+ env['num_infra'] = args.infra
+
+ self.action(args, inventory, env, playbook)
+
def terminate(self, args):
"""
Destroy OpenShift cluster
@@ -292,6 +307,16 @@ if __name__ == '__main__':
help='number of external etcd hosts to create in cluster')
create_parser.set_defaults(func=cluster.create)
+
+ create_parser = action_parser.add_parser('addNodes', help='Add nodes to a cluster',
+ parents=[meta_parser])
+ create_parser.add_argument('-n', '--nodes', default=1, type=int,
+ help='number of nodes to add to the cluster')
+ create_parser.add_argument('-i', '--infra', default=1, type=int,
+ help='number of infra nodes to add to the cluster')
+ create_parser.set_defaults(func=cluster.addNodes)
+
+
config_parser = action_parser.add_parser('config',
help='Configure or reconfigure a cluster',
parents=[meta_parser])