Skip to content

Instantly share code, notes, and snippets.

View junaid18183's full-sized avatar

Juned Memon junaid18183

View GitHub Profile
[main]
storeconfigs = true
storeconfigs_backend = puppetdb
reports = store,puppetdb
pluginsync = true

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

@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
@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.

yum install epel-release
cd /etc/yum.repos.d/
wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo
yum install httpd24*
@junaid18183
junaid18183 / dashing.tf
Created September 28, 2016 11:41
This is the terraform template to use with docker provider, covers ports and volumes + tested on boo2docker + make sure you copy the certs to cert path
# Configure the Docker provider
provider "docker" {
host = "tcp://192.168.99.100:2376/"
cert_path = "/vagrant/docker-certs"
}
# Create a container
resource "docker_container" "dashing" {
image = "${docker_image.dashing.latest}"
name = "dashing"
@junaid18183
junaid18183 / git_submodules.md
Created November 17, 2016 12:57 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@junaid18183
junaid18183 / gist:1997537207891dea1821056b40bfc37c
Created November 25, 2016 06:26 — forked from elijahchancey/gist:98a40f5b033ac3b61f7c
Relaying mail through AWS SES | Chef + Postfix Cookbook + Sasl
HOWTO: Use the Postfix Chef Cookbook to have your EC2 server relay all mail through AWS SES.
node.default['postfix']['mailtype'] = "master"
node.override['postfix']['main']['relayhost'] = "[email-smtp.us-west-2.amazonaws.com]:25"
node.default['postfix']['main']['smtp_sasl_auth_enable'] = "yes"
node.default['postfix']['main']['smtp_sasl_password_maps'] = "hash:/etc/postfix/sasl_passwd"
node.default['postfix']['main']['smtp_sasl_security_options'] = "noanonymous"
node.default['postfix']['main']['smtpd_use_tls'] = "yes"
node.default['postfix']['main']['mynetworks'] = "42.42.42.0/24, 127.0.0.1/32"
node.default['postfix']['main']['mydomain'] = "solongandthanksforallthefi.sh"
@junaid18183
junaid18183 / Readme.md
Created January 4, 2017 11:12
Terraform custom Provider Template

This is a template to be used to create the dummy Terraform provider. For the example purpose I am using check_mk provider , the complete code for that can be found here - https://github.com/reancloud/terraform-provider-checkmk

Since this dummy check_mk provider has single resource named host, you have resource_host.go. Ideally you have to create a file named resource_.go for each resource your provider support

This dummy check_mk provider will work as {code} provider "checkmk" { user = "autouser" password = "UPFKWAJJDPJWTOQMOWHY"

@junaid18183
junaid18183 / Readme.md
Created January 12, 2017 14:57
Kubernetes API Example Usage

Copied from : kubernetes/kubernetes#17404

The API docs don't have a great on-ramp for explaining how to use the API directly. We have some example docs from the DCOS docs, that don't really belong there. I'd like to donate them to the k8s API docs, but I'm not sure where to put them. Any ideas where these would go?

Unfortunately, it somewhat overlaps with the walkthrough 101 page, but the rest API bits don't really belong there...

Create a Kubernetes Pod Definition

A pod is one or more containers that are co-located on the same host. In this example we’re creating a pod which runs nginx.