diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cluster | 8 | ||||
-rw-r--r-- | bin/openshift_ansible/awsutil.py | 15 | ||||
-rwxr-xr-x | bin/opssh | 1 | ||||
-rwxr-xr-x | bin/ossh | 5 |
4 files changed, 18 insertions, 11 deletions
diff --git a/bin/cluster b/bin/cluster index c2765ff92..c3b101c98 100755 --- a/bin/cluster +++ b/bin/cluster @@ -68,7 +68,7 @@ class Cluster(object): self.action(args, inventory, cluster, playbook) - def addNodes(self, args): + def add_nodes(self, args): """ Add nodes to an existing cluster for given provider :param args: command line arguments provided by user @@ -76,7 +76,7 @@ class Cluster(object): cluster = {'cluster_id': args.cluster_id, 'deployment_type': self.get_deployment_type(args), } - playbook = "playbooks/{0}/openshift-cluster/addNodes.yml".format(args.provider) + playbook = "playbooks/{0}/openshift-cluster/add_nodes.yml".format(args.provider) inventory = self.setup_provider(args.provider) cluster['num_nodes'] = args.nodes @@ -321,13 +321,13 @@ if __name__ == '__main__': create_parser.set_defaults(func=cluster.create) - create_parser = action_parser.add_parser('addNodes', help='Add nodes to a cluster', + create_parser = action_parser.add_parser('add-nodes', 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) + create_parser.set_defaults(func=cluster.add_nodes) config_parser = action_parser.add_parser('config', diff --git a/bin/openshift_ansible/awsutil.py b/bin/openshift_ansible/awsutil.py index e03c0ab15..3639ef733 100644 --- a/bin/openshift_ansible/awsutil.py +++ b/bin/openshift_ansible/awsutil.py @@ -89,7 +89,7 @@ class AwsUtil(object): def get_host_types(self): """Searches for host-type tags in the inventory and returns all host-types found.""" - pattern = re.compile(r'^oo_host-type_(.*)') + pattern = re.compile(r'^oo_hosttype_(.*)') host_types = [] inv = self.get_inventory() @@ -177,19 +177,20 @@ class AwsUtil(object): def gen_clusterid_tag(clu): """Generate the clusterid tag """ - return "tag_clusterid_%s" % clu + return "oo_clusterid_%s" % clu @staticmethod def gen_env_tag(env): """Generate the environment tag """ - return "tag_environment_%s" % env + return "oo_environment_%s" % env - def gen_host_type_tag(self, host_type): + def gen_host_type_tag(self, host_type, version): """Generate the host type tag """ - host_type = self.resolve_host_type(host_type) - return "tag_host-type_%s" % host_type + if version == '2': + host_type = self.resolve_host_type(host_type) + return "oo_hosttype_%s" % host_type # This function uses all of these params to perform a filters on our host inventory. # pylint: disable=too-many-arguments @@ -226,7 +227,7 @@ class AwsUtil(object): retval.intersection_update(env_hosts) if host_type: - retval.intersection_update(inv.get(self.gen_host_type_tag(host_type), [])) + retval.intersection_update(inv.get(self.gen_host_type_tag(host_type, version), [])) if version != 'all': retval.intersection_update(inv.get(AwsUtil.gen_version_tag(version), [])) @@ -16,6 +16,7 @@ Options: -c CLUSTER, --cluster CLUSTER which cluster to use -e ENV, --env ENV which environment to use + --v3 When working with v3 environments. v2 by default -t HOST_TYPE, --host-type HOST_TYPE which host type to use --list-host-types list all of the host types @@ -72,6 +72,8 @@ class Ossh(object): parser.add_argument('-o', '--ssh_opts', action='store', help='options to pass to SSH.\n \ "-oForwardX11=yes,TCPKeepAlive=yes"') + parser.add_argument('-A', default=False, action="store_true", + help='Forward authentication agent') parser.add_argument('host', nargs='?', default='') self.args = parser.parse_args() @@ -177,6 +179,9 @@ class Ossh(object): if self.user: ssh_args.append('-l%s' % self.user) + if self.args.A: + ssh_args.append('-A') + if self.args.verbose: ssh_args.append('-vvv') |