summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2016-11-04 12:31:57 -0400
committerJoey Hess2016-11-04 12:31:57 -0400
commita9fb42faeb101d2ba33b21787d65a79569457a6e (patch)
treeb16ca9df5051a43bedfdd6554ace206fd20234aa
parente8dfd6b6d8ddf11eb062eaff5eea2335f78acf2f (diff)
parenta271e8abe2845461585c94274884d3d616c77595 (diff)
Merge branch 'joeyconfig'
l---------config.hs2
-rw-r--r--debian/changelog6
-rw-r--r--joeyconfig.hs10
-rw-r--r--privdata/relocate1
-rw-r--r--src/Propellor/Property/HostingProvider/Linode.hs19
5 files changed, 30 insertions, 8 deletions
diff --git a/config.hs b/config.hs
index ec313725..97d90636 120000
--- a/config.hs
+++ b/config.hs
@@ -1 +1 @@
-config-simple.hs \ No newline at end of file
+joeyconfig.hs \ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
index 7baa9d79..99c296d6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+propellor (3.2.2) UNRELEASED; urgency=medium
+
+ * Added Linode.serialGrub property.
+
+ -- Joey Hess <id@joeyh.name> Fri, 21 Oct 2016 14:59:09 -0400
+
propellor (3.2.1) unstable; urgency=medium
* Simplify Debootstrap.sourceInstall since #770217 was fixed.
diff --git a/joeyconfig.hs b/joeyconfig.hs
index 08ff081b..49cc05f1 100644
--- a/joeyconfig.hs
+++ b/joeyconfig.hs
@@ -168,7 +168,7 @@ oyster :: Host
oyster = host "oyster.kitenet.net" $ props
& standardSystem Unstable X86_64
[ "Unreliable server. Anything here may be lost at any time!" ]
- & ipv4 "104.167.117.109"
+ & ipv4 "64.137.221.146"
& CloudAtCost.decruft
& Ssh.hostKeys hostContext
@@ -260,15 +260,14 @@ kite = host "kite.kitenet.net" $ props
& Network.static "eth0" `requires` Network.cleanInterfacesFile
& Apt.installed ["linux-image-amd64"]
- & Linode.chainPVGrub 5
+ & Linode.serialGrub
& Linode.mlocateEnabled
& Apt.unattendedUpgrades
& Systemd.installed
& Systemd.persistentJournal
& Journald.systemMaxUse "500MiB"
& Ssh.passwordAuthentication True
- -- Since ssh password authentication is allowed:
- & Fail2Ban.installed
+ & Fail2Ban.installed -- since ssh password authentication is allowed
& Apt.serviceInstalledRunning "ntp"
& "/etc/timezone" `File.hasContent` ["US/Eastern"]
@@ -446,8 +445,10 @@ pell = host "pell.branchable.com" $ props
& alias "www.olduse.net"
& alias "www.kitenet.net"
& alias "joeyh.name"
+ & alias "www.joeyh.name"
& alias "campaign.joeyh.name"
& alias "ikiwiki.info"
+ & alias "www.ikiwiki.info"
& alias "git.ikiwiki.info"
& alias "l10n.ikiwiki.info"
& alias "dist-bugs.kitenet.net"
@@ -456,6 +457,7 @@ pell = host "pell.branchable.com" $ props
& Apt.installed ["linux-image-amd64"]
& Apt.unattendedUpgrades
& Branchable.server hosts
+ & Linode.serialGrub
-- See https://joeyh.name/code/keysafe/servers/ for requirements.
keysafe :: Host
diff --git a/privdata/relocate b/privdata/relocate
new file mode 100644
index 00000000..271692d8
--- /dev/null
+++ b/privdata/relocate
@@ -0,0 +1 @@
+.joeyconfig
diff --git a/src/Propellor/Property/HostingProvider/Linode.hs b/src/Propellor/Property/HostingProvider/Linode.hs
index 71719d87..fca3df63 100644
--- a/src/Propellor/Property/HostingProvider/Linode.hs
+++ b/src/Propellor/Property/HostingProvider/Linode.hs
@@ -5,9 +5,22 @@ import qualified Propellor.Property.Grub as Grub
import qualified Propellor.Property.File as File
import Utility.FileMode
--- | Linode's pv-grub-x86_64 does not currently support booting recent
--- Debian kernels compressed with xz. This sets up pv-grub chaining to enable
--- it.
+-- | Configures grub to use the serial console as set up by Linode.
+-- Useful when running a distribution supplied kernel.
+-- <https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-distribution-supplied-kernel-with-kvm>
+serialGrub :: Property DebianLike
+serialGrub = "/etc/default/grub" `File.containsLines`
+ [ "GRUB_CMDLINE_LINUX=\"console=ttyS0,19200n8\""
+ , "GRUB_DISABLE_LINUX_UUID=true"
+ , "GRUB_SERIAL_COMMAND=\"serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1\""
+ , "GRUB_TERMINAL=serial"
+ ]
+ `onChange` Grub.mkConfig
+ `requires` Grub.installed Grub.PC
+
+-- | Linode's pv-grub-x86_64 (only used for its older XEN instances)
+-- does not support booting recent Debian kernels compressed
+-- with xz. This sets up pv-grub chaining to enable it.
chainPVGrub :: Grub.TimeoutSecs -> Property DebianLike
chainPVGrub = Grub.chainPVGrub "hd0" "xen/xvda"