Closed tenthirtyam closed 2 months ago
@tenthirtyam I added this to our board for review. I should be able to review it tomorrow.
@nywilken @lbajolet-hashicorp - All set on this one, let me know when you have time to review and I'm happy to demo this 1:1 so you can see it in action.
Thanks! I'll address the comments and update you when pushed.
Summary
Adds ability to perform cleanup of items added to the remote cache upon build completion in addition to the existing cancelled or halted.
To enable, set
remote_cache_cleanup = true
. Defaults tofalse
.Adds the ability to specify the datastore for the placement of the remote cache.
To enable, set
remote_cache_datastore = "myCacheDatastoreName"
. If not set, the datastore of the virtual machine is used.Adds the ability to specify the path on the datastore for the placement of the remote cache.
To enable, set
remote_cache_path = "foo/bar"
If not set, the default path is
packer_cache
at the root of the datastore.Adds the ability to overwrite items in the remote cache.
To enable, set
remote_cache_overwrite = true
.Adds the ability to overwrite items in the local cache.
To enable, set
local_cache_overwrite = true
.If
local_cache_overwrite = true
,remote_cache_overwrite
is implicitly be set totrue
. This is to ensure consistency between the local and remote cache.Testing
Example configuration:
When
remote_cache_cleanup = true
:When
remote_cache_cleanup = false
or not included:And with:
remote_cache_datastore = "local-ssd-02"
remote_cache_path = "bar/packer_cache"
Results:
make test
Reference
The following is in the top 5 of most requested (open) enhancements.
Closes #14 Closes #55 Closes #88