atom 2.5 docker compose

289 views
Skip to first unread message

Ricardo Pinho

unread,
Nov 27, 2018, 11:25:50 AM11/27/18
to ica-ato...@googlegroups.com
Dear Community,
I've tried to test the latest AtoM 2.5 version using the docker compose installation.

Unlike the 2.4 docker compose version, this 2.5 documentation (wiki) is not updated and I've not been able to finish the installation successfully.

I've used the following branch but unfortunately at the end I was not able to login and access the AtoM site (@http://host:63001)
git clone -b qa/2.5.x https://github.com/artefactual/atom.git atom

Did anyone used this AtoM 2.5 Docker-compose successfully?
What alternative instructions have been followed? (different from the manual)

Thank you.
Cheers,
--
Ricardo Pinho

raddao...@gmail.com

unread,
Nov 27, 2018, 11:52:25 AM11/27/18
to AtoM Users
Hi Ricardo,

I've been using the Docker Compose environment with the stable/2.4.x and qa/2.5.x branches and, other than changing the branch like you did, the documentation should be the same. Did you see any errors in the output when you were setting up the environment? Does `docker-compose ps` show you any container down?

Regards.

Ricardo Pinho

unread,
Nov 28, 2018, 11:46:45 AM11/28/18
to ica-ato...@googlegroups.com
Hi José,
Thank you for your fast reply.
I've followed exactly the same instructions.

The command:
docker-compose exec atom php symfony tools:purge --demo
returned some warning messages that I've ignored.

At first the container: docker_elasticsearch_1   gave me the error: Exit 78
After sttoping and some forcing to restart: docker-compose restart
And I've finally manage to start the elastic container...

All seems to be working butI can't log in with the credentials:
[IP]:63001/index.php/user/login

Username: de...@example.com
Password: demo

Did this worked for you?
Tomorrow I will try to test it again on a new environment!

Thank you!

           


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/c354441a-0b20-460e-9e7c-9d4c5ef083cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Ricardo Pinho

raddao...@gmail.com

unread,
Nov 28, 2018, 2:34:28 PM11/28/18
to AtoM Users
Hi Ricardo,

Right, the Elasticsearch version support has changed in AtoM qa/2.5.x (from ES 1.x to the 5.x version) and the Elasticsearch container is now using a different image. So, if you had a previous environment setup, most likely the issue is caused by Elasticsearch 5.x trying to access data created by the 1.x version. Deleting the "es_data" volume before recreating the environment should fix the problem, which you seem to have already fixed.

Probably, the warnings from the purge task come from that issue and they are impeding the superuser to be created, as this task also purges the Elasticsearch index. If the Elasticsearch container has been properly recreated, running the purge task again should get to the end and create the demo user. I hope that's it.

Best regards.

El martes, 27 de noviembre de 2018, 17:25:50 (UTC+1), Ricardo Pinho - CM Oliveira Azemeis escribió:

Ricardo Pinho

unread,
Dec 2, 2018, 12:03:01 PM12/2/18
to ica-ato...@googlegroups.com
Hi,
I finally managed to build this on a fresh ubuntu server 16.04.5 (VM).

The problem starts at the command:
docker-compose exec atom php symfony tools:purge --demo

PHP Deprecated:  Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
PHP Deprecated:  Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
PHP Deprecated:  Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
PHP Deprecated:  Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
PHP Deprecated:  Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
PHP Deprecated:  Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78

>> schema    converting "/atom/src/config/schema.yml" to XML
>> schema    putting /atom/src/config/generated-schema.xml
>> schema    converting "/atom/src/plugins/qbAclPlugin/config/schema.yml" to XML
>> schema    putting /atom/src/plugins/qbAclPlugin/config/generated-qbAclPlugin-schema.xml
>> schema    converting "/atom/src/plugins/qtAccessionPlugin/config/schema.yml" to XML
>> schema    putting /atom/src/plugins/qtAccessionPlugin/config/generated-qtAccessionPlugin-schema.xml
>> file+     config/generated-qbAclPlugin-schema.xml
>> file-     /atom/src/plugins/qbAclPlugin/config/generated-qbAclPlugin-schema.xml
>> file+     config/generated-qtAccessionPlugin-schema.xml
>> file-     /atom/src/plugins/qtAccessionPlugin/config/generated-qtAccessionPlugin-schema.xml
>> propel    Running "insert-sql" phing task
>> file-     /atom/src/config/generated-schema.xml
>> file-     /atom/src/config/generated-qtAccessionPlugin-schema.xml
>> file-     /atom/src/config/generated-qbAclPlugin-schema.xml


  Couldn't resolve host

It seems that running this command makes the elasticsearch container exit with 78.

docker-compose ps

         Name                       Command                State            Ports
-----------------------------------------------------------------------------------------
docker_atom_1            /atom/src/docker/entrypoin ...   Up        9000/tcp
docker_atom_worker_1     /atom/src/docker/entrypoin ...   Exit 1
docker_elasticsearch_1   /bin/bash bin/es-docker          Exit 78
docker_gearmand_1        docker-entrypoint.sh gearmand    Up        4730/tcp
docker_memcached_1       docker-entrypoint.sh -p 11 ...   Up        11211/tcp
docker_nginx_1           nginx -g daemon off;             Up        0.0.0.0:63001->80/tcp
docker_percona_1         /docker-entrypoint.sh mysqld     Up        3306/tcp

Even if I try to restart the elasticsearch and run the tools:purge command again it returns the same error.

Don't know if the message is related to the ending Couldn't resolve host
PHP Deprecated:  Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
PS. I've found this same issue on your redmine:https://projects.artefactual.com/issues/12568

Without passing this database fill, I can't access the AtoM site.
When I try to access:
http://[IP]:63001
it sends me to a login page, showing this:

Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 99
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78
Deprecated: Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78

Have an account?
Email *
Password *

I appreciate if you can tell me how you have passed this problem.

Thank you.
Best regards,
Ricardo Pinho

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.

For more options, visit https://groups.google.com/d/optout.


--
Ricardo Pinho

raddao...@gmail.com

unread,
Dec 3, 2018, 9:17:31 AM12/3/18
to AtoM Users
Hi Ricardo,

I think we're still facing the same issue related to the Elasticsearch upgrade. You could try to remove the volumes and force a recreation of the containers:

docker-compose down --volumes
docker-compose up -d --build --force-recreate

The Elasticsearch service takes a little more than the others to be available (or fail), so I'd wait to check that it's properly running:

docker-compose ps
docker-compose exec elasticsearch curl -XGET 'localhost:9200/?pretty'

The first command will show you if the container is up, but the most important is the second one, to verify the service is running and it's version:

{
  "name" : "LjD7RyZ",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "FYt5FcIFTJaDdPMAe3qIRQ",
  "version" : {
    "number" : "5.6.0",
    "build_hash" : "781a835",
    "build_date" : "2017-09-07T03:09:58.087Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.0"
  },
  "tagline" : "You Know, for Search"
}

After that, the purge task should be able to connect to the Elasticsearch host and finish its process.

Please, let us know how it goes.

Ricardo Pinho

unread,
Dec 3, 2018, 10:49:33 AM12/3/18
to ica-ato...@googlegroups.com
Hi José,
Thank you for the reply.
I'm sorry, the last test was indeed on a fresh VM, no way to have older volumes, upgrade, etc

But I've followed your instructions.

Just after the recreate and running the:
docker-compose ps
it returns:

         Name                       Command               State                  Ports
----------------------------------------------------------------------------------------------------
docker_atom_1            /atom/src/docker/entrypoin ...   Up       9000/tcp
docker_atom_worker_1     /atom/src/docker/entrypoin ...   Exit 1
docker_elasticsearch_1   /bin/bash bin/es-docker          Up       0.0.0.0:63002->9200/tcp, 9300/tcp
docker_gearmand_1        docker-entrypoint.sh gearmand    Up       4730/tcp
docker_memcached_1       docker-entrypoint.sh -p 11 ...   Up       11211/tcp
docker_nginx_1           nginx -g daemon off;             Up       0.0.0.0:63001->80/tcp
docker_percona_1         /docker-entrypoint.sh mysqld     Up       3306/tcp

If I wait for 1 minute and rerun:
docker-compose ps
it returns:
         Name                       Command                State            Ports
-----------------------------------------------------------------------------------------
docker_atom_1            /atom/src/docker/entrypoin ...   Up        9000/tcp
docker_atom_worker_1     /atom/src/docker/entrypoin ...   Exit 1
docker_elasticsearch_1   /bin/bash bin/es-docker          Exit 78
docker_gearmand_1        docker-entrypoint.sh gearmand    Up        4730/tcp
docker_memcached_1       docker-entrypoint.sh -p 11 ...   Up        11211/tcp
docker_nginx_1           nginx -g daemon off;             Up        0.0.0.0:63001->80/tcp
docker_percona_1         /docker-entrypoint.sh mysqld     Up        3306/tcp

