summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cli/templates
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-07-18 12:45:35 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-07-21 12:06:33 -0300
commitca7767eab6674737a117a09f7f456b7918cffecf (patch)
treea61dd4214796431eff590a93a7e6211b515c7fe1 /roles/openshift_cli/templates
parent3a71ccde5c1a0324648516f761515c09bc461be3 (diff)
downloadopenshift-ca7767eab6674737a117a09f7f456b7918cffecf.tar.gz
openshift-ca7767eab6674737a117a09f7f456b7918cffecf.tar.bz2
openshift-ca7767eab6674737a117a09f7f456b7918cffecf.tar.xz
openshift-ca7767eab6674737a117a09f7f456b7918cffecf.zip
Copy openshift binaries instead of using wrapper script.
For containerized masters, we previously create a wrapper script to run the docker CLI image and clean up afterward, but this approach is much slower than having the binary on the native system. Instead we now use an ansible module to handle the logic of syncing the various OpenShift binaries and symlinks for client tools out onto the host. The module will correctly report changed if modifications were needed. Substantial speed improvement for containerized installs which requires many openshift/oc commands.
Diffstat (limited to 'roles/openshift_cli/templates')
-rw-r--r--roles/openshift_cli/templates/openshift.j228
1 files changed, 0 insertions, 28 deletions
diff --git a/roles/openshift_cli/templates/openshift.j2 b/roles/openshift_cli/templates/openshift.j2
deleted file mode 100644
index 7786acead..000000000
--- a/roles/openshift_cli/templates/openshift.j2
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-if [ ! -d ~/.kube ]; then
- mkdir -m 0700 ~/.kube
-fi
-cmd=`basename $0`
-user=`id -u`
-group=`id -g`
-image_tag="{{ openshift_image_tag }}"
-
->&2 echo """
-================================================================================
-ATTENTION: You are running ${cmd} via a wrapper around 'docker run {{ openshift.common.cli_image }}:${image_tag}'.
-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 %}
-=================================================================================
-"""
-
-if [ -n "$image_tag" ]; then
- image_tag=":$image_tag"
-fi
-
-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 }}${image_tag} "${@}"