Skip to content

Commit

Permalink
Merge pull request #8740 from leseb/examples-layout
Browse files Browse the repository at this point in the history
core: change directory layout
  • Loading branch information
leseb committed Nov 30, 2021
2 parents 83f7c2b + c890710 commit decc481
Show file tree
Hide file tree
Showing 195 changed files with 275 additions and 257 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/.yamllint
@@ -1,8 +1,8 @@
extends: default
ignore: |
cluster/examples/kubernetes/ceph/csi/template
cluster/examples/kubernetes/ceph/crds.yaml
cluster/examples/kubernetes/ceph/monitoring/
deploy/examples/csi/template
deploy/examples/crds.yaml
deploy/examples/monitoring/
rules:
line-length: disable
new-lines: disable
Expand Down
66 changes: 33 additions & 33 deletions .github/workflows/canary-integration-test.yml
Expand Up @@ -55,8 +55,8 @@ jobs:
mgr_raw=$(kubectl -n rook-ceph exec $toolbox -- ceph mgr dump -f json|jq --raw-output .active_addr)
timeout 60 sh -c "until kubectl -n rook-ceph exec $toolbox -- curl --silent --show-error ${mgr_raw%%:*}:9283; do echo 'waiting for mgr prometheus exporter to be ready' && sleep 1; done"
kubectl -n rook-ceph exec $toolbox -- mkdir -p /etc/ceph/test-data
kubectl -n rook-ceph cp cluster/examples/kubernetes/ceph/test-data/ceph-status-out $toolbox:/etc/ceph/test-data/
kubectl -n rook-ceph cp cluster/examples/kubernetes/ceph/create-external-cluster-resources.py $toolbox:/etc/ceph
kubectl -n rook-ceph cp tests/ceph-status-out $toolbox:/etc/ceph/test-data/
kubectl -n rook-ceph cp deploy/examples/create-external-cluster-resources.py $toolbox:/etc/ceph
timeout 10 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool; do echo 'waiting for script to succeed' && sleep 1; done"
- name: run external script create-external-cluster-resources.py unit tests
Expand All @@ -73,11 +73,11 @@ jobs:
run: |
kubectl -n rook-ceph delete deploy/rook-ceph-operator
kubectl -n rook-ceph delete deploy/rook-ceph-osd-1 --grace-period=0 --force
sed -i 's/<OSD-IDs>/1/' cluster/examples/kubernetes/ceph/osd-purge.yaml
sed -i 's/<OSD-IDs>/1/' deploy/examples/osd-purge.yaml
# the CI must force the deletion since we use replica 1 on 2 OSDs
sed -i 's/false/true/' cluster/examples/kubernetes/ceph/osd-purge.yaml
sed -i 's|rook/ceph:master|rook/ceph:local-build|' cluster/examples/kubernetes/ceph/osd-purge.yaml
kubectl -n rook-ceph create -f cluster/examples/kubernetes/ceph/osd-purge.yaml
sed -i 's/false/true/' deploy/examples/osd-purge.yaml
sed -i 's|rook/ceph:master|rook/ceph:local-build|' deploy/examples/osd-purge.yaml
kubectl -n rook-ceph create -f deploy/examples/osd-purge.yaml
toolbox=$(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[*].metadata.name}')
kubectl -n rook-ceph exec $toolbox -- ceph status
timeout 120 sh -c "until kubectl -n rook-ceph exec $toolbox -- ceph osd tree|grep -qE 'osd.1.*.destroyed'; do echo 'waiting for ceph osd 1 to be destroyed'; sleep 1; done"
Expand Down Expand Up @@ -122,12 +122,12 @@ jobs:
- name: deploy cluster
run: |
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/operator.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/operator.yaml
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].encrypted" false
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].count" 2
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].volumeClaimTemplates[0].spec.resources.requests.storage" 6Gi
kubectl create -f tests/manifests/test-cluster-on-pvc-encrypted.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/toolbox.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/toolbox.yaml
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
Expand Down Expand Up @@ -174,11 +174,11 @@ jobs:

- name: deploy cluster
run: |
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/operator.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/operator.yaml
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].encrypted" false
cat tests/manifests/test-on-pvc-db.yaml >> tests/manifests/test-cluster-on-pvc-encrypted.yaml
kubectl create -f tests/manifests/test-cluster-on-pvc-encrypted.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/toolbox.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/toolbox.yaml
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
Expand Down Expand Up @@ -222,12 +222,12 @@ jobs:

