+++ This bug was initially created as a clone of Bug #1006067 +++ We have several different OSE deployments now as we've separated pre-production from production, etc. At first, folks were hand-editing rhc's ~/.openshift/express.conf all the time. Now, folks are doing this as a workaround: 1. Copy your existing .openshift/express.conf to new files, one per environment: cp ~/.openshift/express.conf ~/.openshift/express.conf.dev cp ~/.openshift/express.conf ~/.openshift/express.conf.uat 2. Add these aliases to your ~/.bash_profile: alias rhcd="rhc --config=~/.openshift/express.conf.dev" alias rhcu="rhc --config=~/.openshift/express.conf.uat" 3. Use your new commands (after logging out and back in, so your bash_profile takes effect): # SSH to the UAT security service: rhcu ssh security That's a fine workaround, but I'd like to see "rhc account" get extended with something like "--list" and "--set", where "--list" gave you a one-line list of alternate OpenShift account aliases (such as "dev" and "uat", or "default" for initial default settings). "--set" would let you pick a different alias. "rhc setup" should let you pick an alias for those different configs going forward. So the interaction would be something like:: # rhc account --list default dev uat * prod # rhc account --set prod # rhc account --list default dev uat prod *
Would https://trello.com/c/Xl8v9hgm/180-3-i-can-use-rhc-to-manage-applications-across-multiple-openshift-deployments-multi-inst fulfill this RFE?
Yes, that trello card is exactly what is needed to satisfy this RFE.
*** Bug 1009881 has been marked as a duplicate of this bug. ***
Verified on rhc-1.28.5.1-1.el6op.noarch. Steps to verify: There is rhc server command now implemented to configure multiple servers. 1.Could add multiple servers with rhc server: # rhc server add 10.3.8.136 # rhc server add 10.66.78.209 2.Could set nickname for server,such as: # rhc server configure --server 10.3.8.136 --nickname server1 3.Could list all the servers: # rhc server list Server '10.66.78.209' (in use) ------------------------------ Hostname: 10.66.78.209 Login: zyp Use Auth Tokens: true Insecure: true Server 'server1' ---------------- Hostname: 10.3.8.136 Login: test Use Auth Tokens: true Insecure: true 4.Could choose to use listed server: # rhc server use --server server1 Server '10.66.78.209' --------------------- Hostname: 10.66.78.209 Login: zyp Use Auth Tokens: true Insecure: true Server 'server1' (in use) ------------------------- Hostname: 10.3.8.136 Login: test Use Auth Tokens: true Insecure: true When the server is in use, we can run common operations against it.eg control app: # rhc app create testapp php-5.4 # rhc app show testapp --gears ID State Cartridges Size SSH URL ------------------------ ------- ---------- ----- ---------------------------------------------------------- 53e87c8216ae3171a000010f started php-5.4 small 53e87c8216ae3171a000010f.example.com # rhc app delete testapp --confirm Deleting application 'testapp' ... deleted 5.Have configre file server.yml produced in ~/.openshift,and all servers' info is contained in the file. # cat ~/.openshift/server.yml Server '10.66.78.209' --------------------- Hostname: 10.66.78.209 Login: zyp Use Auth Tokens: true Insecure: true Server 'server1' (in use) ------------------------- Hostname: 10.3.8.136 Login: test Use Auth Tokens: true Insecure: true 5.Could show,check staus of servers: # rhc server show server1 Server 'server1' (in use) ------------------------- Hostname: 10.3.8.136 Login: test Use Auth Tokens: true Insecure: true # rhc server status 10.66.78.209 Connected to 10.66.78.209 Using API version 1.6 6.Could remove server not in use from list: # rhc server remove 10.66.78.209 Removing '10.66.78.209' ... done # rhc server list Server 'server1' (in use) ------------------------- Hostname: 10.3.8.136 Login: test Use Auth Tokens: true Insecure: true
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1095.html