summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-04-01 13:20:33 -0400
committerBrenton Leanhardt <bleanhar@redhat.com>2016-04-01 13:20:33 -0400
commitff86a5d3e4caa6eaba2d77833278998105bd9fd0 (patch)
tree3faba09a64ef1f3d0fd64d91093b38b916e2837d
parentc8f5f05df668eaa6502b17fed9dc8099e7fab258 (diff)
parent51b2ebf46694e0dc51ef56985a54112ed3933017 (diff)
downloadopenshift-ff86a5d3e4caa6eaba2d77833278998105bd9fd0.tar.gz
openshift-ff86a5d3e4caa6eaba2d77833278998105bd9fd0.tar.bz2
openshift-ff86a5d3e4caa6eaba2d77833278998105bd9fd0.tar.xz
openshift-ff86a5d3e4caa6eaba2d77833278998105bd9fd0.zip
Merge pull request #1650 from lhuard1A/ssh_pipelining
Enable Ansible ssh pipelining to speedup deployment
-rwxr-xr-xbin/cluster15
-rw-r--r--playbooks/openstack/openshift-cluster/files/heat_stack.yaml4
-rw-r--r--playbooks/openstack/openshift-cluster/files/user-data6
3 files changed, 25 insertions, 0 deletions
diff --git a/bin/cluster b/bin/cluster
index ecb8bc58e..fcab685ef 100755
--- a/bin/cluster
+++ b/bin/cluster
@@ -34,6 +34,8 @@ class Cluster(object):
os.environ['ANSIBLE_HOST_KEY_CHECKING'] = 'False'
# TODO: A more secure way to proceed would consist in dynamically
# retrieving the ssh host public keys from the IaaS interface
+ if 'ANSIBLE_SSH_PIPELINING' not in os.environ:
+ os.environ['ANSIBLE_SSH_PIPELINING'] = 'True'
def get_deployment_type(self, args):
"""
@@ -284,7 +286,20 @@ if __name__ == '__main__':
cluster = Cluster()
parser = argparse.ArgumentParser(
+ formatter_class=argparse.RawDescriptionHelpFormatter,
description='Python wrapper to ensure proper configuration for OpenShift ansible playbooks',
+ epilog='''\
+This wrapper is overriding the following ansible variables:
+
+ * ANSIBLE_SSH_ARGS:
+ If not set in the environment, this wrapper will use the following value:
+ `-o ForwardAgent=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=600s`
+ If set in the environment, the environment variable value is left untouched and used.
+
+ * ANSIBLE_SSH_PIPELINING:
+ If not set in the environment, this wrapper will set it to `True`.
+ If you experience issue with Ansible ssh pipelining, you can disable it by explicitely set this environment variable to `False`.
+'''
)
parser.add_argument('-v', '--verbose', action='count',
help='Multiple -v options increase the verbosity')
diff --git a/playbooks/openstack/openshift-cluster/files/heat_stack.yaml b/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
index af774aa32..dd6a22cbe 100644
--- a/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
+++ b/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
@@ -598,6 +598,10 @@ resources:
template: |
#cloud-config
write_files:
+ - path: /etc/sudoers.d/00-openshift-no-requiretty
+ permissions: 440
+ content: |
+ Defaults:openshift !requiretty
- path: /etc/sysconfig/network-scripts/ifcfg-eth0
content: |
DEVICE="eth0"
diff --git a/playbooks/openstack/openshift-cluster/files/user-data b/playbooks/openstack/openshift-cluster/files/user-data
index e789a5b69..eb65f7cec 100644
--- a/playbooks/openstack/openshift-cluster/files/user-data
+++ b/playbooks/openstack/openshift-cluster/files/user-data
@@ -5,3 +5,9 @@ system_info:
default_user:
name: openshift
sudo: ["ALL=(ALL) NOPASSWD: ALL"]
+
+write_files:
+ - path: /etc/sudoers.d/00-openshift-no-requiretty
+ permissions: 440
+ content: |
+ Defaults:openshift !requiretty