Skip to content

Instantly share code, notes, and snippets.

View gangsta's full-sized avatar
😎

Karen Harutyunyan gangsta

😎
View GitHub Profile
@gangsta
gangsta / Install Vagrant Virtualbox Fedora 27.md
Last active April 10, 2019 15:23
Install Vagrant and Virtualbox on Fedora 27

How to Install Vagrant and Virtualbox Fedora 27

Check for cpu Virtualization

lsmod | grep kvm
kvm_intel             167936  3
kvm                   499712  1 kvm_intel

Install

@gangsta
gangsta / Prometheus node_exporter Metrics Data Size and Time Count
Last active April 10, 2019 15:21
Bash Script to Fetching Node_Exporter Data Size and Time for Consuming Metrics
#!/usr/bin/env bash
set -e
bytesToHuman() {
b=${1:-0}; d=''; s=0; S=(Bytes {K,M,G,T,E,P,Y,Z}iB)
while ((b > 1024)); do
d="$(printf ".%02d" $((b % 1024 * 100 / 1024)))"
b=$((b / 1024))
let s++
done
@gangsta
gangsta / Install Vagrant Libvirt Fedora 27.md
Last active January 27, 2019 09:11
How to install Libvirt Vagrant on Fedora 27

How to Install Vagrant and Livbirt Fedora 27

Check for cpu Virtualization

lsmod | grep kvm
kvm_intel             167936  3
kvm                   499712  1 kvm_intel

Install

@gangsta
gangsta / docker.md
Last active March 20, 2018 22:26
How to Install Docker CE 17 + version Centos 7

Docker CE for Centos 7

yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce -y
systemctl start docker

Adding Docker compose

@gangsta
gangsta / Puppetagent.md
Last active December 20, 2017 16:47
Puppet agent centos 7

Install Puppet agent 4 Centos 7

yum install -y https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
yum -y install puppet-agent
/opt/puppetlabs/bin/puppet config set server foreman.domain.com --section agent
/opt/puppetlabs/bin/puppet agent -t
/opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true
@gangsta
gangsta / master.md
Last active November 22, 2017 01:13
Install Consul Server on Centos 7
echo '
#! /bin/bash


####### yum update is optional #####
#yum -y update
yum install firewalld -y
systemctl start firewalld
firewall-cmd  --add-port=8300/tcp --add-port=8301/tcp --add-port=8302/tcp --add-port=8400/tcp --add-port=8500/tcp --add-port=80/tcp --add-port=443/tcp --permanent
@gangsta
gangsta / gogs.md
Created November 15, 2017 17:12
How To Install Gogs

How To Install Gogs

First of all ,be sure that you have created user “gogs” .

sudo su - #installing gogs useradd gogs passwd gogs

After that we need to prepare database section to have local database for gogs . In our case its PostgreSql.

@gangsta
gangsta / kube Jenkins.md
Last active August 29, 2017 22:41
kube Jenkins

Execute shell script on remote host using ssh

SSH site	root@k8s.mydomain.com
Command
echo -e ""
echo -e "**************************************************************"
echo -e " Generate YAML for Kubernetes"
echo -e "**************************************************************"
echo -e ""
@gangsta
gangsta / Puppet Gogs.md
Created August 29, 2017 22:33
Gogs and Puppet with Foreman

Execute shell

Command

#!/bin/bash

echo -e ""
echo -e "************************************************************************************************"
echo -e "Parsing Puppet Environment"
echo -e "************************************************************************************************"
@gangsta
gangsta / Vagrantfile
Last active August 8, 2017 16:56 — forked from mapaiva/Vagrantfile
Vagrant file for Golang and PostgreSQL
#-*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at