Commit graph

228 commits

Author SHA1 Message Date
Anders Ingemann
18fb853b48
ansible: Change tags/skip-tags to be lists and shorten task 2017-07-14 19:23:14 +02:00
Anders Ingemann
ff48243c6e
ansible: Check for ansible availability before running 2017-07-14 18:26:52 +02:00
Anders Ingemann
ad6c89cb41
ansible: Make playbook path relative to manifest 2017-07-14 18:26:25 +02:00
Tomasz Melcer
1de10b2f4f minimize_size: make sure the permissions of bindmounts are preserved 2017-07-02 03:33:37 +02:00
Anders Ingemann
266e9e4ae3 Merge pull request #385 from liori/lone-dpkg
Fix lone minimize_size/dpkg without apt
2017-06-25 08:39:39 +02:00
Tomasz Melcer
5d43b9a0e7 Fix lone minimize_size/dpkg without apt 2017-06-25 01:39:17 +02:00
NeatNerdPrime
1f1ebcedb8 Puppet module update (#365)
* #347 - Fix for debconf validator pointing to wrong file.

* reported in https://github.com/andsens/bootstrap-vz/issues/347

  flake8: commands succeeded
  congratulations :)

* # development commit

* trying to fix the packages install with a forced apt-update prior to
installing packages. should fix any issues prior to

* # dev commit

* Trying to parse the commands with a chrotted log_check_call

* # dev commit

* "TypeError: sequence item 2: expected string, list found" , trying to
fix this

* # dev commit - changed the way local packages get installed

This commit changes the way local deb packages get installed.

* rationale: a local deb package mostly includes a deb to configure apt,
e.g.: Puppet apt package. Therefore, after a local dep pkg install , apt
should update itself to be able to install packages that come with the
repo's configured from the local deb package. This assumes you install
LOCAL packages (deb files) first (as a rule of thumb) and AFTER the
REMOTE packages (you include other packages by name)

* reverted command plugin tasks code

* # Dev commit - puppet module update

Goal is to install a puppet 4 agent on the bootstrapped image

* limitations: Only for debian Jessie, installs only puppet4

* # Feature improvement - Puppet module

* a new way to install and configure puppet on a debian jessie
* only tested on debian jessie, for now it only installs the PC1 agent
package.
* future endeavors include all mentioned todo's:
* TODO: plugin must be able to install on any debian release
* TODO: plugin must be able to offer choice of distro package or
apt.puppetlabs.com package
* TODO: plugin must be able to select release version package (vanilla
or PC1)
* TODO: plugin must be able to set up a puppet SERVER , puppetDB
optional
* TODO: plugin have proper linting
* TODO: write test cases

* # Derp commit

* added project files in GitIgnore

* # Dev commit

* added release detection and installs appropriate package.

* # derp commit

* removed unnecessary class parameter.

* # derp dev commit

* add predecessor to ensure repo package gets installed BEFORE the
agent.

* # derp fixes commit

* i must use info.manifest.release
* a little bit refactoring

* # derp commit

* fixed correct predecessor

* # feature & derp dev commit

* added feature to install puppet modules with the plugin

* # Version upgrade commit

New puppet plugin module update

* Plugin can select proper debian release package to install
* Plugin can install modules directly from forge.puppetlabs.com
* Updated documentation with working example 
* Limitations TL;DR: agent software only, PC1 package only, Absolute
pathing, wheezy/jessie only, assumes production environment for modules.
* Several ugly derp bugs squashed.

* * PR fix commit

* Modified puppet readme file as recommended
* added small description in changelog
https://github.com/andsens/bootstrap-vz/pull/365#discussion_r101378921
https://github.com/andsens/bootstrap-vz/pull/365#discussion_r101379039

* # PR fix commit

* Cleaned debugging leftovers
https://github.com/andsens/bootstrap-vz/pull/365#discussion_r101379293

* # PR fix commit

* Removed todo's from code, creating issues on the project issue
tracker.
https://github.com/andsens/bootstrap-vz/pull/365#discussion_r101381742

* # PR fix commit

* Moved EnableAgent task to the bottom as requested
https://github.com/andsens/bootstrap-vz/pull/365#discussion_r101382775

* # PR fix commit

* Removed gitignore file, I have absolutely no idea how that got there.

* # PR fix commit

* Fixed several TOX issues, it's all green now

* #MR-365 - dev commit 

* first try at installing agent with sources/key injection
* New tasks in puppet module: AddPuppetlabsPC1SourcesList;
InstallPuppetlabsPC1ReleaseKey
* it does NOT do any checks. it assumes the url is correct.

* #MR-365 - derp commit

* removed some unused code in tasks

* #365 - tox fix commit

* fixed several tox warnings

* #365 - tox fix commit

* missed one line...

* #365 - tox fix commit

* Noticed the nature of the tox warnings of 'undefined name', fixed.

* # 365 - Task order fix commit

* Some tasks had some invalid predecessors defined, removed.
* when running a test manifest, it fails due to 'NO_PUBKEY
7F438280EF8D349F', trying a hacky way to address this

* #365 - Puppet module update - install with source-key combo

* It now properly installs puppet agent package with sources/keys
instead of package
* Tox is green

