VirtualBox installation and configuration on Windows

Download Virtual Box from https://www.virtualbox.org/wiki/Downloads and follow the instructions to install it. At the time of writing this was the section where the installer files were referenced Run the downloaded installer file and accept all default values. The installer starts the Virtual Box application.You can close it, we will use other tools to start it in the future. …

VirtualBox installation and configuration on Macintosh

Download VirtualBox from https://www.virtualbox.org/wiki/Downloads and follow the instructions to install it. At the time of writing, this was the section where the installer files were referenced Run the downloaded installer file and accept all default values. The installer starts the application.   Create a virtual machine To create a new virtual machine Download the OS image from the …

Create the AWS credentials file from a Chef Data Bag

When a process on a server instance needs access to an AWS account, the user who will execute the AWS CLI commands needs to be able to automatically authenticate in AWS. For automatic AWS authentication, the AWS CLI creates two files in the .aws directory: config and credentials. The location of this directory depends on the …

Splunk configuration

Splunk stores the configuration values in files in the /opt/splunkforwarder directory structure. Splunk client Description Location Splunk Deployment server /opt/splunkforwarder/etc/system/local/deploymentclient.conf   Example targetUri = DEPLOYMENT_SERVER_URL:8089 Splunk Forwarder address /opt/splunkforwarder/etc/apps/tcpout-aws/local/outputs.conf    Example server = FORWARDER1_ADDRESS:9997,FORWARDER2_ADDRESS:9997  Linux event log. Splunk tails this file. /var/log/messages    To log a message in the Linux event log logger “My message”    To …

Splunk installation

Install Splunk Navigate to the Splunk website at splunk.com, In the upper right corner select the Free Splunk button, If you don’t yet have a Splunk account, register to create one, otherwise log in, Select the Free Download in the Splunk Enterprise frame, Select the tab with the operating system of your machine. Linux The simplest …

Upgrade a server on an AWS EC2 instance with minimum risk and downtime

When you need to upgrade an application on an AWS EC2 instance with minimum downtime, there are many options. Upgrade an EC2 instance Stop the application, so users don’t make more changes, Create a backup of the database (snapshot of the RDS instance), Create a backup of the server (backup image of the EC2 instance), …

Test your RightScale script without creating unnecessary revisions

There are certain functions in RightScale scripts (RightScripts) that you cannot test without launching a new instance. To test your script: Edit the Head revision of the RightScale script and save it, Attach the Head revision of the RightScale script to the Head revision of the RightScale Server Template, Select the Head revision of the …

Custom Git Status and Git Pull commands to work with all of your repositories

If you work with many Git repositories it is easy to miss a repository when you commit your changes, and very time consuming to pull from all repositories. It is easy to automate both processes. In this example, we will place all files in the ~/Git/devops-scripts folder. If you want to place your files at another …

Useful Bash commands

Most of these commands work in all Linux, MacOSX, and Unix shells, but some of them only work in selected shells. Find files recursively by file name pattern find . -name ‘*.MY_EXTENSION’ Find files, but exclude a directory from the search. (The -print is needed at the end of the line) find . -path ./tmp/windows …

Add SSH key to a Jenkins Git step

To access a Git repository Jenkins can use an SSH key. To add the SSH key to the Jenkins server use the following Chef script Store the SSH key in an encrypted data bag called “keys”. { “id”: “ci_private_keys”, “ci_github_key”: “—–BEGIN RSA PRIVATE KEY—–\n…\n—–END RSA PRIVATE KEY—–“, }   Add the following to the Jenkins …