How to run chef-client in why-run mode aka “no-operation”

why-run mode is a way to see what the chef-client would have configured, had an actual chef-client run occurred. This approach is similar to the concept of “no-operation” (or “no-op”): decide what should be done, but then don’t actually do anything until it’s done right. Run the executable in why-run mode, which is a type of chef-client run that does everything except modify the system.

When why-run mode is enabled, a chef-client run will occur that does everything up to the point at which configuration would normally occur. This includes

  1. Getting the configuration data,
  2. Authenticating to the Chef server,
  3. Rebuilding the node object,
  4. Expanding the run-list,
  5. Getting the necessary cookbook files,
  6. Resetting node attributes,
  7. Identifying the resources, and
  8. Building the resource collection and
  9. Does not include mapping each resource to a provider or configuring any part of the system.

How to run chef-client?

$ sudo chef-client -o 'recipe[ntp]' --why-run
$ sudo chef-client -o 'recipe[ntp]' -W

Tagged : / / /

Quiet mode

installanywhereExpert created the topic: Quiet mode
I get a issue when using quiet mode, the problem is:
I’m always prompted to select a language when installing”myapp.exe /quiet” if destination computer’s language is not one of the languages myapp.exe supported.
Is there any way to DON‘T show this language selection window and make the whole installation real quiet? thanks in advance!

applicationPackaging replied the topic: Re: Quiet mode
“myapp.exe /?” also prompt the language selection window, so seems windows installer detect current OS language whether is supported by myapp.exe first, then process /quiet option.

Tagged :

How to get bash or ssh into a running container in background mode?

How to get bash or ssh into a running container in background mode?
Step 1: First of all, try to find your active container by running
# docker ps
# docker ps -a
Step 2: If the container is not running,
# docker start your_id
Step 3: If we use attach we can use only one instance of shell.
# sudo docker attach 665b4a1e17b6 #by ID
# sudo docker attach loving_heisenberg #by Name
If we want open new terminal with new instance of container’s shell, we just need run the following:
# sudo docker exec -i -t 2e56ad1705b1 /bin/bash #by ID
# sudo docker exec -i -t loving_heisenberg /bin/bash #by Name
# root@665b4a1e17b6:/#
Step 4: To exit bash without leaving bash running in a rogue process
# exit
A reminder for boot2docker users: remove sudo
If you are using docker in Linux, you will have to use sudo along with docker commands.
You should try not to run commands as sudo, rather add your user to the docker group and just run normally.
Tagged : / / / / / / / /