1414CEPH_IMAGE = 'quay.ceph.io/ceph-ci/ceph:master'
1515BOX_IMAGE = 'cephadm-box:latest'
1616
17+ # NOTE: this image tar is a trickeroo so cephadm won't pull the image everytime
18+ # we deploy a cluster. Keep in mind that you'll be responsible of pulling the
19+ # image yourself with `box cluster setup`
20+ CEPH_IMAGE_TAR = 'docker/ceph/image/quay.ceph.image.tar'
21+
22+ def remove_ceph_image_tar ():
23+ if os .path .exists (CEPH_IMAGE_TAR ):
24+ os .remove (CEPH_IMAGE_TAR )
25+
1726def cleanup_box () -> None :
1827 osd .cleanup ()
28+ remove_ceph_image_tar ()
1929
2030def image_exists (image_name : str ):
2131 # extract_tag
@@ -39,10 +49,10 @@ def get_ceph_image():
3949 run_shell_command (f'docker build -t { CEPH_IMAGE } docker/ceph' )
4050 if not os .path .exists ('docker/ceph/image' ):
4151 os .mkdir ('docker/ceph/image' )
42- image_tar = 'docker/ceph/image/quay.ceph.image.tar'
43- if not os . path . exists ( image_tar ):
44- os . remove ( image_tar )
45- run_shell_command (f'docker save { CEPH_IMAGE } -o { image_tar } ' )
52+
53+ remove_ceph_image_tar ()
54+
55+ run_shell_command (f'docker save { CEPH_IMAGE } -o { CEPH_IMAGE_TAR } ' )
4656 print ('Ceph image added' )
4757
4858def get_box_image ():
@@ -92,10 +102,6 @@ def bootstrap(self):
92102
93103 extra_args = []
94104
95- shared_ceph_folder = os .environ .get ('SHARED_CEPH_FOLDER' )
96- if shared_ceph_folder :
97- extra_args .extend (['--shared_ceph_folder' , shared_ceph_folder ])
98-
99105 extra_args .append ('--skip-pull' )
100106
101107 # cephadm prints in warning, let's redirect it to the output so shell_command doesn't
0 commit comments