diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..d1a634b --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,58 @@ +# -*- mode: ruby -*- +# vi:set ft=ruby sw=2 ts=2 sts=2: + +# Define how much memory your computer has in GB (e.g. 8, 16) +# Larger nodes will be created if you have more. +RAM_SIZE = 16 + +# Define how mnay CPU cores you have. +# More powerful workers will be created if you have more +CPU_CORES = 8 + +# Internal network prefix for the VM network +# See the documentation before changing this +IP_NW = "192.168.56." + +Vagrant.configure("2") do |config| + config.vm.box = "debian/bookworm64" + config.vm.boot_timeout = 900 + config.vm.box_check_update = true + + # Network + config.vm.hostname = PRJ_HOSTNAME + # FIXME: Change bridge adapter name and IP address according to your environment + # For exanple, I use eno1 and IP address 10.0.0.128/28 + config.vm.network "public_network", + bridge: "eno1", ip: "10.0.0.131", hostname: true + + config.vm.network "forwarded_port", guest: 80, host: 8080, + auto_correct: true + config.vm.network "forwarded_port", guest: 443, host: 8443, + auto_correct: true + + config.vm.synced_folder "../drupal8-website", PRJ_DIR + + # Config for hypervisor + # config.vm.provider "hyperv" do |hv| + # and change all vb. to hv. + config.vm.provider "virtualbox" do |vb| + vb.name = PRJ_NAME + + vb.memory = "2048" + vb.cpus = "2" + + vb.gui = false + vb.customize ["modifyvm", :id, "--audio", "none"] + end + + config.vm.provision "file", + source: "~/.ssh/id_ed25519.pub", destination: "~/.ssh/me.pub" + + config.vm.provision "shell", inline: <<-SHELL + sudo apt-get update + sudo apt-get install -y openssh-server + cat /home/vagrant/.ssh/me.pub >> /home/vagrant/.ssh/authorized_keys + cat /home/vagrant/.ssh/me.pub >> /root/.ssh/authorized_keys + SHELL + + end diff --git a/play b/play deleted file mode 100755 index 1df196f..0000000 --- a/play +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -# Check if poetry is installed -if ! type poetry &>/dev/null; then - echo "Poetry is not installed. Please install it first." - echo "See https://python-poetry.org/docs/#installation for more information." - echo "curl -sSL https://install.python-poetry.org | python3 -" - exit 1 -# Check if poetry environment is exist, if not, install it -elif [[ ! -d .venv ]]; then - export POETRY_VIRTUALENVS_PATH=./.venv - poetry install -fi - -export ANSIBLE_CONFIG=./ansible.cfg - -poetry run ansible-playbook "$@" - -exit $? diff --git a/vm/README.md b/vm/README.md index 06d52b4..ba8bca6 100644 --- a/vm/README.md +++ b/vm/README.md @@ -20,3 +20,4 @@ also required for successful pod networking. ## Other settings 1. Install configs for `vim` and `tmux` on master-1 + diff --git a/vm/debian/vimrc b/vm/debian/vimrc index 50c093d..9fbeb42 100644 --- a/vm/debian/vimrc +++ b/vm/debian/vimrc @@ -14,7 +14,6 @@ Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'ekalinin/Dockerfile.vim' -Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } } call plug#end() highlight LineNr ctermfg=grey diff --git a/vm/grafana.yaml b/vm/grafana.yaml index 3a97613..ebf5257 100644 --- a/vm/grafana.yaml +++ b/vm/grafana.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: Pod metadata: