Commit graph

1356 commits

Author SHA1 Message Date
Nicolas Braud-Santoni
34479f06f1
docs/developers: Encourage using rel_path in validate_manifest 2016-09-12 19:20:22 +02:00
Nicolas Braud-Santoni
90da634226
Systematically use rel_path for relative paths 2016-09-12 19:11:20 +02:00
Nicolas Braud-Santoni
d8c831a7fa
common.tools: Make rel_path normalize the path 2016-09-12 18:15:56 +02:00
Nicolas Braud-Santoni
9f7038163f
file_copy: Properly apply file permissions
When dst was a directory, the file would be copied properly,
but the permissions would be applied to the parent directory
rather than the copied file.
2016-09-12 17:37:56 +02:00
Nicolas Braud-Santoni
9caf94ee42
file_copy: Make pathes relative to the manifest
To that effect, the file validation was moved
from validate_manifest to the validation phase.
2016-09-12 17:37:53 +02:00
Nicolas Braud-Santoni
7fd7ba5aa1
admin_user: Properly validate SSH keys 2016-09-12 17:37:50 +02:00
Nicolas Braud-Santoni
9de36b9d99
admin_user: Allow relative paths to pubkeys
The paths are relative to the manifest.

Also, the file validation happens during the validation phase.
2016-09-12 17:37:47 +02:00
Nicolas Braud-Santoni
734afd892b
common.tools: Add a function for relative pathes
rel_path(a, b) is the absolute path of b, taken relative to a.
If b is already an absolute path, rel_path(a, b) is b.
2016-09-12 17:37:44 +02:00
Nicolas Braud-Santoni
81778136bc
Moving host_dependencies tasks to the validation phase 2016-09-12 01:12:19 +02:00
Nicolas Braud-Santoni
9bf2c45ee2
Moving checking tasks to the validation phase 2016-09-12 00:52:10 +02:00
Nicolas Braud-Santoni
8cd0648e27
common: Add a validation phase
As discussed in [#335], the `validate_manifest` method checks the manifest's
  internal consistency.  The validation phase, on the other hand, can be used to
  check the consistency of the manifest with external ressources, for instance:

  - Checking if files or directories exist.
  - Checking if the content of a file is consistent with what was expected.
  - Checking if a network ressource (an APT proxy?) is reachable.

[#335]: https://github.com/andsens/bootstrap-vz/pull/335#issuecomment-239661077
2016-09-11 22:05:22 +02:00
Anders Ingemann
b9d63b701d Merge pull request #332 from hashbang/master
docker: Fix quoting that breaks some versions of Docker
2016-08-14 10:01:33 +02:00
The Fox in the Shell
eca54d6c21
docker: Use a standard escaping function.
The outer double-quotes (") were breaking things on some versions
of Docker, such as the one currently available on Travis.
2016-08-13 14:46:53 +02:00
Anders Ingemann
e0d92382fb tox: Require python2.7 for all testenv 2016-08-13 11:45:48 +02:00
Anders Ingemann
765430bfad Merge pull request #331 from nbraud/misc
Misc. fixes & improvements
2016-08-09 22:25:27 +02:00
Nicolas Braud-Santoni
a15c9ea309
tasks/apt: Don't use security.debian.org for obsolete releases 2016-08-09 22:34:34 +02:00
Nicolas Braud-Santoni
1000430aa0
file_copy: Allow copying directories 2016-08-09 22:34:32 +02:00
Tiago Ilieve
611154a426 Merge pull request #330 from zmarano/master
Fix some GCE image issues.
2016-07-27 22:46:24 -03:00
Zach Marano
1f747788c1 Fix missing source repo in GCE images. Add back baseline apt cache as
well. Add in additional GCE guest package into manifests (init files
were split into their own package to make the python package adhere to
pypi standards).
2016-07-21 14:14:42 -07:00
Anders Ingemann
96086329e6 ec2: Only enable systemd when grub is the bootloader
Right now we can only properly edit the linux bootparams,
when using grub. This should be fixed so that it works for extlinux
as well.

Fixes #328
2016-06-08 16:55:56 +02:00
Anders Ingemann
70402229c5 docker: no need for date in reponame of example manifest
It's part of the docker image itself
2016-06-07 22:28:53 +02:00
Anders Ingemann
d222b267ce Also disable autostart for daemons started through upstart 2016-06-07 22:02:40 +02:00
Anders Ingemann
feea266210 docker: Add some more labeling to the example manifest
Also remove netbase as an explicit install.
It's only there because of the ping pkg
2016-06-07 22:02:39 +02:00
Anders Ingemann
73c2305a4c Add log message about tasklist generation
Generating the tasklist takes >1s, so it's nice to
know what bootstrap-vz is actually doing.
2016-06-07 19:05:31 +02:00
Anders Ingemann
8b4b2701fb docker: Let the autostart of daemons by apt remain disabled 2016-06-05 19:06:16 +02:00
Anders Ingemann
07bc3ddd8d docker: Add packages that are available in the official image (to the manifest) 2016-06-05 18:52:37 +02:00
Anders Ingemann
49ddd3879f docker: Fix dockerfile creation 2016-06-05 17:19:27 +02:00
Anders Ingemann
0d54ad68ec prebootstrapped: Take minimize_size plugin into account
The dpkg tasks modify the volume before debootstrap,
so when re-creating a snapshot we need to remove them as well.
2016-06-05 13:35:01 +02:00
Anders Ingemann
df7df19fb9 prebootstrapped: Support folder backing (for docker) 2016-06-05 13:30:48 +02:00
Anders Ingemann
2ffc4dd6c3 grub: Prettier type checking when writing grub defaults 2016-06-05 13:20:34 +02:00
Anders Ingemann
e030b9f84f Fix bug with task list generation
Only tasks from the loaded provider and plugins were
considered, when creating the task graph.
This was a problem with the prebootstrapped plugin
specifically, which could be used with both ec2 and
vbox.
Fixed the problem by loading all known plugins and
providers and adding them to the taskgraph, nothing
less will do.
2016-06-05 11:41:18 +02:00
Anders Ingemann
4031fd6f84 ec2: Update official jessie 64-bit hvm manifest
Snatched from PR #256 by @JamesBromberger
2016-06-05 10:45:19 +02:00
Anders Ingemann
bb41ba68dd Tiny fix for CheckExternalCommands 2016-06-05 10:45:19 +02:00
Anders Ingemann
ad75b78ce3 Update CHANGELOG 2016-06-05 10:45:19 +02:00
Justin Santa Barbara
0a8ececb20 Source ixgbevf driver from intel, not sourceforge
Sourceforge is often down at the moment, causing bootstrap-vz to fail.

Fix #287
2016-06-05 10:45:19 +02:00
Anders Ingemann
98de220f78 ec2: Add tasks for EC2 tuning
Snatched from PR #256 by @JamesBromberger
2016-06-05 10:45:19 +02:00
Anders Ingemann
c14687a171 cloud-init: Add option to enable modules
Snatched from PR #256 by @JamesBromberger
2016-06-04 22:04:42 +02:00
Anders Ingemann
8eb51524f3 vbox: Add tty0 as grub console output
Fixes #312
2016-06-04 19:54:39 +02:00
Anders Ingemann
cd969b5427 ec2: Fix for 9d2ad17, use tasks.grub not grub 2016-06-04 19:32:03 +02:00
Anders Ingemann
a5f5b9ef3a ec2: Fix PVM grub console output 2016-06-04 19:26:31 +02:00
Anders Ingemann
97deaa3a17 Add lo to jessie network config 2016-06-04 19:23:59 +02:00
Anders Ingemann
45fb28082a ec2: Add hvc0 as grub console output device 2016-06-04 19:23:35 +02:00
Anders Ingemann
9d2ad17d09 ec2: Enable systemd on >=jessie 2016-06-04 19:20:31 +02:00
Anders Ingemann
cf6234bafd Split grub config into small tasks
The way boot options for linux and config params for grub
were configured gave rise to quite a few bugs.
The configuration has now been abstracted so that
options can be added without interfering with the work
of other tasks (no more sed_i!)
2016-06-04 18:48:54 +02:00
Anders Ingemann
da50ed7978 ec2: Silence boto before determining the AMI name 2016-06-04 18:48:54 +02:00
Anders Ingemann
306c87d535 ec2: provider.description is required 2016-06-04 18:48:53 +02:00
Anders Ingemann
4cbeed5263 Add manifest, kernel and NIC config for stretch 2016-06-04 18:19:49 +02:00
Anders Ingemann
0614952014 Disable predictable NIC names for >=stretch
This is just a compabibility hack for now, we should figure
out how to get this working properly.
Issue: #245
Thanks to @apolloclark for this one.
2016-06-04 16:56:11 +02:00
Anders Ingemann
46d4424c65 Fix grub task order 2016-06-04 16:49:14 +02:00
Anders Ingemann
f62c8ade99 Convert indentation from tabs to spaces (4)
Up until now I didn't see the point of using spaces for indentation.
However, the previous commit (a18bec3) was quite eye opening.
Given that python is an indentation aware language, the amount of
mistakes that went unnoticed because tabs and spaces were used
at the same time (tabs for indentation and spaces for alignment)
were unacceptable.

E101,W191 have been re-enable in the tox flake8 checker and
the documentation has been modified accordingly.

The following files have been left as-is:
* bootstrapvz/common/assets/extlinux/extlinux.conf
* bootstrapvz/common/assets/init.d/expand-root
* bootstrapvz/common/assets/init.d/generate-ssh-hostkeys
* bootstrapvz/common/assets/init.d/squeeze/generate-ssh-hostkeys
* bootstrapvz/plugins/docker_daemon/assets/init.d/docker
* bootstrapvz/providers/ec2/assets/bin/growpart
* bootstrapvz/providers/ec2/assets/grub.d/40_custom
* bootstrapvz/providers/ec2/assets/init.d/ec2-get-credentials
* bootstrapvz/providers/ec2/assets/init.d/ec2-run-user-data
* docs/_static/taskoverview.coffee
* docs/_static/taskoverview.less
* tests/unit/subprocess.sh
2016-06-04 11:38:16 +02:00