Giter VIP home page Giter VIP logo

modelix.kubernetes's Introduction

Note

This repository is archived. Actively developed components where moved to:

Moved components

The actively developed components were moved. The other inactive components have not been moved. Their code remains here for possible reuse in future developments.

components new location
db/ modelix/modelix.kubernetes
doc/
gitui/ modelix/modelix.workspaces
gradle-plugin-test/
graphql-server/
headless-runner/
helm/ modelix/modelix.kubernetes
instances-manager/ modelix/modelix.workspaces
integrationtests/
keycloak-extensions/ modelix/modelix.kubernetes
kotlin-js-store/
manual-tests/
metamodel-sandbox/
model-download-gradle/
mps/ modelix/modelix.mps
projector-user-home/ modelix/modelix.mps
proxy/ modelix/modelix.kubernetes
samples/
ui-client/ modelix/modelix.mps
ui-server/
workspace-client/ modelix/modelix.workspaces
workspace-job/ modelix/modelix.workspaces
workspace-manager/ modelix/modelix.workspaces
workspaces/ modelix/modelix.workspaces

The Modelix Project

The Modelix project develops a next generation language workbench that is native to the web and the cloud, inspired by this document. On the path to this final vision, the short-term goal is to use MPS as the backend. To this end, we currently develop two components:

  • Database/Cloud storage for MPS models with realtime collaboration
  • Server-based execution of MPS and browser-based editors

How to run Modelix

You need to install a Kubernetes cluster. For development or evaluation Docker Desktop might be the easiest option.

Docker Desktop

Make sure to enable Kubernetes in the preferences. Under Resources change the memory limit to 8 GB or more.

If you use Docker Desktop >= 4.2.0 you have to add the option "deprecatedCgroupv1": true to the file ~/Library/Group Containers/group.com.docker/settings.json. Otherwise, MPS (the JBR) will not use the correct memory limit.

Deploy with Helm

  • Install helm
  • run helm install --repo https://artifacts.itemis.cloud/repository/helm-modelix/ dev modelix
  • Helm allows you to deploy multiple instances of modelix to the same cluster. You could have one instance for testing and one production instance. Just specify a different instance name and hostname when running helm:
    • helm install --repo https://artifacts.itemis.cloud/repository/helm-modelix/ xyz modelix --set ingress.hostname=xyz.127.0.0.1.nip.io
      • "xyz" is the name of your modelix instance.
      • "xyz.127.0.0.1.nip.io" is the hostname used to access the modelix instance. In a development environment you can use nip.io to get different hostnames that resolve to 127.0.0.1.

Additional Configuration

Admin password

After Modelix is deployed make sure to change the password of the admin account.

Node Pools

If you are using a cloud provider that supports auto-scaling create a separate node pool for the MPS instances. Add a taint "workspace-client" with the value "true" and the type "NoExecute". This taint ensures that the pool can be scaled down after Modelix stopped the MPS instances and the nodes don't keep running because some other small pod was scheduled to them.

An MPS instances with a lot of languages and plugins can require ~8 GB of memory. 16 GB of memory for a node is a reasonable size.

Editing the sources

  • run gradlew in the main directory to download dependencies and build the project
  • While the MPS that is used for the build is downloaded automatically, you have to install MPS yourself to use it as the client.
  • open the project in the folder "mps" with MPS

Content of the root directory

