<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dolibarr.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gpaint</id>
	<title>Dolibarr ERP CRM Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dolibarr.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gpaint"/>
	<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php/Special:Contributions/Gpaint"/>
	<updated>2026-11-12T07:58:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32679</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32679"/>
		<updated>2014-08-20T20:27:15Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Gears&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para Dolibarr, desde la puesta en marcha, hasta la puesta en producción.&lt;br /&gt;
&lt;br /&gt;
1.- Extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un Cartridge de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos en nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Obtenemos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 33.&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 33.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32678</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32678"/>
		<updated>2014-08-20T20:25:18Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. To extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. To put in production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We obtain the hostname and port of MySQL to connect to Dolibarr database. Top image 33. &lt;br /&gt;
Fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 33.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 18.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control the whole Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32261</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32261"/>
		<updated>2014-05-14T21:07:13Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Gears&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para Dolibarr, desde la puesta en marcha, hasta la puesta en producción.&lt;br /&gt;
&lt;br /&gt;
1.- Extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un Cartridge de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos en nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 33.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32260</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32260"/>
		<updated>2014-05-14T21:06:37Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. To extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. To put in production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 33.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 18.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control the whole Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32259</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32259"/>
		<updated>2014-05-14T21:06:08Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. To extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. To put in production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 33.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 18.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control the whole Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32258</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32258"/>
		<updated>2014-05-14T21:05:00Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Gears&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para Dolibarr, desde la puesta en marcha, hasta la puesta en producción.&lt;br /&gt;
&lt;br /&gt;
1.- Extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un Cartridge de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos en nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 33.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32257</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32257"/>
		<updated>2014-05-14T21:04:35Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Gears&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para Dolibarr, desde la puesta en marcha, hasta la puesta en producción.&lt;br /&gt;
&lt;br /&gt;
1.- Extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un Cartridge de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos en nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 33.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32256</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32256"/>
		<updated>2014-05-14T21:00:59Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Gears&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para Dolibarr, desde la puesta en marcha, hasta la puesta en producción.&lt;br /&gt;
&lt;br /&gt;
1.- Extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un Cartridge de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos en nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 33.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32255</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32255"/>
		<updated>2014-05-14T20:53:15Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Gears&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para Dolibarr, desde la puesta en marcha, hasta la puesta en producción.&lt;br /&gt;
&lt;br /&gt;
1.- Extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un Cartridge de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos en nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32254</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32254"/>
		<updated>2014-05-14T20:47:01Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Gears&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para Dolibarr, desde la puesta en marcha, hasta la puesta en producción.&lt;br /&gt;
&lt;br /&gt;
1.- Extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un Cartridge de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32172</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32172"/>
		<updated>2014-05-08T19:19:45Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. To extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. To put in production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 18.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control the whole Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32171</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32171"/>
		<updated>2014-05-08T19:19:15Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. To extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. To put in production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 18.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control the whole Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32169</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32169"/>
		<updated>2014-05-08T14:43:55Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Gears&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para Dolibarr, desde la puesta en marcha, hasta la puesta en producción.&lt;br /&gt;
