fix: split vagrant provisioning into multiple parts
This commit is contained in:
parent
27508ed5ac
commit
afb97e0a89
4 changed files with 55 additions and 39 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'
|
machine.vm.network 'forwarded_port', guest: 80, host: 1080, host_ip: '127.0.0.1'
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provision 'shell', path: 'scripts/vagrant.provision.sh'
|
config.vm.provision 'shell', path: 'scripts/vagrant-provision/base.sh'
|
||||||
end
|
end
|
||||||
|
|
32
scripts/vagrant-provision/base.sh
Normal file
32
scripts/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
|
||||||
|
|
|
@ -9,26 +9,6 @@ HOSTNAME="$(hostname)"
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
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 recording requirements"
|
|
||||||
apt-get install -y \
|
|
||||||
tmux \
|
|
||||||
mdp \
|
|
||||||
bat \
|
|
||||||
asciinema \
|
|
||||||
termtosvg
|
|
||||||
|
|
||||||
echo "Installing mfm requirements"
|
echo "Installing mfm requirements"
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
fzf \
|
fzf \
|
||||||
|
@ -39,24 +19,6 @@ apt-get install -y \
|
||||||
libpcre3-dev \
|
libpcre3-dev \
|
||||||
libevent-dev
|
libevent-dev
|
||||||
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -u
|
|
||||||
|
|
||||||
USER="$(test -d /vagrant && echo "vagrant" || echo "debian")"
|
|
||||||
CLUSTERS_DIR=/home/$USER/clusters
|
|
||||||
|
|
||||||
# Installation de kompose
|
|
||||||
if [ ! -f /usr/local/bin/kompose ]; then
|
|
||||||
DL="$(mktemp)"
|
|
||||||
curl \
|
|
||||||
-L https://github.com/kubernetes/kompose/releases/download/v1.22.0/kompose-linux-amd64 \
|
|
||||||
-o "$DL"
|
|
||||||
chmod +x "$DL"
|
|
||||||
mv "$DL" /usr/local/bin/kompose
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Installing asdf
|
# Installing asdf
|
||||||
su - "$USER" -c "git config --global advice.detachedHead false"
|
su - "$USER" -c "git config --global advice.detachedHead false"
|
||||||
su - "$USER" -c "rm -rf ~/.asdf"
|
su - "$USER" -c "rm -rf ~/.asdf"
|
22
scripts/vagrant-provision/recording.sh
Normal file
22
scripts/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