New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the direct reporting to Chef Compliance #54

Merged
merged 3 commits into from May 25, 2016

Conversation

Projects
None yet
5 participants
@chris-rock
Collaborator

chris-rock commented May 25, 2016

Description

This PR improves the support for direct reporting to Chef Compliance

Issues Resolved

fixes #45
fixes #52

@iennae iennae added the in progress label May 25, 2016

@chris-rock chris-rock changed the title from optimize the direct reporting to Chef Compliance to WIP: optimize the direct reporting to Chef Compliance May 25, 2016

@jeremymv2

View changes

libraries/report.rb Outdated
# to use a chef-compliance server that is _not_ "colocated" with chef-server
property :server, [URI, nil]
# to use a chef-compliance server that is used with chef-server integration
property :server, [String, URI, nil]
property :port, Integer
property :token, [String, nil]
property :variant, String, default: 'chef' # 'chef', 'compliance'

This comment has been minimized.

@jeremymv2

jeremymv2 May 25, 2016

Contributor

With your very nice implementation :variant is no longer needed, correct?

This comment has been minimized.

@chris-rock

chris-rock May 25, 2016

Collaborator

Yes, I want to get rid of variant

@chris-rock chris-rock changed the title from WIP: optimize the direct reporting to Chef Compliance to Optimize the direct reporting to Chef Compliance May 25, 2016

@jeremymv2

This comment has been minimized.

Contributor

jeremymv2 commented May 25, 2016

👍
Awesome improvements @chris-rock! This LGTM.

@alexpop

View changes

recipes/default.rb Outdated
@@ -17,6 +17,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# both are used if used with Chef Compliance directly, otherwise those should be nil

This comment has been minimized.

@alexpop

alexpop May 25, 2016

Collaborator

used if used jumped up here. Alternative:
# These two attributes should only be set when connecting directly to Chef Compliance, otherwise they should be nil

@alexpop

This comment has been minimized.

Collaborator

alexpop commented May 25, 2016

Many thanks for the fixes and improvements Chris!

@alexpop alexpop merged commit 43f2181 into master May 25, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@iennae iennae removed the in progress label May 25, 2016

@chris-rock chris-rock deleted the chris-rock/cc-standalone branch May 25, 2016

@cjohannsen81

This comment has been minimized.

Contributor

cjohannsen81 commented May 26, 2016

@chris-rock Hey, with the new version I have some 404 issues:

➜ cjo@Christians-MBP  ~/Downloads/chef-repo/cookbooks/atom git:(master) ✗ kitchen converge
-----> Starting Kitchen (v1.7.3)
-----> Converging <default-ubuntu-1404>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 4.2.1...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
-----> Chef Omnibus installation detected (install only if missing)
       Transferring files to <default-ubuntu-1404>
       Starting Chef Client, version 12.10.24
       resolving cookbooks for run list: ["atom::default", "audit::default"]
       Synchronizing Cookbooks:
         - atom (0.1.1)
         - audit (0.9.0)
       Installing Cookbook Gems:
       Compiling Cookbooks...
       Converging 2 resources
       Recipe: audit::default
         * compliance_profile[linux] action fetch
           * chef_gem[inspec] action install (up to date)
       [2016-05-26T08:01:53+00:00] WARN: Using inspec version: (0.22.1)
           - install/update inspec
           * directory[/tmp/kitchen/cache/compliance] action create (up to date)
           - create cache directory[2016-05-26T08:01:53+00:00] ERROR: Object does not exist on remote server.
       [2016-05-26T08:01:53+00:00] ERROR: 404 "Not Found"

           - fetch compliance profile
           * chef_gem[inspec] action install (up to date)
           * directory[/tmp/kitchen/cache/compliance] action create (up to date)

         * compliance_profile[linux] action execute
           * chef_gem[inspec] action install (up to date)
       [2016-05-26T08:01:53+00:00] WARN: Using inspec version: (0.22.1)
           - install/update inspec
           * directory[/tmp/kitchen/cache/compliance] action create (up to date)
           - create/verify cache directory
           - execute compliance profile
           * chef_gem[inspec] action install (up to date)
           * directory[/tmp/kitchen/cache/compliance] action create (up to date)
           * file[/tmp/kitchen/cache/compliance/base_linux_report.json] action create
             - update content in file /tmp/kitchen/cache/compliance/base_linux_report.json from f00949 to abcf6a
             - suppressed sensitive resource

         * compliance_report[chef-server] action execute[2016-05-26T08:01:54+00:00] ERROR: Object does not exist on remote server.
       [2016-05-26T08:01:54+00:00] ERROR: 404 "Not Found"

           - report compliance profiles' results

       Running handlers:
       Running handlers complete
       Chef Client finished, 4/12 resources updated in 02 seconds
       Finished converging <default-ubuntu-1404> (0m5.66s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment