From 1f9284983cc6e77233462ea80b521bbe57a0cb6e Mon Sep 17 00:00:00 2001 From: Dominik Rosiek Date: Mon, 10 Jun 2024 11:13:30 +0200 Subject: [PATCH] chore: add arm support for vagrant Signed-off-by: Dominik Rosiek --- Vagrantfile | 8 ++++++++ vagrant/provision.sh | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 090ffaa..68120dc 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -16,6 +16,14 @@ Vagrant.configure('2') do |config| vb.name = 'sumologic-collectd-plugin' end + config.vm.provider "qemu" do |qe, override| + override.vm.box = "perk/ubuntu-2204-arm64" + qe.gui = false + qe.smp = 8 + qe.memory = 16384 + qe.name = 'sumologic-collectd-plugin' + end + config.vm.provision 'shell', path: 'vagrant/provision.sh' config.vm.synced_folder ".", "/sumologic" diff --git a/vagrant/provision.sh b/vagrant/provision.sh index a6552f3..4c540f1 100644 --- a/vagrant/provision.sh +++ b/vagrant/provision.sh @@ -1,3 +1,9 @@ +#!/bin/bash + +set -euo pipefail + +ARCH="$(dpkg --print-architecture)" + sudo apt-get update # Install Python @@ -14,14 +20,14 @@ popd # Install docker curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - add-apt-repository \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + "deb [arch=${ARCH}] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" apt-get install -y docker-ce docker-ce-cli containerd.io usermod -aG docker vagrant # start receiver-mock -sudo docker create -p 3000:3000 --name receiver-mock --restart=always sumologic/kubernetes-tools receiver-mock --print-metrics +sudo docker create -p 3000:3000 --name receiver-mock --restart=always sumologic/kubernetes-tools:2.9.0 receiver-mock --print-metrics sudo docker start receiver-mock # Install collectd