Skip to content

Instantly share code, notes, and snippets.

View amitthk's full-sized avatar
💭
Kubernetes, Spark, Hive, spark.ml, Python

Amit Thakur amitthk

💭
Kubernetes, Spark, Hive, spark.ml, Python
  • DBS
  • Singapore
View GitHub Profile
@amitthk
amitthk / main.yml
Last active January 21, 2022 21:08
ansible docker_container playbook with postgresql springboot nginx
---
- hosts: localhost
connection: local
become: true
gather_facts: true
vars_files:
- settings.yaml
vars:
proj_name: "devopscicd"
nginx_host: "devopscicd.xyz.com"
@amitthk
amitthk / docker.compose.yaml
Created September 4, 2017 11:16
docker compose for postgresql + springboot rest api
version: '2.0'
services:
postresql_db:
build:
context: ./ansible/dev/docker/postgresql/
volumes:
- ./ansible/dev/docker/postgresql/db:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
@amitthk
amitthk / jenkins cannot connect to docker daemon.md
Last active February 25, 2023 07:56
jenkins cannot connect to docker daemon fix

** Make sure jenkin is in docker group **

sudo sudo usermod -aG docker $USER
sudo usermod -aG docker jenkins

** Update the docker.service **

Edit the following file : vi /usr/lib/systemd/system/docker.service

@amitthk
amitthk / jenkinsfile.md
Last active January 21, 2022 21:10
jenkinsfile input
stage 'promotion'
def userInput = input(
 id: 'userInput', message: 'Let\'s promote?', parameters: [
 [$class: 'TextParameterDefinition', defaultValue: 'uat', description: 'Environment', name: 'env'],
 [$class: 'TextParameterDefinition', defaultValue: 'uat1', description: 'Target', name: 'target']
])
echo ("Env: "+userInput['env'])
echo ("Target: "+userInput['target'])
node_version:=$(shell node -v)
npm_version:=$(shell npm -v)
timeStamp:=$(shell date +%Y%m%d%H%M%S)
.PHONY: install build archive test clean
show:
@ echo Timestamp: "$(timeStamp)"
@ echo Node Version: $(node_version)
@amitthk
amitthk / hrchime.py
Last active February 10, 2017 04:25
#This is a simple Hourly Chime/Clock app in python - useful for creatin hourly time
#reminder in raspberry pi or PC(cygwin). This should speak out system time
#rounded off to next 5 minutes. The sounds are to be placed in /sounds/ folder and should be named
#1.mp3, 2.mp3..... 12.mp3, the_time_now_is.mp3 etc accordingly. Can be recorded from Google Text to Speech
import time
import string
from sys import argv
from os import path
from pygame import mixer
@amitthk
amitthk / docker-compose.yml
Created November 22, 2016 05:30
redmine-mysql-docker-compose
mysql:
image: mysql:latest
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=redmine_production
redmine:
image: redmine:latest
links:
- mysql:mysql
ports:
<html>
<head>
<title>Hello world</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<style type="text/css">
.main_content,.rhs_nav{
border:solid 1px #ccc;
}
</style>