Open fishfree opened 3 years ago
Hi, I'm glad to hear that you are interested in deploying the VLO. There actually are some fairly detailed deployment instructions available. I also recommend having a look at the Docker Compose project that exists for the VLO - this should be the easiest way to get the VLO up and running but keep in mind that there are a lot of configuration options that you may have to review and adapt.
Note that complete customisation is not properly supported yet, but you can override a lot of configurations and markup, for instance by adding your own Docker Compose configurations. I hope this helps. If you have any further questions, feel free to leave a comment here!
@twagoo Many thanks for your quick reply and encourage! I followed the README.md, after run ./control.sh -s start
, 2 containers start up, no port mapping, I cannot access VLO. Would you be kind to provide a step by step documentation of setting-up a produciton server for novices like me, please?
Hi, I'm glad to hear that you are interested in deploying the VLO. There actually are some fairly detailed deployment instructions available. I also recommend having a look at the Docker Compose project that exists for the VLO - this should be the easiest way to get the VLO up and running but keep in mind that there are a lot of configuration options that you may have to review and adapt.
Note that complete customisation is not properly supported yet, but you can override a lot of configurations and markup, for instance by adding your own Docker Compose configurations. I hope this helps. If you have any further questions, feel free to leave a comment here!
@twagoo , I have tried setting this project up in every conceivable way, from building from source, using the development instructions making you run vlo-solr and vlo-web separately to using the compose_vlo project. Also, using the compose_vlo project, I have tried all the versions you guys have published and I could not get this project to run. I honestly think there is a big chunk of documentation missing, environment variables people need to set that isn't mentioned or undocumented procedures to run, because after 4 days of trying to get this to run, I'm honestly done.
And finally, the compose should most definitely not be linked to a cli project to be able to run and be dependent on a specific directory structure. People should at minimum be able to just run docker compose up (-d)
and with env variables enhance that minimum setup. Also, it is confusing as hell to have a submodule of the control-script repo inside the compose_vlo repo and then (in the README) have people make a directory structure that has another control-script repo reference and symlinks scattered.
@twagoo , I have tried setting this project up in every conceivable way, from building from source, using the development instructions making you run vlo-solr and vlo-web separately to using the compose_vlo project. Also, using the compose_vlo project, I have tried all the versions you guys have published and I could not get this project to run. I honestly think there is a big chunk of documentation missing, environment variables people need to set that isn't mentioned or undocumented procedures to run, because after 4 days of trying to get this to run, I'm honestly done.
@ibrahimab thanks a lot for the feedback. I agree that documentation for the VLO is lacking in clear instructions for setting it up outside the CLARIN context. Our focus thus far has been deployment inside the CLARIN infrastructure and efforts to make it easily available as a 'turnkey' solution for others are not complete as you and the OP have experienced.
I cannot promise that a complete solution or tailored documentation for such a use case will become in the short term. However I could add a dedicated section to the relevant README files that offers sufficient instructions to at least get the VLO up and running. The following set of commands should do the trick. Would you be able to test this out and confirm this?
# clone repo
git clone https://gitlab.com/CLARIN-ERIC/compose_vlo/
cd compose_vlo/clarin
# OPTIONALLY checkout to a tagged release (master is always latest *stable*)
# git checkout vlo-4.10.1-1
# make .env file from template
cp .env-template .env
# start with compose command, including the 'overlay' YAML that adds configuration which publishes the Tomcat port locally at `8181`
docker-compose -f docker-compose.yml -f expose-tomcat.yml up -d
# wait for services to start and reach healthy state
docker-compose ps
# an (empty) VLO should now be available at http://localhost:8181
Next steps would be get metadata records in the metadata volume, and a matching data roots configuration file in place. This is actually documented at https://gitlab.com/CLARIN-ERIC/compose_vlo/#run-the-importer-to-ingest-cmdi-metadata-into-the-vlo.
Let me know if this works for you - if so, I will add this to the documentation. If not, we have works on my machine and I need to figure out what false assumptions are made.
And finally, the compose should most definitely not be linked to a cli project to be able to run and be dependent on a specific directory structure. People should at minimum be able to just run
docker compose up (-d)
and with env variables enhance that minimum setup. Also, it is confusing as hell to have a submodule of the control-script repo inside the compose_vlo repo and then (in the README) have people make a directory structure that has another control-script repo reference and symlinks scattered.
This is a CLARIN-internal convention for the purpose of deployment management. I understand that at the level of an individual project this is a lot of overhead, and I agree that its usage should be optional. Nearly all functions can be performed through compose commands or bundled scripts however. As explained above, this has not been a documentation priority.
I have tried your example in the previous comment, and like the compose_vlo, the standalone vlo and via the control-script way, I keep getting the same problem. Your method produces this error continuously when following the logs, which btw is the same thing that happens with every other method I mentioned above.
My guess is, either I'm missing env variables that the build/run scripts depends on or the platform I'm running on is missing something. Because, running vlo-solr on its own (docker-solr or the official solr image) works, but when running this project, this happens.
vlo-vlo-solr-1 | 2021-11-12 00:42:12.965115813 +0000 solr: {"message":"Starting Solr "}
vlo-vlo-solr-1 | 2021-11-12 00:42:15.501241956 +0000 supervisord: {"message_date":"2021-11-12","supervisor_time":"00:42:14,285","log_level":"INFO","message":"success: solr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)"}
vlo-vlo-solr-1 | 2021-11-12 00:42:15.948414013 +0000 supervisord: {"message_date":"2021-11-12","supervisor_time":"00:42:15,520","log_level":"INFO","message":"exited: solr (terminated by SIGKILL; not expected)"}
vlo-vlo-solr-1 | 2021-11-12 00:42:16.947986143 +0000 supervisord: {"message_date":"2021-11-12","supervisor_time":"00:42:16,536","log_level":"INFO","message":"spawned: 'solr' with pid 890"}
vlo-vlo-solr-1 | 2021-11-12 00:42:16.963691271 +0000 solr: {"message":"Starting Solr "}
vlo-vlo-solr-1 | 2021-11-12 00:42:18.710204652 +0000 supervisord: {"message_date":"2021-11-12","supervisor_time":"00:42:17,587","log_level":"INFO","message":"success: solr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)"}
vlo-vlo-solr-1 | 2021-11-12 00:42:19.951817672 +0000 supervisord: {"message_date":"2021-11-12","supervisor_time":"00:42:19,294","log_level":"INFO","message":"exited: solr (terminated by SIGKILL; not expected)"}
vlo-vlo-solr-1 | 2021-11-12 00:42:20.949825608 +0000 supervisord: {"message_date":"2021-11-12","supervisor_time":"00:42:20,314","log_level":"INFO","message":"spawned: 'solr' with pid 946"}
vlo-vlo-solr-1 | 2021-11-12 00:42:20.964882697 +0000 solr: {"message":"Starting Solr "}
vlo-vlo-solr-1 | 2021-11-12 00:42:21.948556277 +0000 supervisord: {"message_date":"2021-11-12","supervisor_time":"00:42:21,479","log_level":"INFO","message":"success: solr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)"}
And ends with docker-compose ps
showing "unhealthy" and these messages being produced until i kill it personally.
@twagoo I tried your example, but included -f expose-solr.yml on the docker-compose up line and it worked! Thanks :)
# clone repo
git clone https://gitlab.com/CLARIN-ERIC/compose_vlo/
cd compose_vlo/clarin
# OPTIONALLY checkout to a tagged release (master is always latest *stable*)
# git checkout vlo-4.10.1-1
# make .env file from template
cp .env-template .env
# start with compose command, including the 'overlay' YAML that adds configuration which publishes the Tomcat port locally at `8181`
docker-compose -f docker-compose.yml -f expose-tomcat.yml -f expose-solr.yml up -d
# wait for services to start and reach healthy state
docker-compose ps
# an (empty) VLO should now be available at http://localhost:8181
If I can be of any help with setting up an easy to use docker (compose) setup for people to try out, please do not hesitate to contact me. That includes writing easier documentation, because right now it's a mess. All the links referring to the master branch, even though there are major differences between 1.x and 2.x on the control script.
I would also be open to (help) creating like a global cli project, like angular cli and react have, that include an one-line execution to setup a running project.
Glad to see a big progress! However, I still cannot get it running.
⠿ vlo-solr Pulled
⠿ f81ff37d3565 Pull complete
⠿ c89719cfc446 Pull complete
⠿ 3c133c37a7e9 Pull complete
⠿ 59aa10faf448 Pull complete
⠿ 0a73418f5ebc Pull complete
⠿ 276aa6da2ca3 Pull complete
⠿ 6f39b851f1ea Pull complete
⠿ 39499c0347b8 Pull complete
⠿ 620268f54b1e Pull complete
⠿ 3e1748ceb5f4 Pull complete
⠿ e3c824ef8f92 Pull complete
⠿ 35f750becd60 Pull complete
⠿ b1025f1da98e Pull complete
[+] Running 2/2
⠿ Network vlo_network_vlo Created
⠿ Network vlo_network_internet Created
external volume "" not found
ubuntu@ip-172-26-6-209:~/compose_vlo/clarin$ docker-compose ps
WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string.
NAME COMMAND SERVICE STATUS PORTS
external volume "" not found
I suspect that you don't have all of your environment variables configured properly. Is there a file clarin/.env
(can be a symlink as long as it points to an existing file) and does it have a value configured for all of the following variables?
METADATA_VOLUME
METADATA_DIR
SITEMAP_VOLUME
STATSD_VOLUME
OTHER_PROVIDERS_MARKUP_DIR
VLO_DOCKER_MONITOR_RULES_FILE_DIR
VLO_DOCKER_MONITOR_RULES_DIR_CONTAINER
VLO_MONITORING_DATA_VOLUME
VLO_DOCKER_MONITOR_DB_PATH
For the record, I think these should have defaults in the docker-compose file so that setting them is optional or else not setting them should explicitly lead to an error. This is something that I hope to be able to do for an upcoming version.
@twagoo I strictly run all these commands. And also uncomment your post variables in the .env file, and run agains, it shows:
ubuntu@ip-172-26-6-209:~/compose_vlo/clarin$ docker-compose -f docker-compose.yml -f expose-tomcat.yml -f expose-solr.yml up -d
WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string.
service "vlo-web" refers to undefined volume vlo-mapping-data: invalid compose project
@twagoo I strictly run all these commands. And also uncomment your post variables in the .env file, and run agains, it shows:
ubuntu@ip-172-26-6-209:~/compose_vlo/clarin$ docker-compose -f docker-compose.yml -f expose-tomcat.yml -f expose-solr.yml up -d WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string. service "vlo-web" refers to undefined volume vlo-mapping-data: invalid compose project
Oops, you've found a bug in the .env template there. Assuming you are using the current master branch of compose-vlo
, You can either comment out the line that defines VLO_MONITORING_DATA_VOLUME
, or configure it like this:
VLO_MONITORING_DATA_VOLUME=vlo-monitoring-data
@twagoo When I comment out the line that defines VLO_MONITORING_DATA_VOLUME, it shows errorexternal volume "" not found
mentioned above. When I uncomment it, it show errors as below:
WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string.
service "vlo-web" refers to undefined volume vlo-mapping-data: invalid compose project
@twagoo When I comment out the line that defines VLO_MONITORING_DATA_VOLUME, it shows error
external volume "" not found
mentioned above. When I uncomment it, it show errors as below:WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string. service "vlo-web" refers to undefined volume vlo-mapping-data: invalid compose project
Hi @fishfree are you on the latest revision of master (1c7af063fee5c6492415e978a6d97b9763d3d6e7) and have no other enabled line that defines VLO_MONITORING_DATA_VOLUME
?
Otherwise I suggest setting
VLO_MONITORING_DATA_VOLUME=vlo-monitoring-data
at the very end of clarin/.env
to make sure that this value is used. Confirm that the volume vlo-monitoring-data
is defined in clarin/docker-compose.yml
.
I'd like to deploy this great VLO for my university. But no detailed documentation. Could anyone share a tutorial please? Many thanks!