Skip to content

Instantly share code, notes, and snippets.

View AKSarav's full-sized avatar
🎯
Focusing

AK Sarav AKSarav

🎯
Focusing
View GitHub Profile
@AKSarav
AKSarav / wlsrestcli.py
Created March 18, 2018 05:50
weblogic REST ful CLI interface
#!/usr/bin/python
#
#
import os
import sys
import getpass
import time
import base64
import subprocess
import re
@AKSarav
AKSarav / Kubectl Diff Env variables
Created November 7, 2022 09:02
Kubectl Diff Env variables
diff <(kubectl get deployments deployment1 -n ns1 -o jsonpath='{range .spec.template.spec.containers[*].env[*]}{@.name}{"\n"}{end}'|sort) <(kubectl get deployments deployment2 -n ns2 -o jsonpath='{range .spec.template.spec.containers[*].env[*]}{@.name}{"\n"}{end}'|sort)
@AKSarav
AKSarav / WLPS.sh
Last active July 20, 2022 13:32
WLPS.sh
#!/bin/bash
#
#
#
BASE_DIR=`dirname $0`
SCRIPT=$0
_processinfo_()
@AKSarav
AKSarav / store.properties
Created December 29, 2017 20:58
store.properties
# set default flag to ON
# if you want to save the config & keyfile in default location
defaultflag=ON
username=weblogic
password=weblogic1
adminurl=t3://localhost:17001
# If the default flag is ON following variables will not be used
configfile=/tmp/mwidomain_configfile.secure
keyfile=/tmp/mwidomain_keyfile.secure
@AKSarav
AKSarav / storeuserconfig_v2.py
Created December 29, 2017 20:56
storeuserconfig_v2.py ( The Second One)
import sys
import os
import re
from os.path import exists
from sys import argv
def conn():
connect(USERNAME, PASSWORD, ADMINURL)
@AKSarav
AKSarav / storeuserconfig.py
Created December 29, 2017 20:55
storeuserconfig.py (The First One)
import time
import getopt
import sys
import re
def conn():
connect(USERNAME, PASSWORD, ADMINURL)
def usage():
toprint = '''
@AKSarav
AKSarav / WeblogicREST-Examples
Created March 17, 2018 23:30
DeploymentTasks-WeblogicREST
deploy an application
---------------------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
name: 'mwiapp',
applicationPath : '/apps/oracle-weblogic/applications/mwiapp.war',
targets: ['mwiCluster1'],
@AKSarav
AKSarav / WLS-TMPCACHELOGS-PURGE.sh
Last active July 20, 2022 13:12
WLS-TMPCACHELOGS-PURGE.sh
#!/bin/bash
# Name : WLS-TMPCACHELOGS-PURGE.sh
# Author : SaravAK
# Date : 4-21-2017
## DECLARATION SECTION
if [ "$(whoami)" != "weblogic" ]; then
echo "Script must be run as user: weblogic"
@AKSarav
AKSarav / Nodemanager
Last active July 20, 2022 13:10
NodeManager Startup Script
#!/bin/sh
#
# NodeManager Start/Stop NM
#
#
# chkconfig: 35 99 01
# description: Script for Starting/Stopping Admin Server
# source function library
. /etc/rc.d/init.d/functions
@AKSarav
AKSarav / SecureCLI-Curl.py
Last active July 20, 2022 13:06
SecureCLI-Curl.py
#!/usr/bin/python
#
#
# Author: aksarav@mwinventory.in
# Name: SecureCLI-Curl.py
# Date: 27-March-2018
#
#
import os
import sys