&lt;br /&gt;
1.- Extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32168</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32168"/>
		<updated>2014-05-08T14:37:58Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Gears&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para poner en marcha Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1.- Como desarrolladores, nos da la posibilidad de extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Como empresarios, nos da la posibilidad de poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32167</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32167"/>
		<updated>2014-05-08T14:37:20Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños Cartridges&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para poner en marcha Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1.- Como desarrolladores, nos da la posibilidad de extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Como empresarios, nos da la posibilidad de poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32156</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32156"/>
		<updated>2014-05-07T20:14:02Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades y los costos de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños engranajes&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para poner en marcha Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1.- Como desarrolladores, nos da la posibilidad de extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Como empresarios, nos da la posibilidad de poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor [http://en.wikipedia.org/wiki/InnoDB InnoDB], imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL], en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como [http://sourceforge.net/projects/winscp WinSCP] y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare [http://sourceforge.net/projects/heidisql HeidiSQL], que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32155</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32155"/>
		<updated>2014-05-07T20:08:07Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 18.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control the whole Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32154</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32154"/>
		<updated>2014-05-07T20:07:44Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio (PaaS) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades y los costos de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños engranajes&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para poner en marcha Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1.- Como desarrolladores, nos da la posibilidad de extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Como empresarios, nos da la posibilidad de poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de SSH.&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor InnoDB, imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio SSL, en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como WinSCP y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare HeidiSQL, que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 18.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32153</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32153"/>
		<updated>2014-05-07T20:05:10Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio (PaaS) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades y los costos de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños engranajes&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para poner en marcha Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1.- Como desarrolladores, nos da la posibilidad de extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Como empresarios, nos da la posibilidad de poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de SSH.&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor InnoDB, imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio SSL, en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como WinSCP y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare HeidiSQL, que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 41.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32152</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32152"/>
		<updated>2014-05-07T20:01:52Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio (PaaS) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades y los costos de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños engranajes&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para poner en marcha Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1.- Como desarrolladores, nos da la posibilidad de extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Como empresarios, nos da la posibilidad de poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de SSH.&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor InnoDB, imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio SSL, en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como WinSCP y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare HeidiSQL, que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 41.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32151</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32151"/>
		<updated>2014-05-07T20:01:22Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio (PaaS) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades y los costos de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños engranajes&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para poner en marcha Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1.- Como desarrolladores, nos da la posibilidad de extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Como empresarios, nos da la posibilidad de poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de SSH.&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor InnoDB, imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio SSL, en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como WinSCP y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare HeidiSQL, que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 41.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar a ctl_app pero podemos controlar todo el Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Citados aquí www.openshift.com/developers/remote-access donde encontraremos más comandos útiles.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32150</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32150"/>
		<updated>2014-05-07T20:00:03Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio (PaaS) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades y los costos de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños engranajes&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para poner en marcha Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1.- Como desarrolladores, nos da la posibilidad de extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Como empresarios, nos da la posibilidad de poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de SSH.&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor InnoDB, imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio SSL, en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como WinSCP y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare HeidiSQL, que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 41.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;br /&gt;
&lt;br /&gt;
Nota.- También en la parte remota de WinSCP, podemos navegar hacia carpetas como /var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr donde esta físicamente nuestra base de datos o podemos ir a /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs para ver los logs de MySQL.&lt;br /&gt;
&lt;br /&gt;
Si escribimos help, en la ventana de PuTTY, nos mostrará algunos comandos importantes.&lt;br /&gt;
&lt;br /&gt;
Entre los comandos más comunes están:&lt;br /&gt;
&lt;br /&gt;
ctl_app&lt;br /&gt;
Controle su aplicación (MySQL)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32149</id>
		<title>Cloud con Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_con_Redhat_OpenShift_Flex&amp;diff=32149"/>
		<updated>2014-05-07T19:57:43Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Esta página es un tutorial para explicar cómo instalar Dolibarr ERP-CRM en la plataforma Redhat OpenShift Flex www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;haga clic dos veces sobre la imagen que desea agrandar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Un poco sobre OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift plataforma como servicio&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift es Plataforma como Servicio (PaaS) de Red Hat, que permite a los desarrolladores crear rápidamente aplicaciones escalables host,  en un entorno de nube. Con OpenShift tienes elección de ofertas, en línea, en la premisa, y las opciones de proyectos de código abierto.&lt;br /&gt;
&lt;br /&gt;
OpenShift brinda ayuda para  construir y desplegar aplicaciones web, backends móviles, arquitecturas orientadas a servicios, y recibe sus servicios favoritos.&lt;br /&gt;
&lt;br /&gt;
Openshfit trabaja con Gears y Cartridges, que son términos, con los que tendremos que familiarizarnos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Que es un Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Un gear es un contenedor de recursos limitados que ejecuta una o más pilas de software especificados por el usuario, también conocidas como cartridges. Cada gear tiene una cantidad limitada de memoria RAM y espacio en disco.&lt;br /&gt;
Si una aplicación necesita más recursos, puede ser configurado para utilizar automáticamente más gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;¿Cómo trabajan los Gears?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Echemos un vistazo a una aplicación de ejemplo basada en Drupal que se ejecuta en OpenShift. Podemos estimar las necesidades y los costos de la aplicación en las diferentes etapas.&lt;br /&gt;
&lt;br /&gt;
*15 páginas / segundo&lt;br /&gt;
*Cientos de artículos&lt;br /&gt;
*~ 50k visitantes por mes&lt;br /&gt;
*3 pequeños engranajes&lt;br /&gt;
*Plan Libre&lt;br /&gt;
&lt;br /&gt;
Como vemos, un plan libre, puede ser suficiente, para una Empresa pequeña o mediana.&lt;br /&gt;
Para empresas más grandes, se puede cambiar al plan siguiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En OpenShift, tenemos dos posibilidades claras, para poner en marcha Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1.- Como desarrolladores, nos da la posibilidad de extender o crear nuestros propios módulos.&amp;lt;br /&amp;gt;&lt;br /&gt;
2.- Como empresarios, nos da la posibilidad de poner en producción nuestro DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ventajas que nos ofrece OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Es un sitio seguro, al cual se accede a través de SSH.&lt;br /&gt;
&lt;br /&gt;
Es escalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Aplicación escalable, permite a la aplicación reaccionar a los cambios en el tráfico y automáticamente asignar los recursos necesarios para manejar su demanda actual. La infraestructura OpenShift monitorea el tráfico de Internet entrante y automáticamente trae copias de su cartucho de Web en línea para manejar las peticiones.&lt;br /&gt;
&lt;br /&gt;
Nos da control total, sobre nuestra base de datos, para conectarnos remotamente a través de un cliente GUI como HeidySQL.&lt;br /&gt;
&lt;br /&gt;
En caso de decantarnos por MySql, tenemos a disposición, el motor InnoDB, imprescindible para transacciones.&lt;br /&gt;
&lt;br /&gt;
Nos da la posibilidad, de compartir Certificados SSL de RedHat o personalizar nuestro propio SSL, en caso de tenerlo. Imprescindible, para enviar nuestros datos, tanto de logín o de transferencias bancarias, encriptadas y seguras.&lt;br /&gt;
&lt;br /&gt;
Dicho todo esto, comencemos, la puesta en marcha de nuestra aplicación DoliBarr.&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click en SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Rellenamos nuestros datos, para crear una cuenta.&lt;br /&gt;
Click en Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nos enviaran, un email, a nuestra cuenta de correo, para confirmar.&lt;br /&gt;
&lt;br /&gt;
= Cree una instancia =&lt;br /&gt;
&lt;br /&gt;
== Parte 1 - Creando una instancia ==&lt;br /&gt;
&lt;br /&gt;
Click en LOG IN nuevamente y nos mostrara el aspecto inicial de nuestra Consola de Aplicaciones.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Elija un cartucho de programación web&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Busque el tipo de aplicación&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure la aplicación.&lt;br /&gt;
&lt;br /&gt;
Es importante, definir bien el nombre de dominio, para este tutorial, hemos usado sdme. El dominio, no se puede cambiar más a menos que, borremos todas nuestras aplicaciones y empecemos nuevamente de cero y eso es algo que nadie quiere.&lt;br /&gt;
&lt;br /&gt;
También, tendremos que informar, si tenemos un repositorio externo Git, con nuestro código.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aquí viene lo divertido.&lt;br /&gt;
&lt;br /&gt;
En scaling cambiaremos a Scale with web traffic.&lt;br /&gt;
&lt;br /&gt;
La creación de esta aplicación, usara un Gear de los 3 que disponemos, lo indica justamente, al lado del botón Create Application.&lt;br /&gt;
&lt;br /&gt;
Click en Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando la aplicación es escalable, no se puede añadir más Cartridges, al Gear. Por ejemplo sí queremos usar MySql, deberá ir aparte, en otro Gear.&lt;br /&gt;
&lt;br /&gt;
En la imagen, de arriba, vemos  que a nuestro Gear, se ha añadido el balanceador de carga, que hará nuestra aplicación escalable.&lt;br /&gt;
&lt;br /&gt;
Arriba en el extremo derecho, existe también un botón, por si necesitamos reiniciar el Gear.&lt;br /&gt;
&lt;br /&gt;
Nota.- Con PuTTY, podríamos solventar necesidades más explicitas, para controlar nuestros Gears, con línea de comandos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click en el enlace Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy en Acción.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Si vemos nuestra url startdolibarr-sdme.rhcloud.com este es el aspecto inicial, que tiene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parte 2 - Configuración de Herramientas de administración  ==&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo bien. Ahora, pasemos a la segunda parte, de nuestro tutorial.&lt;br /&gt;
&lt;br /&gt;
Para esta parte, que será la referida a la administración de nuestra aplicación, existen dos caminos, el primero es por CLI (línea de comandos basado en Ruby) y el segundo,  de forma más declarativa, por consola y con SSH.&lt;br /&gt;
&lt;br /&gt;
Para este tutorial, he elegido la forma más fácil he intuitiva, que es la segunda opción.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manos a la obra.&lt;br /&gt;
&lt;br /&gt;
Necesitamos un cliente SSH/FTP como WinSCP y PuTTY.&lt;br /&gt;
&lt;br /&gt;
Los Bajamos y los instalamos.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Dentro la carpeta donde se instaló WinSCP, encontraremos la carpeta PuTTY y dentro de esta carpeta, el programa puttygen.exe, este programa es importante, ya que, es el que nos ayudara a generar nuestro acceso SSH, para conectarnos a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doble Click en puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Dejamos los valores por defecto, SSH-2 RSA y el número de bits en 2048.&lt;br /&gt;
&lt;br /&gt;
Con estos valores ya tendremos una key, fuertemente encriptada.&lt;br /&gt;
&lt;br /&gt;
Click en Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Para que genere de nuestra key, debemos mover el puntero del ratón, constantemente en el espacio en blanco del programa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha finalizado la generación de nuestra key, tendremos que poner una passphrase.&lt;br /&gt;
&lt;br /&gt;
Click en Save public key, para guardar nuestra key publica, le damos el nombre de rsa.pub, hacemos lo mismo con Save private key, y le damos el nombre de rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
Una key pública, es como la cerradura de una puerta y la key privada es como la llave que abre esa cerradura.&lt;br /&gt;
&lt;br /&gt;
Marcamos el código generado en el área de texto y lo copiamos, luego nos vamos a nuestra consola de OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Pegamos el código en Paste the contents of your public key file (.pub) y click en Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfecto ahora OpenShift, tiene nuestra cerradura, y nosotros la llave.&lt;br /&gt;
&lt;br /&gt;
Ahora vamos al tab Applications en nuestra consola de OpenShift&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click sobre nuestra aplicación startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click en Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos el código ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Ponemos la primera parte, 53641a41e0b8cdf5ec000b76 antes de la @ en el campo User name, y la segunda parte, startdolibarr-sdme.rhcloud.com después de la @ en el campo Host name.&lt;br /&gt;
&lt;br /&gt;
Es aconsejable no colocar el password/passphrasse, en este punto, por motivos de seguridad. La usaremos más adelante.&lt;br /&gt;
&lt;br /&gt;
Click en Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En Private key file: seleccionamos nuestra clave privada rsa.ppk, click en OK,  click en guardar y click en Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Cuando nos salga esta agradable ventanita click en Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Aquí colocamos nuestra passphrase y click en OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola tenemos acceso vía SSH a nuestro Gear.&lt;br /&gt;
&lt;br /&gt;
En la parte izquierda esta nuestro espacio local y a la derecha el remoto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Enviar archivos de Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Bajamos la versión genérica de Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En la parte remota seleccionamos la ruta&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transferimos la carpeta dolibarr, de nuestra máquina local a Openshift, presionando F5. Este proceso, puede tardar varios minutos, así que mientras esperamos, nos dedicaremos a  crear nuestro Gear, para la base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Volvemos a la consola de OpenShift y con nuestra aplicación seleccionada, hacemos click en la parte inferior, del apartado Databases y seleccionamos Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Nota.- En una aplicación normal sin Scale activado, el Cartridge Mysql se añadiría al Gear actual, pero en nuestro caso, openShift nos informa que se ocupará un nuevo Gear para MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copiamos los credenciales de acceso a MySQL. Los usaremos más adelante, para acceder a nuestra base de datos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Una vez que ha terminado el upload de dolibarr, descrito en la imagen 23. Editamos el file index.php.&lt;br /&gt;
&lt;br /&gt;
Lo abrimos nuestro editor de texto favorito y reemplazamos con el siguiente código.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hacemos una copia del index.php en la carpeta dolibarr y  volvemos a editarlo  y quitamos dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Lo que acabamos de hacer, sirve, para que no se muestre la estructura de nuestros folders y files de dolibarr en el navegador web, con el index.php obligamos a que se redirija al inicio de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Por último y antes de empezar con la configuración de dolibarr, conviene usar SSL (protocolo criptográfico), que nos proporciona seguridad a la hora de enviar nuestros datos desde el Navegador web al servidor. El uso de SSL es para dar un plus extra a las medidas de seguridad propias de dolibarr, que ya son buenas.&lt;br /&gt;
&lt;br /&gt;
Abrimos nuestro editor de textos una vez más y añadimos lo siguiente.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Guardar con el hombre de .htaccess justo al lado de nuestro folder dolibarr y del index.php&lt;br /&gt;
&lt;br /&gt;
Como se muestra en la siguiente imagen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Vemos como el certificado SSL es aceptado por el navegador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Ejecutar el asistente de instalación Dolibarr =&lt;br /&gt;
&lt;br /&gt;
Comenzamos con la configuración  de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
Seleccionamos del desplegable, Default language to use (language code): , el idioma correspondiente y click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Revisamos la imagen 26, cuando creamos el Cartridge MySQL.&lt;br /&gt;
&lt;br /&gt;
Y nos enfocamos en las líneas.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para crear la conexión con la base de datos, OpenShift nos proporciona unas variables de entorno. Para que dolibarr pueda conectarse a la base de datos, necesitamos saber el valor, de estas variables, así que volvamos a WinSCP y en la carpeta .env/mysql encontraremos dichas variables, como se muestra en la imagen de arriba.&lt;br /&gt;
&lt;br /&gt;
Click con el botón derecho sobre OPENSHIFT_MYSQL_DB_HOST, click en edit y nos mostrara el valor que tiene la variable, copiamos y pegamos en el campo Server como se muestra en la imagen de abajo. Hacemos lo mismo para la variable OPENSHIFT_MYSQL_DB_PORT y pegamos su valor en el  campo Port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Nota.- Para cuando sigan estos pasos, el host y el puerto, para su instalación particular, debería ser diferente, al mostrado en este ejemplo.&lt;br /&gt;
&lt;br /&gt;
Nota2.- En este pasó, también podríamos crear una Base de datos diferente y un propietario diferente, ya que poseemos las credenciales de súper usuario de MySQL, pero este paso no lo tocaremos aquí hoy.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y nos muestra la siguiente ventana.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla, básicamente nos informa que, la conexión a la base de datos se ha establecido y que se ha guardado esta información, en el file de configuración de dolibarr conf.php.&lt;br /&gt;
&lt;br /&gt;
Click en Next Step y comenzará la creación de las tablas en la base de datos, necesarias para el trabajo de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Esta pantalla informa que, ha terminado la creación de las tablas.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos con el username y password, del que será el administrador, para este ejemplo he usado admin/admin. Para el caso real debería ser un password más fuerte.&lt;br /&gt;
&lt;br /&gt;
Click en Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click en Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Introducimos el username y password del administrador, definido anteriormente y Viola. Estamos dentro de DoliBarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Apéndice: MySQL conexión remota =&lt;br /&gt;
&lt;br /&gt;
Como paso final, veremos la conexión, desde un cliente local de Base de datos, hasta nuestro MySQL remoto.&lt;br /&gt;
&lt;br /&gt;
Para este ejemplo usare HeidiSQL, que sirve tanto para base de datos MySQL o PostgreSQL y es Gratuito.&lt;br /&gt;
&lt;br /&gt;
Abrimos HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
Lo primero que debemos hacer es seleccionar MySQL (SSH tunnel) del desplegable Network type, al hacer esto, HeidiSQL añade un nuevo tab llamado SSH tunnel, como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tenga en cuenta que, en el campo plink.exe location: de deberá especificar la ruta de PuTTY.exe, en el campo Password introducidos la passphrase y el campo Local Port debe estar siempre en 3307.&lt;br /&gt;
&lt;br /&gt;
Volvemos al tab Settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Llenamos los campos, con las credenciales de la base de datos, seleccionamos la base de datos y click en guardar y en Open para probar la conexión.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Y con esto terminamos este tutorial.&lt;br /&gt;
&lt;br /&gt;
== Adición ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conexión al Gear MySQL ===&lt;br /&gt;
&lt;br /&gt;
Recordaréis cuando obtuvimos el hostname y el port, de MySQL, para conectar DoliBarr a la Base de datos. Arriba en la imagen 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
La primera parte del Host name: es también el User name: 5364c670e0b8cd09f500036d-sdme.rhcloud.com damos click en Advanced y verificamos, que todo este como en la imagen 41.&lt;br /&gt;
&lt;br /&gt;
Click en Save y click en Login.&lt;br /&gt;
&lt;br /&gt;
Con WinSCP abierto, vamos al menú Options --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications como se muestra en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
En el campo PuTTY/terminal client path: seleccionamos la ruta, donde tenemos el putty.exe y marcamos los tres CheckBoxes. Cada vez que iniciemos sesión con WinSCP también se iniciará sesión en PuTTY. Como vemos en la imagen de abajo.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Tener PuTTY abierto y conectado a la misma sesión, nos permitirá ejecutar sentencias de línea de comandos, para parar o arrancar el Gear o el servidor MySQL.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Preferences_winscp_run_putty.JPG&amp;diff=32148</id>
		<title>File:Preferences winscp run putty.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Preferences_winscp_run_putty.JPG&amp;diff=32148"/>
		<updated>2014-05-07T19:54:25Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: uploaded a new version of &amp;amp;quot;File:Preferences winscp run putty.JPG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:WinSCP_connect_MySQL_Gear.JPG&amp;diff=32147</id>
		<title>File:WinSCP connect MySQL Gear.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:WinSCP_connect_MySQL_Gear.JPG&amp;diff=32147"/>
		<updated>2014-05-07T19:51:57Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: uploaded a new version of &amp;amp;quot;File:WinSCP connect MySQL Gear.JPG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32143</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32143"/>
		<updated>2014-05-07T07:52:54Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control the whole Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32142</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32142"/>
		<updated>2014-05-07T07:52:26Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control the whole Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32134</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32134"/>
		<updated>2014-05-06T22:25:17Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control all Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32133</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32133"/>
		<updated>2014-05-06T22:23:36Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control all Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32132</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32132"/>
		<updated>2014-05-06T22:22:49Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control all Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;br /&gt;
&lt;br /&gt;
Cited here www.openshift.com/developers/remote-access where we find most useful commands.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32131</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32131"/>
		<updated>2014-05-06T22:21:54Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;br /&gt;
&lt;br /&gt;
If we write help in the PuTTY window, will show some important commands.&lt;br /&gt;
&lt;br /&gt;
Among the common commands are:&lt;br /&gt;
&lt;br /&gt;
ctl_app&amp;lt;br /&amp;gt;&lt;br /&gt;
Control your application (MySQL)&lt;br /&gt;
&lt;br /&gt;
*ctl_app start&lt;br /&gt;
*ctl_app stop&lt;br /&gt;
*ctl_app restart&lt;br /&gt;
*ctl_app status&lt;br /&gt;
&lt;br /&gt;
ctl_all&amp;lt;br /&amp;gt;&lt;br /&gt;
Similar to ctl_app but we can control all Gear.&lt;br /&gt;
&lt;br /&gt;
*ctl_all start&lt;br /&gt;
*ctl_all stop&lt;br /&gt;
*ctl_all restart&lt;br /&gt;
*ctl_all status&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32130</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32130"/>
		<updated>2014-05-06T22:19:37Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Having PuTTY open and connected to the same session, allow us to execute command line statements to stop or start the MySQL server or Gear.&lt;br /&gt;
&lt;br /&gt;
Note -. Also in the remote part of WinSCP, we can navigate to folders as&lt;br /&gt;
/var/lib/openshift/5364c670e0b8cd09f500036d/mysql/data/startdolibarr where this physically our database or we can go to /var/lib/openshift/5364c670e0b8cd09f500036d/app-root/logs to see MySQL logs.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32129</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32129"/>
		<updated>2014-05-06T22:18:04Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 46&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Initialize_session_winscp_with_putty.JPG|500px]]&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Initialize_session_winscp_with_putty.JPG&amp;diff=32128</id>
		<title>File:Initialize session winscp with putty.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Initialize_session_winscp_with_putty.JPG&amp;diff=32128"/>
		<updated>2014-05-06T22:17:48Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32127</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32127"/>
		<updated>2014-05-06T22:16:31Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu --&amp;gt; preferences --&amp;gt; Integration --&amp;gt; Applications as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.&lt;br /&gt;
