tsuru 1.4.0 released, with volumes, improved Kubernetes support and more!

Guilherme Garnier
tsurupaas
Published in
2 min readFeb 6, 2018

--

With tsuru 1.3.0, we added experimental support to Kubernetes as a provisioner for running your apps. In the development of tsuru 1.4.0, we kept focusing on this feature. We fixed a couple of bugs and made Kubernetes support much more stable. Now we consider it production-ready!

Volumes

A new, exciting feature of tsuru 1.4.0 is the support to volumes. Suppose you need to share a directory among your app units and keep it in sync. Or maybe you want to use HTTPS and, for some reason, you need to terminate the TLS connection in the app units. For that to work, you would need the certificate in every unit. But keeping a production certificate in your code repository is not a good idea, so you would probably need to make your deploy process fetch the certificate somewhere and put it inside the units. But if you do that before generating the app image, the certificate would be added to the app image, which may be a security issue. That problem could be solved with volumes:

# Assuming you have a nfs volume plan enabled, create a new volume called "share"
$ tsuru volume create share nfs -o capacity=1Gi -o server=nfs.example.com -o path=/path/to/dir
# Bind the new volume to an app, mounting it to /mnt/mountpoint
tsuru volume bind share /mnt/mountpoint -a appname

Volumes are supported only with Kubernetes and Swarm provisioners. For more details, check the volumes documentation.

Forcing app image reset

Another new feature is the support to force an image reset for the next deploy of an app. When you start an app deploy, tsuru uses the image from the previous deploy as base, to save both disk and time — usually, the difference between two app deploys is not that big, which makes the diff layer smaller than building a fresh, new image from the app platform image. But there's a situation where we may need a fresh image: when there's something wrong with the previous deploy image (like referencing an unknown dependency), the image build for the next deploy will also fail. To solve this problem, now you can run the command tsuru app update -a appname --image-reset. This will force the next deploy — be it via tsuru app deploy or git push — to use the app platform image as base.

Besides those, there are other features and bug fixes in this release. For more details, take a look at the release notes.

--

--