lunedì 26 dicembre 2011

openshift: che figata!

Sono anni che sogno di avere un jboss in hosting...e adesso con openshift è possibile!

adesso è possibile avere un virtual server a propria diposizione con mysql, phpmyadmin, 300 mega di ram e 500 mega di spazio disco:

Alcune highlights dell'ultima ora:

1) aggiungere un alias alla propria applicazione:
immaginate di comprare un nome per la vs applicazione su uno dei tanti rivenditori in rete, comprando anche l'uso del dns..a questo punto basta usare il comando:
rhc-ctl-app -a nomeapplicazione -c add-alias --alias www.hostname.org -l account@gmail.com

2) connesioni ssh al ns host:
rhc-user-info -l account@gmail.com

per ogni applicazione ci sarà un url git:
Git URL: ssh://xxxxxxxxxxxxxxxxxxxxxxxxxx@xxxxxx.rhcloud.com

ssh -t xxxxxxxxxxxxxxxxxxxxxxxxxx@xxxxxx.rhcloud.com

e voilà siete dentro la vs macchina:


Welcome to OpenShift shell

    This shell will assist you in managing openshift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Procede with care!
    If worse comes to worse, destroy your application with rhc-ctl-app
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    type "help" for more info.


3) pulizia dello spazio disco non +usato (tmp/log/git history)


rhc-ctl-app -a nomeapplicazione -c tidy  -l account@gmail.com


che farà le seguenti mosse:

Stopping app...
Running 'git gc --prune --aggressive'
Emptying log dir: /var/lib/libra/xxxxxxxxxxxxxxxxxxx/nomeapplicazione/logs/
Emptying tmp dir: /tmp/
Emptying tmp dir: /var/lib/libra/xxxxxxxxxxxxxxxxxxx/nomeapplicazione/tmp/
Emptying tmp dir: /var/lib/libra/xxxxxxxxxxxxxxxxxxx/nomeapplicazione/jbossas-7.0/standalone/tmp/
Starting app...


4) riavviare mysql:
rhc-ctl-app -a nomeapplicazione -e restart-mysql-5.1



utilissimi link per cominciare a giocare:



http://www.jboss.org/openshift/articles.html


da cui:
http://community.jboss.org/blogs/scott.stark/2011/08/10/openshift-expressflex-cartridge-comparision
http://community.jboss.org/blogs/scott.stark/2011/08/10/jbossas7-configuration-in-openshift-express
http://community.jboss.org/blogs/scott.stark/2011/08/10/differences-between-the-express-and-flex-jbossas7-configurations
http://community.jboss.org/wiki/TrackingThreadsInJBossAS7
http://community.jboss.org/blogs/scott.stark/2011/08/10/jbossas7-configuration-in-openshift-express
https://www.redhat.com/openshift/blogs/seeing-cdi-working-in-openshift
https://www.redhat.com/openshift/community/blogs/how-to-create-an-openshift-github-quick-start-project


importante:
http://jaitechwriteups.blogspot.com/2011/08/deploy-java-ee-application-on-openshift.html


pannello di controllo
https://openshift.redhat.com/app/control_panel




Nessun commento: