summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-04-14 09:59:30 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-04-14 09:59:30 -0400
commitc85e91fdca031eba06481a24f74aa076ae9a4d38 (patch)
treeb31bef5d7776f73d83a89309ed46418335ea81b3
parenteb64f8f819139e3901b032a4f2bfa53a3189531e (diff)
parent187e11209d0b7494ffacbabde569c14a8d0ebe2f (diff)
downloadopenshift-c85e91fdca031eba06481a24f74aa076ae9a4d38.tar.gz
openshift-c85e91fdca031eba06481a24f74aa076ae9a4d38.tar.bz2
openshift-c85e91fdca031eba06481a24f74aa076ae9a4d38.tar.xz
openshift-c85e91fdca031eba06481a24f74aa076ae9a4d38.zip
Merge pull request #152 from net-engine/aws_readme
Launch openshift on AWS issues
-rw-r--r--README_AWS.md22
-rw-r--r--playbooks/aws/openshift-cluster/launch_instances.yml3
2 files changed, 22 insertions, 3 deletions
diff --git a/README_AWS.md b/README_AWS.md
index e877f34c6..37f4c5f51 100644
--- a/README_AWS.md
+++ b/README_AWS.md
@@ -14,7 +14,7 @@ Create a credentials file
export AWS_ACCESS_KEY_ID='AKIASTUFF'
export AWS_SECRET_ACCESS_KEY='STUFF'
```
-1. source this file
+2. source this file
```
source ~/.aws_creds
```
@@ -23,7 +23,7 @@ Note: You must source this file in each shell that you want to run cloud.rb
(Optional) Setup your $HOME/.ssh/config file
-------------------------------------------
-In case of a cluster creation, or any other case where you don't know the machine hostname in advance, you can use '.ssh/config'
+In case of a cluster creation, or any other case where you don't know the machine hostname in advance, you can use '.ssh/config'
to setup a private key file to allow ansible to connect to the created hosts.
To do so, add the the following entry to your $HOME/.ssh/config file and make it point to the private key file which allows you to login on AWS.
@@ -34,6 +34,24 @@ Host *.compute-1.amazonaws.com
Alternatively, you can configure your ssh-agent to hold the credentials to connect to your AWS instances.
+(Optional) Choose where the cluster will be launched
+----------------------------------------------------
+
+By default, a cluster is launched with the following configuration:
+
+- Instance type: m3.large
+- AMI: ami-307b3658
+- Region: us-east-1
+- Keypair name: libra
+- Security group: public
+
+If needed, these values can be changed by setting environment variables on your system.
+
+- export ec2_instance_type='m3.large'
+- export ec2_ami='ami-307b3658'
+- export ec2_region='us-east-1'
+- export ec2_keypair='libra'
+- export ec2_security_group='public'
Install Dependencies
--------------------
diff --git a/playbooks/aws/openshift-cluster/launch_instances.yml b/playbooks/aws/openshift-cluster/launch_instances.yml
index e4d5952fd..9d645fbe5 100644
--- a/playbooks/aws/openshift-cluster/launch_instances.yml
+++ b/playbooks/aws/openshift-cluster/launch_instances.yml
@@ -5,6 +5,7 @@
machine_region: "{{ lookup('env', 'ec2_region')|default('us-east-1', true) }}"
machine_keypair: "{{ lookup('env', 'ec2_keypair')|default('libra', true) }}"
created_by: "{{ lookup('env', 'LOGNAME')|default(cluster, true) }}"
+ security_group: "{{ lookup('env', 'ec2_security_group')|default('public', true) }}"
env: "{{ cluster }}"
host_type: "{{ type }}"
env_host_type: "{{ cluster }}-openshift-{{ type }}"
@@ -14,7 +15,7 @@
state: present
region: "{{ machine_region }}"
keypair: "{{ machine_keypair }}"
- group: ['public']
+ group: "{{ security_group }}"
instance_type: "{{ machine_type }}"
image: "{{ machine_image }}"
count: "{{ instances | oo_len }}"