- name: deploy rook
run: |
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/operator.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/operator.yaml
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].encrypted" false
cat tests/manifests/test-on-pvc-db.yaml >> tests/manifests/test-cluster-on-pvc-encrypted.yaml
cat tests/manifests/test-on-pvc-wal.yaml >> tests/manifests/test-cluster-on-pvc-encrypted.yaml
kubectl create -f tests/manifests/test-cluster-on-pvc-encrypted.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/toolbox.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/toolbox.yaml
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
Expand Down Expand Up @@ -274,11 +274,11 @@ jobs:
- name: deploy cluster
run: |
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/operator.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/operator.yaml
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].count" 2
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].volumeClaimTemplates[0].spec.resources.requests.storage" 6Gi
kubectl create -f tests/manifests/test-cluster-on-pvc-encrypted.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/toolbox.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/toolbox.yaml
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
Expand Down Expand Up @@ -325,10 +325,10 @@ jobs:

- name: deploy cluster
run: |
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/operator.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/operator.yaml
cat tests/manifests/test-on-pvc-db.yaml >> tests/manifests/test-cluster-on-pvc-encrypted.yaml
kubectl create -f tests/manifests/test-cluster-on-pvc-encrypted.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/toolbox.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/toolbox.yaml
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
Expand Down Expand Up @@ -375,11 +375,11 @@ jobs:

- name: deploy rook
run: |
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/operator.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/operator.yaml
cat tests/manifests/test-on-pvc-db.yaml >> tests/manifests/test-cluster-on-pvc-encrypted.yaml
cat tests/manifests/test-on-pvc-wal.yaml >> tests/manifests/test-cluster-on-pvc-encrypted.yaml
kubectl create -f tests/manifests/test-cluster-on-pvc-encrypted.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/toolbox.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/toolbox.yaml
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
Expand Down Expand Up @@ -430,7 +430,7 @@ jobs:

- name: deploy cluster
run: |
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/operator.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/operator.yaml
cat tests/manifests/test-kms-vault.yaml >> tests/manifests/test-cluster-on-pvc-encrypted.yaml
yq merge --inplace --arrays append tests/manifests/test-cluster-on-pvc-encrypted.yaml tests/manifests/test-kms-vault-spec-token-auth.yaml
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].count" 2
Expand All @@ -439,7 +439,7 @@ jobs:
yq merge --inplace --arrays append tests/manifests/test-object.yaml tests/manifests/test-kms-vault-spec-token-auth.yaml
yq write -i tests/manifests/test-object.yaml "spec.security.kms.connectionDetails.VAULT_BACKEND_PATH" rook/ver2
kubectl create -f tests/manifests/test-object.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/toolbox.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/toolbox.yaml
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
Expand Down Expand Up @@ -500,12 +500,12 @@ jobs:

- name: deploy cluster
run: |
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/operator.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/operator.yaml
yq merge --inplace --arrays append tests/manifests/test-cluster-on-pvc-encrypted.yaml tests/manifests/test-kms-vault-spec-k8s-auth.yaml
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].count" 2
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].volumeClaimTemplates[0].spec.resources.requests.storage" 6Gi
kubectl create -f tests/manifests/test-cluster-on-pvc-encrypted.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/toolbox.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/toolbox.yaml
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
Expand Down Expand Up @@ -554,10 +554,10 @@ jobs:

