Skip to content

Commit

Permalink
Dev 2.2.0 (#1)
Browse files Browse the repository at this point in the history
* aligned with sdaas 2.1.0

* Added icons to doc

* Ready for merge.
  • Loading branch information
ecow authored Jan 28, 2019
1 parent b1b1dec commit 777550b
Show file tree
Hide file tree
Showing 65 changed files with 1,187 additions and 991 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).



## [unreleased]


## TBD [2.2.0]

aligned with SDaaS [2.1.0]

### Removed

- boilerplate removed (use tests/system/platform)


### Added

- test environments
- coppyright notice on all scripts


### Changed

- refactory
- license conditions
- dockerf file structure (now aligned to blazegraph 2.1.5)


## 2.1.0

First release, aligned with SDaaS [2.0.3] (Talete)


[Unreleased]: https://bitbucket.org/linkeddatacenter/sdaas/compare/master%0D2.2.0
[2.2.0]: https://bitbucket.org/linkeddatacenter/sdaas/compare/2.2.0%0D2.1.0
41 changes: 9 additions & 32 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,20 @@
FROM lyrasis/blazegraph:2.1.4
# Copyright (C) 2019 LinkedData.Center - All Rights Reserved
# Permission to copy and modify is granted under the MIT license
FROM linkeddatacenter/sdaas-rdfstore:1.0.0

LABEL authors="[email protected]"

USER root

ENV SD_LOCAL_BG_ENDPOINT http://localhost:8080/sdaas
ENV SD_REASONER_ENDPOINT http://localhost:8080/sdaas
ENV SDAAS_BIN_DIR /usr/local/bin/sdaas
ENV PATH="${SDAAS_BIN_DIR}:${PATH}"

# load regular linux tools required by sdaas:
# see https://wiki.alpinelinux.org/wiki/How_to_get_regular_stuff_working
RUN apk --no-cache add \
bash \
binutils \
coreutils \
curl \
findutils \
gawk \
grep \
openssl \
php7 \
raptor2 \
sed \
sudo \
unzip \
util-linux


# unpack and rename the blazegraph webapp
RUN unzip ${JETTY_WEBAPPS}/bigdata.war -d ${JETTY_WEBAPPS}/sdaas; \
rm -f ${JETTY_WEBAPPS}/bigdata.war


COPY boilerplate /workspace
COPY writable-web.xml /writable-web.xml
COPY readonly-web.xml /readonly-web.xml
COPY sdaas-bin $SDAAS_BIN_DIR
RUN chmod -R 0755 $SDAAS_BIN_DIR
COPY tests/system/platform /workspace
COPY alpinelinux_provisioning.sh /
COPY scripts $SDAAS_BIN_DIR
RUN chmod -R 0755 $SDAAS_BIN_DIR; /alpinelinux_provisioning.sh

WORKDIR /workspace

CMD sdaas-start --foreground
CMD /sdaas-start --foreground
22 changes: 21 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 LinkedData.Center
Copyright (c) 2018-2019 LinkedData.Center SRL

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,6 +9,26 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The end-user documentation included with the redistribution, if any, must include
the following acknowledgment:

"This product includes software developed by LinkedData.Center, (http://LinkedData.Center/)
and its contributors", in the same place and form as other third-party acknowledgments.
Alternately, this acknowledgment may appear in the software itself,
in the same form and location as other such third-party acknowledgments.


If this software is involved in the provisioning of a service,
the end-user documentation included with the service, if any, must include
the following acknowledgment:

