官术网_书友最值得收藏!

  • OpenShift Cookbook
  • Shekhar Gulati
  • 352字
  • 2021-08-05 17:37:38

Viewing the account details using rhc

In this recipe, you will learn how to view your account details using rhc.

Getting ready

To complete this recipe, you will need to have rhc installed on your machine. Refer to the Installing the OpenShift rhc command-line client recipe for instructions.

How to do it…

To view the account details, run the rhc account command as follows:

$ rhc account

This is all you need to do to view the account details.

How it works…

The rhc account command shows details about the currently logged-in user. When you run the command, it makes a REST call to the OpenShift REST API using the authentication token generated during rhc setup. The REST API returns a JSON response, which rhc will render in a human-readable format:

$ rhc account
Login openshift.cookbook@gmail.com on openshift.redhat.com
----------------------------------------------------------
 ID: 52b8112ae0b8cdc308000018
 Plan: Free
 Gears Used: 0
 Gears Allowed: 3
 Domains Allowed: 1
 Allowed Gear Sizes: small
 SSL Certificates: no

The account details include whom you are logged in as, which OpenShift server you are connected to, your OpenShift user ID, the OpenShift plan you are using, the number of gears as well as the gear size used and allowed, the number of domains allowed, and whether you can use SSL certificates or not.

You can also view the account details in the web console by navigating to the account web page at https://openshift.redhat.com/app/account.

There's more…

You can also view details of any of your other OpenShift accounts by passing the -l or --rhlogin option. The -l or --rhlogin option is a global option available with every command. When you use -l or --rhlogin, you force the rhc client to use the user-specified login:

$ rhc account --rhlogin user@example.com

You can log out from your current session on the server by using the rhc account-logout command. This ends the user's current session and deletes the authorization token files in the .openshift folder at ~/.openshift:

$ rhc account-logout

You can also use rhc logout as a short alternative to rhc account-logout.

See also

  • The Setting up an OpenShift account using rhc recipe
主站蜘蛛池模板: 仁化县| 淅川县| 哈尔滨市| 巫溪县| 项城市| 陇西县| 双牌县| 兴城市| 北京市| 崇仁县| 牟定县| 兴化市| 合肥市| 陆川县| 神农架林区| 海门市| 江西省| 安福县| 柞水县| 新蔡县| 长武县| 溧阳市| 扶风县| 崇仁县| 大庆市| 久治县| 宾阳县| 元阳县| 唐河县| 谷城县| 稻城县| 内黄县| 武胜县| 达日县| 汨罗市| 松滋市| 古交市| 鄂托克前旗| 宜黄县| 贺州市| 定襄县|