Add loopback devices format and mount
The deploy-env role provides the capabilities to create loopback devices that we currently use for test ceph deployment. For testing Swift chart we also need to be able to format and mount loopback devices. Signed-off-by: Vladimir Kozhukalov <kozhukalov@gmail.com> Change-Id: I4fa5db21b4d3149587cdc7e44888fe60512df8c0
This commit is contained in:
@@ -86,7 +86,7 @@ images:
|
||||
nova_spiceproxy_assets: quay.io/airshipit/nova:2025.1-ubuntu_noble
|
||||
test: docker.io/xrally/xrally-openstack:2.0.0
|
||||
image_repo_sync: docker.io/docker:17.07.0
|
||||
nova_wait_for_computes_init: gcr.io/google_containers/hyperkube-amd64:v1.11.6
|
||||
nova_wait_for_computes_init: quay.io/airshipit/ceph-config-helper:latest-ubuntu_jammy
|
||||
local_registry:
|
||||
active: false
|
||||
exclude:
|
||||
|
||||
@@ -54,6 +54,10 @@ loopback_setup: false
|
||||
loopback_device: /dev/loop100
|
||||
loopback_image: /var/lib/openstack-helm/ceph-loop.img
|
||||
loopback_image_size: 12G
|
||||
loopback_format: false
|
||||
loopback_format_fs_type: ext4
|
||||
loopback_mount: false
|
||||
loopback_mount_path: /srv/node/loop100
|
||||
|
||||
coredns_resolver_setup: false
|
||||
coredns_dns_server: "8.8.8.8"
|
||||
|
||||
@@ -17,5 +17,5 @@
|
||||
- name: Restart loop-setup
|
||||
service:
|
||||
name: loop-setup
|
||||
state: restarted
|
||||
state: started
|
||||
...
|
||||
|
||||
27
roles/deploy-env/tasks/loopback_devices_mount.yaml
Normal file
27
roles/deploy-env/tasks/loopback_devices_mount.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
# 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: Format loop device
|
||||
filesystem:
|
||||
fstype: "{{ loopback_format_fs_type }}"
|
||||
dev: "{{ loopback_device }}"
|
||||
when: loopback_format
|
||||
|
||||
- name: Mount loop device
|
||||
mount:
|
||||
src: "{{ loopback_device }}"
|
||||
path: "{{ loopback_mount_path }}"
|
||||
fstype: "{{ loopback_format_fs_type }}"
|
||||
state: mounted
|
||||
when: loopback_mount
|
||||
...
|
||||
@@ -30,6 +30,11 @@
|
||||
file: loopback_devices.yaml
|
||||
when: loopback_setup and inventory_hostname in (groups['k8s_cluster'] | default([]))
|
||||
|
||||
- name: Loop device mount
|
||||
include_tasks:
|
||||
file: loopback_devices_mount.yaml
|
||||
when: loopback_setup and inventory_hostname in (groups['k8s_cluster'] | default([]))
|
||||
|
||||
- name: Deploy Containerd
|
||||
include_tasks:
|
||||
file: containerd.yaml
|
||||
|
||||
Reference in New Issue
Block a user