Adding ATT specifics and metadata/README cleanups
This commit is contained in:
parent
e2ea701a70
commit
852a8e679d
|
@ -15,7 +15,7 @@ This file is used to list changes made in each version of cookbook-openstack-com
|
|||
|
||||
* Initial release of cookbook-openstack-common
|
||||
|
||||
- - -
|
||||
- - -
|
||||
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
|
||||
|
||||
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
|
||||
|
|
40
README.md
40
README.md
|
@ -7,7 +7,7 @@ an OpenStack deployment.
|
|||
Requirements
|
||||
============
|
||||
|
||||
* Chef 0.8+
|
||||
Chef 0.10.0 or higher required (for Chef environment use).
|
||||
|
||||
Cookbooks
|
||||
---------
|
||||
|
@ -43,6 +43,28 @@ This cookbook exposes a set of default library routines:
|
|||
Usage
|
||||
-----
|
||||
|
||||
default
|
||||
----
|
||||
|
||||
Installs/Configures common recipes
|
||||
|
||||
```json
|
||||
"run_list": [
|
||||
"recipe[openstack-common]"
|
||||
]
|
||||
```
|
||||
|
||||
logging
|
||||
----
|
||||
|
||||
Installs/Configures common logging
|
||||
|
||||
```json
|
||||
"run_list": [
|
||||
"recipe[openstack-common::logging]"
|
||||
]
|
||||
```
|
||||
|
||||
The following are code examples showing the above library routines in action.
|
||||
Remember when using the library routines exposed by this library to include
|
||||
the Openstack routines in your recipe's `::Chef::Recipe` namespace, like so:
|
||||
|
@ -85,11 +107,11 @@ template "/etc/cinder/cinder.conf" do
|
|||
end
|
||||
```
|
||||
|
||||
OpenStack Role Operations
|
||||
-------------------------
|
||||
|
||||
OpenStack Role Operations
|
||||
-------------------------
|
||||
|
||||
To find a hash (or partial hash) of configuration information given a named Chef
|
||||
role, use the `Openstack::config_by_role` routine. This routine takes as its
|
||||
role, use the `Openstack::config_by_role` routine. This routine takes as its
|
||||
first parameter the name of the Chef role to look for. An optional second parameter
|
||||
is the section of the node hash to return. If nil, the whole node hash is returned.
|
||||
|
||||
|
@ -147,15 +169,15 @@ This cookbook is using [ChefSpec](https://github.com/acrmp/chefspec) for
|
|||
testing. Should run the following before commiting. It will run your tests,
|
||||
and check for lint errors.
|
||||
|
||||
% ./run_tests.bash
|
||||
$ ./run_tests.bash
|
||||
|
||||
License and Author
|
||||
==================
|
||||
|
||||
Author:: Jay Pipes (<jaypipes@gmail.com>)
|
||||
Author:: John Dewey (<john@dewey.ws>)
|
||||
Author:: Jay Pipes (<jaypipes@att.com>)
|
||||
Author:: John Dewey (<jdewey2@att.com>)
|
||||
|
||||
Copyright 2012-2013, Jay Pipes
|
||||
Copyright 2012-2013, AT&T Services, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Cookbook Name:: openstack-common
|
||||
# Attributes:: default
|
||||
#
|
||||
# Copyright 2012, Jay Pipes
|
||||
# Copyright 2012-2013, AT&T Services, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Cookbook Name:: openstack-common
|
||||
# library:: default
|
||||
#
|
||||
# Copyright 2012, Jay Pipes
|
||||
# Copyright 2012-2013, AT&T Services, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Cookbook Name:: openstack-common
|
||||
# library:: endpoints
|
||||
#
|
||||
# Copyright 2012, Jay Pipes
|
||||
# Copyright 2012-2013, AT&T Services, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Cookbook Name:: openstack-common
|
||||
# library:: passwords
|
||||
#
|
||||
# Copyright 2012, Jay Pipes
|
||||
# Copyright 2012-2013, AT&T Services, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Cookbook Name:: openstack-common
|
||||
# library:: roles
|
||||
#
|
||||
# Copyright 2012, Jay Pipes
|
||||
# Copyright 2012-2013, AT&T Services, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Cookbook Name:: openstack-common
|
||||
# library:: uri
|
||||
#
|
||||
# Copyright 2012, Jay Pipes
|
||||
# Copyright 2012-2013, AT&T Services, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
name "openstack-common"
|
||||
maintainer "Jay Pipes"
|
||||
maintainer_email "jaypipes@gmail.com"
|
||||
maintainer "AT&T Services, Inc."
|
||||
maintainer_email "cookbooks@lists.tfoundry.com"
|
||||
license "Apache 2.0"
|
||||
description "Common OpenStack attributes, libraries and recipes."
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version "0.2.0"
|
||||
|
||||
recipe "opentack-common", "Execute common recipes"
|
||||
recipe "opentack-common", "Installs/Configures common recipes"
|
||||
recipe "opentack-common::logging", "Installs/Configures common logging"
|
||||
|
||||
%w{ ubuntu suse }.each do |os|
|
||||
supports os
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Cookbook Name:: openstack-common
|
||||
# library:: default
|
||||
#
|
||||
# Copyright 2012, Jay Pipes
|
||||
# Copyright 2012-2013, AT&T Services, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Cookbook Name:: openstack-common
|
||||
# library:: logging
|
||||
#
|
||||
# Copyright 2012, AT&T
|
||||
# Copyright 2012-2013, AT&T Services, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -5,8 +5,15 @@
|
|||
set -e
|
||||
|
||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||
if [ -z $COOKBOOK ]; then
|
||||
echo "Cookbook name not defined in metadata.rb"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bundle install
|
||||
bundle exec berks install --path .cookbooks
|
||||
bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .cookbooks/${COOKBOOK}
|
||||
bundle exec rspec .cookbooks/${COOKBOOK}
|
||||
BUNDLE_PATH=${BUNDLE_PATH:-.bundle}
|
||||
BERKSHELF_PATH=${BERKSHELF_PATH:-.cookbooks}
|
||||
|
||||
bundle install --path=${BUNDLE_PATH}
|
||||
bundle exec berks install --path=${BERKSHELF_PATH}
|
||||
bundle exec foodcritic -f any -t ~FC003 -t ~FC023 ${BERKSHELF_PATH}/${COOKBOOK}
|
||||
bundle exec rspec ${BERKSHELF_PATH}/${COOKBOOK}
|
||||
|
|
Loading…
Reference in New Issue