Hi. we are trying to deploy Primero locally and encounter error when run ansible-playbook application-primero.yml --tags configure,start -i inventory/inventory.yml -l demo.ai4ertong.cn . Appreciate if anyone can help on this. thanks, Jim
(venv) ubuntu@VM-16-14-ubuntu:~/primero/ansible$ ansible-playbook bootstrap.yml -i inventory/inventory.yml -l demo.ai4ertong.cn
[WARNING]: Could not match supplied host pattern, ignoring: vpc
[WARNING]: Could not match supplied host pattern, ignoring: first_run
PLAY [!vpc:!first_run] ******************************************************************************************************************
TASK [quoin.infrastructure.install_python3 : install Python version 3] ******************************************************************
changed: [demo.ai4ertong.cn]
PLAY [all:!first_run] *******************************************************************************************************************
TASK [Gathering Facts] ******************************************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_sudo : install sudo] *********************************************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.become_no_password : include_tasks] **************************************************************************
included: /home/ubuntu/primero/ansible/ansible_collections/quoin/infrastructure/roles/become_no_password/tasks/family-debian.yml for demo.ai4ertong.cn
TASK [quoin.infrastructure.become_no_password : Debian :: add ubuntu to the sudo group] *************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.become_no_password : Debian :: disable the password requirement for sudo] ************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.become_no_password : include_tasks] **************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.become_no_password : include_tasks] **************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.openssh_passwordauthentication_no : disable PasswordAuthentication] ******************************************
ok: [demo.ai4ertong.cn]
PLAY RECAP ******************************************************************************************************************************
demo.ai4ertong.cn : ok=7 changed=1 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
(venv) ubuntu@VM-16-14-ubuntu:~/primero/ansible$ ansible-playbook install-docker.yml -i inventory/inventory.yml -l demo.ai4ertong.cn
PLAY [all] ******************************************************************************************************************************
TASK [Gathering Facts] ******************************************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [manage-users : Ensure group primero exists] ***************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [manage-users : create application container user] *********************************************************************************
ok: [demo.ai4ertong.cn]
TASK [manage-users : Ensure group nginx exists] *****************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [manage-users : create nginx container user] ***************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [manage-users : Remove primero from /etc/subuid] ***********************************************************************************
changed: [demo.ai4ertong.cn]
TASK [manage-users : Remove primero from /etc/subgid] ***********************************************************************************
changed: [demo.ai4ertong.cn]
TASK [manage-users : edit /etc/subuid for primero user mapping for docker containers] ***************************************************
changed: [demo.ai4ertong.cn]
TASK [manage-users : edit /etc/subuid for primero user mapping for docker containers] ***************************************************
changed: [demo.ai4ertong.cn]
TASK [manage-users : edit /etc/subgid for primero user mapping for docker containers] ***************************************************
changed: [demo.ai4ertong.cn]
TASK [manage-users : edit /etc/subgid for primero user mapping for docker containers] ***************************************************
changed: [demo.ai4ertong.cn]
TASK [manage-users : Adding existing ansible user ubuntu to application group] **********************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.configure_journald : Create journal directory] ***************************************************************
skipping: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.configure_journald : Set journal directory permissions] ******************************************************
skipping: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_python3_virtualenv : include_tasks] ******************************************************************
included: /home/ubuntu/primero/ansible/ansible_collections/quoin/infrastructure/roles/install_python3_virtualenv/tasks/family-debian.yml for demo.ai4ertong.cn
TASK [quoin.infrastructure.install_python3_virtualenv : Debian :: install Python 3 virtualenv] ******************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_python3_virtualenv : include_tasks] ******************************************************************
skipping: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_python3_docker : create and upgrade the Docker virtualenv] *******************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_python3_docker : install pip names into the Docker virtualenv] ***************************************
changed: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_python3_docker_compose : install the docker-compose package] *****************************************
changed: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : include_tasks] ******************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : include_tasks] ******************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : include_tasks] ******************************************************************************
included: /home/ubuntu/primero/ansible/ansible_collections/quoin/infrastructure/roles/install_docker/tasks/distribution-ubuntu.yml for demo.ai4ertong.cn
TASK [quoin.infrastructure.install_docker : Ubuntu :: install apt-transport-https and ca-certificates] **********************************
ok: [demo.ai4ertong.cn] => (item=apt-transport-https)
ok: [demo.ai4ertong.cn] => (item=ca-certificates)
TASK [quoin.infrastructure.install_docker : Ubuntu :: install Docker APT key] ***********************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : Ubuntu :: install Docker APT repository] ****************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : install Docker] *****************************************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : create the /etc/docker
directory] *********************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : create the /etc/docker/daemon.json file] ****************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : meta] ***************************************************************************************
TASK [quoin.infrastructure.install_docker : start Docker] *******************************************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : add ubuntu
to the docker
group] *********************************************************
ok: [demo.ai4ertong.cn]
TASK [quoin.infrastructure.install_docker : meta] ***************************************************************************************
PLAY RECAP ******************************************************************************************************************************
(venv) ubuntu@VM-16-14-ubuntu:~/primero/ansible$ ansible-playbook application-primero.yml --tags “build” -i inventory/inventory.yml -l demo.ai4ertong.cn
PLAY [all:localhost] ********************************************************************************************************************************************
TASK [Gathering Facts] ******************************************************************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [application-primero : Copy Primero deployment private SSH key to remote host] *****************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [application-primero : Checking for external certs on remote machine] **************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [application-primero : Checking for external certs (key) on remote machine] ********************************************************************************
ok: [demo.ai4ertong.cn]
TASK [application-primero : Fail if no external certs on remote machine] ****************************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [application-primero : Change primero folder owner] ********************************************************************************************************
changed: [demo.ai4ertong.cn]
TASK [application-primero : Pull Primero from Git] **************************************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [application-primero : Change primero folder owner] ********************************************************************************************************
changed: [demo.ai4ertong.cn]
TASK [application-primero : build the Docker containers] ********************************************************************************************************
changed: [demo.ai4ertong.cn]
PLAY RECAP ******************************************************************************************************************************************************
demo.ai4ertong.cn : ok=7 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
(venv) ubuntu@VM-16-14-ubuntu:~/primero/ansible$ ansible-playbook application-primero.yml --tags configure,start -i inventory/inventory.yml -l demo.ai4ertong.cn
PLAY [all:localhost] ********************************************************************************************************************************************
TASK [Gathering Facts] ******************************************************************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [application-primero : Copy Primero deployment private SSH key to remote host] *****************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [application-primero : Checking for external certs on remote machine] **************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [application-primero : Checking for external certs (key) on remote machine] ********************************************************************************
ok: [demo.ai4ertong.cn]
TASK [application-primero : Fail if no external certs on remote machine] ****************************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [application-primero : Change primero folder owner] ********************************************************************************************************
changed: [demo.ai4ertong.cn]
TASK [application-primero : Pull Primero from Git] **************************************************************************************************************
ok: [demo.ai4ertong.cn]
TASK [application-primero : Change primero folder owner] ********************************************************************************************************
changed: [demo.ai4ertong.cn]
TASK [application-primero : Pull Primero configuration from Git] ************************************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [application-primero : configure Primero with a custom configuration] **************************************************************************************
changed: [demo.ai4ertong.cn]
TASK [application-primero : configure Primero with the default seeds] *******************************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [application-primero : Pull docker images] *****************************************************************************************************************
skipping: [demo.ai4ertong.cn]
TASK [application-primero : (re)start the Docker containers] ****************************************************************************************************
fatal: [demo.ai4ertong.cn]: FAILED! => changed=true
cmd:
-
./compose.prod.sh
-
up
-
-d
-
–force-recreate
-
–no-build
delta: ‘0:00:02.484909’
end: ‘2024-03-29 20:30:51.126920’
msg: non-zero return code
rc: 1
start: ‘2024-03-29 20:30:48.642011’
stderr: |-- [[ false == \f\a\l\s\e ]]
- exec ./compose.sh -f docker-compose.prod.yml -f docker-compose.db.yml up -d --force-recreate --no-build
- exec docker-compose -p primero --project-directory …/ -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.db.yml up -d --force-recreate --no-build
Recreating 710ceb54cab4_primero_solr_1 …
Recreating 787abaf99532_primero_postgres_1 …
ERROR: for 787abaf99532_primero_postgres_1 ‘ContainerConfig’
ERROR: for 710ceb54cab4_primero_solr_1 ‘ContainerConfig’
ERROR: for postgres ‘ContainerConfig’
ERROR: for solr ‘ContainerConfig’
Traceback (most recent call last):
File “/opt/docker/bin//docker-compose”, line 8, in
sys.exit(main())
File “/opt/docker/lib/python3.8/site-packages/compose/cli/main.py”, line 81, in main
command_func()
File “/opt/docker/lib/python3.8/site-packages/compose/cli/main.py”, line 203, in perform_command
handler(command, command_options)
File “/opt/docker/lib/python3.8/site-packages/compose/metrics/decorator.py”, line 18, in wrapper
result = fn(*args, **kwargs)
File “/opt/docker/lib/python3.8/site-packages/compose/cli/main.py”, line 1186, in up
to_attach = up(False)
File “/opt/docker/lib/python3.8/site-packages/compose/cli/main.py”, line 1166, in up
return self.project.up(
File “/opt/docker/lib/python3.8/site-packages/compose/project.py”, line 697, in up
results, errors = parallel.parallel_execute(
File “/opt/docker/lib/python3.8/site-packages/compose/parallel.py”, line 108, in parallel_execute
raise error_to_reraise
File “/opt/docker/lib/python3.8/site-packages/compose/parallel.py”, line 206, in producer
result = func(obj)
File “/opt/docker/lib/python3.8/site-packages/compose/project.py”, line 679, in do
return service.execute_convergence_plan(
File “/opt/docker/lib/python3.8/site-packages/compose/service.py”, line 579, in execute_convergence_plan
return self._execute_convergence_recreate(
File “/opt/docker/lib/python3.8/site-packages/compose/service.py”, line 499, in _execute_convergence_recreate
containers, errors = parallel_execute(
File “/opt/docker/lib/python3.8/site-packages/compose/parallel.py”, line 108, in parallel_execute
raise error_to_reraise
File “/opt/docker/lib/python3.8/site-packages/compose/parallel.py”, line 206, in producer
result = func(obj)
File “/opt/docker/lib/python3.8/site-packages/compose/service.py”, line 494, in recreate
return self.recreate_container(
File “/opt/docker/lib/python3.8/site-packages/compose/service.py”, line 612, in recreate_container
new_container = self.create_container(
File “/opt/docker/lib/python3.8/site-packages/compose/service.py”, line 330, in create_container
container_options = self._get_container_create_options(
File “/opt/docker/lib/python3.8/site-packages/compose/service.py”, line 921, in _get_container_create_options
container_options, override_options = self._build_container_volume_options(
File “/opt/docker/lib/python3.8/site-packages/compose/service.py”, line 960, in _build_container_volume_options
binds, affinity = merge_volume_bindings(
File “/opt/docker/lib/python3.8/site-packages/compose/service.py”, line 1548, in merge_volume_bindings
old_volumes, old_mounts = get_container_data_volumes(
File “/opt/docker/lib/python3.8/site-packages/compose/service.py”, line 1579, in get_container_data_volumes
container.image_config[‘ContainerConfig’].get(‘Volumes’) or {}
KeyError: ‘ContainerConfig’
stderr_lines:
stdout: |-
allexport off
braceexpand on
emacs off
errexit on
errtrace off
functrace off
hashall on
histexpand off
history off
ignoreeof off
interactive-comments on
keyword off
monitor off
noclobber off
noexec off
noglob off
nolog off
notify off
nounset on
onecmd off
physical off
pipefail off
posix off
privileged off
verbose off
vi off
xtrace off
Current option settings
errexit on
noglob off
ignoreeof off
interactive off
monitor off
noexec off
stdin off
xtrace off
verbose off
vi off
emacs off
noclobber off
allexport off
notify off
nounset on
priv off
nolog off
debug off
stdout_lines:
PLAY RECAP ******************************************************************************************************************************************************
demo.ai4ertong.cn : ok=7 changed=3 unreachable=0 failed=1 skipped=5 rescued=0 ignored=0