<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>play Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/play/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/play/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Tue, 13 Feb 2018 09:00:00 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>play Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/play/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Tools, not rules: why I&#8217;ve built issues-helper</title>
		<link>https://www.clever.cloud/blog/features/2018/02/13/issues-helper/</link>
		
		<dc:creator><![CDATA[Clement Delafargue]]></dc:creator>
		<pubDate>Tue, 13 Feb 2018 09:00:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[play]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[Scala]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2018/02/13/issues-helper/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="tools not rules 1" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1-1368x528.jpg 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>A few weeks ago I&#39;ve open sourced <a href="https://github.com/CleverCloud/issues-helper">issues-helper</a>. It allows you to easily interact with issues on GitHub and GitLab, from the command line.</p>
<pre><code class="language-bash">gli o --assignee clementd --label improvement &quot;Degauss the frobulator fluxfield&quot;
</code></pre>
<p>Let&#39;s see why and how it&#39;s done.</p>
<span id="more-2928"></span>

<h2 id="tldr">TL;DR</h2>
<p>Issues are a good way to keep track of decisions in a project. Opening issues should be easy so people don&#39;t forget to write down why they&#39;ve done things. Opening issues from the command line with minimal fuss is a good thing:</p>
<pre><code class="language-bash">gli init # generate initial configuration
gli o &quot;Issue title&quot; &quot;Optional issue text&quot;
  # add --open to open the issue in the browser once created
  # add --assignee to assign issue
  # add --label to add labels to the issue