&lt;br /&gt;
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32126</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32126"/>
		<updated>2014-05-06T22:15:26Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
&lt;br /&gt;
Click in Save and click in Login.&lt;br /&gt;
&lt;br /&gt;
With open WinSCP, go to the Options menu -&amp;gt; preferences -&amp;gt; Integration -&amp;gt; Applilcations as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
Image 45&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Preferences_winscp_run_putty.JPG|500px]]&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Preferences_winscp_run_putty.JPG&amp;diff=32125</id>
		<title>File:Preferences winscp run putty.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Preferences_winscp_run_putty.JPG&amp;diff=32125"/>
		<updated>2014-05-06T22:14:54Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32124</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32124"/>
		<updated>2014-05-06T22:11:11Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL Gear ===&lt;br /&gt;
&lt;br /&gt;
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 34.&lt;br /&gt;
&lt;br /&gt;
Image 44&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
The first part of the Hostname: is also the Username:&lt;br /&gt;
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 41.&lt;br /&gt;
Click in Save and click in Login.&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:WinSCP_connect_MySQL_Gear.JPG&amp;diff=32123</id>
		<title>File:WinSCP connect MySQL Gear.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:WinSCP_connect_MySQL_Gear.JPG&amp;diff=32123"/>
		<updated>2014-05-06T22:10:14Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32122</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32122"/>
		<updated>2014-05-06T18:47:55Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32121</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32121"/>
		<updated>2014-05-06T18:43:11Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32120</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32120"/>
		<updated>2014-05-06T18:39:14Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share [http://en.wikipedia.org/wiki/Transport_Layer_Security SSL] Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like WinSCP and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32119</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32119"/>
		<updated>2014-05-06T18:37:39Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share SSL Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like WinSCP and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32118</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32118"/>
		<updated>2014-05-06T18:36:40Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the InnoDB engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share SSL Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like WinSCP and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32117</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32117"/>
		<updated>2014-05-06T18:26:58Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service ([http://en.wikipedia.org/wiki/Platform_as_a_service PaaS]) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through SSH.&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the InnoDB engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share SSL Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like WinSCP and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32116</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32116"/>
		<updated>2014-05-06T18:24:22Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service (PaaS) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through SSH.&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the InnoDB engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share SSL Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like WinSCP and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32115</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32115"/>
		<updated>2014-05-06T18:19:13Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service (PaaS) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through SSH.&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the InnoDB engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share SSL Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial well, we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like WinSCP and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32114</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32114"/>
		<updated>2014-05-06T18:15:02Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service (PaaS) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through SSH.&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the InnoDB engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share SSL Certificates of RedHat or customize our own SSL, if you have one. Essential to send our data of login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial well, we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like WinSCP and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32113</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32113"/>
		<updated>2014-05-06T18:10:47Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service (PaaS) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through SSH.&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
Gives us total control on our database for us to connect remotely to via a GUI client.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the InnoDB engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share SSL Certificates RedHat or customize our own SSL, if you have one. Essential to send our data both login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial well, we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like WinSCP and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32112</id>
		<title>Cloud with Redhat OpenShift Flex</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cloud_with_Redhat_OpenShift_Flex&amp;diff=32112"/>
		<updated>2014-05-06T18:01:36Z</updated>

		<summary type="html">&lt;p&gt;Gpaint: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Admin]]&lt;br /&gt;
[[Category:Cloud]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
This page is a tutorial to explain how to install Dolibarr ERP-CRM on the Redhat OpenShift Flex Platform www.openshift.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;click twice on image to enlarge&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Image 1&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Url_openshift.JPG‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A little about OpenShift =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenShift Platform as a Service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
OpenShift is Red Hat&#039;s Platform-as-a-Service (PaaS) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.&lt;br /&gt;
&lt;br /&gt;
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.&lt;br /&gt;
&lt;br /&gt;
Openshfit works with Gears and Cartridges, which are terms with which we have to familiarize ourselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What&#039;s a Gear?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
A gear is a resource-constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.&lt;br /&gt;
If an application needs more resources, it can be configured to automatically use more gears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How Do Gears Work?&#039;&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
Let&#039;s look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.&lt;br /&gt;
&lt;br /&gt;
*15 pages/second&lt;br /&gt;
*Hundreds of articles&lt;br /&gt;
*~ 50k visitors per month&lt;br /&gt;
*3 Small Gears&lt;br /&gt;
*Free plan&lt;br /&gt;
&lt;br /&gt;
As we see, a free plan, it may be sufficient for a small or medium company.&lt;br /&gt;
For larger companies, you can switch to the next plan.&lt;br /&gt;
&lt;br /&gt;
In OpenShift, we have two possibilities, to launch Dolibarr.&lt;br /&gt;
&lt;br /&gt;
1 -. As developers, it gives us the ability to extend or create your own modules.&amp;lt;br /&amp;gt;&lt;br /&gt;
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages offered OpenShift&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a secure site, which is accessed through SSH.&lt;br /&gt;
&lt;br /&gt;
It is scalable&amp;lt;br /&amp;gt;&lt;br /&gt;
Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your current demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings copies of your web cartridge online to handle requests.&lt;br /&gt;
&lt;br /&gt;
It gives total control on our database to connect remotely via a GUI client HeidySQL.&lt;br /&gt;
&lt;br /&gt;
If we opt for MySql, we feature the InnoDB engine, essential for transactions.&lt;br /&gt;
&lt;br /&gt;
It gives us the possibility to share SSL Certificates RedHat or customize our own SSL, if you have one. Essential to send our data both login or bank transfers, encrypted and secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Create an account =&lt;br /&gt;
Click in SIGN UP&lt;br /&gt;
&lt;br /&gt;
Image 2&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Sing_up.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Fill your data to create an account.&lt;br /&gt;
Click in Sign Up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 3&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Verify_your_account_with_OpenShift_Online.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
They will send an email to your email account to confirm. Click in Verify your Account.&lt;br /&gt;
&lt;br /&gt;
= Create an instance/domain =&lt;br /&gt;
&lt;br /&gt;
== Part 1 - Create instance ==&lt;br /&gt;
&lt;br /&gt;
Click LOG IN back and show us the initial aspect of our console applications.&lt;br /&gt;
&lt;br /&gt;
Image 4&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Control_panel_openshift_account.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Create your first application now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a web programming cartridge&lt;br /&gt;
&lt;br /&gt;
Image 5&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PHP_apart.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
1. Choose a type of application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 6&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Configure_de_application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
2. Configure the application.&lt;br /&gt;
&lt;br /&gt;
It is important to define the domain name, for this tutorial well, we used sdme. The domain, you cannot change it unless, we delete all our applications and start again from scratch and that is something that nobody wants.&lt;br /&gt;
&lt;br /&gt;
Also, we will have to report, if we have an external git repository with our code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here comes the fun part.&lt;br /&gt;
&lt;br /&gt;
In scaling change to Scale with webtraffic.&lt;br /&gt;
&lt;br /&gt;
The creation of this application, used a Gear of the 3 that we have, indicates precisely next to the Create Application button.&lt;br /&gt;
&lt;br /&gt;
Click in Create Application.&lt;br /&gt;
&lt;br /&gt;
Image 7&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Console_startdolibarr_Application.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When the application is scalable, you cannot add more Cartridges, the Gear. For example we do want to use MySQL, you must go apart, another Gear.&lt;br /&gt;
&lt;br /&gt;
In the image above, we see that our Gear, has added the load balancer, which will make our scalable application.&lt;br /&gt;
&lt;br /&gt;
Up on the right end, there is also a button, in case we need to restart the Gear.&lt;br /&gt;
&lt;br /&gt;
Note. - With PuTTY, we could resolve more explicit requirements to control our Gears with command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the link Web load Balancer.&lt;br /&gt;
&lt;br /&gt;
Image 8&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HAProxy.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
HAProxy in Action.&lt;br /&gt;
&lt;br /&gt;
Image 9&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Aspect_your_webpage.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
If we see our url startdolibarr-sdme.rhcloud.com this is the initial appearance, it has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2 - Setup admin tools  ==&lt;br /&gt;
&lt;br /&gt;
So far so good. Now to the second part of our tutorial.&lt;br /&gt;
&lt;br /&gt;
For this part, will be referred to the administration of our application, there are two ways, the first is by CLI (command line based Ruby) and the second, more declarative form, console and SSH.&lt;br /&gt;
&lt;br /&gt;
I chose the easiest way I&#039;ve intuitive, which is the second option for this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hands to work.&lt;br /&gt;
&lt;br /&gt;
We need a SSH / FTP client like WinSCP and PuTTY.&lt;br /&gt;
&lt;br /&gt;
We download and install.&lt;br /&gt;
&lt;br /&gt;
Image 10&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Folder_WinSCP_-_PUTTY.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Inside the folder where you installed WinSCP, find the folder PuTTY and inside this folder, the puttygen.exe program, this program is important because it is the one that will help us generate our SSH access, to connect to our Gear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double Click in puttygen.&lt;br /&gt;
&lt;br /&gt;
image 11&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_initial.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
We leave the default values, SSH-2 RSA, and the number of bits in 2048.&lt;br /&gt;
&lt;br /&gt;
With these values and will have a key, heavily encrypted.&lt;br /&gt;
&lt;br /&gt;
Click in Generate&lt;br /&gt;
&lt;br /&gt;
Image 12&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generating.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate our key, we must move the mouse pointer constantly in the blank space of program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 13&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Puttygen_generate_end.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Once our key generation is complete, we will add a passphrase.&lt;br /&gt;
&lt;br /&gt;
Click Save public key to save our public key, we give the name of rsa.pub, do the same with save private key, and give the name of rsa.ppk.&lt;br /&gt;
&lt;br /&gt;
A public key is like a lock on a door and the private key is like a key that opens the lock.&lt;br /&gt;
&lt;br /&gt;
We mark the generated code in the text area and copy it, then we go to our OpenShift console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 14&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_copy_public_key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Paste the code into Paste the contents of your public key file (. Pub) and click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 15&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_openshift_public_key_saved.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Perfect OpenShift now has our lock and we have the key.&lt;br /&gt;
&lt;br /&gt;
Now we go to the Applications tab in our console OpenShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on our application startdolibarr.&lt;br /&gt;
&lt;br /&gt;
Click in Want to log in to your application?.&lt;br /&gt;
&lt;br /&gt;
Image 16&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:SourceCode_and_Remote_Access.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the code ssh 53641a41e0b8cdf5ec000b76@startdolibarr-sdme.rhcloud.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We opened our WinSCP.&lt;br /&gt;
&lt;br /&gt;
Image 17&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We put the first part, 53641a41e0b8cdf5ec000b76 before the @ in the User name field, and the second part, startdolibarr-sdme.rhcloud.com after the @ in the Host name field.&lt;br /&gt;
&lt;br /&gt;
It is advisable not to place the password / passphrasse, at this point, for security reasons. We&#039;ll use it later.&lt;br /&gt;
&lt;br /&gt;
Click in Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 18&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Login_WinSCP_SSH_private_Key.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In Private key file: select your private key rsa.ppk, click OK, click save, and click Login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 19&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Warning_connect_to_WinSCP.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
When we leave this nice window click Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 20&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:WinSCP_login_passphrasse.JPG]]&lt;br /&gt;
&lt;br /&gt;
Here we place our passphrase and click OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 21&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Session_WinSCP_accept.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Viola we have access via SSH to our Gear.&lt;br /&gt;
&lt;br /&gt;
On the left is our local space and right remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Submit Dolibarr files =&lt;br /&gt;
&lt;br /&gt;
Image 22&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Download_Dolibarr_generic_version.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We went down the generic version of Doibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 23&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Uploading_DoliBarr_into_repo.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
In the remote part, selected route&lt;br /&gt;
/var/lib/openshift/53641a41e0b8cdf5ec000b76/app-root/runtime/repo&lt;br /&gt;
&lt;br /&gt;
Transfer the Dolibarr folder on the local machine to OpenShift, pressing F5. This process may take several minutes, so while we wait, we will work to create our Gear for the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 24&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_5.5.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We return to the console and with our OpenShift application selected, we click on the bottom of the Databases section and select Add MySQL 5.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 25&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_Cartridge_MySL_to_startdolibarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in add Cartridge.&lt;br /&gt;
&lt;br /&gt;
Note -. In a normal application without Scale, the Cartridge Mysql be added to current Gear, but in our case, OpenShift reports that will address a new Gear for MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 26&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_MySQL_Please_make_note_of_these_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Copy the MySQL access credentials. They will be used later to access our data base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 27&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Delete_Index_php.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Once you have completed the upload of dolibarr described in picture 23. Edit the index.php file.&lt;br /&gt;
&lt;br /&gt;
We opened our favorite text editor and replace with the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: dolibarr/htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make a copy of index.php in dolibarr folder and re-edit it and remove dolibarr/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&amp;lt;br /&amp;gt;&lt;br /&gt;
header(&amp;quot;Location: htdocs&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 28&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Index_php_inside_dolibarr_folder.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
What we have just done, serves don&#039;t shown the structure our folders and files of dolibarr from the web browser, with the index.php we force redirect to the home of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Finally, before starting the configuration of dolibarr, should use SSL (encryption protocol), which provides security when sending our data from the web browser to the server. The use of SSL provides plus extra measures of the dolibarr security, which are already good.&lt;br /&gt;
&lt;br /&gt;
We opened our text editor again and add the following.&lt;br /&gt;
&lt;br /&gt;
*RewriteEngine on&amp;lt;br /&amp;gt;&lt;br /&gt;
*RewriteCond %{HTTP:X-Forwarded-Proto} !https&amp;lt;br /&amp;gt;  &lt;br /&gt;
*RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]&lt;br /&gt;
&lt;br /&gt;
Save with the name .htaccess right next to our dolibarr folder and index.php.&lt;br /&gt;
&lt;br /&gt;
As shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 29&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add_htaccess.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:HttpAndhttps.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 30&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Image 31&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Dolibarr_con_SSL_unfoll.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We see the SSL certificate is accepted by the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Run Dolibarr install Wizard =&lt;br /&gt;
&lt;br /&gt;
We start the Dolibarr setup.&lt;br /&gt;
&lt;br /&gt;
We select from the drop down, Default language to use (language code):, the appropriate language and click Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 32&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Start_Install.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 33&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Environment_Variables_conextion_MySQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We review the image 26, when we created the MySQL Cartridge.&lt;br /&gt;
&lt;br /&gt;
And we focus on the lines.&lt;br /&gt;
&lt;br /&gt;
*Root User: adminCRERXju&amp;lt;br /&amp;gt;&lt;br /&gt;
*Root Password: tccRTZ8-xCnK&amp;lt;br /&amp;gt;&lt;br /&gt;
*Database Name: startdolibarr&amp;lt;br /&amp;gt;&lt;br /&gt;
*Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the connection to the database, OpenShift gives us some environment variables. For dolibarr can connect to the database, we need to know the value of these variables, so back to WinSCP and the .env/mysql folder find these variables, as shown in the picture above.&lt;br /&gt;
&lt;br /&gt;
Click the right mouse button on OPENSHIFT_MYSQL_DB_HOST, click on edit and show us the value of the variable, copy and paste into the Server field as shown in the image below. We do the same for OPENSHIFT_MYSQL_DB_PORT variable and paste its value in the Port field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 34&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Create_DDBB_in_configure_DoliBarr.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note.- When you will these follow steps for the host and port for your particular installation, should be different than shown in this example.&lt;br /&gt;
&lt;br /&gt;
Note2. - In this step, we also could create a different data base and a different owner, because be have the superuser credentials of MySQL, but this step does not touch it here today.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and displays the following window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 35&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Confirm_configuration.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen basically tells us that the connection to the database has been established and this information is saved in the configuration file conf.php of dolibarr.&lt;br /&gt;
&lt;br /&gt;
Click Next Step and start creating tables in the database, necessary for the work of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 36&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Database_susetfull_created.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
This screen reports that have completed the creation of the tables.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 37&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the username and password, which will be the administrator, for this example I used admin/admin. For the real case should be a stronger password.&lt;br /&gt;
&lt;br /&gt;
Click in Next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 38&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:End_of_setup.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Click in Go to Dolibarr (setup area).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 39&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Insert_admin_credentials.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Insert the username and password of the administrator, as defined above and Viola. We are within Dolibarr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Appendix: Connection remote MySQL =&lt;br /&gt;
&lt;br /&gt;
As a final step, we will see the connection from a local client database, to our remote MySQL.&lt;br /&gt;
&lt;br /&gt;
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.&lt;br /&gt;
&lt;br /&gt;
Open HeidiSQL.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is select MySQL (SSH tunnel) Network type drop down, in so doing, HeidiSQL adds a new tab called SSH tunnel, as shown in the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 41&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Ssh_tunnel_HeidiSQL.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
Note that, in the plink.exe location: field must specify the path PuTTY.exe, in the Password field entered the passphrase and Local Port field should always be in 3307.&lt;br /&gt;
&lt;br /&gt;
We return to the Settings tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image 42&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Settings_heidisql.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.&lt;br /&gt;
&lt;br /&gt;
Image 43&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:HeidiSQL_has_established_connection.JPG|500px]]&lt;br /&gt;
&lt;br /&gt;
And with that we end this tutorial.&lt;br /&gt;
&lt;br /&gt;
== Addendum ==&lt;br /&gt;
&lt;br /&gt;
=== Connection to MySQL gear ===&lt;/div&gt;</summary>
		<author><name>Gpaint</name></author>
	</entry>
</feed>