{"id":19571623,"url":"https://github.com/serlo/serlo-edusharing-integration","last_synced_at":"2025-02-26T10:42:59.469Z","repository":{"id":256926870,"uuid":"537533623","full_name":"serlo/serlo-edusharing-integration","owner":"serlo","description":"Deploy scripts to start edusharing and the serlo editor with docker in order to test the LTI integration.","archived":false,"fork":false,"pushed_at":"2023-06-08T14:18:01.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-01-09T03:14:09.202Z","etag":null,"topics":["developer-tools","serlo"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serlo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-16T16:21:04.000Z","updated_at":"2024-09-13T09:08:00.000Z","dependencies_parsed_at":"2024-09-15T02:04:53.024Z","dependency_job_id":null,"html_url":"https://github.com/serlo/serlo-edusharing-integration","commit_stats":null,"previous_names":["serlo/serlo-edusharing-integration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serlo%2Fserlo-edusharing-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serlo%2Fserlo-edusharing-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serlo%2Fserlo-edusharing-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serlo%2Fserlo-edusharing-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serlo","download_url":"https://codeload.github.com/serlo/serlo-edusharing-integration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240840032,"owners_count":19866164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","serlo"],"created_at":"2024-11-11T06:19:34.752Z","updated_at":"2025-02-26T10:42:59.414Z","avatar_url":"https://github.com/serlo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"With this repo you can deploy edu-sharing and the Serlo editor locally via\ndocker. It includes also scripts which configure the integration of the Serlo\neditor into edu-sharing.\n\nThe serlo editor container is build by:\nhttps://github.com/serlo/ece-as-a-service\n\n## Setup\n\nFor executing the scripts the following tools need to be installed:\n\n- `python` with the library `requests` (e.g. run\n  `pip install -r requirements.txt`)\n- `docker` and `docker-compose`\n- `bash` with the normal POSIX command line tools and `curl`\n\nEdu-sharings runs on the domain `repository.127.0.0.1.nip.io:8100`. Make sure\nthat this domains resolves to localhost (e.g.\n`host http://repository.127.0.0.1.nip.io:8100` should show `127.0.0.1` as a\nresult). If it is not the case update `/etc/hosts` with the following lines:\n\n```\n127.0.0.1       repository.127.0.0.1.nip.io\n127.0.0.1       rendering.services.127.0.0.1.nip.io\n```\n\n## Run\n\nWith [`./start.sh`](./start.sh) edu-sharing and the serlo editor are pulled,\ndeployed and configured.\n\n```bash\n./start.sh\n```\n\nYou can open edu-sharing under\nhttp://repository.127.0.0.1.nip.io:8100/edu-sharing/components/login. The\nusername and password is `admin`.\n\nThe serlo editor is pulled from: `https://github.com/serlo/ece-as-a-service/`\n(main branch)\n\nThe edu-sharing container is pulled from `edu-sharing.com`.\n\n### Stop containers\n\nWith [`./stop.sh`](./stop.sh) all containers can be stopped (it runs\n`./docker-compose.sh down`).\n\n### Start only serlo / edu-sharing\n\n`./start.sh` can also be used to only start edu-sharing / serlo:\n\n```bash\n# Start only edu-sharing\n./start.sh edusharing\n\n# Start only serlo\n./start.sh serlo\n```\n\n### Connect edu-sharing container to a running development instance of the editor\n\nThis is useful if you do not want to use the editor docker container pulled from\nthe repo but instead use a local running instance during development.\n\n1. Run `yarn start:server` in your local editor repo. This wont terminate, open\n   a new console window.\n2. Run `./start.sh edusharing`in this repo to pull and deploy only the\n   edu-sharing container. This can take some time, wait until it is finished.\n3. Run `./configure-edusharing.py` in this repo to register the running editor\n   instance with the running edu-sharing container. This also can take some\n   time, wait until it is finished.\n4. Search for `INFO: Serlo Editor registered. ID: FTHmXJS0fSqXp4a` in the\n   console output of `./start.sh edusharing`. Copy the id into the editor repo\n   .env file under `EDITOR_CLIENT_ID_FOR_LAUNCH` and save. This should restart\n   the running instance of the editor.\n\nNow, the editor and edu-sharing are connected. Changes to the editor code will\nrestart the editor instance without affecting the connection.\n\n## Behind the scenes (`./docker-compose.sh`)\n\nWe use `docker-compose` to deploy edu-sharing / serlo. The script\n[`./docker-compose.sh`](./docker-compose.sh) is a wrapper around\n`docker-compose` adding the configuration files and other configurations. All\narguments passed to `./docker-compose.sh` are passed to `docker-compose` as\nwell:\n\n```bash\n# Starts all containers\n./docker-compose.sh up -d\n```\n\nWith the environment variable `SETUP_PROFILE` one can set which containers shall\nbe started:\n\n```bash\n# Starts only edu-sharing\nSETUP_PROFILE=edusharing ./docker-compose.sh up -d\n\n# Starts only serlo\nSETUP_PROFILE=serlo ./docker-compose.sh up -d\n```\n\n### Useful commands\n\n```bash\n# Show logs of edu-sharing's repository-service\n./docker-compose.sh logs repository-service\n\n# Show logs of the serlo editor\n./docker-compose.sh logs editor\n\n# Show all deployed container\n./docker-compose.sh ps\n```\n\n## Configurations\n\n### Configuration of edu-sharing\n\nWith the tool [`./configure-edusharing.py`](./configure-edusharing.py) the\nintegration of the Serlo editor can be configured on a locally running\nedu-sharing. The following steps are necessary:\n\n1. Register the serlo editor via Swagger (endpoint\n   `/ltiplatform/v13/manual-registration`) or in the LTI admin panel (maybe\n   delete any old registration of a serlo editor).\n2. For the newly added serlo editor the option `ltitool_customcontent_option`\n   needs to be set to `true`.\n3. Overwrite the cluster configuration with\n   `angular.headers.X-Frame-Options: \"allow-from http://localhost:3000\"`\n4. Add property `allowed_authentication_types` with value `true` in\n   `homeApplication.properties.xml`.\n5. Remove `app-editor2.properties.xml` in the edu-sharing container.\n6. Register the serlo editor as a platform via swagger (endpoint\n   `/lti/v13/registration/static`) or via the admin console.\n\n### Configuration of serlo\n\nWith the tool [`./configure-serlo.sh`](./configure-serlo.sh) the serlo editor\ncan be configured. Note that this script needs to be run _after_ edu-sharing was\nconfigured (especially after the serlo tool was added). The configuration steps\nof this script are:\n\n1. Update `EDITOR_CLIENT_ID_FOR_LAUNCH` to the value which was given by edu-sharing.\n\n## Helper scripts\n\nThere are several helper scripts in the directory [`scripts`](./scripts),\nnamely:\n\n- With the script\n  [`update-edusharing-scripts.sh`](./scripts/update-edusharing-scripts.sh) you\n  can update the deploy scripts of edusharing in the directory\n  [`edusharing`](./edusharing) to the latest version and apply changes needed\n  for the LTI setup on Linux.\n- [`show-repository-service-manifest.sh`](./scripts/show-repository-service-manifest.sh):\n  Shows the deployed `MANIFEST.MF` of the repository service which contains the\n  commit message.\n- [`edit-editor-server-file.sh`](./scripts/edit-editor-server-file.sh): Edits\n  the `server.js` in the editor container which is useful in debugging.\n\n## Troubleshooting\n\n### Error message \"Die Kommunikation mit dem Remote-System konnte nicht verifiziert werden\"\n\nCan be solved by removing the docker volumes. Stop (`docker stop [id]`) and remove (`docker rm [id]`) all containers and run `docker volume prune -a` to delete all volumes. Careful, this removes every docker volume on your system! Use the filter option if you have volumes that should not be removed. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserlo%2Fserlo-edusharing-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserlo%2Fserlo-edusharing-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserlo%2Fserlo-edusharing-integration/lists"}