Bug 1673316

Summary: Openshift installer does not ask for AWS credentials while installation
Product: OpenShift Container Platform Reporter: Arnab Ghosh <arghosh>
Component: InstallerAssignee: Alex Crawford <crawford>
Installer sub component: openshift-installer QA Contact: Johnny Liu <jialiu>
Status: CLOSED NOTABUG Docs Contact:
Severity: low    
Priority: unspecified CC: erich
Version: 4.1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-18 19:49:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1664187    

Description Arnab Ghosh 2019-02-07 11:20:00 UTC
Description of problem:

Openshift installer does not ask for `access key id` and `secret access key` during installation. However installation finished without an error and cluster deployed in my AWS environment.

~~~
[user@user ocp4]$ ./openshift-install create cluster
? SSH Public Key <none>
? Platform aws
? Region ap-southeast-2
? Base Domain aws.cee.redhat.com
? Cluster Name arnabghosh
? Pull Secret [? for help] **
~~~

Version-Release number of the following components:

- Openshift Container Platform 4.0
- Openshift Installer 0.12.0

How reproducible:

Always

Steps to Reproduce:
1. Occurs when a same user tries to install OCP 4.0 twice  
2.
3.

Actual results:

~~~
[user@user ocp4]$ ./openshift-install create cluster
? SSH Public Key <none>
? Platform aws
? Region ap-southeast-2
? Base Domain aws.cee.redhat.com
? Cluster Name arnabghosh
? Pull Secret [? for help] **
~~~

Expected results:

~~~
[user@user ocp4]$ ./openshift-install create cluster
? SSH Public Key <none>
? Platform aws
? AWS Access Key ID ********************
? AWS Secret Access Key [? for help] ****************************************
INFO Writing AWS credentials to "/home/arghosh/.aws/credentials" (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) 
? Region ap-southeast-2
? Base Domain aws.cee.redhat.com
? Cluster Name arnabghosh
? Pull Secret [? for help] **
~~~

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Eric Rich 2019-02-18 19:22:37 UTC
The installer checks for an existing AWS CLI profile in: 

> $HOME/.aws/credentials

If it finds that it uses those credentials! I am not sure this is a bug!

Comment 2 Alex Crawford 2019-02-18 19:49:58 UTC
That's correct. Like most AWS tools, the installer respects AWS_ environment variables and reads credentials from your ~/.aws directory.