diff options
author | Soren Hansen <soren@canonical.com> | 2009-08-25 23:51:16 +0200 |
---|---|---|
committer | Soren Hansen <soren@canonical.com> | 2009-08-25 23:51:16 +0200 |
commit | 59d21bb23db06e5e02cbd91ec531b1506ab97fae (patch) | |
tree | 8743a08d8e959f2a4b5648f55452aa1079218c58 /setup.py | |
parent | 85f6e6168beb89436ebc20c67d329581f7155f5c (diff) | |
download | vyos-cloud-init-59d21bb23db06e5e02cbd91ec531b1506ab97fae.tar.gz vyos-cloud-init-59d21bb23db06e5e02cbd91ec531b1506ab97fae.zip |
Implement EBS volume mounting
This can either be invoked by instrumenting the user-data with a mime
part with content-type 'text/x-ebs-mount-description' with a body like
so:
device=/dev/sde:/var/lib/mysql,/etc/alfresco
device=/dev/sdf:/other/things
or by using the appliance config XML format like so:
<appliance>
<storage device="/dev/sde">
<path>/var/lib/mysql</path>
<path>/etc/alfresco</path>
</storage>
<storage device="/dev/sdf">
<path>/other/things</path>
</appliance>
</appliance>
In either case, if the volume does not yet have a filesystem, one will be created.
For each path that is to live on the volume, a directory is created, and
populated with the data currently in the target directory (e.g.
/var/lib/mysql is copied to ${ebs_volume_path}/_var_lib_mysql). Once
this is done, the directories are bind-mounted to the relevant paths.
If the directories in question already exist, they will just be bind-mounted.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -37,5 +37,7 @@ setup(name='EC2-init', 'ec2-wait-for-meta-data-service.py'], data_files=[('/etc/ec2-init', ['ec2-config.cfg']), ('/etc/ec2-init/templates', glob('templates/*')), - ('/etc/init.d', ['ec2-init'])], + ('/etc/init.d', ['ec2-init']), + ('/usr/share/ec2-init', ['ec2-init-appliance-ebs-volume-mount.sh']), + ], ) |