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

Running a command in the application's SSH session using rhc


In this recipe, you will learn how to view the gear directory listing without performing SSH into the server using rhc.

Getting ready

To step through this recipe, you will need rhc installed on your machine. Also, we will use the OpenShift application created in the Creating an OpenShift application using the rhc command-line client recipe.

How to do it…

To run the ls command without performing SSH into the application server, you should run the following command:

$ rhc app-ssh --app myapp --command ls

The rhc ssh command is a short hand for rhc app-ssh. Both these commands allow you to SSH into an application gear.

How it works…

The rhc app-ssh command internally uses the SSH command-line client to connect with the application gear. With the SSH command-line client, you can specify the command:

$ ssh [email protected] command

The rhc command-line client provides a --command option that allows you to specify a command you want to run...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

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