Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeleton directories #21

Open
mikery opened this issue May 19, 2013 · 2 comments
Open

Skeleton directories #21

mikery opened this issue May 19, 2013 · 2 comments

Comments

@mikery
Copy link
Collaborator

mikery commented May 19, 2013

Placeholder for a feature I need to add.

When a snapshot is not found (i.e. first time an instance is booted), a local directory on an already-mounted file system should be used to populate the new volume, rather than formatting it and leaving it empty.

  • create the files in the skeleton dir, build AMI
  • launch the instance
  • no snapshot will be found, so data will be copied from skeleton dir
  • < backup is taken, machine is rebooted >
  • now that snapshots exist, they are used instead of the skeleton data

Changes:

  • add a skeleton_dir attribute to volume class
  • cp contents of this dir to volume mount location
@tschellenbach
Copy link
Owner

Think the signals already allow you to do this quite easily. What do u
think?
On May 19, 2013 2:16 PM, "Mike Ryan" [email protected] wrote:

Placeholder for a feature I need to add.

When a snapshot is not found (i.e. first time an instance is booted), a
local directory on an already-mounted file system should be used to
populate the new volume, rather than formatting it and leaving it empty.

  • create the files in the skeleton dir, build AMI
  • launch the instance
  • no snapshot will be found, so data will be copied from skeleton dir
  • < backup is taken, machine is rebooted >
  • now that snapshots exist, they are used instead of the skeleton data

Changes:

  • add a skeleton_dir attribute to volume class
  • cp contents of this dir to volume mount location


Reply to this email directly or view it on GitHubhttps://github.com//issues/21
.

@mikery
Copy link
Collaborator Author

mikery commented May 19, 2013

post_mount doesn't know if a snapshot was found or not, so it can't know
whether it needs to load the skeleton dir or not. It could check if the
mounted dir is empty, but... yeah :)

I think the cleanest place to add this would be after doing the format:
https://github.com/tschellenbach/Snaptastic/blob/master/snaptastic/snapshotter.py#L184

Thierry Schellenbach wrote:

Think the signals already allow you to do this quite easily. What do u
think?
On May 19, 2013 2:16 PM, "Mike Ryan" [email protected] wrote:

Placeholder for a feature I need to add.

When a snapshot is not found (i.e. first time an instance is booted), a
local directory on an already-mounted file system should be used to
populate the new volume, rather than formatting it and leaving it
empty.

  • create the files in the skeleton dir, build AMI
  • launch the instance
  • no snapshot will be found, so data will be copied from skeleton dir
  • < backup is taken, machine is rebooted >
  • now that snapshots exist, they are used instead of the skeleton data

Changes:

  • add a skeleton_dir attribute to volume class
  • cp contents of this dir to volume mount location


Reply to this email directly or view it on
GitHubhttps://github.com//issues/21
.


Reply to this email directly or view it on GitHub
#21 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants