Git – Diff Staged and Unstaged Files

While working with Git it is often required to check the changes between different areas.

Probably everyone knows the git diff, that shows the changes between the Working Directory and the Staging Area (git diff unstaged).

But it is also often needed to shows the changes between the Staging Area and the HEAD (git diff staged) or between the Working Directory and the HEAD (git diff staged and unstaged). (more…)

MongoDB: Allow Remote Access

Out of the box, MongoDB doesn’t allow remote connections, because by default it has no authentication enabled and is listening on localhost only.

If you try to connect to MongoDB without remote access being allowed, you will get this error:

Error: couldn’t connect to server $MongoDB:$Port, connection attempt failed:SocketException: Error connecting to $MongoDB:$Port :: caused by :: Connection refused … exception: connect failed

In this article i will show how to allow remote access to MongoDB. (more…)

MongoDB: Install Client – Mongo Shell – Ubuntu, CentOS

The MongoDB client, also known as mongo shell, is a command line interface to MongoDB.

The mongo shell is included in MongoDB package, but to connect to MongoDB it is enough to install MongoDB client only, without MongoDB itself.

From the following article you will find out how to install the latest (or specific) version of mongo shell on Ubuntu and CentOS. (more…)

Install Jenkins – Ubuntu, CentOS

What is Jenkins? Jenkins is a well-known open source CI/CD (Continuous Integration and Continuous Delivery) automation server written in Java.

In this tutorial i will show how to install Jenkins on Ubuntu-18.04, 16.04 and Centos-7, 6 and how to perform initial Jenkins configuration.

Jenkins requires Java, so firstly it needs to install OpenJDK-8 JRE/JDK (Java Runtime Environment and Java Development Kit). (more…)

Install Docker on Ubuntu-18.04

For ones, who want to build and run Docker containers on Ubuntu-18.04 – first of all it is required to install Docker itself.

To install the latest version of Docker and to be able to upgrade it easily in future – it is recommended to install Docker from the official repository.

In this guide i will show how to install free Docker CE (Community Edition) on Ubuntu-18.04 from the stable official repository, how to verify that it is installed correctly and will show the common post-installation steps to perform. (more…)

Prometheus: Apache Exporter – Install and Config – Ubuntu, CentOS

What is Apache Exporter? Apache Exporter is a Prometheus exporter for Apache metrics that exports Apache server status reports generated by mod_status with the URL of http://127.0.0.1/server-status/?auto.

In this article I’ll show how create Apache server status page, how to build Apache Exporter with go get and how to configure it using a systemd service manager on Ubuntu and CentOS. (more…)

Vagrant: Copy File ( To | From ) – ( Host | Guest VM ) – Vagrant SCP

Very common situation when you need to perform one-time operation of copying some file or a directory between Vagrant host and guest VM and you don’t want to waste time on mounting shared volumes or performing traditional provisioning with built-in file provisioner or some configuration management tool.

In the following article i will show the easiest way to copy files and folders between Vagrant host and guest VM using vagrant-scp plugin. (more…)

Prometheus: Delete Time Series Metrics

Sometimes you may want to delete some metrics from Prometheus if those metrics are unwanted or you just need to free up some disk space.

Time series in Prometheus can be deleted over administrative HTTP API only (disabled by default).

To enabled it, pass --web.enable-admin-api flag to Prometheus through start-up script or docker-compose file, depending on installation method. (more…)