From 5388bbe3f19f78c0bb96746a826525c810e1434d Mon Sep 17 00:00:00 2001 From: Ben Blattberg Date: Wed, 1 Mar 2023 15:12:16 -0600 Subject: [PATCH 1/4] attempt microshift podman --- .github/workflows/microshift.yaml | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/microshift.yaml diff --git a/.github/workflows/microshift.yaml b/.github/workflows/microshift.yaml new file mode 100644 index 0000000000..90b4cf41b4 --- /dev/null +++ b/.github/workflows/microshift.yaml @@ -0,0 +1,51 @@ +name: MicroShift + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + go-test: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.x + + - name: Set up podman + run: | + sudo apt-get update + sudo apt-get -y install podman + + - name: Set up oc client + run: | + wget https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz + sudo tar xzvf oc.tar.gz -C /usr/local/bin + + - name: Run a microshift cluster + run: | + sudo podman run -d --rm --name microshift \ + --privileged -v microshift-data:/var/lib -p 6443:6443 \ + quay.io/microshift/microshift-aio:latest + # get kubeconfig + sudo podman exec microshift bash -c \ + 'while ! test -f "/var/lib/microshift/resources/kubeadmin/kubeconfig"; + do + echo "Waiting for kubeconfig..." + sleep 5 + done' + mkdir ${HOME}/.kube + sudo podman cp \ + microshift:/var/lib/microshift/resources/kubeadmin/kubeconfig \ + ${HOME}/.kube/config + sudo chown ${USER} ${HOME}/.kube/config + chmod 600 ${HOME}/.kube/config + # wait for the cluster to become available + sleep 10 + kubectl wait --for=condition=available apiservice --all --timeout 300s + kubectl api-resources From 49eb2c6ab59733f0c973ed3de2138780fa187446 Mon Sep 17 00:00:00 2001 From: Ben Blattberg Date: Wed, 1 Mar 2023 15:19:07 -0600 Subject: [PATCH 2/4] can I check-envtest-existing? --- .github/workflows/microshift.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/microshift.yaml b/.github/workflows/microshift.yaml index 90b4cf41b4..858beb6221 100644 --- a/.github/workflows/microshift.yaml +++ b/.github/workflows/microshift.yaml @@ -49,3 +49,5 @@ jobs: sleep 10 kubectl wait --for=condition=available apiservice --all --timeout 300s kubectl api-resources + + - run: make check-envtest-existing \ No newline at end of file From 44e34cc368dfe35070d85be6a5dccf0788c20d6a Mon Sep 17 00:00:00 2001 From: Ben Blattberg Date: Wed, 1 Mar 2023 16:49:59 -0600 Subject: [PATCH 3/4] experiment with rpm --- .github/workflows/microshift-exp.yaml | 24 ++++++++++++++++++++++++ .github/workflows/microshift.yaml | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/microshift-exp.yaml diff --git a/.github/workflows/microshift-exp.yaml b/.github/workflows/microshift-exp.yaml new file mode 100644 index 0000000000..e10f965f7c --- /dev/null +++ b/.github/workflows/microshift-exp.yaml @@ -0,0 +1,24 @@ +name: MicroShiftexp + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + microshift-runner-exp: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Run a microshift cluster + run: | + sudo subscription-manager repos \ + --enable rhocp-4.12-for-rhel-8-$(uname -i)-rpms \ + --enable fast-datapath-for-rhel-8-$(uname -i)-rpms + + sudo dnf install -y microshift + + microshift version \ No newline at end of file diff --git a/.github/workflows/microshift.yaml b/.github/workflows/microshift.yaml index 858beb6221..db564760f8 100644 --- a/.github/workflows/microshift.yaml +++ b/.github/workflows/microshift.yaml @@ -9,7 +9,7 @@ on: - master jobs: - go-test: + microshift-runner: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 From 37e74b075bbb962d628f02bd8d53f81beee0250d Mon Sep 17 00:00:00 2001 From: Ben Blattberg Date: Wed, 1 Mar 2023 16:56:04 -0600 Subject: [PATCH 4/4] right, ubuntu --- .github/workflows/microshift-exp.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/microshift-exp.yaml b/.github/workflows/microshift-exp.yaml index e10f965f7c..bb512c9fb5 100644 --- a/.github/workflows/microshift-exp.yaml +++ b/.github/workflows/microshift-exp.yaml @@ -15,10 +15,6 @@ jobs: - uses: actions/checkout@v3 - name: Run a microshift cluster run: | - sudo subscription-manager repos \ - --enable rhocp-4.12-for-rhel-8-$(uname -i)-rpms \ - --enable fast-datapath-for-rhel-8-$(uname -i)-rpms - - sudo dnf install -y microshift + sudo apt-get install -y microshift microshift version \ No newline at end of file