Openshift check what contains every gear - openshift

How can I check what contains every gear.
Now I'm using haproxy, mysql and a python web service.
I like to know how check where is every cartridge.

You can use the "rhc app show --gears" command to show which cartridge is installed on which gear (along with other information about them). Or you can use "rhc app show --gears ssh" to show the ssh connection information for all of your gears.

Related

How to run openshift online in Command promt Mac

I have a free trail account of openshift online. I have created an node application and a jenkins pipeline, now I want to add this to github webhooks, so I want to create a webhook. Usually when I use minishift I use oc describe bc/mynode. but how do I connect command prompt to openshift online
From the web console, select the (?) menu top right and then select 'Command Line Tools'. It gives you the command in there to login. You can then use 'oc' commands.
If new to OpenShift, also read the free eBook:
https://www.openshift.com/deploying-to-openshift/
which explains such details.

Openshift Mysql 5.5 cartridge how to access logs?

I need to review the mysql 5.5 server logs but I cannot find a way to get access them via ssh, sftp or mysqlworkbench. The mysql cartridge is in a scaled application. A solution?
There are a couple things here I'd like to point out that should provide some more information on how things work and how to get to the information you're looking for.
Scalable applications with DB's actually have the DB running in a separate gear than the application framework (for scaling purposes). For instance, if you ran rhc app show <appname> --gears for one of your scalable applications you would see that there are 2 gears being used and that the ssh information for each of them is different. So if you're just looking to take a quick look at your logs via ssh, you'll need to ssh into the appropriate gear to get to them.
You will need to use the rhc port-forward command to forward the right local ports to your database gear and then be able to connect mysqlworkbench from there.

Gear to gear connection (Please read the full description first)

I have checked almost all solutions both in Openshift forum and here in stackoverflow but couldn't solve the problem.
Here is the situation
I have a php server with load balancing in one gear.
I have a second gear for mysql server along with PhpMyAdmin. At present OpenShift does not support load balancing for PhpMyAdmin, so my second gear does not have any scaling feature.
Now I want to host a php app in first gear and the database in the second gear. So how do I connect them internally (would be better if I could do it without port forwarding)? I need all the commands from the beginning to the end unfortunately.
Thank you.
You should just add the mysql cartridge to your scaled application. It will still put the mysql database on it's own gear, but it will be accessible from your scaled application using the standard mysql environment variables. You can view those variables by sshing into your application and running env | grep mysql. If you decide to run your own second gear for the mysql database (you still had to install a web cartridge anyways to do that right?) then you will either HAVE to use port forwarding for direct access, or you will have to write an API on that server that will allow your application to access the mysql database.

how to recover credentials of cartridge installation?

is possible to recover the credentials generated during installation? In particular jboss bpm suite' s console and dashboard.
It happens that the creation last longer and i need to refresh the page for this reason i can't get the green frame with all details.
If you have rhc command-line installed, then you can simply do
rhc ssh --app <app_name> --command 'env'
Get to your application console page (through the openshift web ui), grab the ssh connection link (Remote Access) and use it to get a terminal connection open in your application space.
Then type "env" and you should see a bunch of environnement variables, your credentials should be stored in one of them.

How to ssh into HA application gears?

As was explained in the answer to this question: https://stackoverflow.com/questions/11730590/what-are-some-of-the-tricks-to-using-openshift it should be possible to ssh into some of the other gears when using a scaled app with openshift.
Unfortunately the link mentioned there (https://openshift.redhat.com/community/faq/can-i-access-my-applications-gear) seems to be gone.
Via [my app url]/haproxy-status/ I can see the names of the other gears. They are long names like gear-[long number]-[app name]. Using that name I can no longer ssh into them when I'm ssh'ed into the main gear. ssh there just immediately returns without any error.
If I do ssh blala the same thing happened, so it looks like ssh had been replaced by a noop command on the primary gear?
When I examine the haproxy conf file, I see entries like;
server gear-[long number]-[app name] ex-std-node[number].prod.rhcloud.com:[number] check fall 2 ...
I tried ssh'ing into this ext-std-node... address as well, both from the main/primary application gear as well as from my desktop, but it didn't work in both cases.
How can I get shell access to my other gears?
This command shows how to access individual gears:
rhc app show <appname> --gears
The last column of output is the ssh URL. It is of the form $UUID#$UUID-$NAMESPACE.rhcloud.com . You can ssh into them directly, and they are also accessible via ssh from the "head" gear; they have to be, since git pushes are synchronized from the head gear to the others via ssh.