Serverless Fortran Code Execution w/ Time2Code and OpenFaaS

Jock Reed
Jock Reed
Oct 13, 2017 · 3 min read

Since starting the Time2Code project I have promised to support additonal languages beyond the four I started with. Today I am releasing support for the Fortran language through serverless code execution.

This is typically not possible with traditional Cloud provider Serverless platforms to execute different languagues other than the few they support. However OpenFaaS makes this possible with a simple to use Serverless Function platform that runs containers on Docker Swarm and Kubernetes backends. If you can put it in a container, you can make a function out of it with OpenFaaS.

Let’s get you started quickly so you can start to pursue a new career with NASA. First we will deploy Time2Code. Give it a try on Play-With-Docker by following this link. Once Time2Code is deployed click on the link for the Web IDE.

Your Time2Code Play-With-Docker URL will look similar to this…

I have prepared some pre-populated Fortran code examples to use from Fortran sample code snippets from around GitHub. When using the example links be mindful of the query parameters as those are used to pre-populate the web based IDE. Once loaded, click the run button to execute the code serverlessly.

If you want to deploy Time2Code on your own laptop, and you have Docker CE installed on your computer, use the following command to get started with Time2Code.

$ docker swarm init --advertise-addr eth0 \
&& curl -O \
&& sudo bash

Use for your base URL if deploying from your laptop and Docker Swarm.

Congrats on executing Fortran code Serverlessly with Time2Code and OpenFaaS!

Visit here to here more about Time2Code:,

Or go here to work with OpenFaaS on Kubernetes on Secure infrastructure:


STAR Time2Code and OpenFaaS on github.

We are always looking for new contributors to both projects. Contribute to Time2Code by testing, making suggestions, improving code, making pull requests, raising issues, adding coding languages to go along with the web based IDE, writing blogs about your experiences, making coding tutorials in markdown on GitHub:

Contribute to OpenFaaS by testing, making suggestions, improving code, making pull requests, working on backend code, writing blogs about your projects you have created with OpenFaas:,

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade