From 3a50ff6fccaf9beca3e2d5def728dc008ff294e7 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Fri, 14 Aug 2020 01:00:13 +0200 Subject: [PATCH] add podman ci add basic ci to test that kind can create clusters with podman as provider. --- .github/workflows/podman.yml | 221 +++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 .github/workflows/podman.yml diff --git a/.github/workflows/podman.yml b/.github/workflows/podman.yml new file mode 100644 index 0000000000..220c5764b0 --- /dev/null +++ b/.github/workflows/podman.yml @@ -0,0 +1,221 @@ +name: Podman + +on: + workflow_dispatch: + pull_request: + branches: + - master + schedule: + - cron: "0 7 * * *" + +jobs: + + podman: + name: Podman + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + KIND_EXPERIMENTAL_PROVIDER: "podman" + steps: + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Verify + run: make verify + + - name: Install kind + run: sudo make install INSTALL_DIR=/usr/local/bin + + - name: Install podman + run: | + . /etc/os-release + echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list + curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add - + sudo apt-get update -qq + sudo apt-get -qq -y install podman + # Install network + sudo mkdir -p /etc/cni/net.d + curl -qsSL https://raw.githubusercontent.com/containers/libpod/master/cni/87-podman-bridge.conflist | sudo tee /etc/cni/net.d/87-podman-bridge.conf + curl -qsSL https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-amd64-v0.8.6.tgz --output /tmp/cni.tgz + sudo mkdir -p /usr/libexec/cni + sudo tar -C /usr/libexec/cni -xvzf /tmp/cni.tgz + + - name: Create cluster + run: sudo KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster -v100 --wait 1m --retain + + # TODO: implement this + - name: Load docker image + run: sudo KIND_EXPERIMENTAL_PROVIDER=podman kind load docker-image busybox:2 + continue-on-error: true + + - name: Export logs + run: sudo KIND_EXPERIMENTAL_PROVIDER=podman kind export logs + + - name: Delete cluster + run: sudo KIND_EXPERIMENTAL_PROVIDER=podman kind delete cluster + + podman-multinode: + name: Podman-Multinode + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + KIND_EXPERIMENTAL_PROVIDER: "podman" + steps: + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Verify + run: make verify + + - name: Install kind + run: sudo make install INSTALL_DIR=/usr/local/bin + + - name: Install podman + run: | + . /etc/os-release + echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list + curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add - + sudo apt-get update -qq + sudo apt-get -qq -y install podman + # Install network + sudo mkdir -p /etc/cni/net.d + curl -qsSL https://raw.githubusercontent.com/containers/libpod/master/cni/87-podman-bridge.conflist | sudo tee /etc/cni/net.d/87-podman-bridge.conf + curl -qsSL https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-amd64-v0.8.6.tgz --output /tmp/cni.tgz + sudo mkdir -p /usr/libexec/cni + sudo tar -C /usr/libexec/cni -xvzf /tmp/cni.tgz + + - name: Create cluster + run: | + cat <