Commit graph

142 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
Anders Ingemann
2d6a026160 Fix a slew of indentation & spacing issues 2016-06-04 11:38:16 +02:00
Anders Ingemann
fd214915e3 Merge remote-tracking branch 'thepwagner/ec2_publish-plugin' 2016-06-04 09:44:27 +02:00
Anders Ingemann
4cff2f3e70 Merge pull request #326 from zmarano/master
Overhaul GCE image build.
2016-06-04 09:39:52 +02:00
Zach Marano
40ec27ad16 Overhaul GCE image build. 2016-06-02 18:16:57 -07:00
Peter Wagner
d240d13084 ec2_publish plugin
Fixes #271, #91
2016-06-02 16:16:00 -07:00
Peter Wagner
bc895292cd file_copy: Fix documentation typo
Slipping into open PR as both should be trivial.
2016-06-02 16:12:57 -07:00
Anders Ingemann
2291361a1c Fix code block example in commands plugin documentation 2016-05-22 09:14:31 +02:00
Peter Wagner
c8ab73472f cloud-init: modify groups 2016-04-16 08:49:49 -04:00
Peter Wagner
15a7eb0c85 cloud_init disable AdjustGrowpartWorkaround
AdjustGrowpartWorkaround modifies /etc/init.d/expand-root, which doesn't
exist if AddExpandRoot doesn't run.
2016-04-14 20:50:40 -04:00
Tiago Ilieve
c6226f89ae Fix a few typos 2016-04-13 04:38:42 -03:00
Anders Ingemann
d7def9b942 Fix indentation in file_copy plugin docs 2016-03-04 01:21:52 +01:00
Anders Ingemann
6bb654b79f Compat with new sphinx
Changed a lot of code:: to code-block::
Also added sphinx_rtd_theme to deps in tox
2016-03-04 01:21:52 +01:00
Anders Ingemann
aa4cab4084 Merge pull request #298 from nbraud/file_copy
file_copy: Fix manifest and document
2016-03-01 21:49:29 +01:00
Nicolas Braud-Santoni
e5f32ba441 file_copy: Validate early
This validates the source file presence when the
  manifest is validated, rather than failing later.
2016-03-01 20:21:49 +01:00
Nicolas Braud-Santoni
de888c1b3c file_copy: Add documentation 2016-03-01 14:58:52 +01:00
Anders Ingemann
8a8d07991e Merge pull request #291 from nbraud/admin_user
admin_user plugin: Fix non-EC2 behaviour
2016-03-01 00:01:12 +01:00
Nicolas Braud-Santoni
72a9975ed9 admin_user: Add warnings 2016-02-29 20:15:24 +01:00
Nicolas Braud-Santoni
ed6ca6dd6e file_copy: Fix manifest 2016-02-29 19:08:42 +01:00
Anders Ingemann
e961438904 chown/chgrp entire .ssh dir to admin_user
Fixes #295
2016-02-25 08:27:27 +01:00
Nicolas Braud-Santoni
79b3803d64 admin_user plugin: Fix non-EC2 behaviour 2016-02-24 03:20:52 +01:00
Nicolas Braud-Santoni
b4b7fa6bc2 plugins/debconf: Documentation 2016-02-23 17:30:17 +01:00
Nicolas Braud-Santoni
ad79b63c19 Add 'debconf' plugin
Closes #282
2016-02-23 17:30:17 +01:00
Anders Ingemann
3d2088ad2a Fixes #285 admin_user, the sshdir check didn't check in the chroot 2016-02-18 18:23:48 +01:00
Anders Ingemann
73acb1f0d3 Fix breakage of admin_user module
Fixes #284
classnames were changed without testing
2016-02-16 20:43:53 +01:00
Anders Ingemann
ddfd8a2fd3 admin_user: Allow pubkey & password to be used together
Also change README a little, add some comments and get the code
a little more in line with the style of bootstrap-vz
2016-02-10 22:12:02 +01:00
Manoj Srivastava
4a29e5eec5
Bit by os.path.join not liking leading /
join ignores all path components to the left of any component that
starts with a /. Tested and found working.

Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
2016-02-08 02:50:55 -08:00
Manoj Srivastava
32ef6fc571
[admin_user]: More cleanups. Remove uneeded tests.
Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
2016-02-06 02:15:52 -08:00
Manoj Srivastava
efeddc43a8
[admin_user]: Update per comments
As requested, this commit converts to tab indentation.

Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
2016-02-06 01:18:00 -08:00
Manoj Srivastava
a56f20657b
[admin_user]: Added support for password and static pubkey auth
This commit adds authentication optionally with passwords or static
ssh pubkeys for the admin user.

