I know what you’re thinking, “didn’t I just see one of these a few days ago…?”. Yes, yes you did! That’s how quickly things progress on OpenShift Online, our engineering team is always hard at work to bring you new features and the latest improvements. Lets take a look.
Simplified Template Directory (Great for PHP/Python/Perl users)
We’ve made it even easier to migrate your PHP, Python, and Perl apps to OpenShift. With this latest release, I’m happy to announce that now all your PHP/Python/PERL code can be put in the root directory of your Git repo instead of a
WSGI/ directory. To show you just how this works, I’ll start off with PHP.
Please note that all changes ARE backwards compatible and should not break any existing applications
The DocumentRoot is chosen by the cartridge control script logic depending on conditions in the following order:
IF php/ dir exists THEN DocumentRoot=php/ ELSE IF public/ dir exists THEN DocumentRoot=public/ ELSE IF public_html/ dir exists THEN DocumentRoot=public_html/ ELSE IF web/ dir exists THEN DocumentRoot=web/ ELSE IF www/ dir exists THEN DocumentRoot=www/ ELSE DocumentRoot=/
As I’m sure you’ve guessed, this makes the new OpenShift app directory structure compatible with all major upstream PHP projects, including Drupal, WordPress, Joomla, Zend Framework Skeleton Apps and many others.
For python app’s we’ve made some similar changes:
- We got rid of wsgi/, wsgi/static/, data/ and libs/ directories.
- You can use wsgi.py instead of wsgi/application as the default WSGI entry-point.
- We’ve discarded the README.md file that can often conflict with an upstream file of the same name.
OPENSHIFT_PYTHON_WSGI_APPLICATIONto set an alternative WSGI entry-point.
wsgi.py WSGI entry-point (configurable by $OPENSHIFT_PYTHON_WSGI_APPLICATION) setup.py Standard setup.py, specify deps here .openshift/ Location for OpenShift specific files action_hooks/ See the Action Hooks documentation markers/ See the Markers section below
For Perl, we did something similar to python and got rid of the README.txt to stop conflicts. As for the directory structure, take a look below:
index.pl .openshift/ Location for OpenShift specific files action_hooks/ See the Action Hooks documentation markers/ See the Markers section below
New Dependency Management changes
As mentioned earlier, we’ve tried to make it simpler for users to bring their existing PHP/Python/Perl projects on to Openshift. Along with the template directory changes, we made some changes to dependency management to support some of the upstream standards, that many of you are so used to.
Currently the PHP cartridge uses OpenShift-specific deplist.txt file, but now with the latest update we’ve included support for pear (pecl being added soon). All you need to do is put the pear.txt file in your
.openshiftand let OpenShift take care of the rest.
Python now supports the use of requirements.txt to handle your dependencies, although python handles things a little different from the two mentioned above. Your requirements.txt can be in your app’s root directory. If both your setup.py and requirements.txt exist within your repo, then both will be processed.
As with PHP, the Perl cartridge uses an OpenShift-specific deplist.txt instead of CPAN. Since CPAN is recognized by the Perl community, we decided to opt for it instead. Moving forward, your deplist.txt should be moved to the .openshift/ directory and renamed as cpan.txt.
Support for deplist.txt will still exist, however if you happen to have both in your app, it’s important to know that your
CPAN.txt will take precedence.
New Downloadable Vert.x Cartridge
Vert.x is a new polygot application platform for the JVM. It’s lightweight, scalable, and super simple to use. Plus, with it being a polygot platform, you can use a variety of existing languages.
JBoss config management is now easier
If you’ve ever used JBoss CLI to make changes to your configuration in the past, you may have noticed that your changes are overwritten once the app is restarted. However, with this latest update, that’s no longer the case with addition of a new environment variable
Now, if the environment variable
DISABLE_OPENSHIFT_MANAGED_SERVER_CONFIG is set to “true” then the standalone.xml from your repository is ignored, allowing you to make configuration changes directly.
Multiple LD_LIBRARY_PATH support
For cartridge writers we added a new environment variable
OPENSHIFT_Cart_Name_LD_LIBRARY_PATH_ELEMENT. You can use this environment variable to configure the location of each cartridge’s library files. More documentation will follow soon.
Improved Blog Navigation
We’ve added a new navigation component to our OpenShift Blogs Page. Now it’s easier to cruise your way through the great content we love to provide to our users.
We’ve added “Show more” to administrative errors
Sometimes things don’t always go as planned. Now, if you receive an error in the console, you can get more information into what went wrong by clicking the “Show More” link.