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 …

Find the AWS AMI that a RightScale server template is using

When you use RightScale to launch servers in the cloud, you want to use the same base image to test your Chef cookbooks in Test Kitchen. Packer by Hashicorp is a utility to create custom server images based on cloud images. You supply the image ID and other configuration parameters to create a new custom image. …

How to verify or generate file checksums

You can verify the checksum of a file with the built-in features of the operating systems On Macintosh and Linux Open the terminal window and execute the commands SHA-256 shasum -a 256 FILE_NAME On Windows CRC32, CRC64, SHA256, SHA1, BLAKE2sp Right-click the file in Windows Explorer and select CRC SHA > * (star) The popup window will …

Upgrade TeamCity to version 10

Upgrade TeamCity to version 10 Create a backup of the database and the server before the upgrade Disable the Chef-Client scheduled task and Chef-Client service to make sure Chef does not alter the server during the upgrade. Disable the authorized agents to stop them picking new jobs. Stop the TeamCity process on the server, If …

Set up the Artifactory repository authentication

To secure Artifactory repositories follow the steps below Log into Artifactory as an administrator On the left select Admin Add users In the Security menu select Users In the upper right select New Create users for admin, writer, and reader. Make sure the Can Update Profile checkbox is NOT checked, so if someone logs in with the service …

The User Profile Service failed the sign-in. User profile cannot be loaded.

When you try to start a remote desktop connection to a Windows computer on the domain you may get the error message: The User Profile Service failed the sign-in. User profile cannot be loaded. To enable the User Profile update Remote into the computer with a local administrator account, In Windows Explorer open the C:\Users\Default\AppData folder, …

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 …