At Clever Cloud we often go to conferences, we answer many CFPs and some of us are even organising conferences from time to time. As such, we understand the amount of work required to manage these.

Just like organizing a conference, managing a CFP can become cumbersome. That's why people started writing new applications from scratch to handle it. Some of them chose Clever Cloud to host them of course. Among those, you will find cfp.io and the Devoxx family.

Some of you asked us if it was possible to run the one used by Devoxx. In this post I will show you how to deploy it on Clever Cloud.

Setup

The application is written in Scala and is based on Play Framework:

Play Framework makes it easy to build web applications with Java & Scala. Play is based on a lightweight, stateless, web-friendly architecture. Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.

You will find the code on our good friend Nicolas Martignole's Github account. Take a look at the Readme if you want to run the application locally first. You will see that it needs to write on disk, to store data on Redis, and can optionally benefit from fulltext search with Elastic and accounts on several external services. Don't worry, you don't need everything from the start.

If you want to tag along, make sure you have Git, a Clever Cloud account and that you have installed our CLI Clever-Tools. Let's start:

  • Clone the project: git clone https://github.com/nicmarti/cfp-devoxx
  • Get in the project: cd cfp-devoxx
  • Create the Redis add-on: clever addon create redis-addon --plan s --region eu redisCFP
  • Create the FS Bucket add-on: clever addon create fs-bucket --plan s --region eu fsCFP
  • Create the application: clever create --type sbt MyCFP
  • Link the Redis add-on: clever service link-addon redisCFP
  • Link the FS Bucket add-on: clever service link-addon fsCFP
  • Define where to mount our FS Bucket: clever env set CC_FS_BUCKET /devoxx-content:`clever env | awk -F = '/BUCKET_HOST/ { print $2}'`
  • Remove the old FSBucket configuration: git rm clevercloud/buckets.json && git commit -m"remove old bucket configuration"
  • Copy the production configuration sample: cp conf/redis-sample-prod.conf application.conf
  • Add your changes and commit them: git add application.conf;git commit -m"add default conf"

We now have to configure the application using environment variables, here is my dummy test configuration:

ACTIVATE_FAVORITES=true
ACTIVATE_GOLDEN_TICKET=false
ACTIVATE_HTTPS=true
ACTIVATE_VOTE=true
APP_SECRET=1f0bc136-5c99-1e6-bee8-60f81dae2bbc
BITBUCKET_PASSWORD=foobar
BITBUCKET_URL=https://bitbucket.org/api/1.0/repositories/foo/bar/issues
BITBUCKET_USERNAME=foobar
BUCKET_ROOTFOLDER=/app
CC_FS_BUCKET=/devoxx-content:bucket-35ca2d97-ff0e-42fb-ba37-abb815fb90a1-fsbucket.services.clever-cloud.com
CFP_HOSTNAME=app_a6dcb49e-1e16-4e06-8f45-dc9e0e838959.cleverapps.io
CFP_IS_OPEN=false
CFP_LANG=en
CRON_DAYS=2
CRON_UPDATER=false
DIGEST_DAILY=08:00
DIGEST_WEEKLY=1
ENABLE_METRICS=true
ES_ADDON_PASSWORD=foobar
ES_ADDON_URI=http://elasticsearch:9200
ES_ADDON_USER=foobar
GITHUB_ID=foobar
GITHUB_SECRET=foobar
GOOGLE_ID=foobar.apps.googleusercontent.com
GOOGLE_SECRET=foobar
JAVA_VERSION=8
LINKEDIN_CLIEND_ID=foobar
LINKEDIN_SECRET=foobar
MAIL_BCC=foobar@devoxx.fr
MAIL_BUG_REPORT=foobar@devoxx.fr
MAIL_COMMITTEE=foobar@devoxx.fr
MAIL_FROM=foobar@devoxx.fr
OPSGENIE_API=TOD
OPSGENIE_NAME=foobar
PORT=8080
SMTP_HOST=in-v3.mailjet.com
SMTP_MOCK=true
SMTP_PASSWORD=foobar
SMTP_PORT=587
SMTP_SSL=false
SMTP_USER=foobar
You can copy/paste this in the Environment variables tab of your application using the Expert Mode. Make sure you set the value of CFP_HOSTNAME to your domain name; Clever Cloud will assign one by default: take a look at the Domain Names tab in our web console to see it or change it (or use clever domain).

And that's it, your configuration is done. The next step is to deploy your application by running clever deploy.

What's next?

Your application should be running now. You can run clever open to make sure it is. It will open it in your default browser.

Default CFP homepage

Now, you can start tweaking the configuration of your application. You can start by looking at all those environment variables if you have not already. There is one point where you will probably ask yourself how to get SMTP crendentials or an Elasticsearch instance from Clever Cloud. While we currently don't have any partnership with e-mails providers, you can ping our support team for the Elastic instance. It's currently in private beta and should soon be open to the public.

If you are looking for more documentation, I invite you to check out the Github repository issues and to give a good look at the production configuration file conf/application.conf.prod. I believe some of them are not mandatory. It would be great to have a documentation update just for the environment variables.

If you are going to use this for your conference, remember to activate autoscaling: clever scale --min-instances 1 --max-instances 2. And if you dread the weekend before your CFP closes, increase the number of minimum instances with clever scale --instances 2.

Post illustration: Computer at her work with microscope and the Friden calculating machine. Credits: NASA

blog comments powered by Disqus