Skip to content

Commit

Permalink
tests: upgrade from quincy to reef
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Abrioux <[email protected]>
  • Loading branch information
guits committed Feb 17, 2024
1 parent 3b232cf commit ca74ee9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ GRAFANA = settings['grafana_server_vms']
NRBD_MIRRORS = settings['rbd_mirror_vms']
CLIENTS = settings['client_vms']
MGRS = settings['mgr_vms']
PUBLIC_SUBNET = settings['public_subnet']
CLUSTER_SUBNET = settings['cluster_subnet']
PUBLIC_SUBNET = ENV['CEPH_PUBLIC_SUBNET'] || settings['public_subnet']
CLUSTER_SUBNET = ENV['CEPH_CLUSTER_SUBNET'] || settings['cluster_subnet']
BOX = ENV['CEPH_ANSIBLE_VAGRANT_BOX'] || settings['vagrant_box']
CLIENT_BOX = ENV['CEPH_ANSIBLE_VAGRANT_BOX'] || settings['client_vagrant_box'] || BOX
BOX_URL = ENV['CEPH_ANSIBLE_VAGRANT_BOX_URL'] || settings['vagrant_box_url']
Expand Down
52 changes: 22 additions & 30 deletions tox-update.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,74 +9,66 @@ allowlist_externals =
bash
git
pip
rm
passenv=*
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
ANSIBLE_SSH_ARGS = -F {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/tmp/ceph-ansible/ansible_collections
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_ENABLED = profile_tasks
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
# only available for ansible >= 2.5
ANSIBLE_STDOUT_CALLBACK = yaml
# non_container: DEV_SETUP = True
# Set the vagrant box image to use
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8

INVENTORY = {env:_INVENTORY:hosts}
container: CONTAINER_DIR = /container
container: PLAYBOOK = site-container.yml.sample
non_container: PLAYBOOK = site.yml.sample

UPDATE_CEPH_DOCKER_IMAGE_TAG = latest-main
UPDATE_CEPH_DEV_BRANCH = main
UPDATE_CEPH_DEV_SHA1 = latest
UPDATE_CEPH_DOCKER_IMAGE_TAG = latest-reef
ROLLING_UPDATE = True
deps= -r{toxinidir}/tests/requirements.txt
#deps= -r{envdir}/tmp/ceph-ansible/tests/requirements.txt
changedir={toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
commands=
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
# use the stable-7.0 branch to deploy an octopus cluster
git clone -b stable-7.0 --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt
bash {envdir}/tmp/ceph-ansible/tests/scripts/vagrant_up.sh {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:} --no-provision {posargs:--provider=virtualbox}

ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
bash {envdir}/tmp/ceph-ansible/tests/scripts/generate_ssh_config.sh {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}

ansible-galaxy collection install -r {envdir}/tmp/ceph-ansible/requirements.yml -v -p {envdir}/tmp/ceph-ansible/ansible_collections

ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/setup.yml
ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml

# # use the stable-7.0 branch to deploy an octopus cluster
# git clone -b stable-7.0 --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
# pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt
# bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml'
# # configure lvm, we exclude osd2 given this node uses lvm batch scenario (see corresponding inventory host file)
# bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml --extra-vars "osd_scenario=lvm"'
bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml'

# configure lvm, we exclude osd2 given this node uses lvm batch scenario (see corresponding inventory host file)
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml --limit 'osds:!osd2'
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml --limit 'osds:!osd2'

non_container: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/dev_setup.yml --extra-vars "dev_setup=True change_dir={changedir} ceph_dev_branch={env:UPDATE_CEPH_DEV_BRANCH:main} ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest}" --tags "vagrant_setup"
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
yes_i_know=true \
delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \
ceph_dev_branch={env:UPDATE_CEPH_DEV_BRANCH:main} \
ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest} \
ceph_docker_registry_auth=True \
ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \
ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
"

# pip uninstall -y ansible
# pip install -r {toxinidir}/tests/requirements.txt
# ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
pip uninstall -y ansible
pip install -r {toxinidir}/tests/requirements.txt
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections

ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/rolling_update.yml --extra-vars "\
ireallymeanit=yes \
ceph_dev_branch={env:UPDATE_CEPH_DEV_BRANCH:main} \
ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest} \
ceph_docker_registry_auth=True \
ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \
ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
"

bash -c "CEPH_STABLE_RELEASE=reef py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests"
bash -c "CEPH_STABLE_RELEASE=squid py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={envdir}/tmp/ceph-ansible/{env:PLAYBOOK:site.yml.sample} --ssh-config={envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/vagrant_ssh_config {toxinidir}/tests/functional/tests"

vagrant destroy --force

0 comments on commit ca74ee9

Please sign in to comment.