annotate posts/Propellor_and_Pi.md @ 34:226daad31c1b

Fix a missed typo.
author Samuel Hodgkins <samuel.hodgkins@sky.com>
date Wed, 25 Oct 2017 03:55:34 +0100
parents 2307e281b4b7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
7aaa5b28857f Add nice/useful links to post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents: 6
diff changeset
1 [[!meta title="Propellor and a Raspberry Pi 3" author="samis"]]
13
2307e281b4b7 tagify all the things
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents: 10
diff changeset
2 [[!tag tech linux servers propellor archlinuxarm]]
6
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
3 I've given a number of configuration management tools a whirl - Puppet, Chef, Salt, Ansible.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
4 Chef and Puppet started nice, but seemed complex to use given my small needs.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
5 Salt and Ansible had potential and features unique to either, but I've never liked using YAML syntax, and this showed.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
6
10
212b64ea9488 Fix typos
samis <samis@web>
parents: 7
diff changeset
7 Recently I've looked into [Propellor](https://propellor.branchable.com/), a configuration management system written in Haskell with the interface being a DSL in the same language.
6
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
8 I've never been a Haskeller, indeed I'm an unrepentant fan of Smalltalk's beautiful OO simplicity - so why?
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
9
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
10 1. The provided DSL looked interesting and readable. More readable than YAML at any rate (and likely the DSLs of the other two)
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
11 2. Despite being written in and using Haskell, it claimed that knowledge of it was not a prerequisite.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
12 3. The 'getting started' process wasn't complex. The most difficult part was waiting for GHC and dependencies to be compiled (Gentoo.)
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
13 4. Unlike with Chef or Puppet, there was no fancy layered complexity of the tool itself. No fancy 'structures' like Librarian, R10K and Berkshelf for Chef. No large servers requiring gigabytes of RAM all the time.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
14
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
15 I got started, there were and remain some niggles and quirks on the road - for example my VPS needed special bootstrapping attention (interestingly the problem was fixed upstream the same day I worked around it)
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
16 Soon enough two of three boxen of interest had a no-op configuration applied, indicating that the program was working correctly for future usage. But what happened to that third one? It's a long story.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
17
7
7aaa5b28857f Add nice/useful links to post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents: 6
diff changeset
18 This third box was my [Raspberry Pi 3](https://cdn.shopify.com/s/files/1/0174/1800/products/Rainbow_1_of_3_47e94e82-ba3a-4804-a280-3140109cd304_1024x1024.jpg?v=1456669057) running [Arch Linux ARM](https://archlinuxarm.org/).
6
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
19
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
20 # My attempts
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
21
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
22 First I tried just installing GHC. Didn't work, linking errors (later I found there were missing static libraries)
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
23 Then I tried to get a known-good compiler via Stack...before realizing it didn't have ARM binaries. It also didn't work well with the previously mentioned compiler.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
24 I then tried installing an additional package that contained the static libraries. That almost worked...but I later found it to be incomplete Oh well.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
25
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
26 # Getting weirder and crazier...
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
27
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
28 My next plan was very weird: Taking the Debian packaged binaries and running them on my system. This worked when in my home directory....but magically stopped working when installed system-wide (??)
10
212b64ea9488 Fix typos
samis <samis@web>
parents: 7
diff changeset
29 The one that actually succeeded (the most) was simpler: Grab a generic binary release tarball and extract it into /usr/local. This actually worked, no linking errors woo!
6
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
30
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
31 # Close, but no cigar..yet
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
32 This meant the compiler was actually working, but when it came to install the software, the newer compiler meant I had to use a newer snapshot of packages.
10
212b64ea9488 Fix typos
samis <samis@web>
parents: 7
diff changeset
33 This brought dependency problems, which could be solved by compiling and installing another program.
6
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
34 I did what was needed, and the program was compiling. The speed was slow, much slower than the my 'hello world' tests.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
35
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
36 And then, in the middle, it hung. It still answered ping requests, but I couldn't type or SSH in.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
37 I tried rebooting, with the intent of trying again either the same method or differently. Unfortunately, the system didn't come up on wifi afterwards.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
38 Nor did it come up when connected via Ethernet.
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
39
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
40 What was wrong? Plugging in a HDMI cable told me that, and it was 'fsck: UNEXPECTED INCONSISTENCY. Run fsck manually.'
a2460c562582 First draft of new post
Samuel Hodgkins <samuel.hodgkins@sky.com>
parents:
diff changeset
41 I couldn't properly handle this because the receiver for my USB keyboard was godknowswhere.
10
212b64ea9488 Fix typos
samis <samis@web>
parents: 7
diff changeset
42 I need to handle this offline, which means digging out my laptop and using it's sdcard slot. I think I'll take the opportunity to downgrade the compiler while I'm at it. Maybe pre-compile some software if the emulation isn't too bad.