Essential Open Source - Server Install on Linux

Post Reply
john.nordien
Posts: 56
Joined: 17 Sep 2019, 14:50
Location: Winnipeg, Manitoba, CANADA
Contact:

Hello
I have proto-typed a server install using Linux Mint Debian Edition. It seems to work fine but I had to perform some workarounds regarding Java.
Anyway, it seems that all the documentation regarding installation of Protege and Essential AM assumes that the "server" will have a GUI.
How can you install Protege and EssentialAM on a true headless server such as Fedora Server 30/31?

Cheers,
John Nordien.
jan.mlynar
Posts: 9
Joined: 08 Jan 2020, 09:34

Hi,
since Protege is a UI, you have to install it either to some remote desktop (Win - terminal server, Citrix, x-term, ...) or to your own desktop.

Jan
JohnWhite
Posts: 24
Joined: 01 May 2020, 03:06

Hi John,

So you will find some custom docker images in various repos (github etc.) They no longer work out of the box due to where and how the team package up the releases now. However, it gives you insight into how to driver the protege and the widgets installers without the UI - so it can be done. I did kinda get my own docker image running using these as a basis, but i hadn't used docker before so I ended up getting the layering messed up, so certain files couldn't be referenced etc. (see below - note the maintainer email you should be able to find his original docker image )

I actually think a simple bash script can work to download and install from scratch.

For our work dev server i'm currently running on windows server and sql server so didn't have an issue with the UI, however, I'm looking to move this to linux and a different db tech to save some money in azure :-)

My half working docker: I was getting clever with the downloads etc to always get the latest, that was working, and most of the install. you'll need the other files in the original maintainers github repo (or wherever) to get it to work.

FROM tomcat:8-alpine
LABEL LABEL maintainer="[email protected]"

#Ports
EXPOSE 5200 5100

#ENV
ENV CODEBASE_URL file:/root/Protege_3.5/protege.jar

# Install some tools
RUN apk update \
&& apk add ca-certificates wget graphviz \
&& update-ca-certificates

# Get the latest version file names
RUN wget -q https://www.enterprise-architecture.org/os_download.php -O - | grep -o -E 'essentialinstallupgrade.*.jar' > ./WIDGETS_VERSION.ENV
RUN echo $(cat ./WIDGETS_VERSION.ENV)
RUN wget -q https://www.enterprise-architecture.org/os_download.php -O - | grep -o -E 'essential_baseline_v.*.zip' > ./MODEL_VERSION.ENV
RUN echo $(cat ./MODEL_VERSION.ENV)
RUN wget -q https://www.enterprise-architecture.org/os_download.php -O - | grep -o -E 'essential_viewer_.*.war' > ./VIEWER_VERSION.ENV
RUN echo $(cat ./VIEWER_VERSION.ENV)
RUN wget -q https://www.enterprise-architecture.org/os_download.php -O - | grep -o -E 'essential_import_utility_.*.war' > ./IMPORT_VERSION.ENV
RUN echo $(cat ./IMPORT_VERSION.ENV)

# Download essential project files
RUN wget --tries=3 --progress=bar:force:noscroll https://essential-cdn.s3.eu-west-2.amaz ... l-widgets/$(cat ./WIDGETS_VERSION.ENV) \
&& wget --tries=3 --progress=bar:force:noscroll https://essential-cdn.s3.eu-west-2.amaz ... eta-model/$(cat ./MODEL_VERSION.ENV) \
&& wget --tries=3 --progress=bar:force:noscroll https://essential-cdn.s3.eu-west-2.amaz ... om/viewer/$(cat ./VIEWER_VERSION.ENV) \
&& wget --tries=3 --progress=bar:force:noscroll https://essential-cdn.s3.eu-west-2.amaz ... t-utility/$(cat ./IMPORT_VERSION.ENV)

# Download Protege 3.5
RUN wget --tries=3 --progress=bar:force:noscroll https://protege.stanford.edu/download/p ... ge_3.5.bin

# Alternative for download if required
# https://essential-cdn.s3.eu-west-2.amaz ... -noJVM.bin

