Shrink/Reduce Your Windows AMI’s in AWS

Thursday, September 27, 2018

Introduction A few days ago I came across the following question from one of my clients: "As a part of our CI/CD process we use AWS AMI's to provision servers dynamically to run our tests. However we realize that some of those AMI's are larger than we need, causing unnecessary expenses and increasing the provisioning time. How can we reduce the existent AMI's sizes?"   The Problem Larger AMI's volumes sizes Production AMI'S used in several production processes Create new AMI's from scratch is not an option   The Solution Create an EC2 instance from the AMI (the target instance) Create an EC2 Linux instance (the worker instance) Stop the target...
no comments

Monitoring your Linux Servers with Prometheus and Grafana in 7 Minutes

Thursday, September 13, 2018

Objective At the end of this post we will get a Grafana dashboard with all the metrics related to our servers.   Introduction Prometheus is a tool for store time series data and manage alerts. It works as a pull based system, the Prometheus server fetches the metrics values from the target servers periodically. To expose the metrics in each server we will use "node_export" which basically expose the server metrics using the port 9100 (by default). And Grafana is a tool for query, visualize and understand your metrics. We will use it to create our dashboard.   Understand your Infrastructure The first thing we need...
no comments

Connect to Linux Machine Using Windows Remote Desktop

Wednesday, January 25, 2017

1) Access to the Linux machine and open the terminal (Ctrl+Alt+T)   2) Update the apt and install xrdp using the following command: - -> sudo apt-get update   3) Install xrdp using the following command: --> sudo apt-get install xrdp –y   4) Install xfce4 with the command below: --> sudo apt-get install xfce4 –y   5) Run the following command to make sure xRDP uses xfce4 (step 1 of 2): --> echo xfce4-session >~/.xsession   6) Run the following command to make sure xRDP uses xfce4 (step 2 of 2): --> sudo nano /etc/xrdp/   7) Add the following line before the last line of the file --> startxfce4   8) Then, click “Ctrl+X”, click “Y” and...
no comments

Create Your Own Linux Command

Tuesday, January 24, 2017

Create your custom command in Linux is very simple. I will take a specific case and use it to explain the process. I have a Linux machine which is used as a Jenkins slave that is configured to work with windows slaves. I can’t change this configuration so my workaround is replace the command “C:\Program File\Git\cmd\git.exe” for the “git” command. To achieve this I’ll create a command called “C:\Program File\Git\cmd\git.exe” that will be used to run git commands.   1. Create a Bash Script which will run your command   2. Make the command executable   3. Copy your script to the path “/usr/bin”   4. Test your new Linux...