Line 1:
Line 1:
+
<!-- BEGIN origin interlang links -->
+
<!-- You can edit this section but do NOT remove these comments
+
Links below will be automatically replicated on translated pages by PolyglotBot -->
+
[[es:Cloud_con_Redhat_OpenShift_Flex]]
+
<!-- END interlang links -->
+
[[Category:Admin]]
[[Category:Admin]]
+
[[Category:Admin_en]]
[[Category:Cloud]]
[[Category:Cloud]]
{{TemplateDocUser}}
{{TemplateDocUser}}
Line 15:
Line 22:
'''OpenShift Platform as a Service'''
'''OpenShift Platform as a Service'''
−
OpenShift is Red Hat'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.
+
OpenShift is Red Hat'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.
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.
OpenShift provides help to build and deploy web applications, mobile backends, service-oriented architectures, and get your favorite services.
Line 24:
Line 31:
'''What's a Gear?'''<br />
'''What's a Gear?'''<br />
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.
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.
+
If an application needs more resources, it can be configured to automatically use more gears.
If an application needs more resources, it can be configured to automatically use more gears.
'''How Do Gears Work?'''<br />
'''How Do Gears Work?'''<br />
−
Let's look at an example Drupal-based app running on OpenShift. We can estimate the needs and costs of the app at different stages.
+
Let's look at an example Drupal-based app running on OpenShift. We can estimate the needs of the app at different stages.
−
15 pages/second
+
−
Hundreds of articles
+
*15 pages/second
−
~ 50k visitors per month
+
*Hundreds of articles
−
3 Small Gears
+
*~ 50k visitors per month
−
Free plan
+
*3 Small Gears
+
*Free plan
As we see, a free plan, it may be sufficient for a small or medium company.
As we see, a free plan, it may be sufficient for a small or medium company.
+
For larger companies, you can switch to the next plan.
For larger companies, you can switch to the next plan.
+
In OpenShift, we have two possibilities, to launch Dolibarr.
In OpenShift, we have two possibilities, to launch Dolibarr.
−
1 -. As developers, it gives us the ability to extend or create your own modules.<br />
+
1 -. To extend or create your own modules.<br />
−
2 -. As entrepreneurs, it gives us the opportunity to put into production our Dolibarr.
+
2 -. To put in production our Dolibarr.
'''Advantages offered OpenShift'''
'''Advantages offered OpenShift'''
−
It is a secure site, which is accessed through SSH.
+
It is a secure site, which is accessed through [http://en.wikipedia.org/wiki/Secure_Shell SSH].
−
It is scalable
+
It is scalable<br />
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.
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.
−
It gives total control on our database to connect remotely via a GUI client HeidySQL.
+
Gives us total control on our database for us to connect remotely to via a GUI client.
−
If opt for MySql, we feature the InnoDB engine, essential for transactions.
+
If we opt for MySql, we feature the [http://en.wikipedia.org/wiki/InnoDB InnoDB] engine, essential for transactions.
−
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.
+
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.
Line 98:
Line 109:
2. Configure the application.
2. Configure the application.
−
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.
+
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.
Also, we will have to report, if we have an external git repository with our code.
Also, we will have to report, if we have an external git repository with our code.
Line 147:
Line 158:
Hands to work.
Hands to work.
−
We need a SSH / FTP client like WinSCP and PuTTY.
+
We need a SSH / FTP client like [http://sourceforge.net/projects/winscp WinSCP] and PuTTY.
We download and install.
We download and install.
Line 166:
Line 177:
With these values and will have a key, heavily encrypted.
With these values and will have a key, heavily encrypted.
+
Click in Generate
Image 12<br />
Image 12<br />
Line 275:
Line 287:
Click in add Cartridge.
Click in add Cartridge.
−
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.
+
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.
Line 416:
Line 428:
As a final step, we will see the connection from a local client database, to our remote MySQL.
As a final step, we will see the connection from a local client database, to our remote MySQL.
−
For this example I will use HeidiSQL, which serves both MySQL or PostgreSQL database and is Free.
+
For this example I will use [http://sourceforge.net/projects/heidisql HeidiSQL], which serves both MySQL or PostgreSQL database and is Free.
Open HeidiSQL.
Open HeidiSQL.
Line 434:
Line 446:
[[File:Settings_heidisql.JPG|500px]]
[[File:Settings_heidisql.JPG|500px]]
−
We fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.
+
We obtain the hostname and port of MySQL to connect to Dolibarr database. Top image 33.
+
Fill the fields with the credentials of the database, select the database, click in Save and click in Open to test the connection.
Image 43<br />
Image 43<br />
[[File:HeidiSQL_has_established_connection.JPG|500px]]
[[File:HeidiSQL_has_established_connection.JPG|500px]]
+
+
+
+
== Addendum ==
+
+
=== Connection to MySQL Gear ===
+
+
You remember when we obtained the hostname and port of MySQL to connect to Dolibarr database. Top image 33.
+
+
+
Image 44<br />
+
[[File:WinSCP_connect_MySQL_Gear.JPG|500px]]
+
+
The first part of the Hostname: is also the Username:
+
5364c670e0b8cd09f500036d-sdme.rhcloud.com click in Advanced and verify that everything be as the image 18.
+
+
Click in Save and click in Login.
+
+
With open WinSCP, go to the Options menu --> preferences --> Integration --> Applications as shown in the image below.
+
+
In the PuTTY/terminal client path: field select the path where we have the putty.exe and mark the three checkboxes.
+
+
+
Image 45<br />
+
[[File:Preferences_winscp_run_putty.JPG|500px]]
+
+
+
+
Each time you start in with WinSCP session also will start session in PuTTY. As seen in the image below.
+
+
+
Image 46<br />
+
[[File:Initialize_session_winscp_with_putty.JPG|500px]]
+
+
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.
+
+
Note -. Also in the remote part of WinSCP, we can navigate to folders as
+
/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.
+
+
If we write help in the PuTTY window, will show some important commands.
+
+
Among the common commands are:
+
+
ctl_app<br />
+
Control your application (MySQL)
+
+
*ctl_app start
+
*ctl_app stop
+
*ctl_app restart
+
*ctl_app status
+
+
+
ctl_all<br />
+
Similar to ctl_app but we can control the whole Gear.
+
+
*ctl_all start
+
*ctl_all stop
+
*ctl_all restart
+
*ctl_all status
+
+
Cited here www.openshift.com/developers/remote-access where we find most useful commands.
And with that we end this tutorial.
And with that we end this tutorial.