Bug 1009869 - Documentation does not make allowances for connecting to multiple OSE Environments
Documentation does not make allowances for connecting to multiple OSE Environ...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
2.2.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Julie
ecs-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-19 07:28 EDT by Arthur Enright
Modified: 2016-05-25 09:25 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-07 01:15:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
juwu: needinfo-


Attachments (Terms of Use)

  None (edit)
Description Arthur Enright 2013-09-19 07:28:48 EDT
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 08:04:14 EDT
Correction, reference case is 00930509
Comment 3 Julie 2013-11-26 20:01:46 EST
(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 08:00:05 EST
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 08:53:12 EST
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 10:51:45 EST
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-23 23:34:01 EST
Thanks Luke.

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

Note You need to log in before you can comment on or make changes to this bug.