Giter VIP home page Giter VIP logo

Comments (4)

jlruizmlg avatar jlruizmlg commented on August 26, 2024

Hi @labkey-stuartm yes, we will do as soon as we can.

from wazuh-chef.

labkey-stuartm avatar labkey-stuartm commented on August 26, 2024

Thank you.

from wazuh-chef.

sc7565 avatar sc7565 commented on August 26, 2024

Just checking... when do you guys intent to publish the cookbooks to Chef Supermarket as we in middle of implementation and would like to include them @jlruizmlg

from wazuh-chef.

rshad avatar rshad commented on August 26, 2024

Hi all!

Today we made a Demo about the best way to maintain and share Wazuh Chef's cookbooks, roles, etc.

Steps to follow:

1- We first should create an account in Chef https://manage.chef.io/signup

    • Save our private key file

2- Grant Access Permission for Chef Supermarket so we then would be able to upload cookbooks to Chef Supermarket.

3- Create an organization for Wazuh.

    • Add the corresponding users with the proper permissions.
    • Download the client validation key.
    • Download Knife configuration file.

In local machine and inside our wazuh-chef folder

4- Create folder .chef

5- Copy Knife configuration file into wazuh-chef/.chef : knife.rb

# See http://docs.chef.io/config_rb_knife.html for more information on knife configuration options

current_dir = File.dirname(__FILE__)
log_level                :info
log_location             STDOUT
node_name                "<username>"
validation_client_name   "<organiztion name>-validator"
validation_key           "#{current_dir}/<organiztion name>-validator.pem"
client_key               "#{current_dir}/<user key file name>.pem"
chef_server_url          "https://api.chef.io/organizations/<organiztion name>"
cookbook_path            ["#{current_dir}/../cookbooks"]

6- Copy the Client Validation Key into wazuh-chef/.chef : .pem

    • A default one is created automatically.

7- Copy our user private key into wazuh-chef/.chef : .pem

Then we are ready to upload and share.

Uploading to the Organization

Upload the entire chef-repo

Browse to the top level of the chef-repo and enter:

$ knife upload .

or from anywhere in the chef-repo, enter:

$ knife upload /

to upload all cookbooks and data bags, plus all roles and environments that are stored as JSON data. (Roles and environments stored as Ruby data will not be uploaded.)

image

For more details, check here

Note: Uploading the files cookbooks, roles, etc .. to the organization is not equivalent to upload the cookbook to the supermarket, this needs to be done separately, as follows:

knife supermarket share "<cookbook name>" -o <path to cookbooks>

Issue

We got error message when trying to unshare a cookbook from the supermarket owned by us:

ERROR: Forbidden: You must be the maintainer of <...>to unshare it.

We thought that maybe it's related because we didn't specify ourselves as maintainers for the shared cookbooks but it either works with the ones we maintain.

This issue is already reported here: chef/chef#8056

Kr,

Rshad

from wazuh-chef.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.