I love blogging about new technology appropriate for the enterprise. I want to change the face of innovation to embrace change, agility and promote an innovation culture.
Friday, 24 May 2019
Cool SQL queries for rows and indexes
curl an orchestration with environment variables in bash
Friday, 17 May 2019
How I saved 1000s of dollars in one afternoon
I implemented a fairly basic schedule engine in AWS that works on specific tags to control when the machines are up or down. The cost of our demo kit was starting to add up, so I looked into the console (which is great) and saw that the main costs were EC2 and RDS. To fix this I followed a two prong approach:
- mandatory tagging
- schedule for shutdown
Kinda chicken or egg, because the solution I chose defined the tagging.
I basically followed the guides below:
https://docs.aws.amazon.com/solutions/latest/instance-scheduler/welcome.html
https://s3.amazonaws.com/solutions-reference/aws-instance-scheduler/latest/instance-scheduler.pdf
At Fusion5, we defined a single active Tag for schedules and a single schedule stack:
If you use the tag name ScheduleUptime on an EC2 or RDS instance, then this instance will be on a schedule – it's that simple.The fusion5 stack ID is f5sched
If you set your instance to have tag ScheduleUptime
The schedules rely on 2 building blocks, periods and schedules.
A period defines the hour day of starting and stopping, kinda like cron. The schedule uses the period, but has more controls around the behaviour of the EC2 instance when there is an issue (and importantly uses TZ).
- NZ-office-hours
- AU-office-hours
- AU-7till7
- NZ-7till7
I think that you can work out what they actually mean!
1.3 Periods:
root@localhost ~]# scheduler-cli create-period --begintime 07:00 --description "7 till 7 baby" --endtime 19:00 --weekdays 0-4 --name 7till7Mon2Fri -s f5sched
{
"Period": {
"Description": "7 till 7 baby",
"Weekdays": [
"0-4"
],
"Begintime": "07:00",
"Endtime": "19:00",
"Type": "period",
"Name": "7till7Mon2Fri"
}
}
1.4 Schedules:
[root@localhost ~]# scheduler-cli create-schedule -s f5sched --description "Shannon TEsting 9 to 5" --timezone "Australia/Melbourne" --name AU-office-hours --periods "office-hours"
{
"Schedule": {
"RetainRunning": false,
"Enforced": false,
"Description": "Shannon TEsting 9 to 5",
"StopNewInstances": true,
"Periods": [
"office-hours"
],
"Timezone": "Australia/Melbourne",
"Type": "schedule",
"Name": "AU-office-hours"
}
}
1.5 Viewing schedules and periods
1.5.1 Command line
Install the command line
wget https://s3.amazonaws.com/solutions-reference/aws-instance-scheduler/latest/scheduler-cli.zip
python setup.py install
then you can use this, but of course you need aws command line first (https://shannonscncjdeblog.blogspot.com/2017/06/move-tb-from-nz-to-aus-via-s3-bucket-of.html)
DynamoDB
There are two tables in DynamoDB
The top one is the only one to worry about (they are not really tables either)
Basically everything is saved as JSON document:
{
"begintime": {
"S": "07:00"
},
"description": {
"S": "7 till 7 baby"
},
"endtime": {
"S": "19:00"
},
"name": {
"S": "7till7Mon2Fri"
},
"type": {
"S": "period"
},
"weekdays": {
"SS": [
"0-4"
]
}
}
Friday, 3 May 2019
More JDE scheduler frustrations
JDE scheduler BULK password change with LDAP enabled
Thursday, 2 May 2019
cheats guide to JDE and weblogic (in general) timeouts
Find where agent runs:
[oracle@jdepp1 SCFHA]$ ps -ef |grep java | grep -i scfagent
jde920 2554 1 0 Apr12 ? 00:08:38 /jde_home_32/SCFHA/jdk/jre/bin/java -classpath /jde_home_32/SCFHA /lib/scfagent.jar com.jdedwards.mgmt.agent.Launcher
oracle 31900 1 0 Apr26 ? 00:03:03 /jde_home/SCFHA/jdk/jre/bin/java -classpath /jde_home/SCFHA/lib/scfagent.jar com.jdedwards.mgmt.agent.Launcher
Easy, now find the relevant web.xml file:
Find /jde_home_32/SCFHA -name web.xml -print
[oracle@jdepp1 SCFHA]$ find /jde_home/SCFHA -name web.xml -print
/jde_home/SCFHA/targets/WEB_PP_JDEPP1/owl_deployment/webclient.ear/app/webclient.war/WEB-INF/web.xml
Back it up, then edit (vi) it
In the file, Find /web-app
...
"targets/WEB_PP_JDEPP1/owl_deployment/webclient.ear/app/webclient.war/WEB-INF/web.xml" line 976 of 976 --100%-- col 3
Add this before
The results look like this
...
The number 10,800,000 is for 3 hours
Do same for web.xml under user_projects
Ps -ef |grep
[oracle@jdepp1 SCFHA]$ ps -ef |grep java |grep WEB_PP_JDEPP1 | awk -F"-DINSTANCE_HOME=" '{print $2}' | awk '{print $1}'
/Oracle_Home/user_projects/domains/e1apps
Then same find
Nerdy use of flea to find the next web.xml
[oracle@jdepp1 SCFHA]$ find `ps -ef |grep java |grep WEB_PP_JDEPP1 | awk -F"-DINSTANCE_HOME=" '{print $2}' | awk '{print $1}'` -name web.xml |grep stage |grep WEB_PP
/Oracle_Home/user_projects/domains/e1apps/servers/WEB_PP_JDEPP1/stage/WEB_PP_JDEPP1/app/webclient.war/WEB-INF/web.xml
Vi that and fix it too
Finally JAS.INI
User session cache timeout
3,600,000 for 1 hour
Minutes to ms -> https://www.calculateme.com/time/minutes/to-milliseconds/
In my case 10,800,000
Bounce and done!
-
There are a heap of instructions of what you need to change if you change the IP address of your weblogic server, but I find they are not co...
-
They have been around for quite some time, but it's nice to have a refresher on these types of things. 8.12 and 9.0 have have started...
-
I’m running windows 7 virtual on OVM with office 2010. Have E1 fat boy and oracle 11G client. I’m using this machine for some BIP prototyp...