A platform-as-a-service makes deploying applications to cloud fast and easy. But, to get the most out of the OpenShift PaaS, it helps to stay abreast of the interesting technical issues plus their workarounds and solutions. We've made this easy with a weekly tips and tricks blog.
1) By default, users aren't automatically subscribed to all forum threads, how can I get notified of information as it appears in the forums?
https://openshift.redhat.com/community/faq/how-do-i-subscribe-to-the-forums-wikis-or-other-cool-topics-in-the-openshift-community
2) Setting up Tomcat on OpenShift is easy: https://openshift.redhat.com/community/blogs/free-apache-tomcat-hosting-in-the-cloud-for-java-applications-its-called-openshift
But in order to start or stop the app remotely, you need to set up start/stop hooks as in: https://openshift.redhat.com/community/forums/openshift/cant-access-by-own-domain (latest comment).
A platform-as-a-service makes deploying applications to cloud fast and easy. But, to get the most out of the OpenShift PaaS, it helps to stay abreast of the interesting technical issues plus their workarounds and solutions. We've made this easy with a weekly tips and tricks blog.
1) By default, users aren't automatically subscribed to all forum threads, how can I get notified of information as it appears in the forums?
https://www.openshift.com/faq/how-do-i-subscribe-to-the-forums-wikis-or-other-cool-topics-in-the-openshift-community
2) Setting up Tomcat on OpenShift is easy: /free-apache-tomcat-hosting-in-the-cloud-for-java-applications-its-called-openshift
But in order to start or stop the app remotely, you need to set up start/stop hooks as in: https://www.openshift.com/forums/openshift/cant-access-by-own-domain (latest comment).
3) Like Tomcat, you can configure other services like ActiveMQ on DIY by following a few DIY rules:
- Be mindful of port restrictions: https://www.openshift.com/kb/kb-e1038-i-cant-bind-to-a-port
- HTTP access to your service is routed through Apache to your app's $OPENSHIFT_INTERNAL_PORT bound to your app's $OPENSHIFT_INTERNAL_IP environment variables.
4) Along the same lines as DIY apps, Nodejs apps work the same way. The app's listener needs to be configured to listen on $OPENSHIFT_INTERNAL_IP and $OPENSHIFT_INTERNAL_PORT like our sample: https://github.com/openshift/nodejs-example Also, internally, OpenShift executes server.js and there isn't a good way to change it to run something like coffee.js
5) All application languages/types have some level of code/module/API dependencies. You can add them to your application framework based on this KB: https://www.openshift.com/kb/kb-e1017-adding-dependencies-to-applications We recently added Nodejs tips there.
6) Debugging your application, to a fair extent, is not as fun as writing code. It can go from not fun to down-right impossible without access to your processes and logs. "rhc app tail" allows you to review the logs remotely, but sometimes, you just need to get onto the server and do your magic. For that, check out: https://www.openshift.com/faq/can-i-access-my-applications-gear It also covers gear access for scalable apps.
7) Unsure how scalable applications work? Check out: https://www.openshift.com/kb/kb-e1049-how-does-scaling-work-in-openshift
8) Have multiple apps that need to access a single db? The current solution is: https://www.openshift.com/kb/kb-e1051-how-do-i-connect-multiple-applications-to-one-database
9) Is there confusion about when to use the repo vs when to use the data directory? See: https://www.openshift.com/forums/openshift/can-i-copy-files-from-my-workstation-to-openshift-using-scp
10) Does your application support online upgrades like Wordpress, but after a git push, all the upgrades were reverted? Many php apps update server-side files at runtime, but since your remote git repo is stale, you inadvertently push stale files and revert those changes on the remote repo. To work around that, see: https://www.openshift.com/forums/openshift/wordpress-permanent-link-broken
11) Are you having problems with git commands (like git clone $GIT_URL), but ssh seems to work fine? Check out: https://www.openshift.com/kb/kb-e1060-i-can-run-ssh-but-why-cant-i-run-git-commands-like-git-clone-giturl
12) And the grand-daddy of them all this past week, app gears might get locked up when your app spawns too many threads/processes. See: https://www.openshift.com/kb/kb-e1058-rhc-app-commands-are-failing-with-resources-temporarily-unavailable-errors-what-should-i
As you can see, we had a busy week. Special thanks to all Community users who helped report these issues on IRC, Forums and the mailing list. Without you, we won't know what we have to fix nor how we can improve. So please keep the questions coming!!
Thank you!--
Nam Duong - Customer Enablement
Product Marketing Manager
OpenShift | PaaS by Red Hat
http://openshift.redhat.com
Twitter: @openshift, @NamDuong_rh
Categories