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 / 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 / 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 / WLPS.sh
Last active July 20, 2022 13:32
WLPS.sh
#!/bin/bash
#
#
#
BASE_DIR=`dirname $0`
SCRIPT=$0
_processinfo_()
@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 / 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 / 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
@AKSarav
AKSarav / AppStatus.py
Created March 28, 2018 16:04
WLST-AppStatus.py
connect('weblogic','weblogic1','t3://web.mwinventory.in:33011')
myapps=cmo.getAppDeployments()
print "--"*40
print " \t\t\tAPPLICATION STATUS WEBLOGIC\t\t"
print "--"*40
print " %-50s%20s" %("APPLICATION NAME","STATUS")
print "--"*40
for app in myapps:
bean=getMBean('/AppDeployments/'+app.getName()+'/Targets/')
targetsbean=bean.getTargets()
@AKSarav
AKSarav / AppStatus.py
Created March 29, 2018 06:54
AppStatus.py
connect('weblogic','weblogic1','t3://localhost:17001')
myapps=cmo.getAppDeployments()
outputbuffer=[]
outputbuffer.append("--"*40)
outputbuffer.append(" \t\t\tAPPLICATION STATUS WEBLOGIC\t\t")
outputbuffer.append("--"*40)
outputbuffer.append (" %-50s%20s" %("APPLICATION NAME","STATUS"))
outputbuffer.append("--"*40)
for app in myapps:
bean=getMBean('/AppDeployments/'+app.getName()+'/Targets/')