Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

13

There's a couple of way to achieve the result: Chef have a trusted_dir to allow adding certificate to the trusted list. the documentation has a lot of details about it. Adding your CA certificate to this directory would solve the problem. knife has it also in a slightly different path as per it's own documentation Chef use its own CA certiticate list in /...


12

There are a lot of specifics but the overall pattern we use is "wrap and extend". The general idea is to make a cookbook that depends on the community cookbook, usually named mycompany_originalthing, and then make recipes in that which call include_recipe 'originalthing::whatever' but with either more stuff added before/after or with calls to things like ...


10

In such context the typical advice should be immediately applicable: use the right tool for the job. But then you also cannot ignore nowadays the almost virulent tendency of software tools to extend functionality into more or less related fields and actually become toolsets for various reasons: cool feature(s) to have, expand customer base, amass more ...


7

Well that's not exactly about chef, you're basically asking how to use tar. The command to create an archive of a folder would be tar -zcvf <backup_thing>.tgz <path_to_backup> In the tar options: z pass the resulting tar archive to gzip for compression c instruct tar to compress (create the archive) v tells tar to be verbose, so you know at ...


7

I'll put in an answer although I'm not 100% sure. I think that you got the permissions wrong on ~/.ssh and it should be 0700 instead of 0600, otherwise the user cannot access it. Another tip which is unrelated to your problem, the user resource has a property manage_home (https://docs.chef.io/resource_user.html#properties) which will create the home ...


6

Configuration management tools are used to get a system into a known state. Deployment tools deploy new program files and program data to a system. At the end of the day, both types of tools do some combination of: Determine the current state of the system. Transfer files to the system. Add or change persistent data (e.g. configuration files, database data,...


6

Vendoring is the concept of downloading/installing a specific version of dependencies and making it available elsewhere (typically, within a local repo/folder of your supporting application) Vendoring is usually done to prevent breakage occurring when dependences are no longer available. Vendoring also prevents your applications from breaking when ...


6

For the whole points and to try things there's https://learn.chef.io which allow you to test automate also. Mainly chef automate is the next iteration bringing together 4 commercial products from Chef: chef manage (UI), chef reporting, chef compliance and delivery (CI/CD) with the addition of push jobs which was open sourced a little before. Inspec is ...


6

In short, Chef may not be the tool to use here. Chef is a convergent model, so you have to write your recipes in an idempotent way such as after some runs it will be at the desired state according to the others nodes around. Your approach about storing the state sounds the way to go, and you'll have to use an external orchestrator to schedule the chef-...


6

Part of adopting the Immutable Infrastructure Pattern is decomposing your system into small manageable pieces that can move through CI/CD Pipeline very quickly, this means that OS patches can be done quickly and in a controlled manner. I often see clients ending up with a halfway house where infrastructure is mostly immutable. However, there are a few ...


5

what about something like that: %w{ mysql-community-common-5.7.16-1.el7.x86_64.rpm mysql-community-libs-5.7.16-1.el7.x86_64.rpm mysql-community-client-5.7.16-1.el7.x86_64.rpm mysql-community-server-5.7.16-1.el7.x86_64.rpm }.each do |pkg| remote_file "/tmp/#{pkg}" do source "https://s3.amazonaws.com/tmp/mysql/...


5

You might not be able to get this done on the free tier. Puppet for example isn't going to want to start because of the RAM limitations. The AWS free tier uses thje t2.micro instance which only has 1GB of RAM. Your operating system alone probably needs 512 to run at idle. This leaves you a mere 512 MB or ram for all of the things that you listed. While the ...


5

No, it is not, the chef-repo is the legacy way back to chef 10. Knife allows working on multiples directory with the -o option. Berks work from current directory. You can also work around the default .chef directory by using the KNIFE_HOME environment variable too. The current recomendations is indeed a repo per cookbook (or alongside another app)


5

It does nothing. A huge part of the purpose of Chef is that converges are idempotent, meaning you can run them repeatedly with no cumulative effects. I highly recommend consulting the Chef documentation as it will provide an excellent foundation for understanding how and why Chef works.


5

The tool you need is Packer using Docker as the "builder" and Chef as the "provisioner". Then you can add the resulting image to your repo and reuse it without having to pack again, until your recipes change.


5

You may use matchbox on a VM as you do on a baremetal machine, you won't be able to use packer on a baremetal machine ont he other hand as it doesn't handle any PXE boot option. That said, leveraging vSphere/AWS/ API/cli to create a new machine from a template is usually quicker and more effective than using the API/cli to create the VM and then make it ...


4

The error looks like you're using a non-existent reference (branch/tag). Try specifying the correct branch and tag using the branch/tag options. You can also use the commit hash directly using ref option. Also ensure that your git URL is correct (your code does not contain the xxx.git part).


4

TL;DR: Just use Ansbile, it is both configuration and deployment tool :) There are several types of deployment: Application based (files, archives packages) Container based (includes VMs, Habitat, LXC, Docker) Function based (Micro services / Lambdas / Functions) I assume in this case we speak only about application updates on server(s). For deployment ...


4

I'd go with node.run_state to store a transient variable in a run and define it in a ruby_block so it happens at converge time, something like this: yum_package 'somepackage' ruby_block 'set myvar' do block do node.run_state['my_var'] = Mixlib::ShellOut.new('/bin/somecommand').run_command.stdout.strip end end As far as I know requiring 'mixlib/...


4

These strategies have nothing to do with one another. Containers (like Docker) are a methodology for deploying and isolating applications. Containers are well liked because they're transportable. They can be developed on and previewed locally in most cases, so putting applications in them makes sense. As for why Docker uses shell scripting: A docker image ...


4

A node in chef terminology is a machine managed with chef-client. Chef-client is available for various OS, windows, Linux, Aix, Mac etc. However the chef-server is only available for linux.


3

The Azure free trial gives you $200 in credit for the first month which is plenty of capacity spin up many VMs of an adequate size to run all the tools you mention. I would advise not starting the trial period until you have a good plan of what you want to do, to get maximum benefit from it. Provision up to 14 virtual machines, 40 SQL databases or 8 TB ...


3

The prerequisites for a chef server are here and common to any installation. You only need to allow https to port 443 from your inner infrastructure to the cloud server. If you have a proxy with SSL interception I'd recommend adding this proxy certificate to each client cacert.pem and set an environment variable SSL_CERT_FILE=<chef_install_path>...


3

https://www.digitalocean.com/community/tutorials/how-to-use-roles-and-environments-in-chef-to-control-server-configurations For instance, if a node is in the "production" environment, you could want to run a special recipe in your "nginx" cookbook to bring that server up to production policy requirements. You could also have a recipe in the nginx ...


3

So first of all, Chef is just a manner of upgrading/configuring, it will help you keep a reproducible state and keeping configuration in line but it won't do black magic and translate your jobs for you. Now for Jenkins 1 to Jenkins 2, Jenkins-ci site says Jenkins 2 is Backward Compatible. While this is true, when you update the pipeline plugin, not all ...


3

For software and deploying code to an existing server or inside a Docker container, the answer is relatively simple - No, you don't need both, but you might want both if another tool or utility adds value and is the right tool for the job, however things get more complicated when you are deploying servers and operating systems. One value-add of a DevOps ...


3

Application deployment is a hard thing to pin down because it has a lot of sub-problems. Config management systems are excellent at modeling tasks which are convergent and work with "what is the desired state of the system". In the context of app deployment, this is great for things like deploying bits to a machine, managing configuration files, and setting ...


3

Your question is quite vague/generic. People store their source code (or generally, files) in git; let Jenkins run jobs (like CI/CD pipelines), use Docker to put their software into well-defined containers, Nagios to monitor their systems, ELK to collect, store and visualize (mostly logging, event) data, AWS to host their stuff, and Chef to manage their ...


3

This is a textbook example of server orchestration and is something that Chef inherently is not intended to do. As noted by Tensibai, a server running Chef is a convergent system that achieves its own desired state based upon configuration settings set by recipes, attributes, data bags, etc. Without getting in to specific details about your infrastructure, a ...


3

To clear which module you need to install & where, just go through the terminology of chef at chef.io For workstation, you need to install chefDK For node, you need to install chefclient For chef server, you need to install chefserver - not available for windows Note: Always use the stable and latest version of the above-mentioned components.Hope ...


Only top voted, non community-wiki answers of a minimum length are eligible