Generate a GUID in Chef with Ruby
When you need a unique string to name a resource in your Chef scrip, generate a GUID with SecureRandom.uuid To make sure the resource always gets a unique name: log "#{SecureRandom.uuid}" do message 'My message' level :info end
Chef custom resource is using the same property name as the called resource
When you create a Chef custom resource, you can call other resources including custom resources you have created. For ease of use it can be convenient to use the same property name as the called resource use. property :delay_mins, Fixnum,…
How to secure Jenkins
When you install Jenkins, the default settings allow anyone to sign up and administer it. There are many ways to secure Jenkins, the simplest is to disable the user sign up and require login to administer the server. Click sign up in the upper right…
Minimum Windows workstation setup to work with Windows servers
If you work on a Mac or Linux workstation and need to script and administer Windows servers, you need a few Windows tools. You can create a Windows Virtual Machine hosted in the free Virtual Box from Oracle or in VMware Fusion. For installation…
NoMethodError: undefined method `exists?’ for Chef::Resource::File:Class
When you create a Chef custom resource and use the File class, you need to make slight a change in the syntax you use. In a Chef recipe you can use if File.exists?("#{FileName}") to check for the existence of a file. If we use the same line in a Chef…
Migrate databases to and from AWS RDS instances
Amazon Web Services do not provide tools to migrate data to, from and between AWS RDS instances. There is a free utility that can do the job. SQL Server Management Studio (SSMS) Install Microsoft SQL Server Management Studio (SSMS), because the utility…
Chef file locations
The Chef file and folder locations are different on Linux and Windows machines. This article explains the purpose of each file and the location. Summary Linux Windows Cookbook location /var/chef/cache/cookbooks C:\chef\cache\cookbooks Chef Client run…
Internalize Chocolatey packages
To access Chocolatey packages in your private network you need to download them from the Internet and store them at a location where all servers can access them. You can internalize Chocolatey packages if you have a Chocolatey Business subscription. You…
Recommended utilities for your workstation
Graphics Snagit Snagit is a great utility to capture screens and annotate them for documentation. The program is available for Mac and Windows. Download the latest version at https://www.techsmith.com/ Get older versions…
Keep multiple versions of applications on Macintosh
Most of the DevOps tools are still in beta versions, many times the new version is not compatible with your existing scripts or have an error that stops your scripts working. To be able to keep multiple versions of the applications and easily switch…