- name: deploy cluster
run: |
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/operator.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/operator.yaml
yq write -i tests/manifests/test-cluster-on-pvc-encrypted.yaml "spec.storage.storageClassDeviceSets[0].encrypted" false
kubectl create -f tests/manifests/test-cluster-on-pvc-encrypted.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build cluster/examples/kubernetes/ceph/toolbox.yaml
tests/scripts/github-action-helper.sh deploy_manifest_with_local_build deploy/examples/toolbox.yaml
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
Expand Down Expand Up @@ -603,15 +603,15 @@ jobs:
- name: deploy first cluster rook
run: |
tests/scripts/github-action-helper.sh deploy_first_rook_cluster
cd cluster/examples/kubernetes/ceph/
cd deploy/examples/
kubectl create -f rbdmirror.yaml -f filesystem-mirror.yaml
# cephfs-mirroring is a push operation
# running bootstrap create on secondary and bootstrap import on primary. mirror daemons on primary.
- name: deploy second cluster rook
run: |
tests/scripts/github-action-helper.sh deploy_second_rook_cluster
cd cluster/examples/kubernetes/ceph/
cd deploy/examples/
sed -i 's/namespace: rook-ceph/namespace: rook-ceph-secondary/g' rbdmirror.yaml
kubectl create -f rbdmirror.yaml
Expand All @@ -623,30 +623,30 @@ jobs:
- name: create replicated mirrored pool on cluster 1
run: |
cd cluster/examples/kubernetes/ceph/
cd deploy/examples/
yq w -i pool-test.yaml spec.mirroring.enabled true
yq w -i pool-test.yaml spec.mirroring.mode image
kubectl create -f pool-test.yaml
timeout 60 sh -c 'until [ "$(kubectl -n rook-ceph get cephblockpool replicapool -o jsonpath='{.status.phase}'|grep -c "Ready")" -eq 1 ]; do echo "waiting for pool replicapool to created on cluster 1" && sleep 1; done'
- name: create replicated mirrored pool 2 on cluster 1
run: |
cd cluster/examples/kubernetes/ceph/
cd deploy/examples/
yq w -i pool-test.yaml metadata.name replicapool2
kubectl create -f pool-test.yaml
timeout 60 sh -c 'until [ "$(kubectl -n rook-ceph get cephblockpool replicapool2 -o jsonpath='{.status.phase}'|grep -c "Ready")" -eq 1 ]; do echo "waiting for pool replicapool2 to created on cluster 2" && sleep 1; done'
yq w -i pool-test.yaml metadata.name replicapool
- name: create replicated mirrored pool on cluster 2
run: |
cd cluster/examples/kubernetes/ceph/
cd deploy/examples/
yq w -i pool-test.yaml metadata.namespace rook-ceph-secondary
kubectl create -f pool-test.yaml
timeout 60 sh -c 'until [ "$(kubectl -n rook-ceph-secondary get cephblockpool replicapool -o jsonpath='{.status.phase}'|grep -c "Ready")" -eq 1 ]; do echo "waiting for pool replicapool to created on cluster 1" && sleep 1; done'
- name: create replicated mirrored pool 2 on cluster 2
run: |
cd cluster/examples/kubernetes/ceph/
cd deploy/examples/
yq w -i pool-test.yaml metadata.name replicapool2
kubectl create -f pool-test.yaml
timeout 60 sh -c 'until [ "$(kubectl -n rook-ceph-secondary get cephblockpool replicapool -o jsonpath='{.status.phase}'|grep -c "Ready")" -eq 1 ]; do echo "waiting for pool replicapool2 to created on cluster 2" && sleep 1; done'
Expand Down Expand Up @@ -719,15 +719,15 @@ jobs:
- name: create replicated mirrored filesystem on cluster 1
run: |
PRIMARY_YAML=cluster/examples/kubernetes/ceph/filesystem-test-primary.yaml
cp cluster/examples/kubernetes/ceph/filesystem-test.yaml "$PRIMARY_YAML"
PRIMARY_YAML=deploy/examples/filesystem-test-primary.yaml
cp deploy/examples/filesystem-test.yaml "$PRIMARY_YAML"
yq merge --inplace --arrays append "$PRIMARY_YAML" tests/manifests/test-fs-mirror-spec.yaml
kubectl create -f "$PRIMARY_YAML"
timeout 120 sh -c 'until [ "$(kubectl -n rook-ceph get cephfilesystem myfs -o jsonpath='{.status.phase}'|grep -c "Ready")" -eq 1 ]; do echo "waiting for filesystem to be created" && sleep 1; done'
- name: create replicated mirrored filesystem on cluster 2
run: |
cd cluster/examples/kubernetes/ceph/
cd deploy/examples/
yq w -i filesystem-test.yaml metadata.namespace rook-ceph-secondary
yq w -i filesystem-test.yaml spec.mirroring.enabled true
kubectl create -f filesystem-test.yaml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/daily-nightly-jobs.yml
Expand Up @@ -58,12 +58,12 @@ jobs:
# Use the official build images for the nightly arm tests instead of rebuilding
export USE_LOCAL_BUILD=false
# removing liveness probes since the env is slow and the probe is killing the daemons
yq write -d1 -i cluster/examples/kubernetes/ceph/cluster-test.yaml "spec.healthCheck.livenessProbe.mon.disabled" true
yq write -d1 -i cluster/examples/kubernetes/ceph/cluster-test.yaml "spec.healthCheck.livenessProbe.mgr.disabled" true
yq write -d1 -i cluster/examples/kubernetes/ceph/cluster-test.yaml "spec.healthCheck.livenessProbe.osd.disabled" true
yq write -d1 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.mon.disabled" true
yq write -d1 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.mgr.disabled" true
yq write -d1 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.osd.disabled" true
tests/scripts/github-action-helper.sh deploy_cluster
# there are no package for arm64 nfs-ganesha
kubectl delete -f cluster/examples/kubernetes/ceph/nfs-test.yaml
kubectl delete -f deploy/examples/nfs-test.yaml
- name: wait for prepare pod
run: timeout 900 sh -c 'until kubectl -n rook-ceph logs -f $(kubectl -n rook-ceph get pod -l app=rook-ceph-osd-prepare -o jsonpath='{.items[*].metadata.name}'); do sleep 5; done' || kubectl -n rook-ceph get all && kubectl logs -n rook-ceph deploy/rook-ceph-operator
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-lint.yaml
Expand Up @@ -35,4 +35,4 @@ jobs:
uses: helm/chart-testing-action@v2.1.0

