RETIRED, Fuel Library
Go to file
Dmitry Bilunov fce2e2a764 dockerctl: Update authorized_keys in bootstrap images during restore
After backup-reinstall-restore Fuel uses bootstrap with wrong ssh keys.

dockerctl backup procedure does not save the bootstrap's root
filesystem, which holds the list of authorized keys that should be
matching the private key located in /root/.ssh on the master.
It would result in inaccessible nodes from a new master installation
(which has bootstrap images regenerated with a new key, not matching
the original one, restored from the backup).

This patch updates authorized_keys inside squashfsed bootstrap images,
so it will be retained during backup-reinstall-restore procedure, if
user has not requested a full backup. Full backups already contain a
full copy of /var/www/nailgun, so no changes are needed.

User should carefully restore from non-full backups - only active
bootstrap will have its ssh keys updated. To propagate ssh keys to
already running nodes, you can use something like:
  mco rpc --agent execute_shell_command --action execute --arg cmd="echo '$(cat /root/.ssh/id_rsa.pub)' >> /root/.ssh/authorized_keys" -v

Change-Id: I3945200d02b29ed10e60900f7d03ed30970159a3
Closes-Bug: #1536198
DocImpact
2016-02-02 18:47:10 +03:00
debian Bump version to 9.0 2015-12-23 22:41:10 +02:00
deployment Replace usage hiera() to hiera_hash() for all network_scheme lookups 2016-01-19 16:52:02 +03:00
doc/noop-guide Replace deprecated library function os.popen() with subprocess 2016-01-14 04:16:36 -08:00
files dockerctl: Update authorized_keys in bootstrap images during restore 2016-02-02 18:47:10 +03:00
logs Granular Neutron tasks 2015-10-27 17:26:28 +03:00
specs Add xmlstarlet as dependency for fuel-misc 2016-01-14 14:52:12 +00:00
tests Replace usage hiera() to hiera_hash() for all network_scheme lookups 2016-01-19 16:52:02 +03:00
utils Support 'nested_classes_or_defines' test for Puppet4 2016-01-13 20:38:47 +03:00
.gitignore Add sphinx doc build with tox 2015-12-08 11:08:36 +01:00
.gitreview Update paths due to stackforge migration. 2015-10-18 00:07:01 +03:00
CHANGELOG Edit Changelog 2013-05-23 13:38:03 +03:00
Gemfile Explicitly require psych gem 2015-12-14 08:34:34 -07:00
LICENSE LICENCE added 2014-06-05 20:00:54 +00:00
MAINTAINERS Spec for packages MUST be reviewed by mos packaging team 2015-12-17 11:20:53 +02:00
README.md Update README 2015-12-30 18:31:31 +03:00
Rakefile Support 'nested_classes_or_defines' test for Puppet4 2016-01-13 20:38:47 +03:00
doc-test.conf Add sphinx doc build with tox 2015-12-08 11:08:36 +01:00
test-requirements.txt Add sphinx doc build with tox 2015-12-08 11:08:36 +01:00
tox.ini Pass environment variables of proxy to tox 2015-12-11 08:19:17 +00:00

README.md

fuel-library


Table of Contents

  1. Overview - What is the fuel-library?
  2. Structure - What is in the fuel-library?
  3. Granular Deployment - What is the granular deployment for Fuel?
  4. Upstream Modules - How to work with librarian.
  5. Testing - How to run fuel-library tests.
  6. Building docs - How to build docs.
  7. Development
  8. Core Reviers
  9. Contributors

Overview


The fuel-library is collection of Puppet modules and related code used by Fuel to deploy OpenStack environments.

Structure


Basic Repository Layout

fuel-library
├── CHANGELOG
├── LICENSE
├── README.md
├── MAINTAINERS
├── debian
├── deployment
├── doc
├── files
├── specs
├── tests
└── utils

root

The root level contains important repository documentation and license information.

MAINTAINERS

This is repository level MAINTAINERS file. One submitting a patch should contact the apropriate maintainer or invite her or him for the code review. Note, core reviewers are not the maintainers. Normally, cores do reviews after maintainers.

debian/

This folder contains the required information to create fuel-library debian packages.

deployment/

This folder contains the fuel-library Puppet code, the Puppetfile for upstream modules, and scripts to manage modules with librarian-puppet-simple.

doc/

This folder contains RST docs. Currently there is only docs for Noop testing framework.

files/

This folder contains scripts and configuration files that are used when creating the packages for fuel-library.

specs/

This folder contains our rpm spec file for fuel-library rpm packages.

tests/

This folder contains our testing scripts for the fuel-library.

utils/

This folder contains scripts that are useful when doing development on fuel-library

Granular Deployment


The top-scope puppet manifests (sometimes also refered as the composition layer) represent the known deploy paths (aka supported deployment scenarios) for the task-based deployment.

Upstream Modules


In order to be able to pull in upstream modules for use by the fuel-library, the deployment folder contains a Puppetfile for use with librarian-puppet-simple. Upstream modules should be used whenever possible. For additional details on the process for working with upstream modules, please read the Fuel library for Puppet manifests of the Fuel wiki.

Testing


Testing is important for the fuel-library to ensure changes do what they are supposed to do, regressions are not introduced and all code is of the highest quality. The fuel-library leverages existing Puppet module rspec tests, bats tests for bash scripts and noop tests for testing the module deployment tasks in fuel-library.

Building docs


You can use tox to prepare virtual environment and build all RST based guides:

tox -e docs

You can also build a specific guide. For example, to build Noop Tests How-to Guide, use the following command:

tox -e build -- noop-guide

You can find the root of the generated HTML documentation at:

./doc/noop-guide/build/html/index.html

You can also run docs tests with tox. If you like to run individual tests, run:

  • tox -e checkniceness - to run the niceness tests
  • tox -e checksyntax - to run syntax checks

tox will use the openstack-doc-tools package for execution of these tests.

Puppet module tests

Puppet rspec tests should be provided for an every module's directory included. All of the discovered tests will be automatically executed by the rake spec command issued from the repository root path.

Bats: Bash Automated Testing System

Shell scripts residing in the ./files directories should be covered by the BATS test cases. These should be put under the ./tests/bats path as well. Here is an example bats tests written for the UMM feature. See also the bats how-to.

fuel-library noop

The Noop testing framework is used for testing of the known deploy paths with existing modular tasks. For details, see the README

Development


Core Reviewers


Contributors