Search the FirstSpirit Knowledge Base
Hello,
Is it possible to install FS modules to server via command line input of source path and destination path?
Like to createa jar file with command line input of source path and destination path.By executiong this command modules will be installed to different server.
Thank you
Hi Siva,
I think that the behavior is as described in the documentation.
So if you try to install an invalid module file (e.g. an invalid module descriptor) the previous installed version of the module will not be restored. I don’t have tried it yet but I would trust the documentation.
If you want to be sure just try it on your local development environment. 😉
Greetings
Sandro
Hi Siva,
you can take a look at the class "ModuleAdminAgent" of the Developer-API.
It has a method install(InputStream fsmStream, boolean updateUsages) and some other methods that should help you to accomplish your task.
Greeting
Sandro
Hi Siva,
you can extend the OpenSource FS-CLI tool to do that via ModuleAdminAgent as Sandro sugguested:
https://github.com/e-Spirit/FSDevTools
Regards,
Marian
HI Sandro,
Thank you for your reply.I have verified the interface and implemented it via simple java program.
ModuleAdminAgent adminAgent = conn.getBroker().requestSpecialist(ModuleAdminAgent.TYPE);
FileInputStream inputStream = new FileInputStream(fileLocation);
ModuleAdminAgent.ModuleResult result = adminAgent.install(inputStream, true);
String status = result.getLogMessages();
This is working fine and Services are stopped and restarted automatically.
But in the FS-Developer API there is method name called....
ModuleAdminAgent.ModuleResult install(InputStream fsmStream, boolean updateUsages)
throws IOException,
Important:
fsmStream
will be closed, automatically. The caller is not responsible for closing the stream.My Qusetion is:
Suppose if i would have created a problamatic module and installed in the Server Manager.
Now old xxxx.fsm will be deleted in the server and newly created module yyyy.fsm will be loaded.
xxxx.fsm will not be restored right???
Scenario:
One developer is deploying the module with out taking the maven update from SVN,Also another developer is working on the same module with different java file.This leads to yyyy.fsm(problamatic fsm module.)
Thank you.
Have a nice day!.
Siva
Hi Zaplatynski,
Thank you for your reply.
After analysing the tool in Git Repo....
To my understanding the tool FSDev Tool-master is used to install Store element from Source Repo(TFS,GIT,SVN anything) to first spirit system automatically by using cli inputs. Not evaluated fully.
For we have to install FS modules from (TFS,GIT,SVN anything) to our FS server automatically- for this command line arguments plain java programming should be ok for us.
Regards,
Siva
Well,
since the tool is on GitHub and free, you can extend it to your needs. So take Sandro's hint and implement a command for the tool to install a module. A CLI can be intregrated nearly anyhere (IDE, build servers, ...).
Regards
Marian
Hi Siva,
I think that the behavior is as described in the documentation.
So if you try to install an invalid module file (e.g. an invalid module descriptor) the previous installed version of the module will not be restored. I don’t have tried it yet but I would trust the documentation.
If you want to be sure just try it on your local development environment. 😉
Greetings
Sandro
Hi Sandro,
Thank you for your reply.May be i will try in my local with problamatic fsm module and verifiy the log informations.
In the above case old fsm module will not get restored.
So is there any other solution for this to over come the problem.?
Thank you.
regards,
Siva
Hello,
Alreay discussed with Mr.Vogel from e-spirit.This is the common behaviour only.
First need to test in Development machine.If it works there same will work for Quality machine and Production system.
Error occurences changes are from module.xml file and other external jar file.If Development machine cmd lline installation is succuss,then same will be happen in Quality and Production machine.
Thank you.
Regards,
Siva