-
Notifications
You must be signed in to change notification settings - Fork 8
Update prod
OnlineGuru is run from a user on absint, called "onlinebot". This user does not have a regular access to /bin/bash, so we have to use root to get to it.
havardsv@absint:~$ su Password: absint:/home/dotkom/havardsv# su onlinebot -
When you wish to update, you have to check for already running instances. You do this with "ps x".
PID TTY STAT TIME COMMAND 3174 ? Sl 1:33 python listbot.py 3538 ? Sl 0:02 java -Dlog4j.debug -Dlog4j.configuration=file:///local/home/sys/onlinebot/log4j.properties -jar bot/onlineguru/trunk/target/onlineguru-1.2-SNAPSH 4031 pts/11 S 0:00 su onlinebot - 4032 pts/11 S 0:00 bash - 4424 pts/11 R+ 0:00 ps x
Now enter get to onlinebot's home directory, and access the bot/ directory.
onlinebot@absint:/home/dotkom/havardsv$ cd onlinebot@absint:~$ cd bot/
In here you will find checkouts of the irclib and onlineguru. First run "git pull" while in the bot/ directory, then build the project and finally run it.
onlinebot@absint:~/bot$ git pull onlinebot@absint:~/bot$ ./build.sh onlinebot@absint:~/bot$ ./runbot.sh onlinebot@absint:~/bot$ log4j: Using URL [file:/local/home/sys/onlinebot/log4j.properties] for automatic log4j configuration. log4j: Reading configuration from URL file:/local/home/sys/onlinebot/log4j.properties log4j: Parsing for [root] with value=[trace, R]. log4j: Level token is [trace]. log4j: Category root set to TRACE log4j: Parsing appender named "R". log4j: Parsing layout options for "R". log4j: Setting property [conversionPattern] to [%d - %c - %p - %m%n]. log4j: End of parsing for "R". log4j: Setting property [maxBackupIndex] to [1]. log4j: Setting property [file] to [./logs/onlineguru.log]. log4j: Setting property [maxFileSize] to [500KB]. log4j: setFile called: ./logs/onlineguru.log, true log4j: setFile ended log4j: Parsed "R" options. log4j: Finished configuring.
This is the general feedback you get when doing it right. "build.sh" will spit out a lot of information, but the important parts are that it returns BUILD SUCCESSFUL for both irclib and onlineguru.
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------
After you have gotten "Finished configuring" from log4j, you may close the prompt.