chore: move to vexxhost.ceph
diff --git a/molecule/csi/cleanup.yml b/molecule/csi/cleanup.yml
new file mode 100644
index 0000000..45d16dc
--- /dev/null
+++ b/molecule/csi/cleanup.yml
@@ -0,0 +1,15 @@
+# Copyright (c) 2023 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+- ansible.builtin.import_playbook: vexxhost.ceph.destroy_fake_devices
diff --git a/molecule/csi/converge.yml b/molecule/csi/converge.yml
new file mode 100644
index 0000000..d97e10c
--- /dev/null
+++ b/molecule/csi/converge.yml
@@ -0,0 +1,17 @@
+# Copyright (c) 2023 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+- ansible.builtin.import_playbook: vexxhost.ceph.site
+- ansible.builtin.import_playbook: vexxhost.atmosphere.kubernetes
+- ansible.builtin.import_playbook: vexxhost.atmosphere.csi
diff --git a/molecule/csi/molecule.yml b/molecule/csi/molecule.yml
new file mode 100644
index 0000000..a1cdf53
--- /dev/null
+++ b/molecule/csi/molecule.yml
@@ -0,0 +1,76 @@
+# Copyright (c) 2023 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+dependency:
+ name: galaxy
+driver:
+ name: docker
+platforms:
+ - name: instance
+ image: geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest
+ command: ${MOLECULE_DOCKER_COMMAND:-""}
+ privileged: true
+ cgroupns_mode: host
+ pre_build_image: true
+ etc_hosts:
+ k8s: 172.17.0.100
+ environment:
+ container: docker
+ security_opts:
+ - apparmor=unconfined
+ volumes:
+ - /dev:/dev
+ - /lib/modules:/lib/modules:ro
+ - /sys/fs/cgroup:/sys/fs/cgroup:rw
+ - /usr/src:/usr/src:ro
+ groups:
+ - controllers
+ - cephs
+provisioner:
+ name: ansible
+ config_options:
+ connection:
+ pipelining: true
+ tags:
+ skip: sysctl,ethtool
+ inventory:
+ group_vars:
+ all:
+ ceph_fsid: ${MOLECULE_CEPH_FSID:-"1dff0e0f-3c44-48da-81cd-4f3c6e8722b2"}
+ ceph_conf_overrides:
+ - section: global
+ option: osd crush chooseleaf type
+ value: 0
+ - section: mon
+ option: auth allow insecure global id reclaim
+ value: false
+ cilium_helm_values:
+ operator:
+ replicas: 1
+ csi_driver: ${MOLECULE_CSI_DRIVER:-"rbd"}
+ ceph_csi_rbd_helm_values:
+ provisioner:
+ replicaCount: 1
+ controllers:
+ kubernetes_keepalived_interface: "{{ ansible_default_ipv4.interface }}"
+ kubernetes_keepalived_vip: 172.17.0.100
+ kubernetes_keepalived_vrid: 42
+ kubernetes_hostname: k8s
+ cephs:
+ ceph_osd_devices:
+ - "/dev/ceph-{{ inventory_hostname_short }}-osd0/data"
+ - "/dev/ceph-{{ inventory_hostname_short }}-osd1/data"
+ - "/dev/ceph-{{ inventory_hostname_short }}-osd2/data"
+verifier:
+ name: ansible
diff --git a/molecule/csi/prepare.yml b/molecule/csi/prepare.yml
new file mode 100644
index 0000000..dac0bc4
--- /dev/null
+++ b/molecule/csi/prepare.yml
@@ -0,0 +1,47 @@
+# Copyright (c) 2023 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+- name: Prepare
+ hosts: all
+ become: true
+ pre_tasks:
+ - name: Wait for systemd to complete initialization
+ ansible.builtin.command: systemctl is-system-running
+ register: systemctl_status
+ until: >
+ 'running' in systemctl_status.stdout or
+ 'degraded' in systemctl_status.stdout
+ retries: 30
+ delay: 5
+ changed_when: false
+ failed_when: systemctl_status.rc > 1
+ tasks:
+ - name: Refresh cache
+ ansible.builtin.package:
+ update_cache: true
+
+ # NOTE(mnaser): The base image installs Ansible using `pip` which breaks
+ # the system Python, we uninstall all Python packages.
+ - name: Fix Python installation
+ block:
+ - name: Get all Python packages
+ ansible.builtin.command: pip freeze
+ register: pip_freeze
+
+ - name: Uninstall all Python packages
+ ansible.builtin.pip:
+ name: "{{ pip_freeze.stdout_lines }}"
+ state: absent
+
+- ansible.builtin.import_playbook: vexxhost.ceph.create_fake_devices
diff --git a/molecule/csi/verify.yml b/molecule/csi/verify.yml
new file mode 100644
index 0000000..0add366
--- /dev/null
+++ b/molecule/csi/verify.yml
@@ -0,0 +1,84 @@
+# Copyright (c) 2023 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+- name: Verify
+ hosts: controllers
+ become: true
+ tasks:
+ - name: Create a persistent volume
+ kubernetes.core.k8s:
+ state: present
+ definition:
+ apiVersion: v1
+ kind: PersistentVolumeClaim
+ metadata:
+ name: test-pvc
+ namespace: default
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 5Gi
+ storageClassName: general
+
+ - name: Create a pod
+ kubernetes.core.k8s:
+ state: present
+ definition:
+ apiVersion: v1
+ kind: Pod
+ metadata:
+ name: test-pvc-pod
+ namespace: default
+ spec:
+ volumes:
+ - name: test-pvc
+ persistentVolumeClaim:
+ claimName: test-pvc
+ containers:
+ - name: test-pvc-pod-container
+ image: nginx
+ volumeMounts:
+ - name: test-pvc
+ mountPath: /usr/share/nginx/html
+ wait: true
+ wait_timeout: 120
+ wait_condition:
+ type: Ready
+ status: "True"
+
+ - name: Delete the pod
+ kubernetes.core.k8s:
+ state: absent
+ definition:
+ apiVersion: v1
+ kind: Pod
+ metadata:
+ name: test-pvc-pod
+ namespace: default
+
+ - name: Delete the persistent volume
+ kubernetes.core.k8s:
+ state: absent
+ definition:
+ apiVersion: v1
+ kind: PersistentVolume
+ metadata:
+ name: test-pv
+ wait: true
+ wait_timeout: 120
+ wait_condition:
+ type: Available
+ status: "True"