tag:josephlord.svbtle.com,2014:/feedJoseph Lord2014-01-30T08:48:40-08:00Joseph Lordhttps://josephlord.svbtle.comSvbtle.comtag:josephlord.svbtle.com,2014:Post/svtle-vs-posthaven2014-01-30T08:48:40-08:002014-01-30T08:48:40-08:00Svbtle vs. Posthaven<p>I’m giving <a href="http://svbtle.com">Svbtle</a> a try having used <a href="http://posthaven.com">Posthaven</a> for a few months. This is a quick comparison of how I find the two and a little commentary on some of the alternatives I’ve considered but haven’t yet tried. See <a href="http://blog.jtl.me.uk/svbtle-vs-posthaven">this post on Posthaven</a>.</p>
<h1 id="background_1">Background <a class="head_anchor" href="#background_1">#</a>
</h1>
<p>I’m fairly new to blogging, I’d been meaning to set up a blog for some time either off based on an existing open source blog/cms or creating my own basic one in Rails or Django but I hadn’t got round to it. I liked the attitude of Posthaven when it appeared, we will charge you money but you get to keep your name for life and I think it came out of the experience of one of the founders losing control of Posterious and it’s shutdown.</p>
<h1 id="posthaven-summary_1">Posthaven Summary <a class="head_anchor" href="#posthaven-summary_1">#</a>
</h1>
<ul>
<li>Costs $5/month for upto 10 blogs</li>
<li>GUI post editor (a little clunky but it works)</li>
<li>
<a href="https://posthaven.com/our_pledge">Commitment</a> to long term platform</li>
<li>Comments supported</li>
</ul>
<h2 id="advantages_2">Advantages <a class="head_anchor" href="#advantages_2">#</a>
</h2>
<ul>
<li>Permanence/business model</li>
<li>Manage multiple blogs including anonymous and/or private blogs and posts.</li>
</ul>
<h2 id="disadvantages_2">Disadvantages <a class="head_anchor" href="#disadvantages_2">#</a>
</h2>
<ul>
<li>Some of the Posthaven features require Facebook, Twitter, Scribd, Google Analytics scripts in the page and these are loaded (with associated privacy issues) on all your pages.</li>
<li>Not yet any way to theme/customise design which I don’t need for my general blogs but may want for special ones.
# Svtle Summary</li>
<li>No cost (or business model)</li>
<li>Clean (bare) design</li>
</ul>
<h2 id="advantages_2">Advantages <a class="head_anchor" href="#advantages_2">#</a>
</h2>
<ul>
<li>Clean UI very clean (bare but I like it) page design.</li>
</ul>
<h2 id="disadvantages_2">Disadvantages <a class="head_anchor" href="#disadvantages_2">#</a>
</h2>
<ul>
<li>Lack of business model, no confidence in it staying ad-free and free in even the short/medium term.</li>
<li>No hit count - only Kudos.</li>
<li>Seems to add editorial subheadlines for you “Read this first”, “More by Joseph”
# Alternatives</li>
<li>Wordpress is obviously the monster but feels over complicated and reportedly nasty to write plugins for so I personally wouldn’t want to get too deep into it. You can get it hosted or run local.</li>
<li>
<a href="http://medium.com">Medium</a> which might be worth a look but requires a Twitter login so I haven’t tried. I also got put off by many of the articles on HackerNews that were linked to there being poor.</li>
</ul>
<h3 id="self-hosting_3">Self hosting <a class="head_anchor" href="#self-hosting_3">#</a>
</h3>
<p>I hadn’t got round to getting set up myself so this would sort of defeat the purpose but there are a few options that I would consider.</p>
<ul>
<li>Ghost seems like quite an interesting option that I should look at although it is Node so I might need to learn some Javascript if I was going to modify it at all. Hosted cost $5/month even for a single blog. Officially it only supports SQLite and MySQL - Postgres works but isn’t high enough priority to <a href="https://github.com/TryGhost/Ghost/issues/1801#issuecomment-31535224">delay releases</a>.</li>
<li>Octopress / <a href="http://jekyllrb.com/">Jekyll</a> is probably where I should be going in the short term. I could self host or push to Github pages for this sort of thing and it supports Markdown which I am increasingly comfortable with.</li>
<li>Something hacked together with Rails or Django. No time to get it set up or support it in future.</li>
</ul>
<h1 id="conclusion_1">Conclusion <a class="head_anchor" href="#conclusion_1">#</a>
</h1>
<p>I’m not quite happy with either for different reasons, will probably self host in the future. </p>
<p>The scripts from Google and Facebook will probably cause me to move away from Posthaven fairly soon. I use Noscript to avoid them when I am browsing and I would prefer not to impose them on readers as that would be hypocritical (although it does work fine without them if they are Noscript users).</p>
<p>As for Svbtle while I quite like the design and using Markdown but the lack of current business model bothers me and I’d rather migrate at my time of choosing than when they announce some new policy.</p>
tag:josephlord.svbtle.com,2014:Post/a-week-with-docker2014-01-29T04:31:16-08:002014-01-29T04:31:16-08:00A Week with Docker<p>This is a test post on svbtle, it will also be posted at my usual site for such things: <a href="http://blog.human-friendly.com">blog.human-friendly.com</a> which is thus far hosted on Posthaven. It is a bit of a brain dump rather than a fully polished and edited post, in the unlikely event it gets any significant viewership I’ll try to clean it up.</p>
<p>This is some initial thoughts and experiences with using <a href="http://docker.io">Docker</a> for about a week. Specifically I was getting <a href="http://www.atlassian.com/jira">JIRA</a> up and running in Docker on Rackspace for my own use (and it directly receives crash reports from some of my iOS apps). I also used it on my home server to set up a build environment for a JIRA plugin.</p>
<h1 id="general-docker-thoughts_1">General Docker Thoughts <a class="head_anchor" href="#general-docker-thoughts_1">#</a>
</h1>
<p>Docker is nice, new containers spin up quickly, the documentation is OK. It is still pre-1.0 so moving fast and much of the online articles about it are out of date already. This isn’t really the first place you should look for information so I’m generally not going to explain syntax or concepts except to give my understanding of the difference between images and containers.</p>
<h2 id="containers_2">Containers <a class="head_anchor" href="#containers_2">#</a>
</h2>
<p>A container is a runnable environment that you can think of as a lightweight virtual machine. You will normally not run any services or daemons in the container but instead invoke a single command within it (which may be to run a server that would often be run as a daemon). Containers may be running or stopped.</p>
<h2 id="images_2">Images <a class="head_anchor" href="#images_2">#</a>
</h2>
<p>These are frozen checkpoints of containers from which NEW containers may be created. Images may be checked into repositories. For me some of the documentation and examples has a little too much focus on images rather than the containers themselves.</p>
<h2 id="commands_2">Commands <a class="head_anchor" href="#commands_2">#</a>
</h2><h3 id="docker-images_3">docker images <a class="head_anchor" href="#docker-images_3">#</a>
</h3>
<p>This lists the images (optionally in a tree structure).</p>
<h3 id="docker-ps_3">docker ps <a class="head_anchor" href="#docker-ps_3">#</a>
</h3>
<p>This lists the RUNNING containers unless you add the -a argument to see them all. For starting out it would be nice if <code class="prettyprint">docker containers</code> was an alias for <code class="prettyprint">docker ps -a</code> as it wasn’t initially obvious how to see stopped containers.. </p>
<h2 id="name-your-containers_2">Name your containers <a class="head_anchor" href="#name-your-containers_2">#</a>
</h2>
<p>For your sanity I suggest naming your containers from the very beginning. This makes, starting, stopping, deleting and attaching to them much easier. Names are automatically generated but they are a bit long for convenience. When you start combining containers names are essential.</p>
<h3 id="you-can39t-rename-your-containers_3">You can’t rename your containers <a class="head_anchor" href="#you-can39t-rename-your-containers_3">#</a>
</h3>
<p>At least I don’t think so yet. I believe at the moment to rename a container you have to make an image of it (<code class="prettyprint">docker commit</code>), then run the image with the name you want it to have (after deleting any existing containers with that name).</p>
<h1 id="docker-on-debian_1">Docker on Debian <a class="head_anchor" href="#docker-on-debian_1">#</a>
</h1>
<p>I think to do it simply you need to be running Jessie (current Unstable) as the Sid kernel is too old according to the Docker website. Jessie seems to run fine. This was an issue on my home server as I’d just migrated to Debian from Ubuntu.</p>
<h1 id="disk-space_1">Disk space <a class="head_anchor" href="#disk-space_1">#</a>
</h1>
<p>You can quite quickly fill up a number of GB of space. The default location is in /var (/var/lib/docker). My initial partitioning didn’t have a very large /var. So I created a new partition for docker using lvm, moved the contents of the docker folder over and set up a symlink. A settings change would have been an alternative approach. Again this was an issue on my home </p>
<h1 id="docker-files_1">Docker files <a class="head_anchor" href="#docker-files_1">#</a>
</h1>
<p>I haven’t yet created Docker files and have done experimentation from the commandline inside the containers to get it working. Now I have things working I’ll try to get it set up for easy rebuilding.</p>
<h1 id="the-jira-server-setup_1">The JIRA server setup <a class="head_anchor" href="#the-jira-server-setup_1">#</a>
</h1>
<p>Three containers:</p>
<ol>
<li>Postgresql database exposing port 5432 only internally within the docker host.</li>
<li>JIRA host itself exposing 8080.</li>
<li>Apache2 server to run in front as the SSL endpoint rather than have JIRA itself handling the SSL.</li>
</ol>
<h2 id="postgresql_2">Postgresql <a class="head_anchor" href="#postgresql_2">#</a>
</h2>
<p>This host is fairly vanilla with not much custom setup using Postgres 9.3 from the Postgres apt packages. Created a jira database and user. This can definitely be shared by other containers that required databases. I still need to set up DB backups and will probably create a separate container on which can be started by the host’s cron to perform DB backups.</p>
<h2 id="jira_2">JIRA <a class="head_anchor" href="#jira_2">#</a>
</h2>
<p>I’ve currently got the container running with a hardcoded database IP address rather than using the environment variables created by Docker as the dbsetup.xml file for Docker doesn’t seem to be process environment variables. My next step will be create a script to start the JIRA process that will initially write a new dbsetup.xml file with the correct current IP address and port for the database. I also discovered that if you use the JIRA installer then the Tomcat server is included so you don’t need to install the Tomcat packages from Ubuntu. The setup I have is customised slightly so that it works behind the Apache SSL termination.</p>
<p>The default configuration for JIRA uses too much memory for my small virtual host and a single user. Reducing the memory available dramatically improved the performance and there is more tweaking still to be done as I think I can still squeeze it significantly smaller.</p>
<h2 id="apache2_2">Apache2 <a class="head_anchor" href="#apache2_2">#</a>
</h2>
<p>Obviously needs the appropriate SSL certificates and also needs a number of mods enabling which isn’t too difficult. The config files can pick up the environment variables to forward the requests to the JIRA server. The environment variables should be referenced as <code class="prettyprint">${VARIABLE_NAME}</code></p>
<p>I also need to serve some static files (non-SSL and a different host) and I will probably add this to the same container as I am running on a fairly small virtual host and two Apache instances seems wasteful.</p>
<h1 id="jira-build-environment_1">JIRA Build Environment <a class="head_anchor" href="#jira-build-environment_1">#</a>
</h1>
<p>I rarely use Java so don’t have it installed on most of my machines but I wanted to build <a href="https://bitbucket.org/aroth_iapps/jiraconnect-jiraplugin-iapps">this version</a> of the JIRA Connect Mobile plugin as it seemed to have some improvements over Atlassian’s own version in terms of grouping crash reports. This would obviously require Maven and Java and the JIRA plugin development library. As I don’t regularly use Java I preferred it not to insert itself irremovably into my system so I decided to install and build it within a container.</p>