File Description
db Files for building the PostgreSQL docker image
doc Documentation
gradle-plugin gradle plugin for downloading a model from the model server to an MPS model file
gradle-plugin-test Demo project that uses the gradle plugin.
kubernetes YAML configuration files for running Modelix in a kubernetes cluster
model-client Model implementation with real-time collaboration support implemented in kotlin
model-server Java project that implements a REST API on top of an Apache Ignite key value store. It is very generic and lightweight and doesn't know anything about models and their storage format. The mapping between the model data structure and the key value entries happens in MPS.
mps MPS project that implements all the MPS plugins. That's a plugin for synchronizing models with the model server and plugins for editing models in the browser.
proxy Files for building a docker image for a reverse proxy used inside the kubernetes cluster.
samples Projects that show you how to build your own kubernetes cluster running MPS with custom languages.
ssl SSL support inside the kubernetes cluster
ui-client A typescript project that implements the browser part of the editor. This is generic and doesn't contain anything language specific. All language specific parts are implements on the server side in MPS.
ui-server A small Java project that configures and starts MPS in headless mode.
.dockerignore
.gitignore
.nvmrc Currently used NVM version
.travis.yml Required for using travis as the CI server: https://travis-ci.org/github/modelix/modelix
Dockerfile-mps The docker image for the UI server is split into a separate layer for MPS, because the MPS version changes less frequently and this speeds up the rebuild of the docker image.
Dockerfile-ui For building the docker image of the UI server.
LICENSE
README.md
build-scripts.xml Generated by MPS for building the MPS project
build.gradle
docker-build-all.sh Builds all the docker images. You have to run ./gradlew first.
docker-build-db.sh
docker-build-model.sh
docker-build-mps.sh
docker-build-proxy.sh
docker-build-ui.sh
docker-build-uiproxy.sh
docker-ci.sh Is executed by the CI server to publish the docker images for a git tag
docker-run-db.sh If you want to run the PostgresSQL database locally without a kubernetes cluster
generate-modelsecret.sh Access to the model server requires clients to be logged in with their google account. Inside the kubernetes cluster the other components use a secret stored in the kubernetes cluster as the access token.
gradlew Run this to build all projects.
gradlew.bat Run this to build all projects.
kubernetes-apply-gcloud.sh
kubernetes-apply-local.sh
kubernetes-gcloud-dbsecret.sh
kubernetes-secrets.sh
kubernetes-open-proxy.sh Opens Modelix in the browser after loading the kubernetes configuration in docker desktop
kubernetes-use-latest-tag.sh Use this before kubernetes-apply-local.sh to update the kubernetes configurations to use the latest Modelix version
modelix-version.sh Reads or creates a modelix.version file that is used to tag the docker images
mps-version.properties The MPS version that Modelix is based on
run-ui-server.sh This is packaged into the docker image and doesn't work outside of it.
settings.gradle
update-gcloud.sh If you want to build and run your own images inside you cluster.
update-minikube.sh If you want to build and run your own images inside you cluster.

Publishing a new version

To make a new release you will simply need to push a new tag. Everything is automated: it means that no version number have to be changed manually. Code in master can be released under tags indicating the version numbers, without qualifiers. For example, if the last tag from master branch has been "0.0.1", the next tag should be "0.0.2".

See https://semver.org/ for valid version numbers. Helm will fail if the version is not in this format.

The artifacts are published to

Overview of published docker images

This is an overview of the docker images you can find at https://hub.docker.com/?namespace=modelix

Tag Dockerfile Shell Script Depends On Description
modelix/db db/Dockerfile docker-build-db.sh postgres:9.6 Postgres database with the schema required by the model server
modelix/modelix-model modelix.core:model-server/Dockerfile modelix.core:docker-build-model.sh registry.access.redhat.com/ubi8/openjdk-11 Modelix model server
modelix/keycloak keycloak-extensions/Dockerfile docker-build-keycloak.sh quay.io/keycloak/keycloak Keycloak with custom plugins
modelix/modelix-mps Dockerfile-mps docker-build-mps.sh debian:buster (deprecated) MPS without Projector
modelix/modelix-base Dockerfile-base docker-build-base.sh modelix/modelix-mps (deprecated) Adds Modelix MPS plugins
modelix/projector-mps docker-build-projector-mps.sh Runs MPS with Projector without any further plugins
modelix/modelix-projector-base Dockerfile-projector-base docker-build-projector-base.sh modelix/projector-mps (deprecated) Modifies the image to directly open an MPS project without having to confirm anything
modelix/modelix-projector Dockerfile-projector docker-build-projector.sh modelix/modelix-projector-base modelix/projector-mps Adds Modelix plugins
modelix/modelix-proxy Dockerfile-proxy docker-build-proxy.sh nginx Reverse proxy to forward HTTP request to the different services inside kubernetes
modelix/modelix-workspace-client Dockerfile-workspace-client docker-build-workspace-client.sh modelix/modelix-projector Downloads an MPS project defined in a workspace before starting MPS in Projector mode
modelix/workspace-job Dockerfile-workspace-job docker-build-workspace-job.sh openjdk:11 Builds an MPS project defined in a workspace before it is loaded by a workspace-client instance
modelix/modelix-workspace-manager Dockerfile-workspace-manager docker-build-workspace-manager.sh openjdk:11 Allows to define workspace and starts "workspace-jobs" to build a workspace.zip file that is then downloaded by a "workspace-client"
modelix/modelix-instances-manager instances-manager/Dockerfile docker-build-instances-manager.sh openjdk:11 Reverse proxy that creates "workspace-client" instances on demand

modelix.kubernetes's People

Contributors

odzhychko avatar slisson avatar

Watchers

 avatar  avatar  avatar  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.