Re: How to know bosh image id of the deployment


Marco Voelz
 

You might also want to look at
`bosh delete deployment`
followed by
`bosh cleanup --all`

If the stemcell isn't used by any other deployments, it will be deleted from glance as well. You should be careful with deleting things yourself from glance. If you deploy anything else it may be using the same image.

I would generally advise you to not build your own scripts when there is a set of commands in bosh to achieve the same thing.

Warm regards
Marco

On 28/04/16 14:12, "Rosker, Matthias" <matthias.rosker(a)sap.com> wrote:

Hi,

The missing link is the stemcell:
"bosh deployments" will show the stemcell a certain deployment is using.

"bosh stemclls" will give you the CID (which is the glance image id, you can use for glance image delete)




On 28.04.16 13:26, "Vikram Ranabhatt" <vikramranabhatt(a)gmail.com> wrote:

I am doing Cloud Foundry deployment using bosh.Now I am writiing delete deployment script.
I have no clue to know bosh image id for deployment. currently bosh deployment has 24 vms which uses same bosh image.
I need to know that bosh image id,so that i can delete it.

currently i am using error prone method to do this
glance image-list >> out.txt
while
glance image-delete $is
done << out.txt
In this way i am delete the image but it takes lot of time and it try to delete all image currently used by other deployment,though deletion for others fails.

Is there any way to get deployment vm's bosh image id.
In our deployment we are using two stem cells one for bosh director and other for deployments(cloud foundry vm).

I am able to get bosh director bosh image id by through bosh director ip
id=nova list grep | ip

nova show id

I have no clue to get bosh image id of deployment.

Join {cf-bosh@lists.cloudfoundry.org to automatically receive all group messages.