gli l # list issues
gli b # open the project homepage in your browser
</code></pre>
<h2 id="issues-use-them">Issues. Use them.</h2>
<p>At Clever Cloud, we use git (and GitLab) a lot. In addition to just using git for code, we also rely a lot on issues. Many discussions end with &quot;please open an issue and sum up what we&#39;ve just said&quot;.</p>
<p>Issues are not just for bugs, we use it as a way to track decisions. Some projects don&#39;t even have code and are just there to track discussions and decisions.</p>
<p>My goal, as a CTO, is to make sure we keep track of all of our decisions. So I need people to open issues, to open them often, and to open them early.</p>
<h2 id="processes-make-em-easy">Processes. Make &#39;em easy.</h2>
<p>I work with people, not with robots. While I trust them and I know they&#39;re good at what they do, I just can&#39;t expect them not to make mistakes, or in that case follow processes with no clear incentive. So I needed to remove friction when opening issues. When we interact with code, it&#39;s from the command line: we craft commits, we deploy to production, we even close issues from the command line (while crafting commits). So we should also open issues from the terminal.</p>
<p>My first try was to use the ruby gitlab CLI, but it had several issues:</p>
<ul>
<li>configuration was done with environment variables</li>
<li>it&#39;s written in ruby and can be complicated to install</li>
<li>the output is more or less database rows in ascii tables</li>
<li>you have to specify which project you&#39;re talking about</li>
</ul>
<p>Even though I&#39;ve written documentation and showed people how to use it, it was not used a lot. When a tool feels like a hack, nobody wants to use it.</p>
<h3 id="what-i-wanted">What I wanted</h3>
<p>I needed two things to get a tool people would use:</p>
<ul>
<li>automatically know which project we&#39;re talking about</li>
<li>config files to avoid having to mess with env variables (and leak GitLab tokens)</li>
</ul>
<p>To avoid ruby installation issues, I&#39;ve decided to use <a href="https://www.rust-lang.org/">Rust</a>. There&#39;s a lot of available libraries, the build system works well, it&#39;s sufficiently expressive to let me express what I want, and in the end I get a nice binary.</p>
<h4 id="xdg-basedir-respect-it">XDG basedir. Respect it.</h4>
<p>Reading GitLab credentials from a file is not really hard. One common mistake is to put config files directly in <code>~</code> like some kind of animal. Instead of cluttering users&#39; home directories, I followed the <a href="https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html">XDG basedir spec</a>. Most languages have a library which handles it for you, so it really is a no-brainer (and it works out of the box on Windows as well).</p>
<h4 id="infer-information-from-context">Infer information from context</h4>
<p>To know where the issues should be opened, <code>issues-helper</code> looks at the <code>origin</code> remote of the current git repo. From that, it knows what to do. Even if you&#39;re not currently in the right repo,</p>
<pre><code class="language-bash">j my-project # autojump is great
gli o &quot;My issue&quot; # that&#39;s it
</code></pre>
<h2 id="tools-open-source-them">Tools. Open Source them.</h2>
<p>Once I had this working, not only people started using this tool, but people improved it: <a href="https://twitter.com/keruspe">@keruspe</a> fixed a lot of issues quite quickly. So the next step was to un-hardcode every Clever Cloud specific things in the codebase (then rebase everything, fun afternoon).</p>
<p>Once it was on GitHub, I got more contributions (from inside and outside). Also, it made me add GitHub support: not being able to use issues-helper to manage its own issues quickly got very frustrating.</p>
<p>Supporting GitHub also made me contribute on the GitHub crate, thus closing a vertuous circle.</p>
<p>There are <a href="https://github.com/CleverCloud/issues-helper/issues">a few issues left</a>. Feel free to chime in, I&#39;ll help you get started. It&#39;s a good way to start working on a Rust project!</p>
<h2 id="how-its-done">How it&#39;s done</h2>
<p>The tool itself doesn&#39;t hold a lot of business logic. It parses a project location from a git remote, reads config from a file, sends a few HTTP requests and displays useful information.</p>
<h3 id="cli-arguments-parsing">CLI arguments parsing</h3>
<p>It&#39;s one of the most important parts of a program, since it&#39;s the UI. The Rust ecosystem has <a href="https://clap.rs/">clap</a> which handles everything: parsing, help and even autocompletion.</p>
<p>Unfortunately, the parsed values are exposed through a <code>Map&lt;String,String&gt;</code>, so even though parsing checks structure, you have to recreate the structure yourself. In practice, you end up with a bunch of <code>value.unwrap(); // this should never fail</code>.</p>
<p>Fortunately, there&#39;s <a href="https://crates.io/crates/structopt">Structopt</a>, which generates clap config from Rust data structures: all the dirty stuff is handled for you, and you get nice structs and enums. Yay!</p>
<h3 id="config-files">Config files</h3>
<p>Config is in a toml file, config file location is handled by the <a href="https://crates.io/crates/xdg">xdg crate</a>. Remember: every time you add files to <code>~</code>, a cute puppy dies.</p>
<h2 id="so">So</h2>
<p>Having processes in a team is a good thing, but if you don&#39;t document them, you can&#39;t expect people to respect them. If processes don&#39;t make everyone&#39;s life easier, you can&#39;t expect people to respect them. One simple way to make processes stick is to provide tooling to make them the easiest path. A bash script is cool, but mainly for its author. A stable CLI tool with a good UI, written in a robust language is not a lot of work and will age <em>way</em> better.</p>
<p><em>Post illustration: The Sorcerer&#39;s Apprentice, Disney Movies. Friden calculating machine. Credits: Disney</em></p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="tools not rules 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/tools-not-rules-1-1368x528.jpg 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>A few weeks ago I&#39;ve open sourced <a href="https://github.com/CleverCloud/issues-helper">issues-helper</a>. It allows you to easily interact with issues on GitHub and GitLab, from the command line.</p>
<pre><code class="language-bash">gli o --assignee clementd --label improvement &quot;Degauss the frobulator fluxfield&quot;
</code></pre>
<p>Let&#39;s see why and how it&#39;s done.</p>
<span id="more-2928"></span>

<h2 id="tldr">TL;DR</h2>
<p>Issues are a good way to keep track of decisions in a project. Opening issues should be easy so people don&#39;t forget to write down why they&#39;ve done things. Opening issues from the command line with minimal fuss is a good thing:</p>
<pre><code class="language-bash">gli init # generate initial configuration
gli o &quot;Issue title&quot; &quot;Optional issue text&quot;
  # add --open to open the issue in the browser once created
  # add --assignee to assign issue
  # add --label to add labels to the issue
