From 8e688dc05af14a17008e241746fd28ad3ad12e23 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Wed, 26 Aug 2020 09:44:05 +0200 Subject: [PATCH] podman ci --- .github/workflows/podman.yml | 90 +++++++++++++++++++++++++++++++----- 1 file changed, 79 insertions(+), 11 deletions(-) diff --git a/.github/workflows/podman.yml b/.github/workflows/podman.yml index 67543db062..62b436df7e 100644 --- a/.github/workflows/podman.yml +++ b/.github/workflows/podman.yml @@ -16,11 +16,10 @@ jobs: fail-fast: false matrix: ipFamily: [ipv4, ipv6] - deployment: [singleNode, multiNode] + deployment: [singleNode, multiNode, HA] exclude: - # exclude IPv6 and multinode - - ipFamily: ipv6 - - deployment: multiNode + # exclude IPv6 until https://github.com/containers/podman/pull/7314 + - ipFamily: ipv6 env: JOB_NAME: "podman-${{ matrix.deployment }}-${{ matrix.ipFamily }}" KIND_EXPERIMENTAL_PROVIDER: "podman" @@ -32,19 +31,62 @@ jobs: with: fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.14' + - name: Verify run: make verify - name: Install kind run: sudo make install INSTALL_DIR=/usr/local/bin - - name: Install podman + - name: Install kubectl + run: | + curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl + chmod +x ./kubectl + sudo mv ./kubectl /usr/local/bin/kubectl + + - name: Enable ipv4 and ipv6 forwarding 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 + sudo sysctl -w net.ipv6.conf.all.forwarding=1 + sudo sysctl -w net.ipv4.ip_forward=1 + + - name: Build podman from master + if: ${{ matrix.ipFamily == 'ipv6' }} + run: | + export GOPATH=$(go env GOPATH) + + sudo apt-get -y install \ + btrfs-tools \ + git \ + go-md2man \ + iptables \ + libassuan-dev \ + libc6-dev \ + libdevmapper-dev \ + libglib2.0-dev \ + libgpgme-dev \ + libgpg-error-dev \ + libprotobuf-dev \ + libprotobuf-c0-dev \ + libseccomp-dev \ + libselinux1-dev \ + libsystemd-dev \ + pkg-config \ + runc \ + uidmap \ + libapparmor-dev + + # Install conmon + git clone https://github.com/containers/conmon + pushd conmon + export GOCACHE="$(mktemp -d)" + make + sudo make podman + popd + # 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 @@ -52,6 +94,12 @@ jobs: sudo mkdir -p /usr/libexec/cni sudo tar -C /usr/libexec/cni -xvzf /tmp/cni.tgz + # Install podman + git clone https://github.com/containers/podman/ $GOPATH/src/github.com/containers/podman + cd $GOPATH/src/github.com/containers/podman + make BUILDTAGS="selinux seccomp" + sudo make install PREFIX=/usr + - name: Create single node cluster if: ${{ matrix.deployment == 'singleNode' }} run: | @@ -64,6 +112,20 @@ jobs: - name: Create multi node cluster if: ${{ matrix.deployment == 'multiNode' }} + run: | + cat <