Skip to content

do not merge

do not merge #178

Workflow file for this run

name: Manual test
on:
# push:
pull_request:
workflow_dispatch:
jobs:
# self-hosted-edge:
# name: self-hosted wait test
# runs-on: [self-hosted, X64, edge]
# steps:
# - run: echo hello
self-host:
name: self-hosted large
runs-on: [self-hosted, X64, large, jammy]
steps:
- name: Set up microk8s
timeout-minutes: 5
run: |
sudo apt-get update
sudo apt-get install retry -y
sudo snap install microk8s --channel='1.31-strict/stable'
sudo adduser "$USER" 'snap_microk8s'
- name: (IS hosted) Configure microk8s Docker Hub mirror
timeout-minutes: 5
run: |
sudo tee /var/snap/microk8s/current/args/certs.d/docker.io/hosts.toml << EOF
server = "$DOCKERHUB_MIRROR"
[host."${DOCKERHUB_MIRROR#'https://'}"]
capabilities = ["pull", "resolve"]
EOF
sudo microk8s stop
sudo microk8s start
- name: Set up microk8s
id: microk8s-setup
timeout-minutes: 15
run: |
# `newgrp` does not work in GitHub Actions; use `sg` instead
sg 'snap_microk8s' -c "microk8s status --wait-ready"
sg 'snap_microk8s' -c "retry --times 3 --delay 5 -- sudo microk8s enable dns"
sg 'snap_microk8s' -c "microk8s status --wait-ready"
sg 'snap_microk8s' -c "microk8s.kubectl rollout status --namespace kube-system --watch --timeout=5m deployments/coredns"
sg 'snap_microk8s' -c "retry --times 3 --delay 5 -- sudo microk8s enable hostpath-storage"
sg 'snap_microk8s' -c "microk8s.kubectl rollout status --namespace kube-system --watch --timeout=5m deployments/hostpath-provisioner"
mkdir ~/.kube/
# Used by lightkube and kubernetes (Python package)
sg 'snap_microk8s' -c "microk8s config > ~/.kube/config"
- run: sudo snap install juju
- run: sudo usermod -a -G snap_microk8s ubuntu
- run: sg 'snap_microk8s' -c "juju bootstrap microk8s"
- run: juju add-model test
- run: juju deploy postgresql-k8s --channel 14/edge --trust
- name: Setup tmate session
if: always()
uses: canonical/action-tmate@main
# - run: echo hello
# - run: cat /etc/docker/daemon.json
# - run: docker pull github-runner-dockerhub-cache.canonical.com:5000/jujusolutions/charm-base:ubuntu-20.04
# - run: docker pull jujusolutions/charm-base:ubuntu-20.04
# - run: sleep 3600
# self-host-x64:
# name: self-hosted x64 test
# strategy:
# fail-fast: false
# matrix:
# index: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# runs-on: [self-hosted, X64, edge, jammy]
# steps:
# - run: uname -a
# - uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: 3.10.8
# - run: pip install boto3
# - run: python scripts/test_microceph.py
# github-test:
# name: GitHub x64 test
# runs-on: ubuntu-latest
# steps:
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: 3.8.10
# - run: sudo apt-get update
# - run: sudo apt install -y fio
# - name: seq write
# run: sudo fio --name=write_throughput --directory=/ --numjobs=4 --size=3G --time_based --runtime=60s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=1M --iodepth=64 --rw=write --group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64
# - run: sudo rm -f /write* /read*
# - name: rand write
# run: sudo fio --name=write_iops --directory=/ --numjobs=4 --size=3G --time_based --runtime=60s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=4k --iodepth=256 --rw=randwrite --group_reporting=1 --iodepth_batch_submit=256 --iodepth_batch_complete_max=256
# - run: sudo rm -f /write* /read*
# - name: seq read
# run: sudo fio --name=write_throughput --directory=/ --numjobs=4 --size=3G --time_based --runtime=60s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=1M --iodepth=64 --rw=read --group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64
# - run: sudo rm -f /write* /read*
# - name: rand read
# run: sudo fio --name=write_iops --directory=/ --numjobs=4 --size=3G --time_based --runtime=60s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=4k --iodepth=256 --rw=randread --group_reporting=1 --iodepth_batch_submit=256 --iodepth_batch_complete_max=256
# - run: sudo rm -f /write* /read*
# self-host-test-arm64:
# name: self-hosted arm64 test
# runs-on: [self-hosted, ARM64, medium]
# strategy:
# fail-fast: false
# matrix:
# index: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# index: [0]
# steps:
# - uses: actions/checkout@v4
# - run: bash scripts/test_hardware.sh
# - name: tmate ssh
# uses: canonical/action-tmate@debug
# - run: lscpu
# - run: df -h
# - run: free -h
# - run: uname -a
# - run: echo $HTTP_PROXY
# - run: echo $HTTPS_PROXY
# - run: echo $NO_PROXY
# - run: echo $DOCKERHUB_MIRROR
# - uses: canonical/[email protected]
# - run: lxd init --auto
# if: ${{ always() }}
# - run: lxc list
# if: ${{ always() }}
# - run: time sudo snap install juju
# if: ${{ always() }}
# - run: time juju bootstrap localhost localhost
# if: ${{ always() }}
# - run: sudo snap install aproxy --edge
# - run: sudo snap set aproxy proxy=squid.internal:3128 listen=:54969
# - run: |-
# sudo nft -f - << EOF
# define default-ip = $(ip route get $(ip route show 0.0.0.0/0 | grep -oP 'via \K\S+') | grep -oP 'src \K\S+')
# define private-ips = { 10.0.0.0/8, 127.0.0.1/8, 172.16.0.0/12, 192.168.0.0/16 }
# table ip aproxy
# flush table ip aproxy
# table ip aproxy {
# chain prerouting {
# type nat hook prerouting priority dstnat; policy accept;
# ip daddr != \$private-ips tcp dport { 80, 443 } counter dnat to \$default-ip:54969
# }
# chain output {
# type nat hook output priority -100; policy accept;
# ip daddr != \$private-ips tcp dport { 80, 443 } counter dnat to \$default-ip:54969
# }
# }
# EOF
# - run: nc -vz github-runner-dockerhub-cache.canonical.com 5000
# - run: curl $DOCKERHUB_MIRROR -vvv
# - run: sudo apt install docker.io -yq
# - run : docker pull github-runner-dockerhub-cache.canonical.com:5000/jujusolutions/charm-base:ubuntu-20.04
# - run : docker pull python
# - run: echo $TMATE_SERVER_HOST
# - run: echo $TMATE_SERVER_PORT
# - run: sudo apt install netcat
# - name: Test network connection to tmate ssh server
# run: nc -vz $TMATE_SERVER_HOST $TMATE_SERVER_PORT
# - name: tmate ssh
# uses: canonical/action-tmate@debug
# - uses: actions/[email protected]
# - uses: canonical/[email protected]
# - name: Pack charm
# run: |
# sudo snap install charmcraft --classic --channel latest/stable
# charmcraft pack -v
# - run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs >> rustup.sh
# - run: sh rustup.sh -y
# - run: $HOME/.cargo/bin/cargo install ripgrep
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true