- name: Run chart-testing (lint)
run: ct lint --charts=./cluster/charts/rook-ceph --validate-yaml=false --validate-maintainers=false
run: ct lint --charts=./deploy/charts/rook-ceph --validate-yaml=false --validate-maintainers=false
8 changes: 4 additions & 4 deletions .github/workflows/rgw-multisite-test/action.yml
Expand Up @@ -33,20 +33,20 @@ runs:
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
tests/scripts/github-action-helper.sh replace_ceph_image \
"cluster/examples/kubernetes/ceph/cluster-test.yaml" "${{ inputs.ceph-image }}"
"deploy/examples/cluster-test.yaml" "${{ inputs.ceph-image }}"
- name: deploy first cluster rook
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
tests/scripts/github-action-helper.sh deploy_first_rook_cluster
kubectl create -f cluster/examples/kubernetes/ceph/object-multisite-test.yaml
kubectl create -f deploy/examples/object-multisite-test.yaml
# wait for multisite store to be created
tests/scripts/github-action-helper.sh wait_for_rgw rook-ceph
- name: prep second cluster pull realm config
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
cd cluster/examples/kubernetes/ceph/
cd deploy/examples/
IP_ADDR=$(kubectl -n rook-ceph get svc rook-ceph-rgw-multisite-store -o jsonpath="{.spec.clusterIP}")
yq w -i -d1 object-multisite-pull-realm-test.yaml spec.pull.endpoint http://${IP_ADDR}:80
BASE64_ACCESS_KEY=$(kubectl -n rook-ceph get secrets realm-a-keys -o jsonpath="{.data.access-key}")
Expand All @@ -58,7 +58,7 @@ runs:
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
tests/scripts/github-action-helper.sh deploy_second_rook_cluster
kubectl create -f cluster/examples/kubernetes/ceph/object-multisite-pull-realm-test.yaml
kubectl create -f deploy/examples/object-multisite-pull-realm-test.yaml
# wait for realms to be pulled and zone-b-multisite-store to be created
tests/scripts/github-action-helper.sh wait_for_rgw rook-ceph-secondary
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yaml-lint.yaml
Expand Up @@ -28,4 +28,4 @@ jobs:
run: pip install yamllint

- name: Lint YAML files
run: yamllint -c .github/workflows/.yamllint cluster/examples/kubernetes/ --no-warnings
run: yamllint -c .github/workflows/.yamllint deploy/examples/ --no-warnings
4 changes: 2 additions & 2 deletions .gitignore
Expand Up @@ -8,5 +8,5 @@
/tests/integration/rook-test/

# OLM related stuff
cluster/olm/ceph/deploy/*
cluster/olm/ceph/templates/*
deploy/olm/deploy/*
deploy/olm/templates/*

0 comments on commit decc481

Please sign in to comment.