Skip to content
Permalink
Browse files
refactor: remove fuseki image creation and change sipi image creation…
… to sbt (DEV-544) (#2011)

* add fuseki to sbt

* Change fuseki and sipi container creation to SBT

* remove last of Bazel

* integrate changes on remote, cleanup

* remove bazel files

* update sipi image version

* remove remnants of bazel

* fix references to sipi images and versions

* Remove remnants of bazel

* fix path to write test files

* remove unnecessary comment

* fix image in sipi's docker-compose.yml

* Remove USER command

* cleanup sipi folder

* remove unused files

Co-authored-by: Ivan Subotic <400790+subotic@users.noreply.github.com>
  • Loading branch information
irinaschubert and subotic committed Mar 4, 2022
1 parent 54cee7a commit eed2767103b552a0f895aeb18252deecb7cc4497
Showing with 347 additions and 1,219 deletions.
  1. +0 −7 .bazelrc
  2. +0 −1 .bazelversion
  3. +0 −20 .github/workflows/main.yml
  4. +0 −1 .gitignore
  5. +0 −7 BUILD.bazel
  6. +15 −40 Makefile
  7. +1 −17 README.md
  8. +0 −38 RELEASING.md
  9. +0 −153 WORKSPACE
  10. +54 −23 build.sbt
  11. +3 −2 docker-compose.yml
  12. +0 −34 docker/knora-jena-fuseki/BUILD.bazel
  13. +0 −41 docker/knora-sipi/BUILD.bazel
  14. +0 −24 docker/knora-sipi/sipi_image_test_config.yaml
  15. +0 −116 docs/05-internals/development/bazel.md
  16. +2 −19 docs/05-internals/development/building-and-running.md
  17. BIN docs/05-internals/development/figures/import-bazel-project.png
  18. +8 −69 docs/05-internals/development/intellij-config.md
  19. +1 −29 docs/05-internals/development/third-party.md
  20. +0 −20 knora-ontologies/BUILD
  21. +0 −1 mkdocs.yml
  22. +242 −238 project/Dependencies.scala
  23. +0 −27 sipi/Makefile
  24. +0 −37 sipi/README.md
  25. +0 −11 sipi/config/BUILD.bazel
  26. +0 −46 sipi/docker-compose.yml
  27. +0 −36 sipi/scripts/BUILD.bazel
  28. +0 −6 test_data/BUILD.bazel
  29. +0 −14 test_data/upgrade/BUILD.bazel
  30. 0 third_party/BUILD.bazel
  31. +0 −17 third_party/versions.bzl
  32. +0 −22 toolchains/BUILD.bazel
  33. +0 −15 tools/BUILD.bazel
  34. +0 −17 tools/buildstamp/BUILD.bazel
  35. +0 −37 tools/buildstamp/get_workspace_status
  36. +0 −4 webapi/README.md
  37. BIN webapi/_assets/icons/bild.png
  38. BIN webapi/_assets/icons/bildformat.png
  39. BIN webapi/_assets/icons/book.gif
  40. BIN webapi/_assets/icons/incunabula_logo.png
  41. BIN webapi/_assets/icons/page.gif
  42. BIN webapi/_assets/icons/person.png
  43. +0 −1 webapi/src/main/scala/org/knora/webapi/http/version/ServerVersion.scala
  44. +12 −16 webapi/src/test/scala/org/knora/webapi/E2ESpec.scala
  45. +1 −5 webapi/src/test/scala/org/knora/webapi/R2RSpec.scala
  46. +2 −1 webapi/src/test/scala/org/knora/webapi/TestContainerFuseki.scala
  47. +3 −2 webapi/src/test/scala/org/knora/webapi/TestContainersAll.scala
  48. +3 −5 webapi/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala

This file was deleted.

This file was deleted.

@@ -28,11 +28,6 @@ jobs:
with:
format: YYYY-MM-DD
utcOffset: "+02:00"
- name: use daily bazel disk cache
uses: actions/cache@v2
with:
path: ~/.bazel_disk_cache
key: ${{ runner.OS }}-bazel_disk_cache-${{ steps.current-time.outputs.formattedTime }}
- name: setup java version
uses: joschi/setup-jdk@v2
with:
@@ -75,11 +70,6 @@ jobs:
with:
format: YYYY-MM-DD
utcOffset: "+02:00"
- name: use daily bazel disk cache
uses: actions/cache@v2
with:
path: ~/.bazel_disk_cache
key: ${{ runner.OS }}-bazel_disk_cache-${{ steps.current-time.outputs.formattedTime }}
- name: setup java version
uses: joschi/setup-jdk@v2
with:
@@ -121,11 +111,6 @@ jobs:
with:
format: YYYY-MM-DD
utcOffset: "+02:00"
- name: use daily bazel disk cache
uses: actions/cache@v2
with:
path: ~/.bazel_disk_cache
key: ${{ runner.OS }}-bazel_disk_cache-${{ steps.current-time.outputs.formattedTime }}
- name: setup java version
uses: joschi/setup-jdk@v2
with:
@@ -221,11 +206,6 @@ jobs:
with:
format: YYYY-MM-DD
utcOffset: "+02:00"
- name: use daily bazel disk cache
uses: actions/cache@v2
with:
path: ~/.bazel_disk_cache
key: ${{ runner.OS }}-bazel_disk_cache-${{ steps.current-time.outputs.formattedTime }}
- name: setup java version
uses: joschi/setup-jdk@v2
with:
@@ -18,7 +18,6 @@ webapi-it
webapi-test
upgrade/project
sipi/test
bazel-*

**/project/target/
**/target/

This file was deleted.

@@ -34,53 +34,33 @@ docs-clean: ## cleans the project directory
@rm -rf site/

#################################
# Bazel targets
# Docker targets
#################################

.PHONY: build
build: docker-build ## build all targets (excluding docs)

.PHOBY: check-for-outdated-deps
check-for-outdated-deps: ## check for outdated maven dependencies
@bazel run @maven//:outdated

.PHONY: buildifier
buildifier: ## format Bazel WORKSPACE and BUILD.bazel files
@bazel run :buildifier

#################################
# Docker targets
#################################

.PHONY: docker-build-knora-api-image
docker-build-knora-api-image: # build and publish knora-api docker image locally
.PHONY: docker-build-dsp-api-image
docker-build-dsp-api-image: # build and publish dsp-api docker image locally
@sbt "webapi / Docker / publishLocal"

.PHONY: docker-publish-knora-api-image
docker-publish-knora-api-image: # publish knora-api image to Dockerhub
@bazel run //docker/knora-api:push

.PHONY: docker-build-knora-jena-fuseki-image
docker-build-knora-jena-fuseki-image: # build and publish knora-jena-fuseki docker image locally
@bazel run //docker/knora-jena-fuseki:image
.PHONY: docker-publish-dsp-api-image
docker-publish-dsp-api-image: # publish dsp-api image to Dockerhub
@sbt "webapi / Docker / publish"

.PHONY: docker-publish-knora-jena-fuseki-image
docker-publish-knora-jena-fuseki-image: # publish knora-jena-fuseki image to Dockerhub
@bazel run //docker/knora-jena-fuseki:push
.PHONY: docker-build-sipi-image
docker-build-sipi-image: # build and publish sipi docker image locally
@sbt "sipi / Docker / publishLocal"

.PHONY: docker-build-knora-sipi-image
docker-build-knora-sipi-image: # build and publish knora-sipi docker image locally
@bazel run --action_env=PULLER_TIMEOUT=2400 //docker/knora-sipi:image

.PHONY: docker-publish-knora-sipi-image
docker-publish-knora-sipi-image: # publish knora-sipi image to Dockerhub
@bazel run //docker/knora-sipi:push
.PHONY: docker-publish-sipi-image
docker-publish-sipi-image: # publish sipi image to Dockerhub
@sbt "sipi / Docker / publish"

.PHONY: docker-build
docker-build: docker-build-knora-api-image docker-build-knora-jena-fuseki-image docker-build-knora-sipi-image ## build and publish all Docker images locally
docker-build: docker-build-dsp-api-image docker-build-sipi-image ## build and publish all Docker images locally

.PHONY: docker-publish
docker-publish: docker-publish-knora-api-image docker-publish-knora-jena-fuseki-image docker-publish-knora-sipi-image ## publish all Docker images to Dockerhub
docker-publish: docker-publish-dsp-api-image docker-publish-sipi-image ## publish all Docker images to Dockerhub

#################################
## Docker-Compose targets
@@ -188,18 +168,14 @@ stack-without-api-and-sipi: stack-up ## starts the knora-stack without knora-api
@docker compose -f docker-compose.yml stop sipi

.PHONY: stack-db-only
stack-db-only: env-file docker-build-knora-jena-fuseki-image ## starts only fuseki.
stack-db-only: env-file ## starts only fuseki.
@docker compose -f docker-compose.yml up -d db
$(CURRENT_DIR)/webapi/scripts/wait-for-db.sh

#################################
## Test Targets
#################################

.PHONY: test-docker
test-docker: docker-build ## runs Docker image tests
bazel test //docker/...

.PHONY: client-test-data
client-test-data: export KNORA_WEBAPI_COLLECT_CLIENT_TEST_DATA := true
client-test-data: build ## runs the dsp-api e2e tests and generates client test data.
@@ -301,7 +277,6 @@ clean-local-tmp:

clean: docs-clean clean-local-tmp clean-docker ## clean build artifacts
@rm -rf .env
@bazel clean

.PHONY: clean-sipi-tmp
clean-sipi-tmp: ## deletes all files in Sipi's tmp folder
@@ -54,7 +54,6 @@ Each developer machine should have the following prerequisites installed:
* Homebrew (on macOS): https://brew.sh
* [OpenJDK](https://adoptopenjdk.net) 11
* [sbt](https://www.scala-sbt.org/)
* [Bazel](https://bazel.build)

#### Java Adoptopenjdk 11

@@ -71,19 +70,6 @@ To pin the version of Java, please add this environment variable to you startup
export JAVA_HOME=`/usr/libexec/java_home -v 11`
```

#### Bazel build tools

To install, follow these steps:

```shell
npm install -g @bazel/bazelisk
```

This will install [bazelisk](https://github.com/bazelbuild/bazelisk) which is
a wrapper to the `bazel` binary. It will, when `bazel` is run on the command line,
automatically install the supported Bazel version, defined in the `.bazelversion`
file in the root of the `knora-api` repository.

### For building the documentation

See [docs/Readme.md](docs/Readme.md).
@@ -92,9 +78,7 @@ See [docs/Readme.md](docs/Readme.md).

### Run the Knora API server

With [Bazel](https://docs.bazel.build/versions/3.3.0/install-os-x.html) and
[Docker](https://www.docker.com) installed, run the following to create a test
repository and load some test data into the triplestore:
Run the following to create a test repository and load some test data into the triplestore:

```shell
make init-db-test

This file was deleted.

0 comments on commit eed2767

Please sign in to comment.