From 7078e150d864d23c25a5b13e361a0b085ecb3f67 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Wed, 3 Apr 2019 13:33:11 -0400 Subject: [PATCH] Remove 'hub' alias. Add some vagranty stuff. --- bash/misc_aliases.sh | 1 - provision-host.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 provision-host.sh diff --git a/bash/misc_aliases.sh b/bash/misc_aliases.sh index 2787081..b1d504e 100644 --- a/bash/misc_aliases.sh +++ b/bash/misc_aliases.sh @@ -2,7 +2,6 @@ alias unlock="lpass show -c --password" alias arduino-serial="busybox microcom -t 9600 /dev/ttyUSB0" alias grep='LC_ALL="C" grep' alias bt='transmission-remote' -alias git='hub' alias dockviz="docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock nate/dockviz" alias timestamp="date -u +'%Y%m%d%H%M%S'" alias go='docker run --rm -it -v $(pwd):/go/src/ -w /go/src golang:1.11 go' diff --git a/provision-host.sh b/provision-host.sh new file mode 100755 index 0000000..4347ca6 --- /dev/null +++ b/provision-host.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Must be run as root / sudo + +dnf -y install emacs git tmux gnupg2 dnf-plugins-core make go pinentry + +# docker +dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo +dnf -y install docker-ce docker-ce-cli containerd.io +systemctl enable docker +systemctl start docker + +# docker-machine +DOCKER_MACHINE_URL=https://github.com/docker/machine/releases/download/v0.16.0 +curl -L $DOCKER_MACHINE_URL/docker-machine-$(uname -s)-$(uname -m) > /tmp/docker-machine +install /tmp/docker-machine /usr/local/bin/docker-machine + +# docker-compose +DOCKER_COMPOSE_URL=https://github.com/docker/compose/releases/download/1.23.2 +curl -L $DOCKER_COMPOSE_URL/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose +chmod 755 /usr/local/bin/docker-compose + +# If we want vagrant to work +# dnf -y install libvirt-devel libvirt-glib-devel gcc + +# Security +sed -i 's/^.*PubkeyAuthentication.*$/PubkeyAuthentication yes/' /etc/ssh/sshd_config +sed -i 's/^.*PasswordAuthentication.*$/PasswordAuthentication no/' /etc/ssh/sshd_config +service sshd restart