Commit 2d887778 authored by Evgeny Kusmenko's avatar Evgeny Kusmenko

Merge branch 'e/e-infrastructure' into 'master'

ee infrastructure

See merge request !27
parents af41c827 fefcc0c2
Pipeline #191312 passed with stages
in 13 minutes and 47 seconds
......@@ -10,3 +10,5 @@
*.DS_Store
*.iml
/restful/src/main/resources/resources
*.jar
/bin/
#
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
#
image: maven:3-jdk-8
......@@ -55,7 +61,15 @@ branchJobLinux:
tags:
- docker
stage: linux
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
# clean up
- docker rmi montisim-server-builder
- docker rmi rpc-server
- docker rmi restful-server
# pull the latest RMIServer image
- docker pull registry.git.rwth-aachen.de/monticore/embeddedmontiarc/simulators/rmimodelserver:latest
- cd docker
- ./build.sh
- ./run_test.sh
......@@ -70,6 +84,8 @@ masterJobLinux:
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
# pull the latest RMIServer image
- docker pull registry.git.rwth-aachen.de/monticore/embeddedmontiarc/simulators/rmimodelserver:latest
- cd docker
- ./build.sh
- ./run_test.sh
......
# (c) https://github.com/MontiCore/monticore
script:
- git checkout ${TRAVIS_BRANCH}
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install cobertura:cobertura org.eluder.coveralls:coveralls-maven-plugin:report --settings "settings.xml"
......
<!-- (c) https://github.com/MontiCore/monticore -->
# Server
![pipeline](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/server/badges/master/build.svg)
![coverage](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/server/badges/master/coverage.svg)
......@@ -69,17 +68,15 @@ or download the project as a [.zip file](https://github.com/MontiSim/server/arch
__NOTE:__ _MontiSim_ is the directory, in which MontiSim-belonging projects should be clonned. It has to be manually created.
Additionally [RMIModelServer](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/RMIModelServer) repository has to be cloned, in order to be used and to allow integration of external vehicle autopilot models. This can be done via the following commands:
The [RMIModelServer repository](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/RMIModelServer) has to be cloned and compiled to allow the integration of external vehicle autopilot models (*EMADL models*). This can be done via the following commands:
cd MontiSim
git clone https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/RMIModelServer.git
cd ./RMIModelServer
./scripts/compile_install.bat or ./scripts/compile_install.sh
mvn clean install -s settings.xml
The RMIModelServer uses the [HardwareEmulator](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/hardware_emulator) project to run the autopilots.
A pre-compiled version of the HardwareEmulator is contained in the `install` folder of the RMI server.
The install folder also contains a `run.bat` / `run.sh` script that starts the RMI server within the install folder and uses the `autopilots` folder it contains to load autopilots.
The install folder has to be updated if a new version of the _HardwareEmulator_ is used.
The RMIModelServer is exported to the `install` folder.
It contains a `run.bat` / `run.sh` script that starts the RMI server within the install folder and uses the `autopilots` folder it contains to load autopilots.
To use an external vehicle autopilot, one has to clone the corresponding repository. For the _Autopilot emam_ vehicle model, located in [Autopilot emam repository](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/EMAM-showcase), the following commands have to be executed:
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- (c) https://github.com/MontiCore/monticore -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>montisim</artifactId>
......
......@@ -8,6 +8,4 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends metis && \
rm -rf /var/lib/apt/lists/* && \
mvn install -s settings.xml -DskipTests && \
cp rpc/target/rpc-*-jar-with-dependencies.jar rpc/target/rpc.jar && \
find restful/target -regex '.*restful-[0-9.]+\.jar' | \
xargs -i cp {} restful/target/restful.jar
cp rpc/target/rpc-jar-with-dependencies.jar rpc/target/rpc.jar
<!-- (c) https://github.com/MontiCore/monticore -->
<!--
(c) https://github.com/MontiCore/monticore
The license generally applicable for this project
can be found under https://github.com/MontiCore/monticore.
-->
<zone>
<name>World</name>
<isCustomLogin>false</isCustomLogin>
......
#
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
#
version: "3"
services:
......@@ -18,16 +24,9 @@ services:
environment:
ZOO_SERVERS: zoo1:2181
entrypoint:
- java
- -cp
- rmi-model-server.jar
- -Djava.rmi.server.codebase=file:rmi-model-server.jar
- -Djava.rmi.server.useLocalHostname
- rwth.rmi.model.server.RMIServer
- "10101"
- autopilots
- no_time
- os=linux
- bash
- -c
- "source ~/.bashrc && java -Djava.rmi.server.useLocalHostname -jar rmi-model-server.jar port=10101 autopilots_folder=autopilots no_time os=windows"
rpc-server:
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/simulators/server:rpc
......
#
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
#
FROM postgres:latest
COPY ./db-create-script.sql /docker-entrypoint-initdb.d/
\ No newline at end of file
--
-- (c) https://github.com/MontiCore/monticore
--
-- The license generally applicable for this project
-- can be found under https://github.com/MontiCore/monticore.
--
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: area; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE area (
id integer NOT NULL,
minx double precision NOT NULL,
miny double precision NOT NULL,
minz double precision NOT NULL,
maxx double precision NOT NULL,
maxy double precision NOT NULL,
maxz double precision NOT NULL
);
ALTER TABLE area OWNER TO server;
--
-- Name: area_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE area_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE area_id_seq OWNER TO server;
--
-- Name: area_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE area_id_seq OWNED BY area.id;
--
-- Name: entry_node; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE entry_node (
sector_id bigint NOT NULL,
node_osm_id bigint NOT NULL
);
ALTER TABLE entry_node OWNER TO server;
--
-- Name: env_node; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE env_node (
id integer NOT NULL,
x double precision NOT NULL,
y double precision NOT NULL,
z double precision NOT NULL,
osmid bigint NOT NULL,
env_object_id integer NOT NULL,
isintersection smallint NOT NULL
);
ALTER TABLE env_node OWNER TO server;
--
-- Name: env_node_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE env_node_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE env_node_id_seq OWNER TO server;
--
-- Name: env_node_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE env_node_id_seq OWNED BY env_node.id;
--
-- Name: env_object; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE env_object (
id integer NOT NULL,
tag character varying(255) NOT NULL,
osmid bigint NOT NULL,
map_id integer NOT NULL
);
ALTER TABLE env_object OWNER TO server;
--
-- Name: env_object_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE env_object_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE env_object_id_seq OWNER TO server;
--
-- Name: env_object_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE env_object_id_seq OWNED BY env_object.id;
--
-- Name: map; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE map (
id integer NOT NULL,
mname character varying(255) NOT NULL,
src character varying(255) NOT NULL
);
ALTER TABLE map OWNER TO server;
--
-- Name: map_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE map_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE map_id_seq OWNER TO server;
--
-- Name: map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE map_id_seq OWNED BY map.id;
--
-- Name: overlap_area; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE overlap_area (
id integer NOT NULL,
overlap_a integer NOT NULL,
overlap_b integer NOT NULL,
area_id integer NOT NULL
);
ALTER TABLE overlap_area OWNER TO server;
--
-- Name: overlap_area_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE overlap_area_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE overlap_area_id_seq OWNER TO server;
--
-- Name: overlap_area_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE overlap_area_id_seq OWNED BY overlap_area.id;
--
-- Name: path; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE path (
sector_id bigint NOT NULL,
source bigint NOT NULL,
target bigint NOT NULL,
distance double precision
);
ALTER TABLE path OWNER TO server;
--
-- Name: scenario; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE scenario (
id integer NOT NULL,
sname character varying(255) NOT NULL,
map_id integer NOT NULL
);
ALTER TABLE scenario OWNER TO server;
--
-- Name: scenario_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE scenario_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE scenario_id_seq OWNER TO server;
--
-- Name: scenario_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE scenario_id_seq OWNED BY scenario.id;
--
-- Name: sector; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE sector (
id integer NOT NULL,
map_id integer NOT NULL,
area_id integer NOT NULL
);
ALTER TABLE sector OWNER TO server;
--
-- Name: sector_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE sector_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sector_id_seq OWNER TO server;
--
-- Name: sector_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE sector_id_seq OWNED BY sector.id;
--
-- Name: street; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE street (
id integer NOT NULL,
speed_limit integer NOT NULL,
width double precision NOT NULL,
isoneway smallint NOT NULL,
env_object_id integer NOT NULL,
street_type character varying(255)
);
ALTER TABLE street OWNER TO server;
--
-- Name: street_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE street_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE street_id_seq OWNER TO server;
--
-- Name: street_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE street_id_seq OWNED BY street.id;
--
-- Name: street_sign; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE street_sign (
id integer NOT NULL,
ss_type character varying(255) NOT NULL,
ss_state character varying(255) NOT NULL,
isone smallint NOT NULL,
istwo smallint NOT NULL,
x1 double precision NOT NULL,
y1 double precision NOT NULL,
z1 double precision NOT NULL,
x2 double precision NOT NULL,
y2 double precision NOT NULL,
z2 double precision NOT NULL,
env_node_id integer NOT NULL
);
ALTER TABLE street_sign OWNER TO server;
--
-- Name: street_sign_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE street_sign_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE street_sign_id_seq OWNER TO server;
--
-- Name: street_sign_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE street_sign_id_seq OWNED BY street_sign.id;
--
-- Name: track; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE track (
id integer NOT NULL,
tname character varying(50) NOT NULL,
scenario_id integer NOT NULL
);
ALTER TABLE track OWNER TO server;
--
-- Name: track_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--
CREATE SEQUENCE track_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE track_id_seq OWNER TO server;
--
-- Name: track_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: server
--
ALTER SEQUENCE track_id_seq OWNED BY track.id;
--
-- Name: track_section; Type: TABLE; Schema: public; Owner: server; Tablespace:
--
CREATE TABLE track_section (
id integer NOT NULL,
track_id bigint,
source bigint NOT NULL,
target bigint NOT NULL,
sector_id bigint NOT NULL
);
ALTER TABLE track_section OWNER TO server;
--
-- Name: track_section_id_seq; Type: SEQUENCE; Schema: public; Owner: server
--