# Install meta model & tidy up
RUN mkdir /opt/essentialAM/ \
&& unzip $(cat ./MODEL_VERSION.ENV) -d /opt/essentialAM/ \
&& rm ./$(cat ./MODEL_VERSION.ENV) \
&& chmod 777 /opt/essentialAM/essential_baseline_* \
&& ls -la /opt/essentialAM/

# Install the tomcat war files and tidy up
RUN cp $(cat ./VIEWER_VERSION.ENV) /usr/local/tomcat/webapps/essential_viewer.war
RUN rm ./$(cat ./VIEWER_VERSION.ENV)

RUN cp $(cat ./IMPORT_VERSION.ENV) /usr/local/tomcat/webapps/essential_import_utility.war
RUN rm ./$(cat ./IMPORT_VERSION.ENV)

# Copy auto install files to folder
COPY protege-response.txt auto-install.xml ./

# Install tools & tidy up
RUN chmod u+x install_protege_3.5.bin \
&& ./install_protege_3.5.bin -i console -f protege-response.txt \
&& rm ./install_protege_3.5.bin \
&& java -jar $(cat ./WIDGETS_VERSION.ENV) auto-install.xml \
&& rm ./$(cat ./WIDGETS_VERSION.ENV)

# Copy data & startup scripts
COPY server/* /opt/essentialAM/server/
#COPY repo/* /opt/essentialAM/
COPY startup.sh run_protege_server_fix.sh /

#Some Java ENV
#RUN export JAVA_HOME=/usr/lib/jvm/default-jvm/jre/
ENV JAVA_HOME /usr/lib/jvm/default-jvm
WORKDIR /root/Protege_3.5/

#Prepare Filesystem & cleanup install files
RUN chmod +x /startup.sh \
&& chmod +x /run_protege_server_fix.sh

RUN echo "root:" \
&& ls -la \
&& echo "/opt/essentialAM/:" \
&& ls -la /opt/essentialAM/ \
&& echo "/opt/essentialAM/server/:" \
&& ls -la /opt/essentialAM/server/ \
&& echo "/usr/local/tomcat:" \
&& ls -la /usr/local/tomcat \
&& echo "/usr/local/tomcat/conf/:" \
&& ls -la /usr/local/tomcat/conf

# Startup the services
CMD ["/startup.sh"]



Good luck, share how you get on.
JohnWhite
Posts: 24
Joined: 01 May 2020, 03:06

Ok, so I wasn't happy with the performance of running this on windows/MS SQL with remote clients, and I don't have time to learn docker or ansible etc. so I have created a bash script to install everything (currently up to v6.10 models) on a vanilla install of Ubuntu 20.04

Check it out here:
https://github.com/johnpwhite/Essential ... M_LinuxCLI

It's far from great from an engineering standards point of view (no logging yet, lots of console stuff hidden so if an error you might not see it, can;t configure users/passwords and so on) but it works (...for me)

I'm going to test Apache Guacamole next to see if I can run the protege client on the server and present the java UI via a web page (embedded VNC/RDP style) so all the comms between the Protege client and the protege server + DB is all on the same machine and is zero impact for end users on their windows/linux machines. This works using X11 redirection via SSH currently with vcxsvr installed on windows - it performs great (vs the remote java protege client) but my ideal is no fancy software installed on Windows or Mac :-)
JohnWhite
Posts: 24
Joined: 01 May 2020, 03:06

Ok the script is a bit tidier now.

There is a set of variables at the top, if you set RDP=Y it will install all the stuff you need to then be able to remote in via an RDP client, say on windows etc. it also has an option to remove quiet mode etc. unfortunaly Ubuntu has abug with the xrdp package, so it will install the full desktop even though we don't need it to run a single app (protege), it may be fixed by the time you run this... maybe... no harm either way, just waste disk space with packages we don't need.

I suggest you create multiple linux users if you need more than one user to run the protege app remotely via RDP else you'll keep stealing the 'one session' (one session per user log on) (is the commented out script at the top I used to create users).

NOTE: it 'requires' Ubuntu 20.04 as a minimum else you'll get an error when it restores the MySQL DB (the model), as the version of MYSQL with lower LTS versions is also lower.
Post Reply