gli l # list issues
gli b # open the project homepage in your browser
</code></pre>
<h2 id="issues-use-them">Issues. Use them.</h2>
<p>At Clever Cloud, we use git (and GitLab) a lot. In addition to just using git for code, we also rely a lot on issues. Many discussions end with &quot;please open an issue and sum up what we&#39;ve just said&quot;.</p>
<p>Issues are not just for bugs, we use it as a way to track decisions. Some projects don&#39;t even have code and are just there to track discussions and decisions.</p>
<p>My goal, as a CTO, is to make sure we keep track of all of our decisions. So I need people to open issues, to open them often, and to open them early.</p>
<h2 id="processes-make-em-easy">Processes. Make &#39;em easy.</h2>
<p>I work with people, not with robots. While I trust them and I know they&#39;re good at what they do, I just can&#39;t expect them not to make mistakes, or in that case follow processes with no clear incentive. So I needed to remove friction when opening issues. When we interact with code, it&#39;s from the command line: we craft commits, we deploy to production, we even close issues from the command line (while crafting commits). So we should also open issues from the terminal.</p>
<p>My first try was to use the ruby gitlab CLI, but it had several issues:</p>
<ul>
<li>configuration was done with environment variables</li>
<li>it&#39;s written in ruby and can be complicated to install</li>
<li>the output is more or less database rows in ascii tables</li>
<li>you have to specify which project you&#39;re talking about</li>
</ul>
<p>Even though I&#39;ve written documentation and showed people how to use it, it was not used a lot. When a tool feels like a hack, nobody wants to use it.</p>
<h3 id="what-i-wanted">What I wanted</h3>
<p>I needed two things to get a tool people would use:</p>
<ul>
<li>automatically know which project we&#39;re talking about</li>
<li>config files to avoid having to mess with env variables (and leak GitLab tokens)</li>
</ul>
<p>To avoid ruby installation issues, I&#39;ve decided to use <a href="https://www.rust-lang.org/">Rust</a>. There&#39;s a lot of available libraries, the build system works well, it&#39;s sufficiently expressive to let me express what I want, and in the end I get a nice binary.</p>
<h4 id="xdg-basedir-respect-it">XDG basedir. Respect it.</h4>
<p>Reading GitLab credentials from a file is not really hard. One common mistake is to put config files directly in <code>~</code> like some kind of animal. Instead of cluttering users&#39; home directories, I followed the <a href="https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html">XDG basedir spec</a>. Most languages have a library which handles it for you, so it really is a no-brainer (and it works out of the box on Windows as well).</p>
<h4 id="infer-information-from-context">Infer information from context</h4>
<p>To know where the issues should be opened, <code>issues-helper</code> looks at the <code>origin</code> remote of the current git repo. From that, it knows what to do. Even if you&#39;re not currently in the right repo,</p>
<pre><code class="language-bash">j my-project # autojump is great
gli o &quot;My issue&quot; # that&#39;s it
</code></pre>
<h2 id="tools-open-source-them">Tools. Open Source them.</h2>
<p>Once I had this working, not only people started using this tool, but people improved it: <a href="https://twitter.com/keruspe">@keruspe</a> fixed a lot of issues quite quickly. So the next step was to un-hardcode every Clever Cloud specific things in the codebase (then rebase everything, fun afternoon).</p>
<p>Once it was on GitHub, I got more contributions (from inside and outside). Also, it made me add GitHub support: not being able to use issues-helper to manage its own issues quickly got very frustrating.</p>
<p>Supporting GitHub also made me contribute on the GitHub crate, thus closing a vertuous circle.</p>
<p>There are <a href="https://github.com/CleverCloud/issues-helper/issues">a few issues left</a>. Feel free to chime in, I&#39;ll help you get started. It&#39;s a good way to start working on a Rust project!</p>
<h2 id="how-its-done">How it&#39;s done</h2>
<p>The tool itself doesn&#39;t hold a lot of business logic. It parses a project location from a git remote, reads config from a file, sends a few HTTP requests and displays useful information.</p>
<h3 id="cli-arguments-parsing">CLI arguments parsing</h3>
<p>It&#39;s one of the most important parts of a program, since it&#39;s the UI. The Rust ecosystem has <a href="https://clap.rs/">clap</a> which handles everything: parsing, help and even autocompletion.</p>
<p>Unfortunately, the parsed values are exposed through a <code>Map&lt;String,String&gt;</code>, so even though parsing checks structure, you have to recreate the structure yourself. In practice, you end up with a bunch of <code>value.unwrap(); // this should never fail</code>.</p>
<p>Fortunately, there&#39;s <a href="https://crates.io/crates/structopt">Structopt</a>, which generates clap config from Rust data structures: all the dirty stuff is handled for you, and you get nice structs and enums. Yay!</p>
<h3 id="config-files">Config files</h3>
<p>Config is in a toml file, config file location is handled by the <a href="https://crates.io/crates/xdg">xdg crate</a>. Remember: every time you add files to <code>~</code>, a cute puppy dies.</p>
<h2 id="so">So</h2>
<p>Having processes in a team is a good thing, but if you don&#39;t document them, you can&#39;t expect people to respect them. If processes don&#39;t make everyone&#39;s life easier, you can&#39;t expect people to respect them. One simple way to make processes stick is to provide tooling to make them the easiest path. A bash script is cool, but mainly for its author. A stable CLI tool with a good UI, written in a robust language is not a lot of work and will age <em>way</em> better.</p>
<p><em>Post illustration: The Sorcerer&#39;s Apprentice, Disney Movies. Friden calculating machine. Credits: Disney</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Manage your Conference CFP</title>
		<link>https://www.clever.cloud/blog/features/2018/01/30/manage-cfp/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Tue, 30 Jan 2018 11:11:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[play]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[Scala]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2018/01/30/manage-cfp/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/cfps-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="cfps 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/cfps-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/cfps-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/cfps-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/cfps-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/cfps-1-1368x528.jpg 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>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.</p>
