Skip to content

Commit

Permalink
chore: add arm support for vagrant
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
Dominik Rosiek committed Jun 10, 2024
1 parent aaa00c5 commit 1f92849
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 8 additions & 2 deletions vagrant/provision.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/bin/bash

set -euo pipefail

ARCH="$(dpkg --print-architecture)"

sudo apt-get update

# Install Python
Expand All @@ -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
Expand Down

0 comments on commit 1f92849

Please sign in to comment.