How to print something when running Puppet client?

Here is the puppet script with all the available puppet log functions. log_levels.pp node default { notice(“try to run this script with -v and -d to see difference between log levels”) notice(“function documentation is available here: http://docs.puppetlabs.com/references/latest/function.html”) notice(“————————————————————————–“) debug(“this is debug. visible only with -d or –debug”) info(“this is info. visible only with -v or … Read more

Run `apt-get update` before installing other packages with Puppet

Since Puppet 2.6.0 a new feature “relationship syntax” was introduced. An example in Puppet 2.6.0 and above would look like this: exec { “apt-update”: command => “/usr/bin/apt-get update” } Exec[“apt-update”] -> Package <| |> Every time a package command is executed, the dependency (in our case ‘apt-update’) will be triggered fist. You can even define … Read more

Configuration Management for Windows [closed]

Chef is supported on Windows by Opscode. While we don’t run Windows for any of our infrastructure, we do have developers who are continually improving our Windows support. We also get community contributions, and most of the early phase Windows functionality for Chef was contributed by the community. Important: Opscode now provides an MSI installer … Read more

How can I develop a LAMP web application using Docker, Puppet and Vagrant?

Should there be separate Docker containers for the web server (such as Apache), the database server (such as MySQL) and each part of the web application? There is no correct answer to that question. If you will be using Docker in production, then try to run your Docker containers in your development environment as they … Read more

OpenSSL vs GPG for encrypting off-site backups? [closed]

I would pick GPG for file encryption, it’s got decades of secure tested encryption, and is very easy to have multiple “recipients” (backup keys?) or signatures with it’s public keys & even servers (if they would be useful). With GPG, all the simple mistakes have been avoided/fixed, it picks a longer “random” key for the … Read more

How do you add items to .dockerignore?

The .dockerignore file is similar to the .gitignore syntax. Here are some example rules: # Ignore a file or directory in the context root named “modules” modules # Ignore any files or directories within the subdirectory named “modules” # in the context root modules/* # Ignore any files or directories in the context root beginning … Read more

Why do people use Puppet/Chef with Amazon Cloud Formation instead of just using CloudInit?

Is there an advantage over CloudInit? Yes, absolutely, many of them! Sure, you can write top to bottom run once CloudInit scripts to provision a server. But what happens when you need to change a configuration file, add a user, update a package, or install a new package? You will end up logging into servers … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)