There are now three ways to grant access to the admin user:
-  Set a password for the user, or
-  Provide a ssh public key to allow remote ssh login, or
-  Use the EC2 public key (EC2 machines only)

If a password is provided, this plugin sets the admin password. This
also re-enables password login (off by default in Jessie).

If the optional argument pubkey is present (it should be a full path
to a ssh public key), it will ensure that the ssh public key is used
to set up password less remote login for the admin user.

Only one of these options (password, or pubkey) may be specified.

If neither the password not a ssh public key location are specified,
and if the EC2 init scripts are installed, the script for fetching the
SSH authorized keys will be adjust to match the username specified.

Fixes: https://github.com/andsens/bootstrap-vz/issues/248

Signed-off-by: Manoj Srivastava <srivasta@google.com>
2016-02-06 00:39:20 -08:00
Manoj Srivastava
67284eaae5
[admin_user]: Added support for password and static pubkey auth
This commit adds authentication optionally with passwords or static
ssh pubkeys for the admin user.

There are now three ways to grant access to the admin user:
-  Set a password for the user, or
-  Provide a ssh public key to allow remote ssh login, or
-  Use the EC2 public key (EC2 machines only)

If a password is provided, this plugin sets the admin password. This
also re-enables password login (off by default in Jessie).

If the optional argument pubkey is present (it should be a full path
to a ssh public key), it will ensure that the ssh public key is used
to set up password less remote login for the admin user.

Only one of these options (password, or pubkey) may be specified.

If neither the password not a ssh public key location are specified,
and if the EC2 init scripts are installed, the script for fetching the
SSH authorized keys will be adjust to match the username specified.

Fixes: https://github.com/andsens/bootstrap-vz/issues/248

Signed-off-by: Manoj Srivastava <srivasta@google.com>
2016-02-06 00:39:20 -08: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
2923f25767 Place debootstrap excludes file in workspace instead of tmp 2015-12-13 19:41:18 +01:00
Anders Ingemann
9d0356f4fa Disable locale generation when no locales selected 2015-12-13 19:41:17 +01:00
Anders Ingemann
766e60b0de Document all the new minimize_size options 2015-12-13 19:41:17 +01:00
Anders Ingemann
83f6fae139 Fix task description for apt autoremove 2015-12-13 19:41:17 +01:00
Anders Ingemann
3e6d131730 Allow keeping no locales at all when using dpkg.locales 2015-12-13 19:41:17 +01:00
Anders Ingemann
b95e71c4c8 Move dpkg specific settings to dpkg subsection 2015-12-13 19:41:17 +01:00
Anders Ingemann
50b02777e5 Add some comments about the filtering procedure 2015-12-13 19:41:17 +01:00
Anders Ingemann
1df2588b23 Add option to exclude /usr/share/doc
The bootstrap exclude script has also been generalize in the process
2015-12-13 19:41:17 +01:00
Anders Ingemann
620a592f11 Split minimize_size tasks into smaller parts 2015-12-13 19:41:16 +01:00
Anders Ingemann
6ae859f886 Implement locale filter in minimize_size plugin
This filter is rather aggressive, since it also hooks into the
bootstrapping process itself to prevent debootstrap from unpacking
specific locale files
2015-12-13 19:41:16 +01:00
Anders Ingemann
764f8f759d Implement some apt minimization stuff from docker
See here for more: 1d775a54cc/contrib/mkimage/debootstrap
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
EmmanuelKasper
1475a50dbc Set Virtualbox memory to 512 MB
Vagrant documentation recommends to use 512MB for base boxes:

http://docs.vagrantup.com/v2/boxes/base.html
2015-09-04 16:51:55 +02:00
Jonh Wendell
ea1c4037ae apt_proxy: Also consider http error code 406
It seems some Debian versions of apt-cacher-ng return error
code 406 instead of 404:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762969

This is my case in Jessie, for example.

This patch considers both codes as "valid".
2015-06-10 14:44:05 -03:00
Anders Ingemann
c8470790b8 Remove predecessor req. for ApplyPuppetManifest 2015-05-03 07:43:52 +02:00
Anders Ingemann
4df22e79f1 Move AddNtpPackage task into the preparation phase 2015-05-03 07:43:27 +02:00
Tiago Ilieve
3cfba08983 Fix mentions to the commands plugin name 2015-05-02 13:12:33 -03:00
Anders Ingemann
a7f2327e42 Litter the manifest schemas with additionalProperties:false
This pretty much eliminates the possiblity of undiscovered typos in the manifest
2015-05-02 13:04:30 +02:00