Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/assets/testing/edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ core:
bootstrap_args:
- --bootstrap-constraints
- root-disk=5G
- --config
- caas-image-repo=ghcr.io/juju
charms:
cinder-ceph-k8s:
channel: 2024.1/edge
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup GO
uses: actions/setup-go@v4
with:
Expand Down
39 changes: 32 additions & 7 deletions .github/workflows/build-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
snap: ${{ steps.snapcraft.outputs.snap }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build snap locally
uses: canonical/action-build@v1.3.0
id: snapcraft

- name: Upload locally built snap artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: local-${{ steps.snapcraft.outputs.snap }}
path: ${{ steps.snapcraft.outputs.snap }}
Expand All @@ -31,12 +31,16 @@ jobs:
needs: build
name: Functional test
runs-on: [self-hosted, large, noble, x64]
strategy:
fail-fast: false
matrix:
flavor: [storage, no-storage]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download snap artifact
id: download
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: local-${{ needs.build.outputs.snap }}
- name: test
Expand All @@ -48,6 +52,27 @@ jobs:
sudo apt remove --purge docker.io containerd runc -y
sudo rm -rf /run/containerd

roles="control,compute"
if [ "${{ matrix.flavor }}" == "storage" ]; then
roles="$roles,storage"
sudo mkdir -p /dev/disk/by-id/ || true
function loop_device() {
local free_device
local id_path="/dev/disk/by-id/$(basename $1)"
local ld_path="$1.img"
sudo dd if=/dev/zero of="$ld_path" bs=4096 count=305175
sync
free_device=$(sudo losetup --show --find "$ld_path")
wipefs --all "$free_device" 1>&2
sgdisk --zap-all "$free_device" 1>&2
sudo ln -s "$free_device" "$id_path"
echo $id_path
}
sudo snap install yq
lds="$(loop_device /ld1),$(loop_device /ld2),$(loop_device /ld3)"
yq e -i ".core.config.microceph_config.\"$(hostname -f)\".osd_devices = \"$lds\"" .github/assets/testing/edge.yml
fi

# Allow lxd controller to reach to k8s controller on loadbalancer ip
# sudo nft insert rule ip filter FORWARD tcp dport 17070 accept
# sudo nft insert rule ip filter FORWARD tcp sport 17070 accept
Expand All @@ -74,7 +99,7 @@ jobs:
# have more than 32 GiB of memory where Sunbeam selects the multi mysql
# mode instead. So we have to override the Sunbeam's decision to be
# closer to the tutorial scenario.
sg snap_daemon "openstack.sunbeam cluster bootstrap --manifest .github/assets/testing/edge.yml --accept-defaults --topology single --database single"
sg snap_daemon "openstack.sunbeam cluster bootstrap --role "$roles" --manifest .github/assets/testing/edge.yml --accept-defaults --topology single --database single"
sg snap_daemon "openstack.sunbeam cluster list"
# Note: Moving configure before enabling caas just to ensure caas images are not downloaded
# To download caas image, require ports to open on firewall to access fedora images.
Expand Down Expand Up @@ -154,9 +179,9 @@ jobs:
# if test -f tempest_validation.log; then cp tempest_validation.log logs/; fi
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sunbeam_logs
name: sunbeam_logs-${{ matrix.flavor}}
path: logs
retention-days: 30
- name: Setup tmate session
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup GO
uses: actions/setup-go@v4
with:
Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup GO
uses: actions/setup-go@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install tox
- name: Run linters
Expand All @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install tox
- name: Run linters
Expand All @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: python -m pip install tox
- name: Run tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: [self-hosted, large, noble, x64]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: test
run: |
export COLUMNS=256
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
# if test -f tempest_validation.log; then cp tempest_validation.log logs/; fi
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sunbeam_logs
path: logs
Expand Down