Skip to content

Instantly share code, notes, and snippets.

View junaid18183's full-sized avatar

Juned Memon junaid18183

View GitHub Profile
@junaid18183
junaid18183 / AWS Swarm cluster.md
Created August 23, 2016 09:39 — forked from ghoranyi/AWS Swarm cluster.md
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.

Prerequisites

You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

@junaid18183
junaid18183 / gist:63c9faed7928a38d2375
Created March 29, 2016 09:46
Install python2.7 on Centos
yum install -y centos-release-SCL
yum install -y python27
Okay for centos 6.4 also
On apu.0xdata.loc, after this install was done
$ which python
/usr/local/bin/python
$ python -V

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know

[main]
storeconfigs = true
storeconfigs_backend = puppetdb
reports = store,puppetdb
pluginsync = true
Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no
@junaid18183
junaid18183 / apache_process_size.sh
Created April 6, 2015 10:52
Determine an average amount of memory consumed by one Apache process to define the MaxClients in prefork MPM
#Ubuntu
#ps -ylC apache2 | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'
#centos
ps -ylC httpd | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'
@junaid18183
junaid18183 / line_regex.yml
Created February 13, 2015 10:26
Ansible with Regex to change the lines
---
- name: Deploy dbserver
hosts: all
user: root
pre_tasks:
vars :
- Dest : /etc/ansible/facts.d/sojourner.fact
@junaid18183
junaid18183 / Check_MK_Agent_Solaris
Created September 10, 2014 08:32
Check_MK_Agent installation on Solaris
chmod 644 /etc/inet/services
tail -1 /etc/inet/services
check_mk 6556/tcp snmp # CheckMk
tail -1 /etc/inet/inetd.conf
check_mk stream tcp nowait root //usr/sfw/sbin/tcpd /usr/bin/check_mk_agent
inetconv
@junaid18183
junaid18183 / nagios_agent_install.sh
Created September 10, 2014 08:30
Nagios_agent_install Steps
#! /bin/bash
# Step 1 --> Nagios plugins Installation
# add Nagios User with not shell access
useradd -s /sbin/nologin nagios
echo "user Nagios Added" >> /tmp/nagios_plugin_install.log
# Create a direcory at /root/nrpe to hold the Nagios plugin and Nrpe downloads; Download the Nagios Plugins
@junaid18183
junaid18183 / jenkins_overall_jobs_stat.coffee
Last active August 29, 2015 14:06
Dashing Widget for Jenkins Overall Job's status
class Dashing.JenkinsOverallJobsStat extends Dashing.Widget
@accessor 'all_jobs', Dashing.AnimatedValue
@accessor 'failed_jobs', Dashing.AnimatedValue
@accessor 'disabled_jobs', Dashing.AnimatedValue
@accessor 'notbuilt_jobs', Dashing.AnimatedValue
@accessor 'arrow', ->
if (@get('failed_jobs') == 0 ) then 'value-up icon-caret-up' else 'icon-caret-down'
ready: ->
# This is fired when the widget is done being rendered