Filesystem on the cloud: How to store files and images for your applications on CloudBees platform


I have been reading for a long time on support tickets and also by email that customers try to store files or images into the ephemeral filesystem and the have problems once their applications hibernate, scale-up/down or are redeployed. As an example, this could be a general feedback.

“My folders and files disappear after some time on CloudBees”

This is an article in which I try to explain why it happens and what is the recommendation to store images or files for your applications running on CloudBees platform.

Filesystem on the cloud

Filesystem isn’t persistent on the cloud. Application being redeployed/scale-out will start on a distinct node, so we don’t recommend you to store files there. Even when your free application hibernates after about two hours, it will wake up with a new request on a distinct node, so you will lose all the information that you have saved on the local (“ephemeral”) filesystem as a temporary cache.

The standard filesystem can only be used for caching since it will be deleted any time the app is redeployed or restarted. Users wanting a place to store files permanently need to find their own external locations as Amazon S3.
Using Amazon S3 to use your files on CloudBees
CloudBees uses the same infrastructure than AWS, so you will get low latency between your application and  Amazon S3. At this moment, on CloudBees you can deploy your apps to Amazon US (Ashburn - Virginia) and EU (Dublin) either in multi-tenant or dedicated mode, so you just to be sure that you are going to create your Amazon bucket on the same Amazon region in which you will deploy your app on CloudBees.
Any examples about how to do it?

At this moment we provide two ClickStarts which will help you to upload your images to Amazon S3 from your CloudBees application running on RUN@Cloud.