summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkram Ben Aissi <akram@free.fr>2015-01-28 04:14:27 -0500
committerLénaïc Huard <lhuard@amadeus.com>2015-02-19 17:59:44 +0100
commit5090e93a9af43996407dc36f6c2a549d7e83d787 (patch)
tree73eac1fd7049f365744fd6a5723a4b6bb3b3a875
parent81db3db61f911cbbc6ff8f88b90cecb870c41381 (diff)
downloadopenshift-5090e93a9af43996407dc36f6c2a549d7e83d787.tar.gz
openshift-5090e93a9af43996407dc36f6c2a549d7e83d787.tar.bz2
openshift-5090e93a9af43996407dc36f6c2a549d7e83d787.tar.xz
openshift-5090e93a9af43996407dc36f6c2a549d7e83d787.zip
Allows it to run on OSX
- Versions of ruby ported on OSX requires escaping of hyphens in regexp - Adds documentation on packages required by OSX to run openshift-online-ansible on OSX
-rw-r--r--README.md8
-rw-r--r--README_AWS.md5
-rw-r--r--lib/aws_command.rb2
-rw-r--r--lib/gce_command.rb4
4 files changed, 15 insertions, 4 deletions
diff --git a/README.md b/README.md
index 2aa0186f7..a4b708fd9 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,13 @@ Setup
```
yum install -y ansible rubygem-thor rubygem-parseconfig util-linux
```
-
+ - OSX:
+ ```
+ # Install ansible and python 2
+ brew install ansible python
+ # Required ruby gems
+ gem install thor parseconfig
+ ```
- Setup for a specific cloud:
- [AWS](README_AWS.md)
- [GCE](README_GCE.md)
diff --git a/README_AWS.md b/README_AWS.md
index c0f2bce75..fa1ec61ce 100644
--- a/README_AWS.md
+++ b/README_AWS.md
@@ -38,9 +38,14 @@ Alternatively, you can configure your ssh-agent to hold the credentials to conne
Install Dependencies
--------------------
1. Ansible requires python-boto for aws operations:
+RHEL/CentOS/Fedora
```
yum install -y ansible python-boto
```
+OSX:
+```
+ pip install -U boto
+```
Test The Setup
diff --git a/lib/aws_command.rb b/lib/aws_command.rb
index 1205fd5f7..17f33fbed 100644
--- a/lib/aws_command.rb
+++ b/lib/aws_command.rb
@@ -114,7 +114,7 @@ module OpenShift
desc "ssh", "Ssh to an instance"
def ssh(*ssh_ops, host)
- if host =~ /^([\w\d_.-]+)@([\w\d-_.]+)/
+ if host =~ /^([\w\d_.\-]+)@([\w\d\-_.]+)/
user = $1
host = $2
end
diff --git a/lib/gce_command.rb b/lib/gce_command.rb
index b0a84d27b..ac01a7f00 100644
--- a/lib/gce_command.rb
+++ b/lib/gce_command.rb
@@ -137,7 +137,7 @@ module OpenShift
:desc => 'A relative path where files are written to.'
desc "scp_from", "scp files from an instance"
def scp_from(*ssh_ops, host)
- if host =~ /^([\w\d_.-]+)@([\w\d-_.]+)$/
+ if host =~ /^([\w\d_.\-]+)@([\w\d\-_.]+)$/
user = $1
host = $2
end
@@ -169,7 +169,7 @@ module OpenShift
desc "ssh", "Ssh to an instance"
def ssh(*ssh_ops, host)
- if host =~ /^([\w\d_.-]+)@([\w\d-_.]+)/
+ if host =~ /^([\w\d_.\-]+)@([\w\d\-_.]+)/
user = $1
host = $2
end