Skip to content

Instantly share code, notes, and snippets.

View vikaschenny's full-sized avatar
😊
I may be slow to respond.

chennaiah vikaschenny

😊
I may be slow to respond.
View GitHub Profile
#bootstrap chef client on workstation
unix> curl -L https://www.opscode.com/chef/install.sh | bash
1047 knife bootstrap chefnode -x root -P qwerty --verbose
1048 knife ssl check
1049 vi /etc/hosts
1050 knife ssl check
1051 knife ssl check
1052 knife ssl check
@vikaschenny
vikaschenny / Vagrantfile
Created March 25, 2017 09:32 — forked from RainerBlessing/Vagrantfile
vagrant, ubuntu 14.04, jenkins, nexus
# -*- 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
@vikaschenny
vikaschenny / AllowChangePassword.json
Created April 11, 2017 15:04 — forked from rberger/AllowChangePassword.json
Additional iam policies to allow power users to update their console password and 2FA
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowUsersAllActionsForCredentials",
"Effect": "Allow",
"Action": [
"iam:*LoginProfile",
"iam:*AccessKey*",
"iam:*SigningCertificate*"
@vikaschenny
vikaschenny / setup-mysql57-ubuntu16.sh
Created May 21, 2017 18:28 — forked from sheikhwaqas/setup-mysql57-ubuntu16.sh
Install MySQL Server 5.7 on Ubuntu 16.04 LTS
###############################################################################
# Install MySQL Server 5.7 on Ubuntu 16.04 LTS
###############################################################################
# Download and Install the Latest Updates for the OS
apt update && apt upgrade -y
# Install MySQL Server in a Non-Interactive mode. Default root password will be "root"
echo "mysql-server-5.7 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mysql-server-5.7 mysql-server/root_password_again password root" | sudo debconf-set-selections
@vikaschenny
vikaschenny / mongodb-s3-backup.sh
Created May 23, 2017 05:18 — forked from eladnava/mongodb-s3-backup.sh
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.04 LTS)
#!/bin/sh
# Make sure to:
# 1) Name this file `backup.sh` and place it in /home/ubuntu
# 2) Run sudo apt-get install awscli to install the AWSCLI
# 3) Run aws configure (enter s3-authorized IAM user and specify region)
# 4) Fill in DB host + name
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket)
# 6) Run chmod +x backup.sh
# 7) Test it out via ./backup.sh
@vikaschenny
vikaschenny / Dockerfile
Created July 20, 2017 08:48 — forked from ju2wheels/Dockerfile
Docker Dockerfile reference template
# Last updated: 08/24/2916
#
# Total instructions available: 18
#
# https://docs.docker.com/engine/reference/builder/
#
# You can use a .dockerignore file in the same context directory as
# your Dockerfile to ignore files in the context before sending them
# to the Docker daemon for building to speed up building.
@vikaschenny
vikaschenny / scala_sbt_instalation.txt
Created November 9, 2017 07:56 — forked from Frozenfire92/gist:3627e38dc47ca581d6d024c14c1cf4a9
Install Scala and SBT using apt-get on Ubuntu 16.04 or any Debian derivative using apt-get
## Java
sudo apt-get update
sudo apt-get install default-jdk
## Scala
sudo apt-get remove scala-library scala
sudo wget http://scala-lang.org/files/archive/scala-2.12.1.deb
sudo dpkg -i scala-2.12.1.deb
sudo apt-get update
sudo apt-get install scala
@vikaschenny
vikaschenny / install-scala-sbt-and-java-on-ubuntu.md
Last active November 9, 2017 09:07 — forked from alexislucena/install-scala-sbt-and-java-on-ubuntu.md
Ubuntu: Install Scala, SBT and Java on Ubuntu 16.04

Install Scala 2.11.8

$ sudo apt-get remove scala-library scala
$ sudo wget www.scala-lang.org/files/archive/scala-2.11.8.deb
$ sudo dpkg -i scala-2.11.8.deb

Check Scala version

$ scala -version
@vikaschenny
vikaschenny / mysql_secure.sh
Created December 4, 2017 12:50 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10