简体   繁体   中英

How I can install varnish cache in my app openshift?

I need to install and set up step by step the varnish cache in an application in OpenShift , but I do not know where to start and not the steps for this. Can anyone help ?

If you mean OpenShift Online in current production version, it's older version 2.x, based on RedHat's own container technology.

If you have OpenShift Origin or OpenShift Enterprise or OpenShift Online Developer Preview, probably it's version 3.x, and it's based on Docker.

You can definitely tell which version are you using by looking at CLI tool's name. If it's rhc , it's older version 2.x, if it's oc , it's newer Docker based.

For newer Docker base, you should be able to deploy any docker image, so varnish should be no problem at all. You just have to build your own docker image and follow OpenShift tutorial to deploy it on your platform. I started to play with it, but don't have enough know-how to provide you with step-by-step tutorial right now, maybe in a week or so.

However, if you are using older public version of OpenShift Online, I have a bad news for you. I've tried to compile static version of varnishd , no luck till now. And I'm not going to try anymore, because fully static version of varnishd is not possible at all, as it's based on dynamically loading of compiled VCLs, thus should be dynamically linked to OS libraries. And this could be a bit hard to achieve. You have to match correct versions of OS libraries and still it's fragile as it could possibly break after upgrade of underlying OS.

I wouldn't try this in production.

I suggest you to try another could provider, either IaaS solution with full OS with varnishd installed from packages, or choose any Docker hosting provider.

Or, if you can afford it and it's worth for you, you may try http://fastly.com/ , a CDN provider. Their technology is based on customized older version of varnishd, with easy to use GUI, a lot of fancy built-in stats, etc... But the most important feature is you can deploy your own VCLs upon request. If they enable it to you, you can upload new VCL in few seconds.

Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM