Alex S.'s picture

Hello everyone!

A few days ago, searching for Mayan-EDMS instances, I came across this site and was quite intrigued. Since the VM has a PostgreSQL backend instead of the usual SQLite one, I thought I found what I was searching for.

My goal is to have an instance of Mayan-EDMS with all its features and to develop inside of it. I was running the latest version of Mayan on a VM, just running the project I got from GitLab, which made it possible to "develop", but for some reason the upload wasnt working (already before I "added new features"). Since this is quite a big deal, I wasnt able to continue like that.

What I am asking now is, does anbody know, how I can get a GUI for my Turnkey Mayan VM or be able to develop new features using your VM. I cannot work with the already deployed app, since I really need to see the project and would have to start/stop it manually.

Thanks in advance, I appreciate any ideas,

Alex

Forum: 
Tags: 
Jeremy Davis's picture

I'm a commandline guy and use vim for development, so my question would be why would you want to install a GUI, when there's a perfectly good CLI?! ;)

Having said that, I would recommend installing full/proper vim if you plan on using that. FYI our servers ship with vim-tiny which is fine for simple text editing, but IMO the code highlighting (and support for plugins) is well worth the few MB that the full vim offers. Do that like this:

apt update
apt install vim

But if you prefer a UI, then there are a couple of options.

The first would be to use your current GUI and connect to your VM. AFAIK, most IDEs these days support SSH. Assuming your IDE of preference does support that, simply configure SSH and do your development (in your VM) from your main OS?! Even if your IDE doesn't support SSH, then you could use an SFTP client (e.g. Filezilla) to mirror the relevant files to your local OS. It's been ages since I developed via a non-CLI environment, but IIRC it can be configured to auto sync. The only other consideration there is that you need to be sure not to edit any of the files in Notepad! (If you are using Windows, then editing Linux files within most Windows specific tools, will stop them working on Linux).

The other option would be installing a GUI as you asked. Under the hood, TurnKey is Debian, so you could install a window manager, or even a full desktop environment if you really wanted.

It's not really something I would recommend for a few reasons. The main one is that I anticipate that it will a bit of effort to set up (TurnKey is after all designed to work as a headless server; not a desktop!). There are lots of things that you'll need to consider, such as user accounts and how they will interact with both the desktop and Mayan (you should never run a GUI as root, but as a limited user, you won't have write access to Mayan - if you change the permissions of Mayan, it may not run properly, etc...).

Your server will also need much more RAM and CPU resources that a headless server. Mayan-EDMS is already a fairly resource intensive app, so I would expect it to significantly drag on your hosts resources. If you have a modern PC with good hardware specs (or are running the VM on a different host that has tons of resources) then it may be fine, but it's good to be aware of. You can find more info about different GUI environments on Debian on the wiki.

I hope that's of some value to you? If you have further questions, or need clarification, please ask. Also, I'd be interested to hear which path you choose and how you go with it all.

Alex S.'s picture

Well, that should do the job. Thanks a lot for taking the time answering my question(s)!

Jeremy Davis's picture

You're most welcome. Please post back if you have any troubles implementing your plan (and/or any other TurnKey Linux questions/issues).

Good luck! :)

Alex S.'s picture

So since you implemented PostgreSQL as your backend for Mayan-EDMS, I was wondering on how you did that. I cant find anything up-to-date online and am not able to do it without guidance at my current point of knowledge.

Would you mind on explaining me how I can achieve a PostgreSQL backend when I am starting from a clean Mayan-EDMS GitLab Clone?

 

I hope thats not too much to ask for.

Thanks in advance,

Alex

Jeremy Davis's picture

If you have a look at the Mayan-EDMS build code then you can see exactly what we've done! :)

The conf.d/main script is essentially the "install script". Although the buildcode probably won't work in isolation. It's designed to be built using our TKLDev appliance - our "build tool in a box". If you want a better understanding of what is going on (and what all the different files are/mean/do), then please have a look at the TKLDev docs - namely the "source code walkthrough".

I hope that helps?! If there is any detail you don't understand, please ask.

Alex S.'s picture

but it seems like the whole TurnKey solution is too advanced for me. My coding knowledge especially working thus deeply with VirtualMachines is not really existent. Is there any way to simply implement the changes you made in the "Mayan-EDMS build code" (especially Pgsql backend/frontend) to a freshly cloned GitLab Mayan Project? My dream would be to clone the official mayan project, implement your changes (somehow I guess?) and run the usual commands like "python manage.py initialsetup/runserver" and have the instance running on my host with Pgsql frontend backend. Is there any way I could get that to work? Like very simply?

 

Thanks in advance and sorry for the inconvenience

Jeremy Davis's picture

Firstly, it's worth noting that most of our build code hasn't been updated (because it hasn't needed it) for over a year. So I'm not sure how "out of date" you mean?

As for using Postgres as a DB backend, IIRC the DB definition is the important part. We write all our config to a specific file so it's easier to load that config (e.g. like this line).

Having said that, we aren't doing anything special re use of Postgres. We essentially just followed the install docs (which use Postgres by default). Perhaps you missed those docs?

Good luck!

Add new comment