Bug 1009869

Summary: Documentation does not make allowances for connecting to multiple OSE Environments
Product: OpenShift Container Platform Reporter: Arthur Enright <aenright>
Component: DocumentationAssignee: Julie <juwu>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.2.0CC: aenright, bleanhar, ecs-bugs, jokerman, libra-onpremise-devel, lmeyer, mmccomas
Target Milestone: ---Flags: juwu: needinfo-
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-07 06:15:06 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:

Description Arthur Enright 2013-09-19 11:28:48 UTC
Description of problem: Once rhc (or eclipse plugin) is registered to an instance of OpenShift (online or Enterprise) it is not aware of or easily configured to connect to another instance.  A perfect case is if a user has been using OpenShift On-line and then tries to configure RHC for use of an on-premise OpenStack Enterprise stack it causes errors/issues.


Version-Release number of selected component (if applicable): OpenShift On-prem/Enterprise 1.2


How reproducible: 100%


Steps to Reproduce:
1. Configure RHC / Eclipse plugin to use OpenShift On-line
2. Try and configure same workstation to use OpenShift on-prem/Enterprise
3. Try and figure out the error messages

Actual results: You have to blow away your on-line config and re-configure for Enterprise


Expected results: Would like to document this clearly the process for switching between On-line and Enterprise and/or between different Enterprise instances.


Additional info: Will file an RFE to extend functionality/wizard to understand multiple environments.  Support case 0093509 can be referenced as well.

Comment 2 Arthur Enright 2013-09-19 12:04:14 UTC
Correction, reference case is 00930509

Comment 3 Julie 2013-11-27 01:01:46 UTC
(In reply to Arthur Enright from comment #0)
> Description of problem: Once rhc (or eclipse plugin) is registered to an
> instance of OpenShift (online or Enterprise) it is not aware of or easily
> configured to connect to another instance.  A perfect case is if a user has
> been using OpenShift On-line and then tries to configure RHC for use of an
> on-premise OpenStack Enterprise stack it causes errors/issues.
> 
> 
> Version-Release number of selected component (if applicable): OpenShift
> On-prem/Enterprise 1.2
> 
> 
> How reproducible: 100%
> 
> 
> Steps to Reproduce:
> 1. Configure RHC / Eclipse plugin to use OpenShift On-line
> 2. Try and configure same workstation to use OpenShift on-prem/Enterprise
> 3. Try and figure out the error messages
> 
> Actual results: You have to blow away your on-line config and re-configure
> for Enterprise
> 
> 
> Expected results: Would like to document this clearly the process for
> switching between On-line and Enterprise and/or between different Enterprise
> instances.
> 
> 
> Additional info: Will file an RFE to extend functionality/wizard to
> understand multiple environments.  Support case 0093509 can be referenced as
> well.

Hey Arthur,
     I cannot find support case 00930509 (https://access.redhat.com/support/cases/list/all/) 
Can you link me to it? 

Please also give me any additional information you have on what you want documented. 

Many thanks,
Julie

Comment 4 Luke Meyer 2014-01-20 13:00:05 UTC
It is possible to switch between servers with:

rhc setup --server broker.example.com

However I think I have seen a better way to maintain multiple profiles at the same time in a single config and select one without blowing the others away.

Comment 5 Luke Meyer 2014-02-07 13:53:12 UTC
I cannot speak for how the Eclipse plugin works; I would expect it has a way to set up different OpenShift profiles.

rhc has some helpful options to make switching between servers and accounts fairly painless using config profiles.

It works like so:

1. By default, when you run rhc it uses ~/.openshift/express.conf.

2. However, you can pass rhc the --conf <profile> option to use a different file ~/.openshift/<profile>.conf. For example, "rhc --conf=online" will create and use the file ~/.openshift/online.conf. Create an alias for this command in your shell of choice if you don't want to type it out every time.

3. Another way to keep from having to (think about and) type this out every time is to set it in the environment variable OPENSHIFT_CONFIG. This may be shell-dependent, but under bash, you could switch profiles using "export OPENSHIFT_CONFIG=<profile>" and then rhc would use that profile as long as you were in that shell. You could do the same in your .bash_profile in order to make it the default for every new shell.

4. It's important to note that for each new profile, you need to run "rhc setup" once to get set up. If the server is not OpenShift Online, then you need to specify the server desired with --server. Your login is also stored in the profile, so it could be helpful to have different profiles for different logins on the same server. You can always re-run "rhc setup --server=<host>" or "rhc setup -l <login>" to change the setup in a profile if needed, but for switching between servers or logins that are used frequently, it is easiest to create and use separate profiles.

Comment 7 Luke Meyer 2014-02-07 15:51:45 UTC
Apologies, in 2. --conf <profile> does not really work as I described. It requires the actual file name, so e.g.:

rhc --config=~/.openshift/online.conf setup

... which is rather more typing (and it has to have the "=" in there, won't work with a space like most options). OPENSHIFT_CONFIG does work as I described, though.

Comment 12 Julie 2014-02-24 04:34:01 UTC
Thanks Luke.

To QE,
   Please see comment10. 10.7 updated as per Luke's feedback in comment11.