Git Product home page Git Product logo

biotope's Introduction

Biotope

Web Application Server built around the relational data model described in [1]. Text based content, e.g. HTML, Javascript, CSS, GraphViz, JSON is created with the template language described in [2]. Other type of content is created with dedicated Java servlets. Jetty is the default servlet engine. Command line scripts are written in Bash, Python, Make and Ant.

Installation

Start the installation with a clone of this repo.

git clone https://github.com/TheOtherMarcus/Biotope.git

Download Jetty [3], extract the archive in the Biotope directory and create a symlink with the name jetty to it.

cd Biotope
wget http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.6.v20170531/jetty-distribution-9.4.6.v20170531.tar.gz
tar xvf jetty*
rm jetty*.tar.gz
ln -s jetty* jetty

Enable basic HTTP authentication in Jetty [4]. Edit jetty/etc/jetty.xml and add the following at the bottom.

    <Call name="addBean">
      <Arg>
        <New class="org.eclipse.jetty.security.HashLoginService">
          <Set name="name">Biotope Realm</Set>
          <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/passwd.properties</Set>
          <Call name="start"></Call>
        </New>
      </Arg>
    </Call>

Add users to the file jetty/etc/passwd.properties. The security roles used by Biotope are reader and writer.

guest: yourewelcome,reader
admin: CRYPT:adgc01se8haby9,reader,writer

Encrypted passwords can be generated by a Jetty utility.

java -cp jetty/lib/jetty-http-9.2.10.v20150310.jar:jetty/lib/jetty-util-9.2.10.v20150310.jar org.eclipse.jetty.util.security.Password USERNAME PASSWORD

Install Java and Ant. Make sure you have java 8 selected among the alternatives.

sudo apt-get install openjdk-8-jdk ant
sudo update-alternatives --config java

Install the Biotope servlets in Jetty.

cd servlets
ant deploy
cd ..

Install PostgreSQL.

sudo apt-get install postgresql

Create the database. This is typically performed by the postgres user.

sudo su - posgtgres

createuser -P -S -R -D biotope
Enter password for new role: biotope

createdb -O biotope -E UTF8 biotope

exit

Create the collations you need for correct text handling (e.g. sorting) in PostgreSQL. This also tests that postgres server accepts socket connections from localhost, which is necessary for Biotope to work. You may need to add the locale at the OS level first.

# sudo dpkg-reconfigure locales
psql -h localhost --user biotope biotope
Password for user biotope: biotope
CREATE COLLATION sv_se (LOCALE = 'sv_SE.utf8');
\q

Install Python libraries.

sudo apt-get install python-psycopg2

Install the default content.

make

Install GraphViz.

sudo apt-get install graphviz

Visualize the databse schema.

./schema.sh
make

Start Jetty.

cd jetty
java -jar start.jar

biotope's People

Contributors

theothermarcus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.