Commit graph

763 commits

Author SHA1 Message Date
Johan Euphrosine
99786539c7 plugins/docker_daemon: flake8 2014-11-19 16:25:27 -08:00
Johan Euphrosine
e53e727c9c plugins/docker_daemon: only add PullDockerImages tasks when pull_images is set 2014-11-19 16:21:38 -08:00
Johan Euphrosine
6fdf0cc403 plugins/docker_daemon: align with space 2014-11-19 16:16:26 -08:00
Johan Euphrosine
31ba98821c plugins/docker_daemon: logcheckcall, inline pull and indent 2014-11-19 16:14:51 -08:00
Johan Euphrosine
feb4d093c9 bootstrapvz/plugins/docker_daemon: spaces to tabs 2014-11-19 11:53:23 -08:00
Johan Euphrosine
962532065c bootstrapvz/plugins/docker_daemon: flake8 2014-11-19 11:49:26 -08:00
Johan Euphrosine
f3a9a1b1ec docker_daemon: add pull_images option 2014-10-31 05:32:15 -07:00
Tim Smith
7944db886f Enable auto-rootdisk growth on gce-backports.
This commit adds the cloud-initramfs-growroot package to the
installation list for GCE images with backports enabled, and updates
the gce tasklist to add the /etc/init.d/expand-root script
(with provider-appropriate touch-ups) to the image.
2014-10-13 10:02:15 -07:00
Tim Smith
3410118250 Fix typo in AdjustExpandRootScript
This commit fixes a typo in common.tasks.initd.AdjustExpandRootScript (a
missing double-quote in the search regex) that rendered it ineffective.
2014-10-09 21:05:48 -07:00
Dave Bailey
bad378e28b fix test for DOCKER_NOFILE 2014-09-22 17:11:26 +00:00
Dave Bailey
107577cb16 allow custom ulimit -n for Docker 2014-09-17 18:12:49 +00:00
Tiago Ilieve
0f5de13bae Add version option to docker_daemon plugin
As requested on #147, there is now an option to specify the Docker
version to be installed when using the `docker_daemon` plugin. The
version string is validated against a pattern extracted from the
Docker's CHANGELOG. If the version is not present, it will just download
the latest available.

The download method was also changed from `urllib` to `wget`, so we can
see its progress if needed.

This closes #147.
2014-09-13 15:08:52 -03:00
Rick Wright
96a1683c26 Fix task ordering to better support customizations
This ensures that preferences are written before apt update and also ensures
that in GCE the backports are added to the sources before the provider-specific
SetPackageRepositories happens.

Change-Id: I3c85f922c49c2a6fbd3c0f2bad1072eff0d098c8
2014-09-08 11:45:55 -07:00
Tiago Ilieve
89a74a33c8 Fix linux-headers package version detection
The `uname -r` command returns the version of the running kernel running
on the host machine, as the chroot environment doesn't load a new one.
This prevents the proper version of the `linux-headers-*` package from
being added when the target has a different kernel version or
architecure.

This closes #121.
2014-09-02 19:53:10 -03:00
Filipe Brandenburger
1fe10207b8 Check the value of the --color argument
Make sure it's either `auto' (the default), `always' or `never'. If it
does not match any of the values, raise a Docopt exception that causes
it to print usage and exit.

Tested:
- $ sudo ./bootstrap-vz --color=invalid manifests/gce.manifest.yml
  Value of --color must be one of auto, always or never.
  Usage: bootstrap-vz [options] MANIFEST

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-24 10:52:08 -07:00
Filipe Brandenburger
84cf497c66 Support --color option to indicate whether to use colors in the terminal
Mimic the behavior of the --color=<auto|always|never> found in tools
like `ls' and `grep'. Default to `auto' which checks whether stderr is a
tty to define whether colors are used.

Tested:
- Ran ./boostrap-vz --color=never and --color=always, confirmed
  colorization worked as expected.
- Ran ./boostrap-vz --color=auto ${manifest_file} 2>bootstrap.log,
  confirmed colors were not added to boostrap.log by default, repeated
  the test with --color=always and confirmed escape sequences were
  output.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-22 11:46:19 -07:00
