The rsync command allows you to copy files using SSH connection, between your workstation and another Linux machine. You have to be logged into one of the machines, this command cannot copy files between two remote machines. To copy a file from your local machine to a remote server rsync -avz -e “ssh -i SSH_KEY_FILE -o …
Tag Archives: DevOps
Using tmux terminal multiplexer
The tmux terminal multiplexer allows us to open multiple terminal windows in the same SSH session and continue the command execution even when we log out of the SSH session. This way we can execute long-running copy commands overnight without keeping the SSH session open. Install tmux On CentOS family Linux yum install tmux To start tmux …
Add SSH key access to a GitHub repository
Generate an SSH key pair In a terminal execute ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key : /Users/MY_USERNAME/Git/_Keys/MY_PROJECT/MY_PROJECT_rsa_ci Enter passphrase (empty for no passphrase): Enter same passphrase again: Leave the passphrase empty, many systems cannot work with password protected key pairs. This process will save the key-pair in …
Continue reading “Add SSH key access to a GitHub repository”
Creating CentOS server images with Packer
The CentOS images are not available on the AWS Quick Start tab. CentOS publishes official images on the AWS Marketplace, but you need to subscribe to the image to be able to launch it with an automation software, like Terraform. Find the latest available CentOS image in the AWS Marketplace Execute this command to display the …
Continue reading “Creating CentOS server images with Packer”
Using Terraform
To generate graphs with Terraform Open a terminal window in the Terraform script directory Execute the command terraform graph | dot -Tsvg > graph.svg
SocketError: Error connecting to … Name or service not known
In an enterprise environment, the company usually operates its own DNS servers. When a Linux instance launches in AWS, the DNS settings only contain the AWS DNS server. If the company DNS server settings are applied with Chef, during the first Chef Client run those settings do not take effect. When we reference an internal DNS …
Continue reading “SocketError: Error connecting to … Name or service not known”
The specified version of the NuGet package is not found in Artifactory
The “chocolatey_package” Chef resource can install NuGet packages from Artifactory. Artifactory is inconsistent in case sensitivity when an application is searching for a NuGet package. When we specify the package ID only, the search is not case sensitive. If the package is called “GoogleChrome” and we search for “googlechrome” the NuGet package is found in Artifactory. chocolatey_package ‘googlechrome’ do source ‘devops-chocolatey’ options “–allow-empty-checksums –ignore-package-exit-codes” end When we specify the version of the package, …
Continue reading “The specified version of the NuGet package is not found in Artifactory”
Determine the Linux OS version
To display the Linux operating system version execute the command cat /etc/*release* uname -a
Copy files between Windows and Linux computers
There are many tools to copy files between Windows and Linux computers, I have found this method the simplest. It does not require any software installation on the Windows machine, and only one package installation on the Linux machine. Share a folder on the Windows machine Share a folder on the Windows machine and allow …
Continue reading “Copy files between Windows and Linux computers”
Edit the HKEY_CURRENT_USER Windows Registry keys of another user
The user-specific settings in the Windows registry are stored under the HKEY_CURRENT_USER key. If you open the Regedit.exe application the HKEY_CURRENT_USER key contains the settings for your user account. To access the registry keys of another user we need to Find the Security ID of the user In Regedit navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist The key lists the Security IDs and …
Continue reading “Edit the HKEY_CURRENT_USER Windows Registry keys of another user”