Search code examples
tomcatopenshifttomcat8openshift-cartridge

Tomcat8 on OpenShift


Is there a Tomcat 8 cartridge for OpenShift? I know that you can install Tomcat8 in a DIY cartridge, but I was looking for a faster and easier solution.

And if there is one, how can I install it and how can I migrate an application from jbossews 2 (tomcat7)?

I tried to use https://github.com/openshift/origin-community-cartridges/tree/master/openshift-origin-cartridge-tomcat as a downloadable cartridge, but I got this error:

The provided downloadable cartridge 'https://github.com/openshift/origin-community-cartridges/raw/master/openshift-origin-cartridge-tomcat/metadata/manifest.yml' cannot be loaded: Cartridge-Vendor 'Red Hat' does not match pattern /\Aa-z0-9\z/.


Solution

  • That looks like an old cartridge. The only explanation I can think of for the Cartridge-Vendor error is that Red Hat changed its validation for the field. All of their up-to-date cartridges define

    Cartridge-Vendor: redhat
    

    without the space.

    You may be able to hack around it by forking that git repo and changing the Cartridge-Vendor yourself. Only their manifest validation logic also prohibits using redhat as a vendor since it's reserved:

      reserved_vendor_names = %w(
        redhat
      )
    

    So editing manifest.yml you may get this cartridge to work, but I wouldn't bet on it since the cartridge is no longer supported.