Max Illfelder
3ff1bfb7d9 Removed a check to verify file type
The file command is not installed by bootstrap-vz by default.

Change-Id: I59d5f04145b7db517c28bfec1d4d758be468b398
2014-08-14 18:10:54 -07:00
Jimmy Kaplowitz
89e1a701eb Disable SSH password auth on GCE
This change was unintentional but occurred as part of GCE's transition
from build-debian-cloud to bootstrap-vz.

Might be replaced later with a similar change that applies to all
bootstrap-vz providers, based on the opinion of the debian-cloud list.

Change-Id: I72a694c49f32df06252d9cc01b1d5c7cfc015347
2014-08-14 18:10:54 -07:00
Jimmy Kaplowitz
3bfe9dddf9 Reinstate hostname hook for GCE
This DHCP exit hook to shorten the system hostname on GCE was previously
installed by build-debian-cloud and bootstrap-vz, but seems to have been
inadvertently removed in commit c81045cc6e
as part of a broad cross-cloud cleanup. Again, this was caught by our
validation tests, and we might be done with the fixes at this point.

In this commit, I'm reinstating the hook with a name change and an
explanatory comment, to reduce the risk of this vanishing accidentally
in the future.

Change-Id: I4e7268f8b9ab3b2a7fc8b510898c6fbdd685aa53
2014-08-05 17:56:33 -07:00
Anders Ingemann
9f46bdc519 Merge pull request #131 from jkaplowitz/cloudsdk
Install Cloud SDK, which includes gcutil and gsutil.
2014-08-05 17:12:51 -06:00
Jimmy Kaplowitz
a352f4d576 Installing Cloud SDK which includes gcutil and gsutil. We still don't
have a package for it so laying out the tarball for now.

Change-Id: If66f0f1c074e6077e1ca57375cac9c4832bbd7fc
2014-08-01 20:05:23 -07:00
Anders Ingemann
7ad565cbe9 Merge pull request #126 from jkaplowitz/development
Install ca-certificates on GCE
2014-07-28 21:39:56 +02:00
Jimmy Kaplowitz
e8f04d0baf Install ca-certificates on GCE
Needed to fetch GCE startup scripts over HTTPS, among other reasons.

Change-Id: I89e3afb44f786539b5e3275b5f1f3b7201ab44fd
2014-07-25 09:49:52 -07:00
Jimmy Kaplowitz
c412c4cdcf Fix list of tasks and their ordering
- GCE provider wasn't including the GCE SetHostname task, without which
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604883 was
  preventing the hostname from getting set after reboot.
- During the GCE build, one of the GCE cleaning tasks was trying to run
  an apt-get update after the build-time resolv.conf file was removed.
  Fix this ordering by moving the network.Remove* tasks to the
  system_cleaning phase as they should have been all along, and adding
  an appropriate ordering rule for the GCE cleaning task.
- Add the fallback http.debian.net mirror after, not before, our mirror.
- The puppet plugin's ApplyPuppetManifest task specified that it should
  run before the network.Remove* tasks within the system_modification
  phase. Now that those tasks have been moved to a later phase
  (system_cleaning), remove this dependency. I have no puppet manifest
  to test this change, but am including it in hopes of avoiding a
  breakage there. Hopefully someone who uses puppet can test this or at
  least confirm that it's correct.

Change-Id: Ieca97f288f456bab119989f4cbc4c3993a755830
2014-07-24 20:20:54 -07:00
Tiago Ilieve
719a6c31b0 Reverting 210999f, as asked by @jkaplowitz 2014-07-25 00:08:07 -03:00
Anders Ingemann
9e61ac94d2 Add a word, to make error message about nbd more understable 2014-07-16 22:08:14 +02:00
Anders Ingemann
e41dbdd807 Rename variable in load_yaml to match load_json 2014-07-16 22:08:13 +02:00
Tiago Ilieve
cc95f146b1 Add AddDefaultSources as AddBackports predecessor 2014-07-13 02:57:37 -03:00
Anders Ingemann
af3cca2644 Remove unused import 2014-07-12 19:56:30 +02:00
Anders Ingemann
f925045e59 8f43ee1d removed a used import in the cloud-init and opennebula plugins, readded 2014-07-12 19:56:18 +02:00
Anders Ingemann
b953cf7757 Merge pull request #120 from rybaktomasz/boto-credentials
Do not crash with KeyError when there is no credentials in manifest.
2014-07-12 19:47:03 +02:00
Tiago Ilieve
8f43ee1dc7 Move AddBackports to common.tasks.apt
The `AddBackports` task is needed by many different plugins, so is
better if it is available as a common task.

This closes #96.
2014-07-12 14:42:52 -03:00
Tomasz Rybak
d6fe85e124 Do not crash with KeyError when there is no credentials in manifest. 2014-07-12 19:40:53 +02:00
Tiago Ilieve
210999ff5d Remove redundant code from GCE's tasks.apt
GCE's `tasks.apt.SetPackageRepositories` was adding duplicated entries
to apt `info.source_lists`, even ignoring the package mirror specified
on manifest.
2014-07-12 13:28:46 -03:00
Anders Ingemann
cca31b642f Add documentation for the run() function.
Also: Move the return statement in run() to the bottom
2014-07-09 23:31:16 +02:00
Anders Ingemann
0cc26d82d0 Allow passing data into the manifest.
This makes it possible to create dynamically created manifests
2014-07-09 23:17:05 +02:00
Anders Ingemann
7fe9c1ba36 Refactor logging setup to be more modular 2014-07-09 23:17:05 +02:00
Anders Ingemann
9d8821235f Clone packages-kernels.yml pattern to other providers
GCE also gets its own file.
For now, this scales - but we might want to refactor when there is more that just the kernel package we need to choose from
2014-07-09 23:17:05 +02:00
Anders Ingemann
e4a9cc837a Differentiate installation of grub 1.99 and grub 2 2014-07-09 23:17:05 +02:00
Anders Ingemann
1dc9ae18db Do a basic validation of the manifest before accessing it.
This prevents cryptic error messages
2014-07-09 23:17:05 +02:00
Anders Ingemann
34bb45bb00 Factor release codename fetching out into common.tools
This allows code that runs before the bootstrapinformation object has been created
to also figure out the release codename
2014-07-09 23:17:05 +02:00
Anders Ingemann
376baae583 Take advantage of the YAML multiline notation 2014-07-09 23:17:04 +02:00
Anders Ingemann
03a0746299 Convert every JSON file to YAML
Lines removed: over 500. Readiblity gained: A shitload
Now you can actually get an overview of a manifest on a single screen height.
I am sure that it will also save a lot of hassle when modifying schema in the future.
No more "expected property name" etc. because of an extraneous comma
Comments are of course natively support, so there's no need for this minify_json hokey pokey
2014-07-09 23:17:04 +02:00
Anders Ingemann
ebba39f59b Convert "provider" into provider specific section
This is where all provider specific settings belong
like waagent on azure, guest additions iso path on vbox and virtualization type on ec2
2014-07-09 23:17:04 +02:00
Anders Ingemann
5bb0e5428e Merge pull request #117 from zeridon/fix-grub-options
Improvement in grub options for ec2
2014-07-09 23:13:07 +02:00
Tomasz Rybak
62b3e9c255 Jessie has different kernel for i386, fixing name for EC2. 2014-07-08 20:59:16 +02:00
Tomasz Rybak
ebee46b57f Fix wrong condition in dhcpcd configuration in Jessie. 2014-07-06 19:13:46 +02:00
Tomasz Rybak
5433963f4e Jessie contains dhcpcd5 instaed of dhcpcd; fixing configuration. 2014-07-06 19:05:00 +02:00
Anders Ingemann
55c853c348 Fix call to boto get_all_images() 2014-07-05 11:08:21 +02:00
Vladimir Vitkov
94b3e4605a Improvement in grub options
* Be more robust when setting GRUB_CMDLINE_LINUX_DEFAULT
 * Stop console from blanking
 * Switch elevator to noop as disks are not real disks and this yields
   better performance.
2014-07-02 15:04:54 +03:00