Netflix / aminator

A tool for creating EBS AMIs. This tool currently works for CentOS/RedHat Linux images and is intended to run on an EC2 instance.
Apache License 2.0
950 stars 170 forks source link

Add --partition parameter to allow mounting of partitioned volumes #207

Closed willtrking closed 9 years ago

willtrking commented 10 years ago

This pull adds a --partition parameter to the linux block device plugin to facilitate mounting of volumes with partition tables. It also adds in proper handling of partitioned volumes to the linux volume plugin. It's currently being used in deployment to create HVM AMI's with the ansible and yum provisioners.

This follows the general concept outlined by @mtripoli in issue https://github.com/Netflix/aminator/issues/59

Usage example:

aminate -e ec2_ansible_amzn -n my_ami_name --partition 1 --vm-type hvm -B my-ami-id my/playbook.yml --debug
cloudbees-pull-request-builder commented 10 years ago

aminator-pull-requests #184 FAILURE Looks like there's a problem with this pull request

willtrking commented 10 years ago

Seems like the build failure is unrelate to this request.

From cloudbees:

Cleaning up...
aminator/exceptions.py OK
aminator/cli.py OK
aminator/plugins/blockdevice/base.py OK
aminator/plugins/blockdevice/null.py OK
aminator/plugins/blockdevice/__init__.py OK
aminator/plugins/blockdevice/manager.py OK
aminator/plugins/blockdevice/linux.py OK
aminator/plugins/__init__.py OK
aminator/plugins/provisioner/apt.py OK
aminator/plugins/provisioner/yum.py OK
************* Module aminator.plugins.provisioner.base
E: 99,29: Too many arguments for format string (too-many-format-args)
E:148,33: Too many arguments for format string (too-many-format-args)
make: *** [validate] Error 1
Build step 'Execute shell' marked build as failure
Build did not succeed and the project is configured to only push after a successful build, so no pushing will occur.
Putting comment on the pull request
Finished: FAILURE
bmoyles commented 10 years ago

Hey @willtrking -- sorry for the radio silence. The error is indeed an erroneous error from pylint that we'll get cleaned up. We will need to review the patch to ensure it's not breaking any behavior that'd affect other plugins. This sort of thing may make more sense as a plugin for that reason--the pre-packaged extensions are considered "core" and we really should be careful about changing them too drastically.

willtrking commented 10 years ago

Understandable, packaging it as a separate set of plugins wouldn't take me very long, although it would have to include both a block device and volume plugin. If that's the way you guys would prefer to go I can do that.

cloudbees-pull-request-builder commented 10 years ago

aminator-pull-requests #186 FAILURE Looks like there's a problem with this pull request

cloudbees-pull-request-builder commented 10 years ago

aminator-pull-requests #187 FAILURE Looks like there's a problem with this pull request

tewner commented 9 years ago

Hey All! This is a very useful PR - Any chance it can be merged?

coryb commented 9 years ago

Thanks, sorry for the delay. -Cory

tomstockton commented 9 years ago

Apologies for ignorance. Should the --partitions parameter work with the Puppet provisioner or does the Puppet plugin need to support it?