Commit graph

213 commits

Author SHA1 Message Date
Michael Gerlach
4eb90a544e type is never going to be a partition 2017-02-04 16:15:24 +01:00
Stefan
64e1020e6d fix pep8 2017-02-01 20:16:23 +01:00
Michael Gerlach
5a4719c236 remove semicolons.. :-/ 2017-02-01 18:38:37 +01:00
Michael Gerlach
ff4918f1e0 sort out UnformattedPartitions nicer 2017-01-31 21:45:40 +01:00
Zach Marano
84f258e748 Fixes to create stretch images. Add stretch manifest for GCE. 2017-01-10 13:30:31 -08:00
Michael Gerlach
519ff5e605 Remove debug output 2016-12-10 20:09:35 +01:00
Michael Gerlach
167a0af4ce Add handling for addtitional partitions 2016-12-10 16:11:58 +01:00
Michael Gerlach
87707486cd Add mountopts to classes and methods 2016-12-10 16:11:58 +01:00
Anders Ingemann
ee18fc84ca
Fix some task ordering warnings 2016-12-01 15:59:51 +01:00
Anders Ingemann
c81eacf02f
PEP8 compliance
bootstrapvz/common/task_groups.py:137:1: E305 expected 2 blank lines after class or function definition, found
1
2016-12-01 15:08:47 +01:00
Marcin Kulisz
18f31df2f4 Stretch (9.0) patch #3 - EC2: fixing insserv & +
ssh keys removal for releases after Jessie
2016-09-24 19:03:28 +01:00
Anders Ingemann
e5c96195bb Merge pull request #341 from nbraud/rel_path
Use the rel_path utility function
2016-09-20 16:34:07 +02:00
Anders Ingemann
a86337cc69 Merge pull request #335 from nbraud/admin_user
admin_user & file_copy: Make paths relative to the manifest
2016-09-20 16:33:59 +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
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
Anders Ingemann
f71eac2c39 Merge pull request #333 from nbraud/validate-trusted-keys
apt: Validate packages.trusted-keys
2016-09-12 07:38:31 +02:00
Nicolas Braud-Santoni
58a7011348
apt: Validate trusted keys
This checks that the specified keyrings exist, and are valid.

Closes #323
2016-09-12 01:13:39 +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
Nicolas Braud-Santoni
a15c9ea309
tasks/apt: Don't use security.debian.org for obsolete releases 2016-08-09 22:34:34 +02:00
Anders Ingemann
d222b267ce Also disable autostart for daemons started through upstart 2016-06-07 22:02:40 +02:00
Anders Ingemann
2ffc4dd6c3 grub: Prettier type checking when writing grub defaults 2016-06-05 13:20:34 +02:00
Anders Ingemann
bb41ba68dd Tiny fix for CheckExternalCommands 2016-06-05 10:45:19 +02:00
Anders Ingemann
97deaa3a17 Add lo to jessie network config 2016-06-04 19:23:59 +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
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
Zach Marano
40ec27ad16 Overhaul GCE image build. 2016-06-02 18:16:57 -07:00
Anders Ingemann
16a680bb6b Fix order for AddManifestPackages
This ensures that the task also works with manually
added sources.
2016-05-22 08:59:46 +02:00
andrewbogott
b9aad2d881 Set a default of GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"
This needed changing to hvc0 for ec2, and was accidentally changed
for all other providers.  Since the ec2 provider overrides to hvc0
anyway, we can just change this default to the setting that works
for everyone else.

Fixes: #318
2016-05-10 01:56:27 -05:00
The Fox in the Shell
aecb89aab5 Indent with 4 spaces 2016-03-15 18:01:41 +01:00
The Fox in the Shell
4cc9ec0d1b Add the 'apt.conf.d' manifest subsection 2016-03-15 18:01:41 +01:00
Zach Marano
108fa9547e Move the >=jessie workaround out of the common task. 2016-03-03 10:14:02 -08:00
Zach Marano
ee12a3e340 Fix missing script line. 2016-03-02 16:30:53 -08:00
Zach Marano
3f208b985f Move hack for growpart to its own task. 2016-03-02 16:19:57 -08:00
Manoj Srivastava
4fc3b69d81
[set localtime]: Update locale group tasks
Convert the locale group tasks frmom a simple list to a function. This
now matches the other non-simple task groups.

Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
2016-02-11 16:00:26 -08:00
Manoj Srivastava
b20ce793a4
[set localtime]: Set /etc/localtime by either copying or symlinking
Starting in version 2016a-1 (circa Jan 2016) the package tzdata
changed /etc/timezone into a symlink. This change is in unstable,
testing, and will be in the next release (stretch). This commit checks
the release, and creates a task to either copy the contents of the
zoneinfo file (jessie and older) or create a symbolic link (newer than
jessie).

Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
2016-02-10 13:47:12 -08:00
Jesse Szwedko
433cbf2ae4 Only sed in growpart workaround when release is >= jessie
This script is only needed/created on jessie or later distros.

Signed-off-by: Andrew Garrett <andrew.garrett@getbraintree.com>
2016-01-13 18:50:41 +00:00
Jesse Szwedko
7f9ee9d22c Write Jessie growpart workaround script to something other than growpart
In case growpart is installed. Sed this workaround path into the init.d
script.

Signed-off-by: Andrew Garrett <andrew.garrett@getbraintree.com>
2016-01-12 19:12:57 +00:00
Jesse Szwedko
2ece5a66e1 sed in root_device_path into expand-root
To make it more flexible

Signed-off-by: Andrew Garrett <andrew.garrett@getbraintree.com>
2016-01-12 18:46:26 +00:00
Jesse Szwedko
4429c226a8 Use hash instead of which in expand-root
Also remove the variable since we established that it is already in the
$PATH

Signed-off-by: Andrew Garrett <andrew.garrett@getbraintree.com>
2016-01-12 18:46:26 +00:00
Jesse Szwedko
78b796be5b Exit 1 in expand-root if there was an error
Signed-off-by: Andrew Garrett <andrew.garrett@getbraintree.com>
2016-01-12 18:46:26 +00:00
Jonh Wendell
c477c32e4a EC2: Added growpart script
This is an attempt to fix issue #237

The script "growpart" was added as an asset, because
Debian's Jessie version (inside cloud-utils) package is
outdated and buggy.

Then "expand-root" init script was modified to call growpart
before calling resize2fs. In fact, calling resize2fs without
resizing the partition first is useless.

The task was named 'AddWorkaroundGrowpart' because it must
go away in the future in favor of using recent stuff in cloud-utils.

Currently even the official images suffer this issue, that makes
the system use only 8 GiB, even if the user chooses a bigger
storage size inside AWS.
2016-01-12 18:46:20 +00:00
Anders Ingemann
02860de849 Fixed the error that's been swallowing exception messages
Finally!
Becuase "TypeError: __init__() takes at least 3 arguments (2 given)"
is not very useful...
2015-12-13 20:26:43 +01:00
Anders Ingemann
c880a6849a Remove image section in manifest
All provider specific settings have been moved to the
provider section. The image name itself is now located
at the top level and called "name". It is required for all providers.
2015-12-13 19:41:18 +01:00