summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cli/templates
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-01-07 13:16:38 -0500
committerScott Dodson <sdodson@redhat.com>2016-01-07 13:16:38 -0500
commit635df52db7ed51593135f53feae1cf7d48ad2a71 (patch)
tree40343e729f6e73b377ed601eb5e7b94592ad5a2e /roles/openshift_cli/templates
parente807b15822a68aed9ed8d1c07a3b623bd4ad8cc3 (diff)
downloadopenshift-635df52db7ed51593135f53feae1cf7d48ad2a71.tar.gz
openshift-635df52db7ed51593135f53feae1cf7d48ad2a71.tar.bz2
openshift-635df52db7ed51593135f53feae1cf7d48ad2a71.tar.xz
openshift-635df52db7ed51593135f53feae1cf7d48ad2a71.zip
Add a banner to CLI wrapper instructing users that it's only for bootstrapping
Also remove -a STDIN,STDOUT,STDERR that's the default
Diffstat (limited to 'roles/openshift_cli/templates')
-rw-r--r--roles/openshift_cli/templates/openshift.j216
1 files changed, 15 insertions, 1 deletions
diff --git a/roles/openshift_cli/templates/openshift.j2 b/roles/openshift_cli/templates/openshift.j2
index d773e9b1c..a7c148a22 100644
--- a/roles/openshift_cli/templates/openshift.j2
+++ b/roles/openshift_cli/templates/openshift.j2
@@ -6,4 +6,18 @@ cmd=`basename $0`
user=`id -u`
group=`id -g`
-docker run -i -a STDERR -a STDOUT -a STDIN --privileged --net=host --user=${user}:${group} -v ~/.kube:/root/.kube -v /tmp:/tmp -v {{ openshift.common.config_base}}:{{ openshift.common.config_base }} -e KUBECONFIG=/root/.kube/config --entrypoint ${cmd} --rm {{ openshift.common.cli_image }} "${@}"
+>&2 echo """
+================================================================================
+ATTENTION: You are running ${cmd} via a wrapper around 'docker run {{ openshift.common.cli_image }}'.
+This wrapper is intended only to be used to bootstrap an environment. Please
+install client tools on another host once you have granted cluster-admin
+privileges to a user.
+{% if openshift.common.deployment_type in ['openshift-enterprise','atomic-enterprise'] %}
+See https://docs.openshift.com/enterprise/latest/cli_reference/get_started_cli.html
+{% else %}
+See https://docs.openshift.org/latest/cli_reference/get_started_cli.html
+{% endif %}
+=================================================================================
+"""
+
+docker run -i --privileged --net=host --user=${user}:${group} -v ~/.kube:/root/.kube -v /tmp:/tmp -v {{ openshift.common.config_base}}:{{ openshift.common.config_base }} -e KUBECONFIG=/root/.kube/config --entrypoint ${cmd} --rm {{ openshift.common.cli_image }} "${@}"