aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/todo.rst4
-rw-r--r--share/config/provision/tpc.conf5
-rwxr-xr-xshare/hydractl/provision15
3 files changed, 18 insertions, 6 deletions
diff --git a/doc/todo.rst b/doc/todo.rst
index a4ab4e5..aada1de 100644
--- a/doc/todo.rst
+++ b/doc/todo.rst
@@ -10,4 +10,6 @@ TODO
- compile:
- per-node compiled files (node/nodename.yaml and secrets/node/nodename.yaml).
- backups: automatic definitions for per-node backup::users.
-- import-certs: concat.pem.
+- import-certs:
+ - concat.pem.
+ - cert.pem and cert.crt symlinks.
diff --git a/share/config/provision/tpc.conf b/share/config/provision/tpc.conf
index b0a6e74..5b9b932 100644
--- a/share/config/provision/tpc.conf
+++ b/share/config/provision/tpc.conf
@@ -4,7 +4,8 @@
#
interactive="n" # Interactive mode?
-swap_size="20G" # Size of swap partition
+swap_size="8G" # Size of swap partition
+root_size="-1" # Size of root partition
home_size="0" # Size of home partition
var_size="0" # Size of var partition
encrypt="y" # Encrypt volumes?
@@ -12,6 +13,6 @@ garbage="n" # Pre-fill volumes with garbage?
disable_zeroing="n" # Disable zeroing of lvm volumes?
random_swap="n" # Random swap?
arch="amd64" # System arch
-version="wheezy" # Distro version
+version="jessie" # Distro version
grub="y" # Setup GRUB?
mirror="http://http.debian.net/debian/" # Debian mirror
diff --git a/share/hydractl/provision b/share/hydractl/provision
index 70e52e5..e186213 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -94,8 +94,8 @@ function hydra_provision_config {
hydra_user_config interactive y "Interactive mode? (y/n)"
hydra_user_config device /dev/sdb "Destination device"
- hydra_user_config root_size 20G "Size of root partition (-1 for all free space)"
hydra_user_config swap_size 2000 "Swap size (in MB, 0 to not create it)"
+ hydra_user_config root_size 20G "Size of root partition (-1 for all free space)"
hydra_user_config home_size 20G "Size of home partition (0 to not create it, -1 for all free space)"
hydra_user_config var_size 20G "Size of var partition (0 to not create it, -1 for all free space)"
hydra_user_config encrypt y "Encrypt volumes? (y/n)"
@@ -177,15 +177,17 @@ if ! vgdisplay $vg &> /dev/null; then
hydra_sudo_run vgcreate $vg $syst_device
fi
-# Create root partition.
+# Activate volume group
hydra_sudo_run vgchange -a y $vg
-hydra_provision_lvcreate root $root_size
# Create swap partition
if [ "$swap_size" != "0" ]; then
hydra_provision_lvcreate swap $swap_size
fi
+# Create root partition.
+hydra_provision_lvcreate root $root_size
+
# Create home partition.
if [ "$home_size" != "0" ]; then
hydra_provision_lvcreate home $home_size
@@ -446,6 +448,7 @@ hydra_provision_networking
# Ssh.
echo "Installing OpenSSH daemon..."
$APT_INSTALL openssh-server -y
+hydra_sudo_run chroot $WORK/ service ssh stop
# Accounts.
echo "Installing sudo..."
@@ -457,6 +460,12 @@ hydra_sudo_run chroot $WORK passwd root
# Fingerprints
hydra_provision_fingerprints
+# Turn off device
+hydra_sudo_run umount $WORK/sys $WORK/proc $WORK/dev $WORK
+hydra_sudo_run cryptsetup luksClose provision-swap
+hydra_sudo_run cryptsetup luksClose provision-root
+hydra_sudo_run vgchange -a n $vg
+
cat <<-EOF
Now proceeed with final steps: