franzinc / docker-agraph Goto Github PK
View Code? Open in Web Editor NEWRun AllegroGraph in a Docker container
Run AllegroGraph in a Docker container
entrypoint.sh
, there needs to be a note or have chmod +x entrypoint.sh
in the Dockerfile
..to avoid the assumption that entrypoint.sh
is executableentrypoint.sh
, afaik and atm, the block of code below is INSIDE the # No agraph.cfg set, run configure-agraph
logic flow....I am pretty sure this is not correct and needs correction..i believe the intended pseudo code is: if user config file found..do something ..else (no user cfg file) do something....after all of that run the block of code below/agraph/lib/configure-agraph \
--non-interactive \
--config-file $AG_CFG_FILE \
--data-dir $AG_DATA_DIR \
--log-dir $AG_DATA_DIR \
--super-user "$AGRAPH_SUPER_USER" \
--super-password "$AGRAPH_SUPER_PASSWORD" \
--session-ports 10000-10034 \
--runas-user $AG_RUNAS_USER
shm
in k8s is as below. See https://franz.com/agraph/support/documentation/current/docker.htmlvolumes:
- emptyDir:
medium: Memory
sizeLimit: 2Gi
name: cache-volume
volumeMounts:
- mountPath: /dev/shm
name: cache-volume
agraph.cfg
to your pod... don't do it ...mounted configmaps are read-only... so when entrypoint.sh
runs (assuming that it is fixed as mentioned in point number 2) as instructed by the Dockerfile
's entrypoint...it will fail because running /agraph/lib/configure-agraph
means changing agraph.cfg
..which is a mounted configmap volume......so read-only..the error you would get is like below.Found user-defined AllegroGraph configuration at /agraph/etc/agraph.cfg
/agraph/lib/configure-agraph: line 574: /agraph/etc/agraph.cfg: Read-only file system
FYI, we thought we were slick by changing this in entrypoint.sh
..meaning ignore the file agraph.cfg
..but in the end ..it doesn't matter
# Find all files not owned by $AG_RUNAS_USER in the /agraph/data and
# /agraph/etc directories (volume mount points) and change ownership
# to $AG_RUNAS_USER:$AG_RUNAS_GROUP.
find /agraph/data /agraph/etc \! -user agraph \! -name '*.cfg' -exec sudo chown $AG_RUNAS_USER {} +
I configured AllegroGraph using docker-compose and I constantly get this error upping connecting to the backend using agraph-python
, even though the credentials seem to be correct:
franz.miniclient.request.RequestError: Server returned 401: Invalid username/password combination.
When I comment out the volumes
section, then everything works fine.
From my docker-compose file:
agraph:
image: franzinc/agraph
volumes: # When this section is commented out, the everything works fine
- agraph-data:/agraph/data
- ${CERT_BUNDLE_PATH}:/etc/ssl/certs/bundle.pem
- ./agraph.cfg:/agraph/etc/agraph.cfg
ports:
- "10000-10035:10000-10035"
networks:
- intranet
environment:
- AGRAPH_SUPER_USER
- AGRAPH_SUPER_PASSWORD
restart: on-failure
shm_size: 4g
Content of file agraph.cfg
:
RunAs agraph
SessionPorts 10000-10034
Port 10035
SSLPort 10036
SettingsDirectory /agraph/data/settings
LogDir /agraph/data
PidFile /agraph/data/agraph.pid
InstanceTimeout 604800
SSLCertificate /etc/ssl/certs/bundle.pem
<RootCatalog>
Main /agraph/data/rootcatalog
</RootCatalog>
<SystemCatalog>
Main /agraph/data/systemcatalog
InstanceTimeout 10
</SystemCatalog>
the current Docker version for MacOS is: Docker 18.06.0-ce-mac70 is currently the newest version available.
I believe the documentation at https://franz.com/agraph/docker/ is outdated. Am I right? The issue #1 still persists.
I tried change the VERSION in makefile without success! How to upgrade to 6.0.2?
The current 6.0.1 start with a warnning:
thp
Systemwide Transparent Hugepage (THP) support is enabled. Transparent Hugepages are known to cause performance problems for large databases. Consider disabling THP by executing (as root): echo never > /sys/kernel/mm/transparent_hugepage/enabled
. For more information, see: http://franz.com/agraph/support/documentation/current/performance-tuning.html#THP
I tried to start with
% podman run -d -e AGRAPH_SUPER_USER=test -e AGRAPH_SUPER_PASSWORD=xyzzy -p 10000-10035:10000-10035 --shm-size 1g --name agraph --restart=always franzinc/agraph
Resolving "franzinc/agraph" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/franzinc/agraph:latest...
Getting image source signatures
Copying blob sha256:480132409357ae5587627204f0ced161306f9a836aa5b85b97041179bcf65d65
Copying blob sha256:5bed26d33875e6da1d9ff9a1054c5fef3bbeb22ee979e14b72acf72528de007b
Copying blob sha256:f11b29a9c7306674a9479158c1b4259938af11b97359d9ac02030cc1095e9ed1
Copying blob sha256:930bda195c84cf132344bf38edcad255317382f910503fef234a9ce3bff0f4dd
Copying blob sha256:78bf9a5ad49e4ae42a83f4995ade4efc096f78fd38299cf05bc041e8cdda2a36
Copying blob sha256:6c2cabc6d26383ea81907a94da3b6878eb761df490db9601d9e925389b9b4834
Copying blob sha256:3e323b6cf798bfae86d41863eb49a8683b68662209b6e6b1882138408715a3d7
Copying blob sha256:62415b940e78e841d0985e2a4895fef4b1261103f0d4bb71391668ee2c2dd446
Copying config sha256:bd807bd54678df61af4a2b10f912f4cf1727d77c3c3cf10ef40bbafb3340bae9
Writing manifest to image destination
687e97e07b6a346f8e9a6d9cdc95c0d563797b47d0d88fd1898b8827efc40900
(venv) ar@tenis emap-nlp-2023.2 % podman run -d -e AGRAPH_SUPER_USER=test -e AGRAPH_SUPER_PASSWORD=xyzzy -p 10000-10035:10000-10035 --shm-size 1g --name agraph --restart=always franzinc/agraph
eae4a033b0dd7496deea5f4661c1ec6cb9645cca023225ec5c0771dcca1562e2
I am getting the log:
sudo: unable to send audit message
sudo: pam_open_session: System error
sudo: policy plugin failed session initialization
sudo: unable to send audit message
sudo: pam_open_session: System error
sudo: policy plugin failed session initialization
...
Following the http://franz.com/agraph/docker/, I would expect being able to use a data volume. But run.sh is not using --volumes-from, right? Why the Dockerfile.data file anyway ?
I want to send SPARQL queries via REST.
What is the URL of the endpoint once this is running?
Alternatively, what is the curl
command to do that?
Assume I created the catalog called my_db
I am expecting something like
curl "http://localhost/catalogs/sparql?query=SELECT%20*%20WHERE%20%7B%3Fs%20%3Fp%20%3Fo%7D%20LIMIT%208"
I've been trying to deploy the latest image with podman-compose and haven't been unable to figure out why it does no work. Can anyone help me?
Zip containing the compose.yml and additional config files: agraph_issue_example.zip
Log:
➜ agraph_issue_example podman-compose up
['podman', '--version', '']
using podman version: 4.3.1
** excluding: set()
['podman', 'network', 'exists', 'agraph_issue_example_default']
['podman', 'network', 'create', '--label', 'io.podman.compose.project=agraph_issue_example', '--label', 'com.docker.compose.project=agraph_issue_example', 'agraph_issue_example_default']
['podman', 'network', 'exists', 'agraph_issue_example_default']
podman create --name=agraph_issue_example_agraph_1 --label io.podman.compose.config-hash=123 --label io.podman.compose.project=agraph_issue_example --label io.podman.compose.version=0.0.1 --label com.docker.compose.project=agraph_issue_example --label com.docker.compose.project.working_dir=/Users/eltons/Code/agraph_issue_example --label com.docker.compose.project.config_files=compose.yml --label com.docker.compose.container-number=1 --label com.docker.compose.service=agraph -v /Users/eltons/Code/agraph_issue_example/agraph-config/agraph.cfg:/agraph/etc/agraph.cfg -v /Users/eltons/Code/agraph_issue_example/agraph-data:/agraph/data/ --net agraph_issue_example_default --network-alias agraph -p 10035:10035 -p 11036-11436:11036-11436 --shm-size 4g franzinc/agraph:v7.3.0
Resolving "franzinc/agraph" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/franzinc/agraph:v7.3.0...
Getting image source signatures
Copying blob sha256:480132409357ae5587627204f0ced161306f9a836aa5b85b97041179bcf65d65
Copying blob sha256:5bed26d33875e6da1d9ff9a1054c5fef3bbeb22ee979e14b72acf72528de007b
Copying blob sha256:78bf9a5ad49e4ae42a83f4995ade4efc096f78fd38299cf05bc041e8cdda2a36
Copying blob sha256:f11b29a9c7306674a9479158c1b4259938af11b97359d9ac02030cc1095e9ed1
Copying blob sha256:930bda195c84cf132344bf38edcad255317382f910503fef234a9ce3bff0f4dd
Copying blob sha256:6c2cabc6d26383ea81907a94da3b6878eb761df490db9601d9e925389b9b4834
Copying blob sha256:7ff2721009c62901f977ed5b2a3537c1ec513bad8d37bb43ace5734f67d7d6b3
Copying blob sha256:1b0ea6736978c3f15e6e461062e0a69d87d20c5f6f85653b84283194d5730da1
Copying config sha256:a2fbc773ea405121c32a709e197e8f02c8a355669e1b1f67d0d435aca37dbed4
Writing manifest to image destination
Storing signatures
42040d8d260eb8f34bcb18e9331d0284789184e4addbf63bc22f5686b571c8a9
exit code: 0
podman start -a agraph_issue_example_agraph_1
sudo: unable to send audit message
sudo: pam_open_session: System error
sudo: policy plugin failed session initialization
exit code: 1
Podman Machine Info:
➜ agraph_issue_example podman machine info
Host:
Arch: amd64
CurrentMachine: podman-machine-default
DefaultMachine: ""
EventsDir: /var/folders/0w/3rvhqpr16rb46fxbpklj93000000gn/T/podman-run--1/podman
MachineConfigDir: /Users/eltons/.config/containers/podman/machine/qemu
MachineImageDir: /Users/eltons/.local/share/containers/podman/machine/qemu
MachineState: Running
NumberOfMachines: 1
OS: darwin
VMType: qemu
Version:
APIVersion: 4.3.1
Built: 1668026638
BuiltTime: Wed Nov 9 17:43:58 2022
GitCommit: ""
GoVersion: go1.18.8
Os: darwin
OsArch: darwin/amd64
Version: 4.3.1
Podman Machine Inspect:
agraph_issue_example podman machine inspect
[
{
"ConfigPath": {
"Path": "/Users/eltons/.config/containers/podman/machine/qemu/podman-machine-default.json"
},
"ConnectionInfo": {
"PodmanSocket": {
"Path": "/Users/eltons/.local/share/containers/podman/machine/podman-machine-default/podman.sock"
}
},
"Created": "2022-11-21T21:49:55.772295-03:00",
"Image": {
"IgnitionFilePath": {
"Path": "/Users/eltons/.config/containers/podman/machine/qemu/podman-machine-default.ign"
},
"ImageStream": "testing",
"ImagePath": {
"Path": "/Users/eltons/.local/share/containers/podman/machine/qemu/podman-machine-default_fedora-coreos-37.20221106.2.1-qemu.x86_64.qcow2"
}
},
"LastUp": "2022-11-22T15:28:48.181752-03:00",
"Name": "podman-machine-default",
"Resources": {
"CPUs": 3,
"DiskSize": 50,
"Memory": 8192
},
"SSHConfig": {
"IdentityPath": "/Users/eltons/.ssh/podman-machine-default",
"Port": 60771,
"RemoteUsername": "core"
},
"State": "running"
}
]
OS Info:
agraph_issue_example sw_vers
ProductName: macOS
ProductVersion: 13.0.1
BuildVersion: 22A400
Hardware Info:
MacBook Pro 2019
2,6 GHz 6-Core Intel Core i7
16 GB 2667 MHz DDR4
SSD 500GB (249,98 GB available)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.