Skip to content

Commit

Permalink
v1.9.0 (#46)
Browse files Browse the repository at this point in the history
* Delete .npmrc

* remove .npmrc from dockerfiles

Signed-off-by: Markus Graube <[email protected]>

* a long journey from Frankfurt

Signed-off-by: Markus Graube <[email protected]>

* more tests and lintings

Signed-off-by: Markus Graube <[email protected]>

* refactoring: linting

Signed-off-by: Markus Graube <[email protected]>

* refactoring: linting

Signed-off-by: Markus Graube <[email protected]>

* Linting DataAssemblies

Signed-off-by: Markus Graube <[email protected]>

* Linting Module.ts

Signed-off-by: Markus Graube <[email protected]>

* split condition into multiple files

Signed-off-by: Markus Graube <[email protected]>

* reformat Module.ts

Signed-off-by: Markus Graube <[email protected]>

* add codecov

Signed-off-by: Markus Graube <[email protected]>

* Revert: add codecov

Signed-off-by: Markus Graube <[email protected]>

* lint index.ts

Signed-off-by: Markus Graube <[email protected]>

* continue linting

Signed-off-by: Markus Graube <[email protected]>

* reorder stuff in RecipeRun

Signed-off-by: Markus Graube <[email protected]>

* Add setOperationMode to setting parameters

Signed-off-by: Markus Graube <[email protected]>

* correct casting of strategy id

Signed-off-by: Markus Graube <[email protected]>

* fix circular json

Signed-off-by: Markus Graube <[email protected]>

* fix options.json()

Signed-off-by: Markus Graube <[email protected]>

* Greenkeeper/node opcua 0.7.4 (#11)

* chore(package): update node-opcua to version 0.7.4

* chore(package): update lockfile package-lock.json

* use advanced version of typedoc-plantuml with UML class diagrams in typedoc (#9)

Signed-off-by: Markus Graube <[email protected]>

* Feature/puml documentation (#10)

* add documentation

Signed-off-by: Markus Graube <[email protected]>

* add UML diagrams

Signed-off-by: Markus Graube <[email protected]>

* Greenkeeper/@types/node 12.0.10 (#12)

* chore(package): update @types/node to version 12.0.10

* chore(package): update lockfile package-lock.json

* fix petrinet diagrams

Signed-off-by: Markus Graube <[email protected]>

* Update command-line-usage to the latest version 🚀 (#13)

* fix(package): update command-line-usage to version 6.0.0

* chore(package): update lockfile package-lock.json

* update uml diagrams

Signed-off-by: Markus Graube <[email protected]>

* lint Manager.ts

Signed-off-by: Markus Graube <[email protected]>

* remove 'rm' from package.json scripts

Signed-off-by: Markus Graube <[email protected]>

* update polaris-interface to 1.25.0

Signed-off-by: Markus Graube <[email protected]>

* Feature/code cov (#16)

* add codecov

Signed-off-by: Markus Graube <[email protected]>

* use npm version on nyc

Signed-off-by: Markus Graube <[email protected]>

* try secret token

Signed-off-by: Markus Graube <[email protected]>

* other version of token

Signed-off-by: Markus Graube <[email protected]>

* add badge

Signed-off-by: Markus Graube <[email protected]>

* sign drone.yml

Signed-off-by: Markus Graube <[email protected]>

* remove debugging flag

Signed-off-by: Markus Graube <[email protected]>

* use options from polaris-interface

Signed-off-by: Markus Graube <[email protected]>

* remove nodemon

Signed-off-by: Markus Graube <[email protected]>

* Greenkeeper/@types/node 12.6.1 (#17)

* chore(package): update @types/node to version 12.6.1

* chore(package): update lockfile package-lock.json

* sign done.yml

Signed-off-by: Markus Graube <[email protected]>

* WIP: VirtualServices (#15)

* first version of virtualservice
* timer
* storage
* pid controller
* aggregatedservice

* handle lint warnings

Signed-off-by: Markus Graube <[email protected]>

(cherry picked from commit d5b7a78)
Signed-off-by: Markus Graube <[email protected]>

* add tests for module router

Signed-off-by: Markus Graube <[email protected]>

* move uml diagram

Signed-off-by: Markus Graube <[email protected]>

* Update node-opcua to the latest version 🚀 (#18)

* fix(package): update node-opcua to version 2.1.0

* chore(package): update lockfile package-lock.json

* fix API changes of node-opcua

Signed-off-by: Markus Graube <[email protected]>

* fix lint warnings

Signed-off-by: Markus Graube <[email protected]>

* more time for test

Signed-off-by: Markus Graube <[email protected]>

* fix test shutdown

Signed-off-by: Markus Graube <[email protected]>

* Bump lodash from 4.17.11 to 4.17.14 (#19)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <[email protected]>

* repair command line usage and document the test server

Signed-off-by: Markus Graube <[email protected]>

* Update issue templates

* add logging for removing a module

Signed-off-by: Markus Graube <[email protected]>

* harden module connection

Signed-off-by: Markus Graube <[email protected]>

* unskip test for not existing endpoint and provide more precise test name

Signed-off-by: Markus Graube <[email protected]>

* make tests more aggresive

Signed-off-by: Markus Graube <[email protected]>

* Update typedoc to the latest version 🚀 (#22)

* chore(package): update typedoc to version 0.15.0

* chore(package): update lockfile package-lock.json

* update node opcua to 2.1.5 (#28)

* chore(package): update node-opcua to version 2.1.5

* chore(package): update lockfile package-lock.json

* add logging for removing a module

Signed-off-by: Markus Graube <[email protected]>

* harden module connection

Signed-off-by: Markus Graube <[email protected]>

* unskip test for not existing endpoint and provide more precise test name

Signed-off-by: Markus Graube <[email protected]>

* make tests more aggresive

Signed-off-by: Markus Graube <[email protected]>

* Add dockerfile for test pea, drone script and update readme (#29)

* Add dockerfile for test pea, drone script and update readme

Signed-off-by: Markus Graube <[email protected]>

* sign drone file

Signed-off-by: Markus Graube <[email protected]>

* Advanced module test server (#32)

* advance ModulTestServer

* create abstract Variable class and reuse functionality for NumericVariable
  and StringVaribale
* add StatusCode for setting OPC UA values
* add some more types

Signed-off-by: Markus Graube <[email protected]>

* adapt tests to changes in ModuleTestServer

Signed-off-by: Markus Graube <[email protected]>

* correct HTTP status code for missing module

Signed-off-by: Markus Graube <[email protected]>

* add missing statuscode for Strategy variable

Signed-off-by: Markus Graube <[email protected]>

* [CodeFactor] Apply fixes

* fix tests

Signed-off-by: Markus Graube <[email protected]>

* Bump assign-deep from 1.0.0 to 1.0.1 (#33)

Bumps [assign-deep](https://github.com/jonschlinkert/assign-deep) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/jonschlinkert/assign-deep/releases)
- [Commits](https://github.com/jonschlinkert/assign-deep/commits/1.0.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Data Assemblies constructed with mixins

Signed-off-by: Markus Graube <[email protected]>

* change MTP files to new names

Signed-off-by: Markus Graube <[email protected]>

* new structure

Signed-off-by: Markus Graube <[email protected]>

* add logging category for data assembly

Signed-off-by: Markus Graube <[email protected]>

* tidy up data assemblies

Signed-off-by: Markus Graube <[email protected]>

* a lot of work

Signed-off-by: Markus Graube <[email protected]>

* clean up packages

Signed-off-by: Markus Graube <[email protected]>

* make listenToOpcUaNode async

* resolves when subscription is ready
* not necessary to wait for first event 'changed'

Signed-off-by: Markus Graube <[email protected]>

* make tests working again

Signed-off-by: Markus Graube <[email protected]>

* update packages

Signed-off-by: Markus Graube <[email protected]>

* Update README.md

* Update README.md

* wait in test until specific change has been arrived

Signed-off-by: Markus Graube <[email protected]>

* update package-lock.json

Signed-off-by: Markus Graube <[email protected]>

* split mixins in different files

Signed-off-by: Markus Graube <[email protected]>

* restructure ScopeItem

Signed-off-by: Markus Graube <[email protected]>

* refactoring

Signed-off-by: Markus Graube <[email protected]>

* refactoring: extract fix reactor for achema demonstrator

Signed-off-by: Markus Graube <[email protected]>

* advance tests

Signed-off-by: Markus Graube <[email protected]>

* refactoring

* extract opcuaconnection from module
* rename methods according to dataitems

Signed-off-by: Markus Graube <[email protected]>

* refactoring

Signed-off-by: Markus Graube <[email protected]>

* let tests run smoothly

Signed-off-by: Markus Graube <[email protected]>

* fix condition tests

Signed-off-by: Markus Graube <[email protected]>

* reduce error logging

Signed-off-by: Markus Graube <[email protected]>

* Refactoring (#36)

* reduce error logging

Signed-off-by: Markus Graube <[email protected]>

* refactoring

Signed-off-by: Markus Graube <[email protected]>

* fix test

Signed-off-by: Markus Graube <[email protected]>

* add ServiceControl for DataAssemblyFactory

Signed-off-by: Markus Graube <[email protected]>

* further tests

Signed-off-by: Markus Graube <[email protected]>

* fix test

Signed-off-by: Markus Graube <[email protected]>

* work more

Signed-off-by: Markus Graube <[email protected]>

* fix codefactor issues

Signed-off-by: Markus Graube <[email protected]>

* add username & password authentication for OPC UA connection (#38)

Signed-off-by: Markus Graube <[email protected]>

* Feature/unsubscribe (#40)

* extend logging in notifyclients

Signed-off-by: Markus Graube <[email protected]>

* add logging when module is disconnected

Signed-off-by: Markus Graube <[email protected]>

* add unsubscribe for dataassemblies

Signed-off-by: Markus Graube <[email protected]>

* Add files via upload

* fix reactor fix

Signed-off-by: Markus Graube <[email protected]>

* restructure MTPs in assets

Signed-off-by: Markus Graube <[email protected]>

* fix file names in tests

Signed-off-by: Markus Graube <[email protected]>

* Greenkeeper/expr eval 2.0.1 (#43)

* fix(package): update expr-eval to version 2.0.1

Closes #39
* chore(package): update lockfile package-lock.json

* Greenkeeper/@types/node 12.7.5 (#44)

* chore(package): update @types/node to version 12.7.5

* chore(package): update lockfile package-lock.json

closes #42

* Update package.json (#45)
  • Loading branch information
markusgraube authored Sep 12, 2019
1 parent 481df41 commit 83cc8fc
Show file tree
Hide file tree
Showing 141 changed files with 12,680 additions and 5,514 deletions.
20 changes: 19 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ steps:
commands:
- export LOGLEVEL=warn
- npm test
- node_modules/.bin/nyc report --reporter=json > coverage.json

- name: codecov
image: robertstettner/drone-codecov
settings:
token:
from_secret: codecov_token

- name: docker
image: plugins/docker
Expand All @@ -42,6 +49,17 @@ steps:
auto_tag: true
auto_tag_suffix: arm

- name: docker-test-pea
image: plugins/docker
settings:
dockerfile: Dockerfile.test-pea
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: p2olab/test-pea
auto_tag: true

- name: notify
image: drillster/drone-email
settings:
Expand All @@ -57,6 +75,6 @@ steps:

---
kind: signature
hmac: 392e24d213749c7c035d18876b28896425a6f67b9ec7d8055d826f3880ad06b8
hmac: af163dddfd72ca6aa1af521e412b641586f9bcb0c5be6cefd0cb33f01ea51255

...
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ WORKDIR /app
FROM base as dependencies
COPY package.json .
COPY package-lock.json .
COPY .npmrc .
RUN npm install --prod

## Image for building
Expand Down
1 change: 0 additions & 1 deletion Dockerfile.arm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ WORKDIR /app
FROM base as dependencies
COPY package.json .
COPY package-lock.json .
COPY .npmrc .
RUN npm install --prod

## Image for building
Expand Down
26 changes: 26 additions & 0 deletions Dockerfile.test-pea
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Docker Parent Image with Node and Typescript
FROM node:8-jessie as base
WORKDIR /app

# image for runtime dependencies
FROM base as dependencies
COPY package.json .
COPY package-lock.json .
RUN npm install --prod

## Image for building
FROM dependencies as build
COPY src src
COPY tsconfig.json .
RUN npm install
RUN npm run build

# production image
FROM node:alpine
LABEL org.label-schema.name "test-pea"
LABEL org.label-schema.docker.cmd "docker run -d -p 4334:4334 p2olab/test-pea"

COPY --from=dependencies /app/node_modules node_modules
COPY --from=build /app/build build
EXPOSE 4334
ENTRYPOINT ["node", "build/src/testServer.js"]
42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# polaris-backend

*Polaris* is a Process Orchestration Layer application for controlling process equipment assemblies (PEA) in the context of modular production in process industries. Thus, it follows the VDI/VDE/NAMUR 2658 standards.
*polaris-backend* is a NodeJs application which can be controlled via REST. Furthermore it provides recent state changes via websockets.
*polaris-backend* is a NodeJs application which can be controlled via REST. Furthermore it provides recent state changes via websockets. For testing and debugging purposes, polaris-backend provides also a testserver which behaves like a PEA.

A HTML user interface for this project is provided via the [polaris-frontend](https://github.com/p2o-lab/polaris-frontend) project.

[![Build Status](https://cloud.drone.io/api/badges/p2o-lab/polaris-backend/status.svg?ref=refs/heads/develop)](https://cloud.drone.io/p2o-lab/polaris-backend)
[![Docker Badge](https://images.microbadger.com/badges/image/p2olab/polaris-backend.svg)](https://microbadger.com/images/p2olab/polaris-backend "Get your own image badge on microbadger.com")
[![Build Status](https://cloud.drone.io/api/badges/p2o-lab/polaris-backend/status.svg?ref=refs/heads/develop)](https://cloud.drone.io/p2o-lab/polaris-backend "Build status")
[![Docker Badge](https://img.shields.io/docker/pulls/p2olab/polaris-backend)](https://hub.docker.com/r/p2olab/polaris-backend "Docker image on docker.hub")
[![MicroBadger Size](https://images.microbadger.com/badges/version/p2olab/polaris-backend.svg)](https://microbadger.com/images/p2olab/polaris-backend "Get your own image badge on microbadger.com")
[![Greenkeeper badge](https://badges.greenkeeper.io/p2o-lab/polaris-backend.svg)](https://greenkeeper.io/)
[![CodeFactor](https://www.codefactor.io/repository/github/p2o-lab/polaris-backend/badge)](https://www.codefactor.io/repository/github/p2o-lab/polaris-backend)
[![codecov](https://codecov.io/gh/p2o-lab/polaris-backend/branch/develop/graph/badge.svg)](https://codecov.io/gh/p2o-lab/polaris-backend)


## Installation and Deployment
Expand All @@ -30,37 +32,33 @@ or use ready binary (which should also be installed globally and in modules)

### Docker

Use docker ready image
Use ready docker image, which are automatically updated during drone.io integration
```
docker pull p2olab/polaris-backend
docker run -d -p 3000:3000 p2olab/polaris-backend
```

Update docker image
```bash
docker run deploy
```
or make it manually
```
docker build -t p2olab/polaris-backend .
docker push p2olab/polaris-backend
```

Update docker image for raspberry pi
```
docker build -t p2olab/polaris-backend:latest-arm -f Dockerfile.arm .
docker push p2olab/polaris-backend:latest-arm
```


## Usage


After starting *polaris-backend* its REST interface is available under
http://localhost:3000

*polaris-backend* has several command line parameters:
*polaris-backend* has several command line parameters which are documented by calling `npm start -- -h`



Its documentation is served by the application under the path **/doc** (e.g. http://localhost:3000/doc)

## Test Process Equipment Assembly
Polaris can serve a test PEA with an OPC UA server. It has two services with some parameters and some other variables which change over time. You can start this testserver via
```
npm run testserver
```

or via docker container
```
docker run -p 4334:4334 p2olab/test-pea
```

The corresponding JSON file `assets/modules/module_testserver_1.0.0.json` can be directly loaded in Polaris.
Loading

0 comments on commit 83cc8fc

Please sign in to comment.