Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dip command "ag-create-repo" doesn't work #4

Open
jvendetti opened this issue Jan 17, 2024 · 1 comment
Open

Dip command "ag-create-repo" doesn't work #4

jvendetti opened this issue Jan 17, 2024 · 1 comment
Assignees

Comments

@jvendetti
Copy link
Member

I'm trying to execute the ag-create-repo dip command, but it's failing with a "no such service" message:

ontoportal_docker git:(main) ✗ docker compose -f docker-compose.backend_only.yml --profile agraph up -d
[+] Building 0.0s (0/0)                                                                                                                                                                                                                 docker:desktop-linux
[+] Running 6/6
 ✔ Network ontoportal_docker_default     Created                                                                                                                                                                                                        0.1s
 ✔ Container ontoportal_docker-solr-1    Started                                                                                                                                                                                                        0.2s
 ✔ Container ontoportal_docker-mgrep-1   Started                                                                                                                                                                                                        0.1s
 ✔ Container ontoportal_docker-agraph-1  Started                                                                                                                                                                                                        0.1s
 ✔ Container ontoportal_docker-redis-1   Started                                                                                                                                                                                                        0.1s
 ✔ Container ontoportal_docker-4store-1  Started                                                                                                                                                                                                        0.1sontoportal_docker git:(main) ✗ dip ag-create-repo
no such service: agraph

Context

Now that we're running on AllegroGraph in production, I want to run BioPortal REST API unit tests against AllegroGraph in my local development environment (instead of against 4store, which I'm still currently doing).

For example, I want to execute the unit test suite for ontologies_linked_data like so:

➜  ontologies_linked_data git:(develop) ✗ bundle exec rake test TESTOPTS="-v"

But this results in an error message about a missing triplestore:

Unable to open triple-store "ontoportal_test" (it does not appear to exist). (SPARQL::Client::ClientError)
@jvendetti
Copy link
Member Author

jvendetti commented Jan 20, 2024

In case it's helpful, I'm posting a workaround from @alexskr

Launch containers using the AllegroGraph profile

docker compose -f docker-compose.backend_only.yml --profile agraph up -d

Delete the 4store container

It's a known issue that both 4store and AllegroGraph are started when using the agraph profile. Use the Docker Desktop application to delete the 4store container.

This step is optional, but it may assist in avoiding insufficient memory errors with subsequent steps:

When allocating the string table failed to create shared memory segment of size 134,225,920, message: "insufficient shared memory space available"

Create an AllegroGraph test database

docker compose -f docker-compose.backend_only.yml --profile agraph exec -it agraph agtool repos create ontoportal_test

In my development environment, this command often fails with insufficient shared memory errors. The only way I can created the test database is to repeatedly execute the command until it succeeds.

Grant user privileges

docker compose -f docker-compose.backend_only.yml --profile agraph exec -it agraph agtool users grant anonymous root:ontoportal_test:rw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants