Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying OPENSHIFT COOKBOOK
  • Table Of Contents Toc
  • Feedback & Rating feedback
OPENSHIFT COOKBOOK

OPENSHIFT COOKBOOK

By : Gulati
3.8 (6)
close
close
OPENSHIFT COOKBOOK

OPENSHIFT COOKBOOK

3.8 (6)
By: Gulati

Overview of this book

If you are a web application developer who wants to use the OpenShift platform to host your next big idea but are looking for guidance on how to achieve this, then this book is the first step you need to take. This is a very accessible cookbook where no previous knowledge of OpenShift is needed.
Table of Contents (14 chapters)
close
close
12
A. Running OpenShift on a Virtual Machine
13
Index

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 [email protected] 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 [email protected]

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

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY