Open richang2009 opened 1 year ago
The repo_dir
works as follows:
grendel.toml
:# Path to repo directory
repo_dir = "/var/lib/grendel/repo"
/var/lib/grendel/repo
:$ find /var/lib/grendel/repo/
/var/lib/grendel/repo/mytestfile.txt
/var/lib/grendel/repo/ubuntu
/var/lib/grendel/repo/ubuntu/ubuntu-20.04.2-live-server-amd64.iso
/repo
path. For example:
$ curl http://x.x.x.x/repo/mytestfile.txt
$ curl http://x.x.x.x/repo/ubuntu/ubuntu-20.04.2-live-server-amd64.iso
Can you confirm you're using the correct path?
I have set the repo_dir to a local directory under the user home directory. Does it have to be under /var/lib/grendel/repo only ?
Even if we set the repo_dir to /var/lib/grendel/repo, why do we need to mention http://local_IP/repo
and not http://local_IP/
I have set the repo_dir to a local directory under the user home directory. Does it have to be under /var/lib/grendel/repo only ?
No you can set it to any path on the filesystem. The default is /var/lib/grendel/repo
Even if we set the repo_dir to /var/lib/grendel/repo, why do we need to mention
http://local_IP/repo
and nothttp://local_IP/
Grendel server repo_dir
under the URL path /repo
. So any files in that dir will be accessible via HTTP using the /repo
path. For example, http://local_IP/repo/my-file
I am just not able to get the http service recognize a repo dir.
Whatever repo_dir I set to, in the grendel.toml file, none of them works.
This is what I see in the log.
[2024-06-13T10:06:19+05:30] INFO PROVISION: Routes in order: [] [2024-06-13T10:06:19+05:30] INFO PROVISION: Using repo dir: [2024-06-13T10:06:19+05:30] INFO PROVISION: Listening on http://192.168.3.254:80 [2024-06-13T10:06:19+05:30] INFO PROVISION: ⇨ http server started on 192.168.3.254:80
Using curl to download the file I know it is there in the directory also doesn't work.
user@VBOXubuntu:~$ curl http://192.168.3.254/repo/test.txt {"message":"Not Found"}
[2024-06-13T10:11:24+05:30] WARN PROVISION: Requested path not found ip=192.168.3.254 path=/repo/test.txt
Hello, please make sure Grendel is reading the correct configuration file, you should see: INFO CLI: Using config file: /etc/grendel/grendel.toml
in your logs. This can be set by executing Grendel with the -c /etc/grendel/grendel.toml
flag. Also make sure the repo_dir option is both uncommented and placed under the [provision]
section in said config file like so:
#------------------------------------------------------------------------------
# HTTP Provision Server
#------------------------------------------------------------------------------
[provision]
# Path to repo directory
repo_dir = "/var/lib/grendel/repo"
Then you should see this in your logs: INFO PROVISION: Using repo dir: /var/lib/grendel/repo
Hi, http doesn't seem to be working. When I try to serve a directory using the "repo_dir" variable in the grendel.toml file, the client (compute and/or curl and wget) can't seem to download any file. Gets a 404 not found when using wget. I have never been able to server any files using http. Not in 0.0.6, not in 0.0.7 and also not in 0.0.8. Not sure if it is just me only.
Thanks, RC