[chef] Re: Put Chef Repo into Private Git


Chronological Thread 
  • From: Fabien Delpierre < >
  • To: chef < >
  • Subject: [chef] Re: Put Chef Repo into Private Git
  • Date: Tue, 15 Sep 2015 08:23:10 -0400

Simon,
Yes and no.
It's trivial to turn your existing directory into a Git repo and push it to your private GitHub server.
https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
Before committing, you may want to set up a .gitignore. If you have any secrets in your data bags, think about whether they should be in source control.

Making your Chef server use that Git repo is a little trickier. Somehow you still need to upload data from the repo to the Chef Server by using Knife. The data is not stored in Chef Server the same way it's stored in the Chef repo on your workstation. You could set up a CI workflow with something like Jenkins and/or Travis CI that would keep an eye on the GitHub repo and upload changes to the Chef Server. It's not hard to do but is a little more involving than adding the Chef repo to GitHub.
Just an example: https://blog.5apps.com/2014/01/07/using-travis-to-make-sure-your-chef-repo-and-server-are-in-sync.html

I hope this helps!
Fabien


On Tue, Sep 15, 2015 at 4:05 AM, Simon Hawkins < " target="_blank"> > wrote:

Hi All,

 

I have my chef-repo on my chef-workstation with the usual directories:

 

/home/chefuser/chef-repo

config

cookbooks

data_bags

environments

 

etc,

 

Is there a way I can create a repository on our private github server and upload this whole directory structure and get my chef-server and workstation to use this repo? Are there any guides on how to do this?

 

Cheers,

Simon

 


Disclaimer

This message is intended only for the use of the person(s) ("Intended Recipient") to whom it is addressed. It may contain information which is privileged and confidential. Accordingly any dissemination, distribution, copying or other use of this message or any of its content by any person other than the Intended Recipient may constitute a breach of civil or criminal law and is strictly prohibited. If you are not the Intended Recipient, please contact the sender as soon as possible.

Totaljobs Group Limited Registered Office: Bluefin Building, 110 Southwark Street, London, SE1 0TA, UK Registered in England and Wales under company no. 4269861






Archive powered by MHonArc 2.6.16.

§