And then the next command returns error:
docker-compose exec elasticsearch curl -XGET 'localhost:9200/?pretty'

ERROR: No container found for elasticsearch_1

Even if I try to restart elasticsearch, after a while it goes down again.


For more options, visit https://groups.google.com/d/optout.


--
Ricardo Pinho

raddao...@gmail.com

unread,
Dec 3, 2018, 11:26:43 AM12/3/18
to AtoM Users
Hi again Ricardo,

Maybe we can find some info in the logs from the Elasticsearch container. Try restarting the container:

docker-compose restart elasticsearch

And, in another terminal, check the logs until it goes down:

docker-compose logs -f elasticsearch

Let us know what you see.

raddao...@gmail.com

unread,
Dec 3, 2018, 11:43:52 AM12/3/18
to AtoM Users
Hi again Ricardo,

It could be a virtual memory issue as Elasticsearch requires a high mmap counts limit in the latest versions. Try increasing that value in the host and then restart the Elasticsearch container again:

sudo sysctl -w vm.max_map_count=262144
docker-compose restart elasticsearch

More information and how to set that value permanently in here.

Sorry I didn't think about that sooner.

Ricardo Pinho

unread,
Dec 3, 2018, 12:05:27 PM12/3/18
to ica-ato...@googlegroups.com
Hi José,
Yes, I confirm that, after looking at the error log:
elasticsearch_1  | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
After the recommended commands:
sudo sysctl -w vm.max_map_count=262144
docker-compose restart elasticsearch
It does respond to:
docker-compose exec elasticsearch curl -XGET 'localhost:9200/?pretty' 
 
The :
docker-compose exec atom php symfony tools:purge --demo
Still outputs the Deprecated messages:

PHP Deprecated:  Function create_function() is deprecated in /atom/src/vendor/symfony/lib/config/sfConfigHandler.class.php on line 78

But ends with:
>> propel    Purge complete!

After the next steps:
docker-compose exec atom make -C plugins/arDominionPlugin 
docker-compose restart atom_worker 

The http://[IP]:63001 site finally appears! 
with the Deprecated messages... (see attached image)
 
Thank you!


For more options, visit https://groups.google.com/d/optout.


--
Ricardo Pinho
atom25docker.png

raddao...@gmail.com

unread,
Dec 3, 2018, 12:30:36 PM12/3/18
to AtoM Users
Glad it worked Ricardo!

As you noted, we already have an issue created for the deprecated function. This environment is only suited for development and test but, if you want to hide those messages, you can probably achieve it modifying the PHP configuration in:


Best regards.

Ricardo Pinho

unread,
Dec 3, 2018, 2:28:37 PM12/3/18
to ica-ato...@googlegroups.com, Dan Gillean
Thank you very much José!

If I may, please let me suggest to update the documentation with this value information for others to come:

1. Correct atom source version
replace:
git clone -b stable/2.4.x https://github.com/artefactual/atom.git atom
for:
git clone  --depth 1 -b qa/2.5.x https://github.com/artefactual/atom.git atom

2. Add this note vm memory requirement before running the docker-compose

Something like:
Note: For elasticsearch container to run increase the max virtual memory areas vm.max_map_count to at least [262144]
sudo sysctl -w vm.max_map_count=262144
# Create and start containers. This may take a while the first time you run
# it because all the images have to be downloaded (e.g. percona, memcached)
# and the AtoM image has to be built.
docker-compose up -d
Best regards,
Ricardo Pinho
--
Ricardo Pinho

raddao...@gmail.com

unread,
Dec 4, 2018, 6:02:04 AM12/4/18
to AtoM Users
Thanks for the suggestion Ricardo, I fully agree ;)


Best regards.

Ricardo Pinho

unread,
Jan 15, 2019, 11:18:55 AM1/15/19
to ica-ato...@googlegroups.com
Hi José,
Another ISSUE for you to look at... this time with the solution! ;-)
Kind regards,
Ricardo Pinho


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.

For more options, visit https://groups.google.com/d/optout.


--
Ricardo Pinho

Dan Gillean

unread,
Jan 16, 2019, 1:27:25 PM1/16/19
to ICA-AtoM Users
Thanks for this, Ricardo! 

Radda is away on vacation right now, but I will ask him to look at the GitHub issue you've filed when he has returned. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


José Raddaoui

unread,
Jan 17, 2019, 11:29:00 AM1/17/19
to AtoM Users
Thanks Ricardo!

I've created a Redmine issue and a PR with your suggestion.

Best regards.
Reply all
Reply to author
Forward
0 new messages