feat: add vagrant provisioning scripts
This commit is contained in:
parent
0df153053d
commit
9390263f1d
4 changed files with 89 additions and 1 deletions
2
Vagrantfile
vendored
2
Vagrantfile
vendored
|
@ -30,5 +30,5 @@ Vagrant.configure('2') do |config|
|
|||
machine.vm.network 'forwarded_port', guest: 80, host: 1080, host_ip: '127.0.0.1'
|
||||
end
|
||||
|
||||
config.vm.provision 'shell', path: 'scripts/vagrant-provision/base.sh'
|
||||
config.vm.provision 'shell', path: 'misc/vagrant-provision/base.sh'
|
||||
end
|
||||
|
|
32
misc/vagrant-provision/base.sh
Normal file
32
misc/vagrant-provision/base.sh
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
USER="$(test -d /vagrant && echo "vagrant" || echo "debian")"
|
||||
HOSTNAME="$(hostname)"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
echo "Installing required system packages"
|
||||
apt-get update --allow-releaseinfo-change
|
||||
apt-get install -y \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
git \
|
||||
curl \
|
||||
wget \
|
||||
vim \
|
||||
gnupg2 \
|
||||
software-properties-common
|
||||
|
||||
# echo "Installing mfm requirements"
|
||||
# apt-get install -y \
|
||||
# fzf \
|
||||
# sshfs \
|
||||
# httpdirfs \
|
||||
# libyaml-0-2 \
|
||||
# libyaml-dev \
|
||||
# libpcre3-dev \
|
||||
# libevent-dev
|
||||
|
34
misc/vagrant-provision/build.sh
Normal file
34
misc/vagrant-provision/build.sh
Normal file
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
|
||||
# install crystal
|
||||
set -e
|
||||
set -u
|
||||
|
||||
USER="$(test -d /vagrant && echo "vagrant" || echo "debian")"
|
||||
HOSTNAME="$(hostname)"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
echo "Installing mfm requirements"
|
||||
apt-get install -y \
|
||||
fzf \
|
||||
sshfs \
|
||||
httpdirfs \
|
||||
libyaml-0-2 \
|
||||
libyaml-dev \
|
||||
libpcre3-dev \
|
||||
libevent-dev
|
||||
|
||||
# Installing asdf
|
||||
su - "$USER" -c "git config --global advice.detachedHead false"
|
||||
su - "$USER" -c "rm -rf ~/.asdf"
|
||||
su - "$USER" -c "git clone --quiet https://github.com/asdf-vm/asdf.git \
|
||||
~/.asdf \
|
||||
--branch v0.8.0"
|
||||
su - "$USER" -c "echo '. \$HOME/.asdf/asdf.sh' >> ~/.bashrc"
|
||||
|
||||
su - "$USER" -c "source \$HOME/.asdf/asdf.sh \
|
||||
&& asdf plugin add crystal 2>&1 \
|
||||
&& asdf install crystal 1.7.3 >/dev/null 2>&1 \
|
||||
&& asdf global crystal 1.7.3"
|
||||
|
22
misc/vagrant-provision/recording.sh
Normal file
22
misc/vagrant-provision/recording.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
# install crystal
|
||||
set -e
|
||||
set -u
|
||||
|
||||
USER="$(test -d /vagrant && echo "vagrant" || echo "debian")"
|
||||
HOSTNAME="$(hostname)"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
echo "Installing required system packages"
|
||||
apt-get update --allow-releaseinfo-change
|
||||
|
||||
echo "Installing recording requirements"
|
||||
apt-get install -y \
|
||||
tmux \
|
||||
mdp \
|
||||
bat \
|
||||
asciinema \
|
||||
termtosvg
|
||||
|
Loading…
Reference in a new issue