TIPS

sábado, 19 de noviembre de 2016

Directory Environment Variables

Directory environment variables return the directories where an application resides. These variables are always available to the application, regardless of which cartridges the application is using.

Variable Name

Purpose

OPENSHIFT_HOMEDIR

The home directory of the application.

OPENSHIFT_DATA_DIR

A persistent data directory.

OPENSHIFT_REPO_DIR

Repository containing the currently deployed version of the application.

OPENSHIFT_TMP_DIR

A temporary directory you can use; SELinux protects data in this directory from other users.

OPENSHIFT_LOG_DIR

Where all cartridge logs are stored.

Many of these directories are emptied and rebuilt whenever new code is pushed to an application. The only persistent directory is OPENSHIFT_DATA_DIR. Therefore, Red Hat recommends that you store persistent files in the OPENSHIFT_DATA_DIR directory.
referencia: https://developers.openshift.com/managing-your-applications/environment-variables.html#directory-variables

miércoles, 16 de noviembre de 2016

Agrega Llave Pública a tu Aplicación OpenShift Online

1.- Copia al portapapeles tu llave pública.
pbcopy < ~/.ssh/id_rsa.pub

2.- Abre tu aplicación y en la pestaña settings y presiona el botón Add New Key.



2.- Pega tu llave pública y luego presiona  Create.


Listo!!, ahora puedes conectar con tu aplicación via ssh.

martes, 15 de noviembre de 2016

Habilitar Java 8 en OpenShift Online


1.- El primer paso es connectar con tu aplicación via SSH
ssh <user_name>@<application_name>.rhcloud.com

2.- Establecer el siguiente PATH en tu ambiente
export JAVA_HOME=/etc/alternatives/java_sdk_1.8.0
export PATH=$JAVA_HOME/bin:$PATH
NOTA IMPORTANTE: Recuerda que para poder conectar vía SSH necesitas tener una llave pública y que debe estar agregada a tu aplicación, si no sabes como crear una llave pública lo puedes ver aquí.