<span id="more-2927"></span>

<p>Just like organizing a conference, managing a CFP can become cumbersome. That&#39;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 <a href="http://www.cfp.io/">cfp.io</a> and the <a href="https://cfp.devoxx.fr/">Devoxx family</a>.</p>
<p>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.</p>
<h2 id="setup">Setup</h2>
<p>The application is written in Scala and is based on Play Framework:</p>
<blockquote>
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.
</blockquote>

<p>You will find the code on our good friend <a href="https://github.com/nicmarti/cfp-devoxx">Nicolas Martignole&#39;s Github account</a>. 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&#39;t worry, you don&#39;t need everything from the start.</p>
<p>If you want to tag along, make sure you have Git, a Clever Cloud account and that you have installed our CLI <a href="https://www.clever.cloud/developers/clever-tools/getting_started/">Clever-Tools</a>. Let&#39;s start:</p>
<ul>
<li>Clone the project: <code>git clone https://github.com/nicmarti/cfp-devoxx</code></li>
<li>Get in the project: <code>cd cfp-devoxx</code></li>
<li>Create the Redis add-on: <code>clever addon create redis-addon --plan s --region eu redisCFP</code></li>
<li>Create the FS Bucket add-on: <code>clever addon create fs-bucket --plan s --region eu fsCFP</code></li>
<li>Create the application: <code>clever create --type sbt MyCFP </code></li>
<li>Link the Redis add-on: <code>clever service link-addon redisCFP</code></li>
<li>Link the FS Bucket add-on: <code>clever service link-addon fsCFP</code></li>
<li>Define where to mount our FS Bucket: <code>clever env set CC_FS_BUCKET /devoxx-content:`clever env | awk  -F = &#39;/BUCKET_HOST/ { print $2}&#39;` </code></li>
<li>Remove the old FSBucket configuration: <code>git rm clevercloud/buckets.json &amp;&amp; git commit -m&quot;remove old bucket configuration&quot;</code></li>
<li>Copy the production configuration sample: <code>cp conf/redis-sample-prod.conf application.conf </code></li>
<li>Add your changes and commit them: <code>git add application.conf;git commit -m&quot;add default conf&quot;</code></li>
</ul>
<p>We now have to configure the application using environment variables, here is my dummy test configuration:</p>
<pre><code class="language-bash">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
</code></pre>
<p>You can copy/paste this in the <em>Environment variables</em> tab of your application using the <em>Expert Mode</em>. Make sure you set the value of <em>CFP_HOSTNAME</em> to your domain name; Clever Cloud will assign one by default: take a look at the <em>Domain Names</em> tab in our web console to see it or change it (or use <code>clever domain</code>).</p>
<p>And that&#39;s it, your configuration is done. The next step is to deploy your application by running <code>clever deploy</code>.</p>
<h2 id="whats-next">What&#39;s next?</h2>
<p>Your application should be running now. You can run <code>clever open</code> to make sure it is. It will open it in your default browser.</p>
<img alt="Default CFP homepage" src="https://www2.cleverapps.io/app/uploads/2021/08/cfp_devoxx.png"/>

