From the command line
If you'd like to use our powerful command line client, the steps below will get you installed and running in minutes.
The OpenShift client tools are packaged as a Ruby Gem. To run OpenShift on your platform, you'll need Ruby 1.8.7 or newer, the ability to install a gem (on Linux this will require root access), and the Git version control tool. More details are available about installing the client tools in the Developer Center.
1. Install the client tools
To update to the latest version of the client tools, use the gem update command:
$ sudo gem update rhc
2. Setup your environment
Using your OpenShift login and password, run
rhc setupto connect to OpenShift and create a unique namespace for your applications.
$ rhc setup Starting Interactive Setup for OpenShift's command line interface We'll help get you setup with just a couple of questions. To connect to openshift.redhat.com enter your OpenShift login (email or Red Hat login id):
The wizard will help you upload your SSH keys so you can communicate with Git, check to see if you are missing any required configuration, and then help you create a domain name. On OpenShift, domain names make up part of your app's url. They are also unique across all OpenShift users so choose wisely and be creative!
3. Create your first application
Now you can create an application.
$ rhc app create -a myapp -t php-5.3 Password: (type... type... type...)
This will create a remote git repository for your application, and clone it locally in your current directory.
4. Make a change, publish
Getting an application running is only the first step. Now you are on the road to making it your own. Here's an example for the php framework.
$ cd myapp $ vim php/index.php (Make a change... :wq) $ git commit -a -m "My first change" $ git push
Use whichever IDE or editor works best for you. Chances are, it'll have git support. Even if it doesn't, you're just two simple commands away from glory!
Now, check your URL - your change will be live.
5. Next steps
While this has gotten you started, there is a lot more information out there to really get you going. Check out the following pages for videos, blogs, and tutorials: