Firefly-1980: firefly standalone installation#1962
Conversation
78a2cfa to
c46648e
Compare
c46648e to
5a6913f
Compare
loitly
left a comment
There was a problem hiding this comment.
It looks good. Definitely good enough for phase 1. Below are my feedbacks.
Instead of a new standalone directory under firefly repo root, have you considered moving these scripts into the existing bin directory?
Rather than remoteInstall.sh, maybe call it get-firefly.
Instead of “create an install directory,” install.sh should prompt for an installation location, defaulting to the current directory.
I would move startFirefly into the firefly/bin directory. There will likely be additional scripts added later, and we could either add this directory to the user’s PATH automatically or instruct the user to do so during installation.
I’d also think about how to organize the files under ~/.firefly. Maybe place them under a config directory so files are not hanging directly off .firefly.
loitly
left a comment
There was a problem hiding this comment.
Even though this is already in the firefly repo, we still prefix it with “firefly” everywhere. Perhaps instead of “src/firefly_standalone”, it should simply be “standalone” or “application”.
| // tomcat for standalone | ||
| implementation 'org.apache.tomcat.embed:tomcat-embed-core:11.0.21' | ||
| implementation 'org.apache.tomcat.embed:tomcat-embed-websocket:11.0.21' | ||
| implementation 'org.apache.tomcat.embed:tomcat-embed-jasper:11.0.21' | ||
|
|
There was a problem hiding this comment.
Is this still necessary when firefly_standalone dependencies are already defined?
|
@loitly |
sure
good idea
many install scripts no longer prompt. they go for simple. For example install java.
yea, I suppose, I was not quite sure where to put it. I wanted a script that the user could copy to other places. If it is in the bin I guess the install script needs to make a clear message to the user.
I experimented with stuff like that. After that, I purposely tried to make it more shallow I am not sure of the point of making it deeper. |
|
One more suggestion: Here’s an example of how you can use it: firefly start [-d]
firefly stop
firefly status
firefly logs [-f]This script can be extended to include additional functionalities, such as loading a file: firefly load <file-name>The purpose of these user-facing suggestions, including the directory organization, is to future-proof the tool. |
jaladh-singhal
left a comment
There was a problem hiding this comment.
This is looking really good. The commands were easy to follow after seeing help. The firefly menu in the topmost tray is helpful.
- Upload and IRSA image search are working fine but the searches that go through job monitor aren't working for me. In the logs, I see the following two errors after POSTing a TAP, SIA or IRSA catalogs query:
java.lang.NullPointerException: Cannot invoke "edu.caltech.ipac.firefly.core.background.JobInfo.getMeta()" because "info" is null
io.lettuce.core.RedisCommandExecutionException: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
-
It will be nice if you can add an option
--port, -pto start to override port.txt. I find editing file an extra step/ -
The multi-port deployment needs more thought. I started one firefly server at 8888 with
ff start -dand then changed the port.txt to 8889 and started another one. The state of these two servers are independent - I tired doing different searches in each url - so that's good. Now when I didff stopit successfully shut downned the recent one which was 8999. Then I didff stopagain but it fails withline 32: kill: (84074) - No such process. These multi-port issues are probably out-of-scope for this pass and we can just prevent starting firefly server at more than one port by checking if it's already running.
(I didn't really do a proper code review but skimmed it and nothing jumps out)
| echo | ||
| echo ">>>>>>>>>>>>>>>>>>>>>> ${binDir#$PWD/}/ff start" | ||
| echo | ||
| echo "You might want to add the bin dir to your path: $binDir" |
There was a problem hiding this comment.
To make it clear that we're talking about PATH env var:
| echo "You might want to add the bin dir to your path: $binDir" | |
| echo "You might want to add the bin dir to your PATH: $binDir" |
|
|
||
| if isTrue $inBackground; then | ||
| (cd "$applicationDir" && ${JAVA} ${splash} "${nameParam}" ${PROPS} edu.caltech.ipac.app.FireflyApplication &> "${fireflyServer}/logs/backgroundStart.log" &) | ||
| echo "Firefly server starting in background (is takes a few seconds)..." |
There was a problem hiding this comment.
| echo "Firefly server starting in background (is takes a few seconds)..." | |
| echo "Firefly server starting in background (it takes a few seconds)..." |
| @@ -0,0 +1,184 @@ | |||
| #!/bin/bash | |||
|
|
|||
| SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | |||
There was a problem hiding this comment.
I think this script should also check if the port is available before starting firefly server.
Before executing start command, I had a jupyter server running (it also uses 8888) and the start command succeeded with Firefly ready: use URL: http://localhost:8888/firefly/ but going to this url showed me:
The start command should have given port not free error along with instructions to change port.
| echo "stop the firefly server" | ||
| else | ||
| pid=$(cat "$fireflyDir/pid.txt"); | ||
| kill "$pid" |
There was a problem hiding this comment.
It might be worth echoing a message (if the process kill was successful) that "Firefly server at <url> stopped". It gives no feedback esp if you started Firefly server with ff start -d
Firefly-1980: create a user installable standalone firefly
Testing
curl -L https://raw.githubusercontent.com/Caltech-IPAC/firefly/refs/heads/FIREFLY-1980-standalone/bin/get-firefly | bashfirefly/bin/ff startfirefly/bin/ffInformation
~/.firefly/serverfirefly.logandapplication.log~/.firefly/user_ops.shTodo