Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Configuration Management Tool » Repo: How to setup Chef Repository
  • Veeam backup for proxmox worker update failure
    What to know about “Failed to perform Veeam Worker Upgrade” Backup
  • HybridCloudTrust
    WHFB Hybrid Cloud Kerberos Trust Model is now available AWS/Azure/OpenShift
  • enable WinRM
    WSManFault Message 2144108526 0x80338012: Fix the client cannot connect to the destination specified in the request Windows Server
  • create a Mapped Drive via GPO
    How to create a Mapped Drive via GPO Preferences Windows
  • Enable or disable SA acocunt
    How to enable an SA account that has been disabled Oracle/MSSQL/MySQL
  • Featured image externaldis
    How to fix the external display not working on Windows 11 Windows
  • Commvault Docker Images
    Pull and Push Commvault Images to Azure Container Registry AWS/Azure/OpenShift
  • windows hello la gi
    All you need to know before deploying Windows Hello for Business Key and Certificate Trust Windows

Repo: How to setup Chef Repository

Posted on 14/12/201826/09/2023 Christian By Christian No Comments on Repo: How to setup Chef Repository
Chef

As discussed in https://techdirectarchive.com/2018/12/14/get-started-with-opsworks-for-chef-automate/ 
It is recommended to placed in Git of any of the VCS your cookbooks etc.

A Chef repository contains several directories. Each directory in the StarterKit contains a README file that describes the directory’s purpose, and how to use it for managing your systems with Chef. There are two ways to get cookbooks installed on your Chef server. Either by using the,
– knife commands, or
– Berkshelf commands. 

Create a directory on your local PC for storing cookbooks similar to the Chef-repo

  • Create a directory on yourlocal computer for storing cookbooks, such as chef-repo. After you addcookbooks, roles, and other files to this repository, we recommend that youupload or store it in a secure, versioned system, such as AWS CodeCommit, Git,or Amazon S3.
  • In the chef-repo directory, create the following three directories, as shown in the Starter Kit:
    1. cookbooks/ – Stores cookbooks that you download or create.
    2. roles/ – Stores rolesin .rb or .json formats.
    3. environments/ – Stores environments in .rb or .json formats
Setup
Picture1 2

Use-Case 1
However, Use Berkshelf to get Cookbooks from the Chef Supermarket:

Berkshelf is a tool for managing cookbooks and their dependencies. It downloads a specified cookbook into your local storage, which is called the Berkshelf. Moreover, You can specify which cookbooks and versions to use with your Chef server and upload them.

First: Let’s try this very basic example.
Step 1: Navigate to Chef supermarket https://supermarket.chef.io/ and search for Google Chrome and Firefox.

Furthermore, locate the Berksfile as shown below and add the Firefox and Google Chrome codebooks as shown below. This ensures the cookbooks are downloaded and stored locally.

Locate the path where you have the starter kit downloaded to, mine is 

C:UsersyournameChefAutomatechef-automateserver
Repository
Picture1 4

Additionally, Let’s modify the Berksfile and add the cookbooks for Firefox and chrome gotten from the Chef Supermarket.

Configuration

Step 2: Download and install the cookbooks on your local Computer
– Launch the Chef Dk Client (PowerShell)

Nevertheless, Navigate to the Chef local Repository from the Chef Dk terminal otherwise this will not work if you are in a different directory. Therefore, See the image below and run the command. See screenshoot below for the Repo content.

Chef
Screenshot 2018 12 14 at 09.01.53

Step 3: Upload this cookbook to Chef Server

Consequently, This is different from how it works on Linux than on Windows.
See link: https://docs.aws.amazon.com/opsworks/latest/userguide/opscm-starterkit.html

Nonetheless, For Windows, Ensure the Execution Policy in PowerShell is set to RemoteSigned. Similarly, The execution policy ensures you can load configuration files and determine which script, if any, must be digitally signed. See the image below on how to set the execution policy to RemoteSigned.

Picture1 6
Picture1 6

See https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-6


This simply restricts us from running unsigned PowerShell scripts downloaded from the Internet.

Run berksinstall
Picture1 7
Picture1 7

Otherwise, you wouldn’t be able to upload your cookbooks. Moreover, Verify if this is installed by running the command below in the console.

berks –version

Next run the command below to add the SSL Cert file.

$env:SSL_CERT_FILE="ca_certsopsworks-cm-ca-2016-root.pem"

However, Then run berks upload to upload to the Chef Server

'berks upload'

Furthermore, remove the SSL Cert File

Remove-Item Env:SSL_CERT_FILE

To verify that this worked, simply run the command “knife cookbook list” as shown below

Picture1 8
Picture1 8

https://docs.aws.amazon.com/opsworks/latest/userguide/welcome_opscm.html

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Configuration Management Tool Tags:AWS, Repository

Post navigation

Previous Post: Get Started with OpsWorks for Chef Automate
Next Post: Chef – Node Bootstrapping

Related Posts

  • image 92
    Install Let’s Encrypt Wildcard SSL Certificate in cPanel using Certify The Web Configuration Management Tool
  • 1 kajkbmlyehn0inifwrh 8w 1
    What to note when settings up Ansible to work with Kerberos Configuration Management Tool
  • Groovy
    How to install Groovy on Linux and Windows Configuration Management Tool
  • CI With GitLab 1
    Build Docker Images with GitLab CI Automation
  • images 7
    The plugin filter file/etc/ansible/plugin_filters(yml) does not exist – Skipping Configuration Management Tool
  • ansible 1
    How to fix no Python interpreters found for the host Configuration Management Tool

More Related Articles

image 92 Install Let’s Encrypt Wildcard SSL Certificate in cPanel using Certify The Web Configuration Management Tool
1 kajkbmlyehn0inifwrh 8w 1 What to note when settings up Ansible to work with Kerberos Configuration Management Tool
Groovy How to install Groovy on Linux and Windows Configuration Management Tool
CI With GitLab 1 Build Docker Images with GitLab CI Automation
images 7 The plugin filter file/etc/ansible/plugin_filters(yml) does not exist – Skipping Configuration Management Tool
ansible 1 How to fix no Python interpreters found for the host Configuration Management Tool

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Veeam backup for proxmox worker update failure
    What to know about “Failed to perform Veeam Worker Upgrade” Backup
  • HybridCloudTrust
    WHFB Hybrid Cloud Kerberos Trust Model is now available AWS/Azure/OpenShift
  • enable WinRM
    WSManFault Message 2144108526 0x80338012: Fix the client cannot connect to the destination specified in the request Windows Server
  • create a Mapped Drive via GPO
    How to create a Mapped Drive via GPO Preferences Windows
  • Enable or disable SA acocunt
    How to enable an SA account that has been disabled Oracle/MSSQL/MySQL
  • Featured image externaldis
    How to fix the external display not working on Windows 11 Windows
  • Commvault Docker Images
    Pull and Push Commvault Images to Azure Container Registry AWS/Azure/OpenShift
  • windows hello la gi
    All you need to know before deploying Windows Hello for Business Key and Certificate Trust Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.