Skip to main content

Redhat's OpenShift Cloud Experience

Redhat's OpenShift project describes itself "OpenShift is Red Hat's free, auto-scaling Platform as a Service (PaaS) for applications. As an application platform in the cloud, OpenShift manages the stack so you can focus on your code."
OpenShift uses the Secure Shell (SSH) network protocol to manage your cloud environmentI will give some example commands and results. Cygwin terminal can be used on windows systems. I want to create a namespace and application.

$ rhc domain create -n testspace -l <testuser> -p <testpass>
OpenShift key found at /home/testuser/.ssh/libra_id_rsa. Reusing...
Problem reported from server. Response code was 400.
Re-run with -d for more information.
RESULT:
User already has a domain associated. Update the domain to modify.

That's because a namespace was created when i sign up for an account using web console from openshift.redhat.com.

$ rhc domain show -l <testuser> -p <testpass>
User Info
=========
Namespace: testspace
RHLogin: testuser
Application Info
================
testapp
Framework: php-5.3
Creation: 2012-05-31T06:32:16-04:00
UUID: ecb1312e21ce44a0ae73a6cbb2d24cc9
Git URL: ssh://asd1312es4a0ae33a6sdfsdf2v666@testapp-testspace.rhcloud.com/~/git/testapp.git/
Public URL: http://testapp-testspace.rhcloud.com/
Embedded:
None

I want to delete existing namespace and create a new one.
$ rhc app destroy -a testapp -l <testuser> -p <testpass>
!!!! WARNING !!!! WARNING !!!! WARNING !!!!
You are about to destroy the testapp application.
This is NOT reversible, all remote data for this application will be removed.
Do you want to destroy this application (y/n): y
RESULT:
Successfully destroyed application: testapp
$ rhc domain destroy -n testspace -l <testuser> -p <testpass>
Success

$ rhc domain create -n newspace -l <testuser> -p <testpass>
OpenShift key found at /home/testuser/.ssh/libra_id_rsa. Reusing...
Problem reported from server. Response code was 500.
Re-run with -d for more information.
MESSAGES:
We are currently experiencing some intermittent technical difficulties with our authentication system. This issue should not affect user applications functionality. We are aware of the problem and working on it. Thank you for patience.
RESULT:
An error occurred while contacting the authentication service. If the problem persists please contact Red Hat support.

Apparently sometimes openshift has technical problems. You can debug it using -d parameter if you want to.
$ rhc domain create -n newspace -d -l <testuser> -p <testpass>
OpenShift key found at /home/testuser/.ssh/libra_id_rsa. Reusing...
Submitting form:
namespace: newspace
rhlogin: testuser
ssh: ZZZZZZASDFK234vdEAAAAAOWEKEBAQCkISDJ345Ahcd71UASDK3ffsDV+jbXYn8SDFKRGF5045gfm34+TEEEnlSDFO++fasd+FDKFKFK33333UYm0BNuQhoEBmojpIuQuc0QCDxDMEmlbphd9rKvekver90nk34n34tnktn45klnt45n4m545nlnMGKGGKNS4345NsDFER+&32&676rFKFJWWJ4585PPWOIWdjdns3ed3DK
key_type: ssh-rsa
Contacting https://openshift.redhat.com
Problem reported from server. Response code was 500.
MESSAGES:
We are currently experiencing some intermittent technical difficulties with our authentication system. This issue should not affect user applications functionality. We are aware of the problem and working on it. Thank you for patience.
DEBUG:
Exit Code: 1
api_c: placeholder
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
API version: 1.1.3
RESULT:
An error occurred while contacting the authentication service. If the problem persists please contact Red Hat support.

Finally technical problem solved.
$ rhc domain create -n newspace -d -l <testuser> -p <testpass>
OpenShift key found at /home/testuser/.ssh/libra_id_rsa. Reusing...
Submitting form:namespace: newspacerhlogin: testuserssh:
ZZZZZZASDFK234vdEAAAAAOWEKEBAQCkISDJ345Ahcd71UASDK3ffsDV+jbXYn8SDFKRGF5045gfm34+TEEEnlSDFO++fasd+FDKFKFK33333UYm0BNuQhoEBmojpIuQuc0QCDxDMEmlbphd9rKvekver90nk34n34tnktn45klnt45n4m545nlnMGKGGKNS4345NsDFER+&32&676rFKFJWWJ4585PPWOIWdjdns3ed3DK
key_type: ssh-rsaContacting https://openshift.redhat.comResponse from server:MESSAGES:We are currently experiencing some intermittent technical difficulties with our authentication system. This issue should not affect user applications functionality. We are aware of the problem and working on it. Thank you for patience.DEBUG:Exit Code: 0broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapiapi_c: placeholderAPI version: 1.1.3Checking ~/.ssh/configCould not find /home/testuser/.ssh/config. This is ok, continuing Adding rhcloud.com to ~/.ssh/configCreation successfulYou may now create an application.

Check domain status.
$ rhc domain status
Password:<testpass>
Analyzing system
Could not open a connection to your authentication agent.
=================================================||
Your system did not pass all of the tests ||=================================================
1) Either ssh-agent is not running or you do not have any keys loaded.

Just start the ssh agent and add rsa key.
$ eval `ssh-agent`
Agent pid 4976
$ ssh-add ~/.ssh/libra_id_rsa
Identity added: /home/testuser/.ssh/libra_id_rsa (/home/testuser/.ssh/libra_id_rsa)

Check domain status again.
$ rhc domain status
Password:<testpass>
Analyzing system.. .....
=========================================================||
Congratulations, your system has passed all tests ||=========================================================

Now it is time to create your own application. 

Comments

Popular posts from this blog

Creating Multiple VLANs over Bonding Interfaces with Proper Routing on a Centos Linux Host

In this post, I am going to explain configuring multiple VLANs on a bond interface. First and foremost, I would like to describe the environment and give details of the infrastructure. The server has 4 Ethernet links to a layer 3 switch with names: enp3s0f0, enp3s0f1, enp4s0f0, enp4s0f1 There are two bond interfaces both configured as active-backup bond0, bond1 enp4s0f0 and enp4s0f1 interfaces are bonded as bond0. Bond0 is for making ssh connections and management only so corresponding switch ports are not configured in trunk mode. enp3s0f0 and enp3s0f1 interfaces are bonded as bond1. Bond1 is for data and corresponding switch ports are configured in trunk mode. Bond0 is the default gateway for the server and has IP address 10.1.10.11 Bond1 has three subinterfaces with VLAN 4, 36, 41. IP addresses are 10.1.3.11, 10.1.35.11, 10.1.40.11 respectively. Proper communication with other servers on the network we should use routing tables. There are three

PowerShell Script for Switching Between Multiple Windows

Windows PowerShell has strong capabilities. I have a separate computer with a big lcd screen in which I am watching regularly some web based monitoring applications. So I need those application windows switch between on a timely basis. Then I wrote this simple powershell script to achieve this. You can change it according to your needs.