Import a solution from the command line

Is there a way to do this? I’ve poked around a bit and haven’t seen anything. I’m sure I could probably hack something together with curl to get this done, but it would be awfully nice if there was a native way to handle this.

I’ve been working on a way to streamline our client update process and I’ve reached a point where it can almost be just a one click launch, but what’s hold it back is not really being able to automate the solution import.

Any other ISVs out there have any tricks to smooth out the multi-target deployment process?

crickets

Really? No one?

you can POST it against the admin pages. You can even use the http plugin to do that.

The challenge is to do it using only functional programming. violin

drums wait till you see what’s on the roadmap after 6 more drums here

Jan Aleman:
you can POST it against the admin pages. You can even use the http plugin to do that.

Is this documented? Where can I find which parameters I should include in the POST-request and what to expect back?

michel:

Jan Aleman:
you can POST it against the admin pages. You can even use the http plugin to do that.

Is this documented? Where can I find which parameters I should include in the POST-request and what to expect back?

this is not a supported feature… If you want to do that you just have to analyze the solution upload/import page, and rebuild the post that is done there.
Of course this could break with a next version of Servoy.

Crafting up a solution to POST an update from inside Servoy isn’t exactly the “command line” type of solution I was looking for…like I said, if I wanted to hack around with HTTP, I’d use CURL…and as Johan has so kindly pointed out, this isn’t really a stable way to do things anyhow.

Seriously though, when you have 30 or so different servers to update when you release, little things like being able to make a script to perform the update is a BFD. It’s already kind of a pain that there is no supported way to upgrade Servoy to a specific build for when you need to update an app server to something other than the latest release, though to be fair, I’v heard that this may be changing. However, I’ve got a way to get around this, and can apply that update from the command-line. Other things that can be done via CLI include:

Turn off/on the app/db service
Update plugins
Sign/ReSign jars
SQL Scripts

So really, all that is missing from being able to be able to package up an update into a single script installer is, you know, actually being able to apply the code changes. This isn’t a really crazy request by any standard, and I’m sure any ISV that does on site installations would agree. It’s not like I’m asking for something awesome like having a built in way to deploy updates via an automatic download from a centralized server. That would just be insanity :roll:

I imagine it wouldn’t be exceedingly hard to re-purpose the code that already exists to handle getting a file from the file system instead of POST data. If that code is part of the open source I’d be happy to look at it and implement my own if someone wants to point me towards the right area.

david:
The challenge is to do it using only functional programming. violin

I thought the challenge was to get free Scotch? :wink:

jgarfield:
So really, all that is missing from being able to be able to package up an update into a single script installer is, you know, actually being able to apply the code changes. This isn’t a really crazy request by any standard, and I’m sure any ISV that does on site installations would agree. It’s not like I’m asking for something awesome like having a built in way to deploy updates via an automatic download from a centralized server. That would just be insanity :roll:

+1

For us it would not be a problem if this is done via http post-requests. But it should be both supported and documented, otherwise we could get in serious trouble when it breaks after updating Servoy.

+1 for improving scripted updates

The Servoy admin solution upload/import has been exactly the same the entire history of Servoy for what it’s worth.

jgarfield:

david:
The challenge is to do it using only functional programming. violin

I thought the challenge was to get free Scotch? :wink:

doh! :oops:

crickets again…

No Servoy reaction? (Besides we have to wait for the drums)

As Johan already mentioned the workaround for posting manually on the Admin page isn’t officially supported and Jan already mentioned to keep an eye on updates on the post 6.0 roadmap.

We’ll be providing a post 6.0 roadmap update soon.

Paul

jgarfield:
Other things that can be done via CLI include:

Turn off/on the app/db service
Update plugins
Sign/ReSign jars
SQL Scripts

So really, all that is missing from being able to be able to package up an update into a single script installer is, you know, actually being able to apply the code changes. This isn’t a really crazy request by any standard, and I’m sure any ISV that does on site installations would agree. It’s not like I’m asking for something awesome like having a built in way to deploy updates via an automatic download from a centralized server. That would just be insanity :roll:

Hi!
I am new to servoy and is tasked to create an update installer that will pretty much have the same procedure. Can you share the command lines to on/off the app/db, as well as how to update the plugins? What packager are you using?
I was also tasked to create the deployment installer using Inno Setup. What I did was package the installed application_server with the deployed solution and the bundled database engine that comes with servoy. Can you see any issues that may arise?
Looking forward to your expect advice
Thanks!

In windows the “net” command can start and stop services

net stop servicename

As far as updating plugins goes, after the service is stopped I’m just copying them into their appropriate directory via CLI move commands.

I’m not really doing anything quite as fancy as using any sort of standard package installer framework, basically just rolling my own for the moment, so I can’t really provide you with any tips in that arena…but if you make any headway, let us know!