Skip to content

Commit

Permalink
Initial Release (#1)
Browse files Browse the repository at this point in the history
* adding base files and first features

* minor typo on comment

* cleanup for testing

* removing redundant version checks

* json cleanup

* adding env var to point to right kitchen conf for dokken

* removing dependency on poise cookbooks

* oddly not finding default recipe so making explicit

* updating dokken to try and figure out why kitchen cant find recipes

* so... totally didn't add recipes.. whoops..

* had version of ubuntu mismatch, reverting the explicit call for default recipes

* removing explicit path to virtualenv for now..

* changing to bash resources, easier to instantiate the virtualenv that way because sh otherwise

* update repo urls, make special accomodations for centos6 pip limitations

* standardizing on underscore for repo resources

* standardizing on underscore for repo resources

* adding spec coverage

* this felt like it should be separated

allows for more customizable deployments
adding or splitting out appropriate tests

* 1.6.11 is last ver of django compatible with python26

* updating runlist to consume storage recipes and resource tests

* adding a special dir for experimenting to the ignore file

* adding test placeholders for storage recipes

* doing tests from single databag instead of many

* adding disable option to default filestorage, adding default databag/items for services

* updating checks

* adding some pre-flight setup tasks for autochanger installs

* adding a working storage daemon recipe that is extensible, so far..

* tmp drop sensitive, move conf hash to top of list, cleanup

* adding a working autochanger resource

* adding a working storage device resource

* updating some tests, adding some placeholders, prepping for future testing

* adding storage templates, updating property/variable names

* adding new test recieps for resources or env setup

* updating tests with latest bits for better integration coverage

* adding ability to change the name of the template file if someone wants to opt out of using current templates

template cookbook source is already provided

* custom resources autochanger and device can restart sd if changes detected

* adding integration tests for storage recipes and resource tests

* adding descriptions to config, using that for some integration testing a well

* trying this delivery thing

* this setup for travis should still do what we want be be more efficient..

* well.. that is getting changed back and fixed (travis config)

* moving to use the normal single service resource for notifications so it unifies the restart of the sd

* adding back cookstyle and foodcritic to precommit just so local env does it as part of commit

* adding next if to loop structure

If you do not set anything in the databag/vault to confgure the configs for sd, it should just skip them
The installed packages should have some default configs that allow the sd to still start so this is world breaking necessarily
This will also allow you to opt out of configuring the sd via databags/vaults if desired

* adding a commented out section that allows you to test the attribute config feature baked into the storage and other daemon config recipes

* adding the placeholder attribute in case it needs to be used for some reason

* adding features, cleanup:

fixing call to notifies, was in wrong place
Default Filestorage device should have AutomaticMuont enabled by default
adding three possible outcomes for sd configs:
 1. You use the default data bag structure to configure the storage daemon (vaults preferred)
 2. You use the optional attribute method which follows the same structure as the data bag method
 3. You 'use' the attribute method but only fill in enough of the key to skip over them or be called out for setting
    the option to use attributes then not setting them as you declared you would. Either way if you want to do your own thing, you can with this in place.

* cookstyle cleanup

* getting a working start to some more spec tests

* trying to get bash resources to only run once so they are just out of the way during multiple kitchen runs

* missed some quotes around passwords that are there by default

* meant to set this default since i cahnged it recently in my testing

* changing the default attribute hash depth to allow for smooth integration of attribute configs as desired

* adjusting some of the guard logic for sd configs and getting rid of a now useless message

* adding what should be in both the default form package and still the default after base config is deployed

* these spec files arent ready for prime time yet, taking out until i have a chance to get them rolling

* cutting out this commented example, not necessary any longer

* comment isnt relevant any longer

* adding missing deps to fixture cookbook

* standardizing on some hash calls

* adding starting place for spec tests for resource tests

* trying to avoid future naming collisions

* moving closer to strictly a custom resource library, lots of changes to where it really should be to support that effort

* lots of test updating, should be 100% coverage through current point

* cutting out last remaining dependency for bareos-cookbook

* minor cleanup, removing default catalog create from director common (overloads recipe), organizing

* attempting to append all supported OS's to builds in travis

* some more updates, should have all the testing proper now

* adding necessary templates to help debian systems spawn databases when told to and not otherwise

* use_custom_catalog attribute not necessary

* treating the kitchen runlist more like consumer cookbook runlist

* did a bit of refactoring

condensing, aligning some naming, updating tests, applying some feedback from Bareos support regarding the catalog deployment strategy
also needed to add some logic to better handle the catalog creation process, needs a bit more touching up but mostly there
some refactoring for simplicity

* adding a bunch of director resources, templates and resource tests and examples

also making an effort to simplify the resource calls and making a couple more assumptions about the host environment being available prior to use of the resources in general

* adding yaml seperator

* adding jobs and jobdef resources, needs testing integration and spec testing

* aligning ordering, minor

* Aligning Kitchen configs and adding support Ubuntu 18

* aligning resource names and files with docs more closely, updating tests to include ubuntu 18, adding start to README

* adding some consideration notes for the cookbook and updating some formatting

* adding some better integration testing for repos

* updating where to update certain dependencies for travis

* adding changelog and fixing integration test for ubuntu 18

* Adding stubs and completing more documentation

* adding better comments for docs and removing unused property

* consistent wording alignment

* adding some badges (not all active), and contributing guidelines

* adding more tests, more resources, updates to resources, docs, etc.

* README heading formatting

* missed one change
  • Loading branch information
GitBytes authored Feb 7, 2019
1 parent c2e8cc6 commit c3aa13c
Show file tree
Hide file tree
Showing 110 changed files with 4,678 additions and 9 deletions.
1 change: 1 addition & 0 deletions .delivery/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml"
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~
pkg/

# Berkshelf
.vagrant
/cookbooks
Berksfile.lock

# Bundler
Gemfile.lock
bin/*
.bundle/*

.kitchen/
.kitchen.local.yml
spec/spec_state
*WIP*
73 changes: 73 additions & 0 deletions .kitchen.dokken.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
driver:
name: dokken
chef_version: latest

transport:
name: dokken

provisioner:
name: dokken
always_update_cookbooks: true

platforms:
- name: debian-8
driver:
image: dokken/debian-8
privileged: true
pid_one_command: /lib/systemd/systemd
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro # required by systemd
- name: debian-9
driver:
image: dokken/debian-9
privileged: true
pid_one_command: /lib/systemd/systemd
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro # required by systemd
- name: ubuntu-14
driver:
image: dokken/ubuntu-14.04
privileged: true
- name: ubuntu-16
driver:
image: dokken/ubuntu-16.04
privileged: true
pid_one_command: /lib/systemd/systemd
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro # required by systemd
- name: ubuntu-18
driver:
image: dokken/ubuntu-18.04
privileged: true
pid_one_command: /lib/systemd/systemd
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro # required by systemd
- name: centos-6
driver:
image: dokken/centos-6
privileged: true
- name: centos-7
driver:
image: dokken/centos-7
privileged: true
pid_one_command: /usr/lib/systemd/systemd
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro # required by systemd

verifier:
name: inspec

suites:
- name: server
run_list:
- recipe[bareos-test]
- recipe[bareos-test::pgsql]
- recipe[bareos-test::mysql]
- recipe[bareos-test::python]
- recipe[bareos-test::director_test]
- recipe[bareos-test::autochanger_test]
- recipe[bareos-test::storage_test]
- recipe[bareos-test::client_test]
- recipe[bareos-test::console_test]
- recipe[bareos-test::graphite_poller_test]
49 changes: 49 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
driver:
name: vagrant

platforms:
- name: debian-8
driver:
box: bento/debian-8.11
- name: debian-9
driver:
box: bento/debian-9.6
- name: ubuntu-14
driver:
box: bento/ubuntu-14.04
- name: ubuntu-16
driver:
box: bento/ubuntu-16.04
- name: ubuntu-18
driver:
box: bento/ubuntu-18.04
- name: centos-6
driver:
box: bento/centos-6.10
- name: centos-7
driver:
box: bento/centos-7.6

provisioner:
name: chef_zero
product_name: chef
install_strategy: always
product_version: latest

verifier:
name: inspec

suites:
- name: server
run_list:
- recipe[bareos-test]
- recipe[bareos-test::pgsql]
- recipe[bareos-test::mysql]
- recipe[bareos-test::python]
- recipe[bareos-test::director_test]
- recipe[bareos-test::autochanger_test]
- recipe[bareos-test::storage_test]
- recipe[bareos-test::client_test]
- recipe[bareos-test::console_test]
- recipe[bareos-test::graphite_poller_test]
31 changes: 31 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0-1
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-json
- id: check-vcs-permalinks
- id: mixed-line-ending
- id: pretty-format-json
args:
- --autofix
- --top-keys=id
- id: sort-simple-yaml
files: '.yaml$'
- id: check-symlinks
- id: check-yaml
- id: detect-private-key
- repo: git://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.6
hooks:
- id: remove-crlf
- id: remove-tabs
- repo: git://github.com/EMSL-MSC/pre-commit-hooks-chef
rev: 8e9ad15ee7430c7a52d5527d6b9cc5d0a158c974
hooks:
- id: check-cookstyle
- id: check-foodcritic
#- id: check-rspec
61 changes: 61 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
dist: trusty
sudo: required
group: edge
services: docker
addons:
apt:
sources:
- chef-stable-trusty
packages:
- chefdk

stages:
- lint
- test

install: echo "skip bundle install"

before_script:
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
- chef --version
- chef gem update fauxhai

env:
- T=server-debian-8
- T=server-debian-9
- T=server-ubuntu-14
- T=server-ubuntu-16
- T=server-ubuntu-18
- T=server-centos-6
- T=server-centos-7

script:
- chef gem install kitchen-dokken
- KITCHEN_LOCAL_YAML=.kitchen.dokken.yml kitchen test $T -d always

jobs:
include:
- stage: lint
env:
services:
sudo:
language: python
python: 3.6
script:
- cookstyle --version
- foodcritic --version
- rspec --version
- delivery --version
- pip install pre-commit
- pre-commit run -a
- chef exec delivery local all

notifications:
email:
recipients:
- [email protected]
- [email protected]
on_failure: never
on_success: always
11 changes: 11 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source 'https://supermarket.chef.io'

metadata

solver :ruby, :required

group :integration do
Dir['test/fixtures/cookbooks/**/metadata.rb'].each do |metadata|
cookbook File.basename(File.dirname(metadata)), path: File.dirname(metadata)
end
end
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CHANGELOG

## [1.0.0] - WIP
### Added
- All the things!
- Initial Release, documentation located in README.md!
22 changes: 22 additions & 0 deletions DISCLAIMER
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
This material was prepared as an account of work sponsored by an agency of the
United States Government. Neither the United States Government nor the United
States Department of Energy, nor Battelle, nor any of their employees, nor any
jurisdiction or organization that has cooperated in the development of these
materials, makes any warranty, express or implied, or assumes any legal
liability or responsibility for the accuracy, completeness, or usefulness or
any information, apparatus, product, software, or process disclosed, or
represents that its use would not infringe privately owned rights.

Reference herein to any specific commercial product, process, or service by
trade name, trademark, manufacturer, or otherwise does not necessarily
constitute or imply its endorsement, recommendation, or favoring by the United
States Government or any agency thereof, or Battelle Memorial Institute. The
views and opinions of authors expressed herein do not necessarily state or
reflect those of the United States Government or any agency thereof.

PACIFIC NORTHWEST NATIONAL LABORATORY
operated by
BATTELLE
for the
UNITED STATES DEPARTMENT OF ENERGY
under Contract DE-AC05-76RL01830
14 changes: 7 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
MIT License

Copyright (c) 2018 EMSL Molecular Science Computing
Copyright 2018 Battelle Memorial Institute

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Expand Down
Loading

0 comments on commit c3aa13c

Please sign in to comment.