Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/squid and CI fixes #66

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
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
45 changes: 23 additions & 22 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Prepare Rock
uses: canonical/craft-actions/rockcraft-pack@main
id: rockcraft
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: rock
path: ${{ steps.rockcraft.outputs.rock }}
Expand All @@ -49,7 +49,7 @@ jobs:


CephadmTest:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [build-rock, flake8-lint]
strategy:
matrix:
Expand All @@ -66,7 +66,7 @@ jobs:
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: rock

Expand All @@ -78,19 +78,6 @@ jobs:
- name: install dependencies
run: ./scripts/deploy-helper.sh install_custom_runner_dependencies

- name: Load image to registry
run: |
ls
rock_file=$(ls *.rock | head -1)
docker run -d -p 5000:5000 --restart=always --name registry registry:2
sleep 10
skopeo --insecure-policy copy oci-archive:$rock_file docker-daemon:canonical/ceph:latest
docker image ls -a
docker image tag canonical/ceph:latest localhost:5000/canonical/ceph:latest
sleep 10
docker push localhost:5000/canonical/ceph
echo $'[registries.insecure]\nregistries = ["localhost:5000"]' | sudo tee -a /etc/containers/registries.conf

- name: install and init lxd snap
run: |
sudo snap install lxd
Expand All @@ -102,14 +89,28 @@ jobs:
sudo systemctl reload snap.lxd.daemon
sleep 5

- name: Deploy Cephadm over LXD Container
- name: Setup LXD machine
run: |
reg_addr=$(./test/scripts/cephadm_helper.sh get_ip)
sudo python test/deploy.py --osd-num 3 --ceph-version reef image "$reg_addr:5000/canonical/ceph:latest"

./test/scripts/cephadm_helper.sh setupLXDMachine
./test/scripts/cephadm_helper.sh runOnHost cephadm0 install_apt
./test/scripts/cephadm_helper.sh runOnHost cephadm0 configure_insecure_registry

./test/scripts/cephadm_helper.sh runOnHost cephadm0 deploy_cephadm localhost:5000/canonical/ceph:latest

- name: Add storage to machine
run: |
./test/scripts/cephadm_helper.sh add_storage_devices

- name: Deploy osd service
run: |
./test/scripts/cephadm_helper.sh runOnHost cephadm0 deploy_osd
./test/scripts/cephadm_helper.sh runOnHost cephadm0 wait_num_objs osd 3

RookTest:
needs: build-rock
runs-on: ubuntu-latest
# Minikube action only works on Jammy.
runs-on: ubuntu-22.04

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -134,7 +135,7 @@ jobs:
./tests/scripts/github-action-helper.sh create_partitions_for_osds

- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: rock

Expand All @@ -143,7 +144,7 @@ jobs:
ls
rock_file=$(ls *.rock | head -1)
docker run -d -p 5000:5000 --restart=always --name registry registry:2
skopeo --insecure-policy copy oci-archive:$rock_file docker-daemon:canonical/ceph:latest
rockcraft.skopeo --insecure-policy copy oci-archive:$rock_file docker-daemon:canonical/ceph:latest
docker image ls -a
docker image tag canonical/ceph:latest localhost:5000/canonical/ceph:latest
sleep 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/collect-logs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
tests/scripts/collect-logs.sh

- name: Upload canary test result
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: /home/runner/work/test
11 changes: 2 additions & 9 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
name: ceph
base: ubuntu@22.04
base: ubuntu@24.04
version: '0.1' # replaced by CI when building to publish.
summary: Ubuntu based Ceph container image
description: Rock for Containerised Ceph based on Ubuntu Ceph distribution.
license: Apache-2.0
platforms:
amd64:

# Custom PPAs for Bug: https://bugs.launchpad.net/ubuntu/jammy/+source/ceph/+bug/2003704
# This will be removed once the required packages are available from jammy repositories.
package-repositories:
- type: apt
cloud: bobcat
priority: always

services:
ceph-container:
override: replace
Expand Down Expand Up @@ -63,7 +56,7 @@ parts:
- attr # utilities for manipulating filesystem extended attributes
- targetcli-fb
- uuid-runtime
- python-setuptools
- python3-setuptools
- udev
- dmsetup
- ceph-volume
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ set -xeEo pipefail

function install_custom_runner_dependencies() {
sudo apt-get -y update
sudo apt-get -y install skopeo
sudo python -m pip install --upgrade pip
# for recent skopeo client
sudo snap install rockcraft --classic
sudo pip install flake8 pep8-naming pylxd pyyaml argparse
sudo snap install docker
sleep 10
Expand Down
Loading
Loading