Commit graph

132 commits

Author SHA1 Message Date
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
Anders Ingemann
31f7c70237 Update GenerateLocale task description 2015-12-13 19:41:17 +01:00
Anders Ingemann
5883673380 umount /sys & /proc when debootstrap is aborted 2015-12-13 19:41:17 +01:00
Anders Ingemann
42d12d440d Add bootstrap_script property to BootstrapInfo
This allows plugins to manipulate the debootstrap process
2015-12-13 19:41:16 +01:00
Anders Ingemann
55b2d2228f info.tarball is never used across tasks, make it local 2015-12-13 19:41:16 +01:00
Anders Ingemann
4a509aba76 First stab at docker provider
Huh... That was easy.
2015-12-13 19:41:16 +01:00
Tiago Ilieve
3d3c303ee1 Changes 'MoveImage' from loopback to image 2015-10-18 16:35:11 -02:00
Anders Ingemann
f572703ecc Bootstrap azure images directly to VHD 2015-10-14 22:40:15 +02:00
Anders Ingemann
d5ef584b42 Add note about why the VDI format does not have an OVF URI 2015-10-14 22:40:14 +02:00
Rick Wright
77cbb64b9f GRUB_HIDDEN_TIMEOUT should be a numeric value.
This changes GRUB_HIDDEN_TIMEOUT to 0 from true and sets
GRUB_HIDDEN_TIMEOUT_QUIET to true.
2015-09-28 14:51:31 -07:00
Anders Ingemann
608de63d3e Better grub options
Inspired by 9c151c43b3ee85fe8cb7d4cdadb45115807c6710 by JamesBromberger/bootstrap-vz
2015-07-30 10:07:25 +02:00
Zach Marano
c682dab6ec Fix expand-root script to work for Debian 8 and simplify how partition
types are forumlated.
2015-06-24 12:41:06 -07:00
Tiago Ilieve
71d628544c 'Disabling' for 'Enabling' in EnableRootLogin 2015-05-12 08:17:43 -03:00
Alexandre Derumier
02c333c8c8 fix ^PermitRootLogin regex
fix issue https://github.com/andsens/bootstrap-vz/issues/218
2015-05-08 09:11:14 +02:00
Anders Ingemann
f88a1b0af5 Merge branch 'development' 2015-05-02 22:33:04 +02:00
Anders Ingemann
2948badf47 Fix #204, user_modification phase has been introduced 2015-05-02 12:31:06 +02:00
Anders Ingemann
1f6f23e680 Fix #104: Don't verify default target when adding packages 2015-04-29 23:51:55 +02:00
Anders Ingemann
f1ce582994 Compare with "unstable" instead of "sid" 2015-04-29 23:31:09 +02:00
Anders Ingemann
71c7d445ad Fix #217, by introducing class for comparison of releases 2015-04-29 21:38:06 +02:00
Anders Ingemann
2d3a0a0ce3 The change in d9e9014 failed when SSH was not installed 2015-04-29 21:36:22 +02:00
Anders Ingemann
c8ddd7de45 Flip compairson for whether sector size is equal in Sectors 2015-04-29 20:46:53 +02:00
Jonh Wendell
d9e9014a8f root_password: Enable SSH root login
Jessie comes with root login disabled for passwords, however,
if the user is using this plugin, chances are high that they
need to login via SSH as root.
2015-04-28 18:51:39 -03:00
Tiago Ilieve
a28b8cee8b Add codename of the next testing release
The Debian 9, following 8 "Jessie", will be named "Stretch":

https://wiki.debian.org/DebianStretch
https://lists.debian.org/debian-devel-announce/2014/11/msg00005.html
2015-04-26 18:57:13 -03:00
Anders Ingemann
d1197ca82c Jessie was release, update codename mapping 2015-04-26 10:39:54 +02:00
Tiago Ilieve
cba0a99d0a Fix truncate arguments
`truncate` doesn't expect the parameter `create` that was used
previously by `qemu-img`. This made a sparse file named "create" to
appear at current working directory every time the command as executed.

This closes #212.
2015-04-23 23:19:16 -03:00
Anders Ingemann
9ad79cbf60 Remove some unnecessary dependencies across phases 2015-04-16 22:22:47 +02:00
Anders Ingemann
411578a498 *Always* use link_dm_node() when install grub 1.99
Grub install fails when in a chrooted environment,
it has nothing to do with the volume being a loopback volume
2015-04-16 22:22:47 +02:00
Anders Ingemann
4ad1d51624 Take @ssgelm's advice in #155 and copy the mount table
df warnings no more :-)
2015-04-16 22:22:47 +02:00
Anders Ingemann
7f4d46a330 Fix serialization error when ManifestException is thrown
("__init__() takes at least 3 arguments (2 given)")
2015-04-16 22:22:46 +02:00
Anders Ingemann
07e4c97c09 Fix PEP8 nitpick 2015-04-16 22:22:26 +02:00
Anders Ingemann
ec96de3a0e fix log_call logging when command is a string 2015-04-16 22:21:46 +02:00
Anders Ingemann
d26ba8bea4 Simplify exception throwing in sed_i 2015-04-16 22:21:46 +02:00