diff options
author | Akram Ben Aissi <akram@free.fr> | 2014-12-11 13:52:16 +0100 |
---|---|---|
committer | Akram Ben Aissi <akram@free.fr> | 2014-12-12 09:17:07 +0100 |
commit | f929f3f94c7c89e40f9c8e2b85293f496101aebe (patch) | |
tree | dff6a02b0883306ef42a7b1721298bc03962d710 /cluster.sh | |
parent | 95ae631e6e5f2230a912d65d7add0178e7878079 (diff) | |
download | openshift-f929f3f94c7c89e40f9c8e2b85293f496101aebe.tar.gz openshift-f929f3f94c7c89e40f9c8e2b85293f496101aebe.tar.bz2 openshift-f929f3f94c7c89e40f9c8e2b85293f496101aebe.tar.xz openshift-f929f3f94c7c89e40f9c8e2b85293f496101aebe.zip |
Adding AWS support to openshift-ansible module
- Update documentation to say that ssh configuration need to point to the private key file
- Removing the -p argument when calling time .... because it is misintrepreted by ruby
- Turning the cluster.sh to agnostic in its help/error message by replacing explicit reference to GCE by a a variable
- Fixing a bug within the playbooks that incorrectly references the minions and master fact group.
- Adding playbooks for AWS, which are almost of copy/paste for those of GCE
- Added environment variable OO_PROVIDER to allow definition of the provider. Defaults is gce
- TODO implement the terminate.yml cookbook
Diffstat (limited to 'cluster.sh')
-rwxr-xr-x | cluster.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/cluster.sh b/cluster.sh index 035602620..73c87eb95 100755 --- a/cluster.sh +++ b/cluster.sh @@ -2,7 +2,16 @@ MINIONS=3 MASTERS=1 -PROVIDER=gce + +# If the environment variable OO_PROVDER is defined, it used for the provider +PROVIDER=$OO_PROVIDER +# Otherwise, default is gce (Google Compute Engine) +if [ "x$PROVIDER" == "x" ];then + PROVIDER=gce +fi + +UPPER_CASE_PROVIDER=$(echo $PROVIDER | tr '[:lower:]' '[:upper:]') + # FIXME: Add options MASTER_PLAYBOOK=openshift-master @@ -12,10 +21,10 @@ MINION_PLAYBOOK=openshift-minion # @formatter:off function usage { cat 1>&2 <<-EOT - ${0} : [create|terminate|update|list] {GCE environment tag} + ${0} : [create|terminate|update|list] { ${UPPER_CASE_PROVIDER} environment tag} Supported environment tags: - $(grep 'SUPPORTED_ENVS.*=' ./lib/gce_command.rb) + $(grep 'SUPPORTED_ENVS.*=' ./lib/${PROVIDER}_command.rb) EOT } # @formatter:on |