* Delete .project

* Delete .pydevproject

* #365 - Puppet module update 

General puppet module update.

* Fixed several issues discussed in the pull request.
* Tox is all green

* General puppet module update.

* This update allows for the installation of the puppetlabs.com agent VERSION 4 from the official apt.puppetlabs.com repo
* Allows for the installation of puppet modules. Useful for masterless setups.
* Puppet modules you declare in your bootstrap-vz manifest are installed with the --force flag.

Limitations and gotcha's:

* Only works for Debian Wheezy & Jessie.
* The Puppetlabs.com agents are only released for i386 and amd64 architectures.
* If you require the puppet 3.x agent, you should not use this module but add "puppet-agent" into the packages list
* You need to add your own puppet.conf file to fit your needs, this can be easily included in the assets directive.
* Assets path is absolute.

* General puppet module update.

* This update allows for the installation of the puppetlabs.com agent VERSION 4 from the official apt.puppetlabs.com repo
* Allows for the installation of puppet modules. Useful for masterless setups.
* Puppet modules you declare in your bootstrap-vz manifest are installed with the --force flag.

Limitations and gotcha's:

* Only works for Debian Wheezy & Jessie.
* The Puppetlabs.com agents are only released for i386 and amd64 architectures.
* If you require the puppet 3.x agent, you should not use this module but add "puppet-agent" into the packages list
* You need to add your own puppet.conf file to fit your needs, this can be easily included in the assets directive.
* Assets path is absolute.

* #365 - Changed the way trusted keys are fetched.

* @andsens is right, keyrings are better added by injecting them into
the image, removing the need to install package 'ca-certificates'

* * Added new feature: puppet module version can now be included in the
manifest.
* modified manifest-schema to reflect proper module installation
* Updated documentation.
* Example manifest added to demonstrate changes
* @andsens is right, keyrings are better added by injecting them into
the image, removing the need to install package 'ca-certificates'

* Fix several requests

* Example manifest moved to a more suitable location, documentation
changed as well.
* A bit more efficient programming.
* reverted file_copy to it's proper state
2017-06-25 00:29:00 +02:00
Tomasz Melcer
9b15c52ed6 fix some typos in documentation 2017-04-23 16:59:37 +02:00
Anders Ingemann
0fa83961b8 Merge pull request #372 from zmarano/master
Fix an ordering issue with the expand-root plugin.
2017-04-15 21:07:31 +02:00
Zach Marano
70a2f93d41 Fix an ordering issue with the expand-root plugin. 2017-04-15 10:29:23 -07:00
Anders Ingemann
a40c639c3c
Move some package adding tasks into the preparation phase 2017-04-15 10:01:27 +02:00
Pritpal Sabharwal
87efcc812b Pass arguments for shell command as elements in a list. When shell=False, subprocess interprets the string as the name of an executable (including spaces) and fails to run. 2017-03-16 10:49:30 +00:00
Anders Ingemann
605febdeea
cloud-init: Clarify which values are possible for metadata sources
Fixes #364
2017-02-13 23:18:57 +01:00
Zach Marano
74a58c6829 Create a plugin for expand_root to replace the internal common task.
Switch GCE to use this plugin.
2017-01-26 10:18:04 -08:00
Marcin Kulisz
6507ccbc0b Adding boto3 to setup.py and minor lint fixes 2017-01-21 21:13:57 +00:00
Marcin Kulisz
ef698b06ca Final fix for ec2_launch plugin 2017-01-21 20:31:49 +00:00
Marcin Kulisz
ed33a5f067 ec2_launch plugin porting to boto3 +
(print_public_ip not working yet)
2017-01-19 19:00:25 +00:00
Peter Wagner
441786e8e1 Support ca-central-1
AMI? More like eh-MI
2016-12-09 08:39:17 +01:00
Anders Ingemann
273b5e0183
Fix linting error in file_copy plugin 2016-12-09 08:38:34 +01:00
Anders Ingemann
876ea7bd85
Fix bug in file_copy plugin that made copying files... not work 2016-12-01 16:00:04 +01:00
Anders Ingemann
ee18fc84ca
Fix some task ordering warnings 2016-12-01 15:59:51 +01:00
Anders Ingemann
b63f19ec73 Rename schema.yaml to manifest-schema.yml
Fixes #347. Bug introduced in 90da634.
2016-09-28 18:26:41 +02:00
Marcin Kulisz
6c0e2674e1 Stretch (9.0) patch #1 2016-09-24 19:03:28 +01:00
Marcin Kulisz
27abceefc1 Plugin: ec2_launch ssh key, instance type, etc. +
* added ssh_key parameter to the manifest to connect with (have to be
  present in AWS)
* added readme
* changed instance type to something what can run outside VPC (m3.medium)
2016-09-21 14:56:00 +01:00
Nicolas Braud-Santoni
90da634226
Systematically use rel_path for relative paths 2016-09-12 19:11:20 +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
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
1000430aa0
file_copy: Allow copying directories 2016-08-09 22:34:32 +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
c14687a171 cloud-init: Add option to enable modules
Snatched from PR #256 by @JamesBromberger
2016-06-04 22:04:42 +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
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