"This service uses the SDaaS (Smart Data as a Service) software developed by LinkedData.Center,
(http://LinkedData.Center/) and its contributors", in the same place and form as other
third-party acknowledgments.
Alternately, this acknowledgment may appear in the home page of the service itself,
in the same form and location as other such third-party acknowledgments or in the form of
"Power by LinkedData.Center" linked to http://LinkedData.Center/

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

Expand Down
112 changes: 97 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,112 @@
# sdaas-ce
A docker with a lightweight implementation of a [KEES](http://linkeddata.center/kees) specification derived from the [LinkeData.Center SDaaS product](https://it.linkeddata.center//p/sdaas).
![logo](http://linkeddata.center/resources/v4/logo/Logo-colori-trasp_oriz-640x220.png)

## Quickstart
# Welcome to LinkedData.Center SDaaS Platform Community Edition (sdaas-ce)

A vanilla open source implementation of the [LinkeData.Center SDaaS product](https://it.linkeddata.center/p/sdaas).
See documentation in [LinkedData.Center SDaaS wiki](https://bitbucket.org/linkeddatacenter/sdaas/wiki/Home).

Try a short [demo of the platform](https://en.linkeddata.center/l/sdaas-ce-demo/).

## 🚀 Quickstart

```
docker build -t linkeddatacenter/sdaas-ce .
docker run --name sdmp -d -p 8080:8080 linkeddatacenter/sdaas-ce
docker exec -t sdmp sdaas -f build.sdaas --reboot
# browse knowledge base at http://localhost:8080/sdaas
# when finish:
docker rm -f sdmp
```


## Development environment ##

You need a gnu compliant system with following packages installed:

- bash (version > 4.4 )
- coreutils: base64 basename cat chgrp chmod chown cp cut date dir dirname echo env
head md5sum mkdir mktemp mv pwd realpath rm rmdir sleep sort split stat tail tee test
touch tr uniq unlink wc ...
- curl
- find
- awk
- grep
- sed

Start a standard development environment by executing in docker with the
default bash distribution; then install the required packages:


```
docker run --rm -it -v "$(pwd):/workspace" -w /workspace bash
./alpinelinux_provisioning.sh
```


## Unit tests ###

In order to run unit tests bats is needed (see https://github.com/bats-core/bats-core ):

```
apk --no-cache add bats
bats tests/unit/
exit
```
docker run --name sdaas -d -p 8889:8080 -v $PWD/boilerplate:/workspace linkeddatacenter/sdaas-ce:2.1.0
docker exec -t sdaas -f build.sdaas --reboot
curl "http://localhost:8889/sdaas/sparql?query=SELECT DISTINCT ?g WHERE {GRAPH ?g {?s ?p ?o}}"


## Functional and system test

To run functional and system tests you will need to start a local instance of blazegraph.
By default, test scripts expect blazegraph endpoint at http://localhost:8080/bigdata
but you can configure a different address exporting the the SD_REASONER_ENDPOINT.
The instance of blazegraph must share /workspace volume with sdaas.

**WARNING**: blazegraph needs at least 2GB RAM to run functional tests.

The easy way, is to start from the lyrasis/blazegraph blazegraph docker distribution
and then installing inside its image the missing components:

```
docker run -d --name sdmp -v "$(pwd):/workspace" -p 8080:8080 lyrasis/blazegraph:2.1.5
docker exec -ti -w /workspace sdmp bash
./alpinelinux_provisioning.sh
apk --no-cache add bats
# ... access blazegraph workbench browsing http://localhost:8080/bigdata
```

See [LinkedData.Center SDaaS wiki](https://bitbucket.org/linkeddatacenter/sdaas/wiki/Home)

## Local builds
For functional test execute:

```
docker build -t sdaas-ce .
docker run --name dmp -d -p 8889:8080 -v $PWD/boilerplate:/workspace sdaas-ce
docker exec -t dmp sdaas -f build.sdaas --reboot
curl "http://localhost:8889/sdaas/sparql?query=SELECT DISTINCT ?g WHERE {GRAPH ?g {?s ?p ?o}}"
bats tests/functional
```

Navigate the knowledge base pointing a browser to http://localhost:9999/:
For system test, verify that the host is able to access Internet then execute

```
bats tests/system/platform
```

You can also launch directly the build process with:

```
cd tests/system/platform
../../../scripts/sdaas -f build.sdaas --reboot
```

To free the docker resources:

```
exit
docker rm -f sdmp
```


## Credits and license

- the dockerfile was inspired from [Docker Blazegraph](https://github.com/lyrasis/docker-blazegraph)
- the sdaas community edition platform is derived from [LinkedData.Center SDaas Product](https://it.linkeddata.center/p/sdaas) and licensed with MIT by LinkedData.Center to g0v community
The sdaas community edition platform is derived from [LinkedData.Center SDaas Product](https://it.linkeddata.center/p/sdaas) and licensed with MIT by LinkedData.Center

Copyright (C) 2018 LinkedData.Center SRL
- All Rights Reserved
Permission to copy and modify is granted under the [MIT license](LICENSE)

50 changes: 0 additions & 50 deletions RWStore.properties

This file was deleted.

25 changes: 25 additions & 0 deletions alpinelinux_provisioning.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Copyright (C) 2019 LinkedData.Center - All Rights Reserved
# Permission to copy and modify is granted under the MIT license
# see https://wiki.alpinelinux.org/wiki/How_to_get_regular_stuff_working

if [ -z "$PWD/.git" ]; then
echo "please launch this script in project home page"
exit
fi

if [ $(id -u) -ne 0 ];then
echo "please launch this script as root"
exit
fi

apk --no-cache add \
coreutils \
curl \
findutils \
gawk \
grep \
openssl \
raptor2 \
sed \
net-tools
Loading

0 comments on commit 777550b

Please sign in to comment.