knesenkoKiril Nesenko

All articles by knesenko

 

Docker: Remove Images and Containers

Want to remove some images ? Want to remove all exited containers ? The following commands might help you then. # Delete all containers docker rm $(docker ps -a -q) # Delete all images docker rmi $(docker images -q) # Delete all exited containers docker rm $(docker ps -aq -f status=exited)
Continue reading...  

Install and Configure Mesos-DNS on Mesos Cluser

Overview Before you read this wiki, please consider to read: Install and Configure Production-Ready Mesos Cluster on Photon Hosts , Install and Configure Marathon for Mesos Cluster on Photon Hosts and Install and Configure DCOS CLI for Mesos. After you have fully installed and configured Mesos cluster you can execute jobs on it. But if
Continue reading...  

Install and Configure Marathon for Mesos Cluster on Photon Hosts

In my previous post I described how to install and configure Mesos cluster on Photon hosts. In this post I am going to explain how to install and configure Marathon for Mesos cluster. I will use Photon OS. All following steps should be done on each Mesos master. First of all download marathon: root@pt-mesos-master1 [ ~ ]# mkdir -p
Continue reading...  

How To Configure Production-Ready Mesos Cluster on Photon Hosts

In this post I will try to explain how to install a production ready Mesos cluser and Zookeeper. If you are not familiar with some of these technologies, you can read more about Mesos, Marathon and Zookeeper. Overview For this setup I will use 3 Mesos masters and 3 slaves. On each Mesos master I
Continue reading...  

Installing DCOS CLI for Mesos

To install the DCOS CLI: Install virtualenv. The Python tool virtualenv is used to manage the DCOS CLI’s environment. $ sudo pip install virtualenv Tip: On some older Python versions, ignore any ‘Insecure Platform’ warnings. For more information, see https://virtualenv.pypa.io/en/latest/installation.html. From the command line, create a new directory named dcos and navigate into it. $
Continue reading...  

Generate public SSH key from private key

Suppose I have a SSH keys pair, but I’ve deleted the public key. I have the private key only. How can I regenerate public key from private key ? man ssh-keygen says: -y This option will read a private OpenSSH format file and print an OpenSSH public key to stdout. The following command will generate
Continue reading...  

jenkins-job-builder setup on mac

jenkins-job-builder setup on mac During my work day I use jenkins-jobs a lot since we have a lot of jenkins jobs. Running this tool on Centos, works like a charm. Tried to setup on my MAC and I failed to run it. Got the following errors: knesenko@knesenko-mbp:~$ jenkins-jobs Traceback (most recent call last): File “/usr/local/bin/jenkins-jobs”,
Continue reading...  

Jenkins Groovy Script Code Completion

jenkins groovy script code completion Do you always remember all methods of all classes in Jenkins and its plugins ? I don’t and it was had for me to google everything. In my example I am using IntelliJ. Create a new MVN project jenkinsgroovy and add at least jenkins-core and the plugins you need as
Continue reading...  

Managing Temporary Files RHEL

Managing Temporary Files RHEL A modern systems requires a large amount of temporary files. Usually these files are located under /run /tmp directories. Before version 7, system administrators used tool tmpwatch to clean /tmp directory and relied on System V scripts that were shipped with daemons. In RHEL/Centos 7 there is a new functionality provided
Continue reading...  

Check ssh key length

Check ssh key length If you want to check the ssh key length you can use the following commands for it. knesenko@knesenko-centos7:~/.ssh$ ssh-keygen -l -f id_rsa 2048 1e:0f:a9:ba:a6:cf:7a:54:e3:4d:56:99:35:f6:6e:bb knesenko@test.com (RSA) knesenko@knesenko-centos7:~/.ssh$ openssl rsa -text -noout -in id_rsa Private-Key: (2048 bit) … … …
Continue reading...  

Scheduling Tasks With Cron Jobs

Scheduling Tasks With Cron Jobs Linux systems ships with crond daemon which is enabled by default. There are many configuration files for this daemon, one is for user (which is controlled by crontab command) and others are in use by the daemon itself. If the commands run from the cron job will produce output, this
Continue reading...  

Using Arrays in Bash

Using Arrays in Bash In bash you can use arrays. Lets see some examples. Create new array: ARR=(“a” “b” “c”) Show all array values: [root@knesenko-centos7 ~]# echo “${ARR[@]}” a b c [root@knesenko-centos7 ~]# echo “${ARR[*]}” a b c [root@knesenko-centos7 ~]# Difference between ‘*’ and ‘@’. Same as in positional parameters: [root@knesenko-centos7 ~]# cat “${ARR[@]}” cat:
Continue reading...  

Schedule One Time Tasks Linux

Schedule One Time Tasks Linux From time to time, you want to run a command or set of commands at a set point of the future. These scheduled commands usually called tasks or jobs. One of the solutions is to use at. This is not a standalone tool, but rather a system daemon atd. atd
Continue reading...  

Automating Installation With Kickstart

Automating Installation With Kickstart Introduction A systems administrator can automate the installation using a feature called kickstart. Anaconda is a program that installs the system and it needs to be told how to install the system: network configuration, disks, partitions, users, groups etc. A kickstart installation uses uses a text file to provide all the
Continue reading...  

Configure NTP Client and Server Centos

Configure NTP Client and Server Centos Install NTP The ntp package is same for client and server. This package will synchronize your server’s time via NTP protocol. In my example server’s address is 192.168.0.1 and client’s address is 192.168.0.2. # yum -y install ntp   Configure NTP server Make sure the following lines exists in
Continue reading...  

Checking the Memory Usage Linux

Checking Memory in Linux Sometimes you want to check your memory usage and there are a lot of tools to do so. I”ll try to explain about some most useful tools to check memory usage of your system. free knesenko@knesenko-centos7:~$ free -m total used free shared buffers cached Mem: 3778 861 2916 16 84 451
Continue reading...  

Wellcome to DevOps Experts Blog

Welcome to DevOps Experts blog. In this blog I will share DevOps best practices. I will try to share the solutions I implemented and technologies/products I used. Hope you will enjoy.
Continue reading...