-
Notifications
You must be signed in to change notification settings - Fork 60
tests: Adds common setup steps #609
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
Open
claudiubelu
wants to merge
1
commit into
canonical:main
Choose a base branch
from
claudiubelu:tests-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| name: MicroCeph Test Multi Node Setup | ||
| description: Common setup steps for MicroCeph multi node testing | ||
|
|
||
| inputs: | ||
| container-network-name: | ||
| description: Container network name for create_containers. | ||
| required: false | ||
| default: "public" | ||
|
|
||
| ceph-release: | ||
| description: | | ||
| Ceph release to be installed from the store. If empty, the local | ||
| microceph snap will be installed instead. | ||
| required: false | ||
| default: "" | ||
|
|
||
| bootstrap-parameters: | ||
| description: | | ||
| Space-separated parameters to be used for the "Bootstrap" step. | ||
| Skipped if empty. | ||
| required: false | ||
| default: bootstrap_head public | ||
|
|
||
| setup-cluster-parameters: | ||
| description: | | ||
| Space-separated parameters to be used for the "Setup cluster" step. | ||
| Skipped if empty. | ||
| required: false | ||
| default: cluster_nodes public | ||
|
|
||
| osd-count: | ||
| description: Number of OSDs to add. Skipped if 0. | ||
| required: false | ||
| default: 0 | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Download snap | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: snaps | ||
| path: /home/runner | ||
|
|
||
| - name: Copy utils | ||
| shell: bash | ||
| run: cp tests/scripts/actionutils.sh $HOME | ||
|
|
||
| - name: Clear FORWARD firewall rules | ||
| shell: bash | ||
| run: ~/actionutils.sh cleaript | ||
|
|
||
| - name: Free disk | ||
| shell: bash | ||
| run: ~/actionutils.sh free_runner_disk | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash | ||
| run: | | ||
| ~/actionutils.sh install_tools | ||
| ~/actionutils.sh setup_lxd | ||
|
|
||
| - name: Create containers with loopback devices | ||
| shell: bash | ||
| run: ~/actionutils.sh create_containers ${{ inputs.container-network-name }} | ||
|
|
||
| - name: Install ceph release from store | ||
| if: "${{ inputs.ceph-release != '' }}" | ||
| shell: bash | ||
| run: ~/actionutils.sh install_store ${{ inputs.ceph-release }} | ||
|
|
||
| - name: Install local microceph snap | ||
| if: "${{ inputs.ceph-release == '' }}" | ||
| shell: bash | ||
| run: ~/actionutils.sh install_multinode | ||
|
|
||
| - name: Bootstrap | ||
| if: "${{ inputs.bootstrap-parameters != '' }}" | ||
| shell: bash | ||
| run: ~/actionutils.sh ${{ inputs.bootstrap-parameters }} | ||
|
|
||
| - name: Setup cluster | ||
| if: "${{ inputs.setup-cluster-parameters != '' }}" | ||
| shell: bash | ||
| run: ~/actionutils.sh ${{ inputs.setup-cluster-parameters }} | ||
|
|
||
| - name: Add and wait for OSDs | ||
| if: ${{ inputs.osd-count != 0 }} | ||
| shell: bash | ||
| run: | | ||
| set -uex | ||
| for i in $(seq 0 $[${{ inputs.osd-count }} - 1]) ; do | ||
| ~/actionutils.sh add_osd_to_node "node-wrk$i" | ||
| done | ||
|
|
||
| ~/actionutils.sh headexec wait_for_osds ${{ inputs.osd-count }} | ||
|
|
||
| lxc exec node-wrk0 -- sh -c "microceph.ceph -s" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: MicroCeph Test Single Node Setup | ||
| description: Common setup steps for MicroCeph single node testing | ||
|
|
||
| inputs: | ||
| osd-count: | ||
| description: Number of OSDs to add. Skipped if 0. | ||
| required: false | ||
| default: 0 | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Download snap | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: snaps | ||
| path: /home/runner | ||
|
|
||
| - name: Copy utils | ||
| shell: bash | ||
| run: cp tests/scripts/actionutils.sh $HOME | ||
|
|
||
| - name: Clear FORWARD firewall rules | ||
| shell: bash | ||
| run: ~/actionutils.sh cleaript | ||
|
|
||
| - name: Free disk | ||
| shell: bash | ||
| run: ~/actionutils.sh free_runner_disk | ||
|
|
||
| - name: Install local microceph snap and setup | ||
| shell: bash | ||
| run: | | ||
| ~/actionutils.sh install_tools | ||
| ~/actionutils.sh install_microceph | ||
|
|
||
| - name: Add loopback file OSDs | ||
| if: ${{ inputs.osd-count != 0 }} | ||
| shell: bash | ||
| run: | | ||
| set -uex | ||
|
|
||
| sudo microceph disk add loop,1G,${{ inputs.osd-count }} | ||
| ~/actionutils.sh wait_for_osds ${{ inputs.osd-count }} | ||
|
|
||
| sudo microceph.ceph -s |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.