diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ff303fd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,37 @@ +Contributing +============ + +Do you want to contribute to the bootstrap-vz project? Nice! Here is the basic workflow: + +* Fork this repository. +* Make any changes you want/need. +* Check the coding style of your changes using [tox](http://tox.readthedocs.org/), running `tox -e flake8` and +fixing any warnings that may appear. This will be done again by +[Travis CI](https://travis-ci.org/andsens/bootstrap-vz) later when you send a pull request, so it's better if +you check this before. +* Commit your changes. +* Squash the commits if needed. For instance, it is fine if you have multiple commits describing atomic units +of work, but there's no reason to have many little commits just because of corrected typos. +* Push to your fork, preferable on a topic branch. + +By this moment, there are two paths that you have to consider: + +If you patch is a new feature, e.g.: plugin, provider, etc. then: + +* Send a pull request to the `development` branch. It will be merged into the `master` branch when we can make +sure that the code is stable. + +If it is a bug/security fix: + +* Send a pull request to the `master` branch. + +Please try to be very descriptive about your changes when you write a pull request, stating what it does, why +it is needed, what use cases do you think it would be useful, etc. You could as well be asked to rebase your +work on the current branch state, so it can be merged cleanly. Also, be in mind that if you push a new commit +to your pull request, we won't be notified just by this - that will happen only if you make a new comment on +the issue. + +Be aware that your modifications needs to be properly documented and pushed to the `gh-pages` branch, if they +concern anything done on `master`. Otherwise, they should be sent to the `gh-pages-dev`. + +Happy hacking! :-) diff --git a/README.md b/README.md index 9747034..bd72479 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,10 @@ and learn [how you create a manifest](http://andsens.github.io/bootstrap-vz/mani Developers ---------- The API documentation can be found at [bootstrap-vz.readthedocs.org](http://bootstrap-vz.readthedocs.org). + +Contributing +------------ + +Contribution guidelines are described on the [CONTRIBUTING](CONTRIBUTING.md) file. +There's also a [topic on the documentation](http://andsens.github.io/bootstrap-vz/development.html#coding_style) +regarding the coding style. diff --git a/bootstrapvz/common/tasks/network-configuration.json b/bootstrapvz/common/tasks/network-configuration.json index 4e5dce7..2937384 100644 --- a/bootstrapvz/common/tasks/network-configuration.json +++ b/bootstrapvz/common/tasks/network-configuration.json @@ -8,5 +8,7 @@ "wheezy": ["auto eth0", "iface eth0 inet dhcp"], "jessie": ["auto eth0", + "iface eth0 inet dhcp"], +"sid": ["auto eth0", "iface eth0 inet dhcp"] } diff --git a/bootstrapvz/plugins/cloud_init/tasks.py b/bootstrapvz/plugins/cloud_init/tasks.py index 90b3fde..007ad86 100644 --- a/bootstrapvz/plugins/cloud_init/tasks.py +++ b/bootstrapvz/plugins/cloud_init/tasks.py @@ -2,6 +2,8 @@ from bootstrapvz.base import Task from bootstrapvz.common import phases from bootstrapvz.common.tools import log_check_call from bootstrapvz.common.tasks import apt +from bootstrapvz.common.tasks import locale +import logging import os.path @@ -12,7 +14,6 @@ class AddBackports(Task): @classmethod def run(cls, info): if info.source_lists.target_exists('{system.release}-backports'): - import logging msg = ('{system.release}-backports target already exists').format(**info.manifest_vars) logging.getLogger(__name__).info(msg) else: @@ -53,6 +54,7 @@ class SetUsername(Task): class SetMetadataSource(Task): description = 'Setting metadata source' phase = phases.package_installation + predecessors = [locale.GenerateLocale] successors = [apt.AptUpdate] @classmethod @@ -63,9 +65,8 @@ class SetMetadataSource(Task): source_mapping = {'ec2': 'Ec2'} sources = source_mapping.get(info.manifest.provider, None) if sources is None: - import logging msg = ('No cloud-init metadata source mapping found for provider `{provider}\', ' - 'skipping selections setting.').format(info.manifest.provider) + 'skipping selections setting.').format(provider=info.manifest.provider) logging.getLogger(__name__).warn(msg) return sources = "cloud-init cloud-init/datasources multiselect " + sources diff --git a/bootstrapvz/providers/ec2/tasks/packages-kernels.json b/bootstrapvz/providers/ec2/tasks/packages-kernels.json index 1e42622..adbbf97 100644 --- a/bootstrapvz/providers/ec2/tasks/packages-kernels.json +++ b/bootstrapvz/providers/ec2/tasks/packages-kernels.json @@ -7,6 +7,9 @@ {"i386": "linux-image-686", "amd64": "linux-image-amd64"}, "jessie": + {"i386": "linux-image-686", + "amd64": "linux-image-amd64"}, +"sid": {"i386": "linux-image-686", "amd64": "linux-image-amd64"} }