falcosecurity / cncf-green-review-testing

Falco configurations intended for testing with the CNCF Green Reviews Working Group
Apache License 2.0
1 stars 2 forks source link

[Example] Test VMs for debugging w/ minikube #7

Closed incertum closed 1 month ago

incertum commented 6 months ago

Sharing some example test VMs (vagrant), but don't need to use vagrant, just making it more convenient to have all install commands in one place.


Vagrant.configure("2") do |config|

  unless Vagrant.has_plugin?("vagrant-vbguest")
    raise '[ERROR] vagrant-vbguest is not installed!'
  end

  config.vm.provider "virtualbox" do |v|
    v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    v.memory = "4000"
    v.cpus = "8"
  end

  config.ssh.forward_agent = true

  config.vm.define "ubuntu" do | m |
    m.vm.box = "bento/ubuntu-22.04"
    m.vm.hostname = "ubuntu"
    m.vbguest.auto_update = false
    m.vm.synced_folder '.', '/vagrant'
    m.vm.provision "shell", inline: <<-SHELL
      apt-get update -y;
      apt-get install -y git cmake build-essential pkg-config autoconf libtool libelf-dev dkms;
      apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
      libreadline-dev libsqlite3-dev wget curl llvm clang htop libncurses5-dev libncursesw5-dev \
      xz-utils tk-dev libffi-dev liblzma-dev jq tree;
      apt-get -y install linux-headers-$(uname -r);
      apt-get -y install linux-tools-$(uname -r);
      apt-get -y install linux-cloud-tools-$(uname -r);
      curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh;
      chown vagrant:vagrant /vagrant;
      sudo rm get-docker.sh;
      usermod -aG docker vagrant;
      curl -sL https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb -o /tmp/minikube.deb
      dpkg -i /tmp/minikube.deb
      curl -sL "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -o /tmp/kubectl
      install -o root -g root -m 0755 /tmp/kubectl /usr/local/bin/kubectl

    SHELL

  end

  config.vm.define "fedora36" do | m |
    m.vm.box = "generic-x64/fedora36"
    m.vm.hostname = "fedora36"
    m.vbguest.auto_update = false
    m.vm.synced_folder '.', '/vagrant'
    m.vm.provision "shell", inline: <<-SHELL
      yum update -y;
      yum install -y gcc gcc-c++ git make autoconf automake pkg-config patch libtool glibc-static libstdc++-static elfutils-libelf-devel dkms;
      yum install -y wget curl llvm clang htop jq bpftool tree;
      yum -y install kernel-devel-$(uname -r);
      curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh;
      chown vagrant:vagrant /vagrant;
      sudo rm get-docker.sh;
      usermod -aG docker vagrant;
      curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
      sudo install minikube-linux-amd64 /usr/local/bin/minikube
      curl -sL "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -o /tmp/kubectl
      install -o root -g root -m 0755 /tmp/kubectl /usr/local/bin/kubectl
      sudo systemctl start docker
    SHELL
  end

end
poiana commented 3 months ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana commented 2 months ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh with /remove-lifecycle rotten.

Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle rotten

poiana commented 1 month ago

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

poiana commented 1 month ago

@poiana: Closing this issue.

In response to [this](https://github.com/falcosecurity/cncf-green-review-testing/issues/7#issuecomment-2155921377): >Rotten issues close after 30d of inactivity. > >Reopen the issue with `/reopen`. > >Mark the issue as fresh with `/remove-lifecycle rotten`. > >Provide feedback via https://github.com/falcosecurity/community. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.