Skip to content

Instantly share code, notes, and snippets.

View MeenachiSundaram's full-sized avatar

MeenachiSundaram V MeenachiSundaram

View GitHub Profile
@MeenachiSundaram
MeenachiSundaram / deploy.rb
Created January 7, 2017 10:18
chef training Jan 07 - Nano Project - deploying a facebooc application
package ['make', 'sqlite3', 'libsqlite3-dev', 'git']
git '/opt/facebooc' do
repository 'https://github.com/schoolofdevops/facebooc.git'
revision 'master'
action :sync
end
execute 'make facebooc' do
cwd '/opt/facebooc'
@MeenachiSundaram
MeenachiSundaram / default
Created January 7, 2017 11:08
nginx port configuration file - "nginx/sites-enabled/default"
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
@MeenachiSundaram
MeenachiSundaram / docker-chef
Created January 17, 2017 05:46
chef setup for docker
version: '2'
networks:
chef:
driver: bridge
services:
ws:
image: schoolofdevops/chef-controller:v1.2.0
ports:
@MeenachiSundaram
MeenachiSundaram / docker-rhel.sh
Last active January 17, 2017 08:14
docker installation in rhel
#!/usr/bin/env bash
set -eux
# Sample custom configuration script - add your own commands here
# to add some additional commands for your environment
#
# For example:
# yum install -y curl wget git tmux firefox xvfb
echo "Installing Updates"
@MeenachiSundaram
MeenachiSundaram / chef-docker.sh
Last active January 17, 2017 08:18
docker chef codebox pull and setup
#!/usr/bin/env bash
set -eux
mkdir /codespace
cd /codespace && https://gist.githubusercontent.com/MeenachiSundaram/4daf6793b812d24aec2cfe86dc947df1/raw/4a78be1a5eae13980ed7e51adbd308302e786339/docker-rhel.sh
cd /codespace && chmod +x docker-rhel.sh
@MeenachiSundaram
MeenachiSundaram / docker-compose.yml
Last active June 13, 2017 04:48
chef-ci akurath
version: '2'
networks:
chef:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.0.101.0/24
services:
ws:
@MeenachiSundaram
MeenachiSundaram / docker.sh
Created April 24, 2017 12:36
docker installation in ubuntu
#!/usr/bin/env bash
set -eux
sudo apt-get update
sudo apt-get install \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual -y
#!/usr/bin/env bash
set -eux
cd /tmp
wget https://gist.githubusercontent.com/MeenachiSundaram/697b7abacf332e331e7cc152017e601b/raw/1a732b1d934841fb240d84e013b5dc0b0d2af915/docker.sh
chmod +x docker.sh
#!/bin/bash
knife cookbook bulk delete '.*' -p -y
knife client list | grep -vE "*validator" | xargs -n 1 knife client delete -y
knife node list | xargs -n 1 knife node delete -y
knife role list | xargs -n 1 knife role delete -y
knife environment list | grep -vE "_default" | xargs -n 1 knife environment delete -y
knife data bag list | xargs -n 1 knife data bag delete -y
#!/bin/sh
# change file name containing space to _
for file in *
do
mv "$file" `echo $file | tr ' ' '_'`
done
# lowerit