<p>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&#39;t have any partnership with e-mails providers, you can ping our support team for the Elastic instance. It&#39;s currently in private beta and should soon be open to the public.</p>
<p>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 <a href="https://github.com/nicmarti/cfp-devoxx/blob/dev/conf/application.conf.prod">conf/application.conf.prod</a>. I believe some of them are not mandatory. It would be great to have a documentation update just for the environment variables.</p>
<p>If you are going to use this for your conference, remember to activate autoscaling: <code>clever scale --min-instances 1 --max-instances 2</code>. And if you dread the weekend before your CFP closes, increase the number of minimum instances with <code>clever scale --instances 2</code>.</p>
<p><em>Post illustration: Computer at her work with microscope and the Friden calculating machine. Credits: NASA</em></p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/cfps-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="cfps 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/cfps-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/cfps-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/cfps-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/cfps-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/cfps-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>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.</p>
<span id="more-2927"></span>

<p>Just like organizing a conference, managing a CFP can become cumbersome. That&#39;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 <a href="http://www.cfp.io/">cfp.io</a> and the <a href="https://cfp.devoxx.fr/">Devoxx family</a>.</p>
<p>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.</p>
<h2 id="setup">Setup</h2>
<p>The application is written in Scala and is based on Play Framework:</p>
<blockquote>
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.
</blockquote>

<p>You will find the code on our good friend <a href="https://github.com/nicmarti/cfp-devoxx">Nicolas Martignole&#39;s Github account</a>. 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&#39;t worry, you don&#39;t need everything from the start.</p>
<p>If you want to tag along, make sure you have Git, a Clever Cloud account and that you have installed our CLI <a href="https://www.clever.cloud/developers/clever-tools/getting_started/">Clever-Tools</a>. Let&#39;s start:</p>
<ul>
<li>Clone the project: <code>git clone https://github.com/nicmarti/cfp-devoxx</code></li>
<li>Get in the project: <code>cd cfp-devoxx</code></li>
<li>Create the Redis add-on: <code>clever addon create redis-addon --plan s --region eu redisCFP</code></li>
<li>Create the FS Bucket add-on: <code>clever addon create fs-bucket --plan s --region eu fsCFP</code></li>
<li>Create the application: <code>clever create --type sbt MyCFP </code></li>
<li>Link the Redis add-on: <code>clever service link-addon redisCFP</code></li>
<li>Link the FS Bucket add-on: <code>clever service link-addon fsCFP</code></li>
<li>Define where to mount our FS Bucket: <code>clever env set CC_FS_BUCKET /devoxx-content:`clever env | awk  -F = &#39;/BUCKET_HOST/ { print $2}&#39;` </code></li>
<li>Remove the old FSBucket configuration: <code>git rm clevercloud/buckets.json &amp;&amp; git commit -m&quot;remove old bucket configuration&quot;</code></li>
<li>Copy the production configuration sample: <code>cp conf/redis-sample-prod.conf application.conf </code></li>
<li>Add your changes and commit them: <code>git add application.conf;git commit -m&quot;add default conf&quot;</code></li>
</ul>
<p>We now have to configure the application using environment variables, here is my dummy test configuration:</p>
<pre><code class="language-bash">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
</code></pre>
<p>You can copy/paste this in the <em>Environment variables</em> tab of your application using the <em>Expert Mode</em>. Make sure you set the value of <em>CFP_HOSTNAME</em> to your domain name; Clever Cloud will assign one by default: take a look at the <em>Domain Names</em> tab in our web console to see it or change it (or use <code>clever domain</code>).</p>
<p>And that&#39;s it, your configuration is done. The next step is to deploy your application by running <code>clever deploy</code>.</p>
<h2 id="whats-next">What&#39;s next?</h2>
<p>Your application should be running now. You can run <code>clever open</code> to make sure it is. It will open it in your default browser.</p>
<img alt="Default CFP homepage" src="https://www2.cleverapps.io/app/uploads/2021/08/cfp_devoxx.png"/>

<p>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&#39;t have any partnership with e-mails providers, you can ping our support team for the Elastic instance. It&#39;s currently in private beta and should soon be open to the public.</p>
<p>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 <a href="https://github.com/nicmarti/cfp-devoxx/blob/dev/conf/application.conf.prod">conf/application.conf.prod</a>. I believe some of them are not mandatory. It would be great to have a documentation update just for the environment variables.</p>
<p>If you are going to use this for your conference, remember to activate autoscaling: <code>clever scale --min-instances 1 --max-instances 2</code>. And if you dread the weekend before your CFP closes, increase the number of minimum instances with <code>clever scale --instances 2</code>.</p>
<p><em>Post illustration: Computer at her work with microscope and the Friden calculating machine. Credits: NASA</em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
