Can we install plugin without firing gremlin console ?

17 views
Skip to first unread message

Prashanth Reddy

unread,
Apr 17, 2018, 12:50:50 PM4/17/18
to Gremlin-users

Can we install plugin without firing gremlin console ?

In other words.. i would like to automate plugin installation instead of manually typing :install and things like that..


I have asked same question at https://issues.apache.org/jira/browse/TINKERPOP-1938?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel


but that answer it little confusing to me.. haven't tried groovy before :(


i tried created a init.groovy script


init.groovy

-------------

:plugin list


and tried running this as

> bin/gremlin.sh -e init.groovy  but it dint do anything..


Could you please help me with this issue..

Prashanth Reddy

unread,
Apr 17, 2018, 12:56:48 PM4/17/18
to Gremlin-users
I have tried below in init.groovy but it dint work too :(

":plugin list".execute()

Stephen Mallette

unread,
Apr 17, 2018, 1:02:28 PM4/17/18
to Gremlin-users
-e won't show any output except that which is sent to println, so for a script that just has 

:plugin list

i think it is expected that you did not see anything. I still don't understand what it is you want to automate since the plugin commands only need to be executed once and then the console is always ready with those installed/activated plugins. Can you clarify what you are trying to do?


--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/93835782-68f7-4f03-9df7-07bd0cd30431%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Prashanth Reddy

unread,
Apr 17, 2018, 1:04:51 PM4/17/18
to Gremlin-users
Thanks Stephen. 

I'm trying to create a template which would automate all the stuff.. like creates a spark cluster and than installs spark-gremlin module..

At the end user would have environment ready for him instead of all my users trying to run that command


On Tuesday, April 17, 2018 at 12:02:28 PM UTC-5, Stephen Mallette wrote:
-e won't show any output except that which is sent to println, so for a script that just has 

:plugin list

i think it is expected that you did not see anything. I still don't understand what it is you want to automate since the plugin commands only need to be executed once and then the console is always ready with those installed/activated plugins. Can you clarify what you are trying to do?

On Tue, Apr 17, 2018 at 12:56 PM, Prashanth Reddy <firestor...@gmail.com> wrote:
I have tried below in init.groovy but it dint work too :(

":plugin list".execute()



On Tuesday, April 17, 2018 at 11:50:50 AM UTC-5, Prashanth Reddy wrote:

Can we install plugin without firing gremlin console ?

In other words.. i would like to automate plugin installation instead of manually typing :install and things like that..


I have asked same question at https://issues.apache.org/jira/browse/TINKERPOP-1938?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel


but that answer it little confusing to me.. haven't tried groovy before :(


i tried created a init.groovy script


init.groovy

-------------

:plugin list


and tried running this as

> bin/gremlin.sh -e init.groovy  but it dint do anything..


Could you please help me with this issue..

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Stephen Mallette

unread,
Apr 17, 2018, 1:08:04 PM4/17/18
to Gremlin-users
I think you're automation just needs to then use -e then. Have the init.groovy include:

:install org.apache.tinkerpop hadoop-gremlin 3.3.2
:install org.apache.tinkerpop spark-gremlin 3.3.2
:plugin use tinkerpop.hadoop
:plugin use tinkerpop.spark

and from your automation just do:

bin/gremlin.sh -e init.groovy

Next time your user starts the console, it should be ready to go with access to spark...is there some problem with that approach?

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/b7d442bc-51fc-4d54-9677-293737921577%40googlegroups.com.

Prashanth Reddy

unread,
Apr 17, 2018, 1:18:08 PM4/17/18
to Gremlin-users
Perfect. It worked... Thanks for help Stephen..

Any way we could get logs of that install command if something goes wrong :)
Reply all
Reply to author
Forward
0 new messages