DigitalState/Platform

Solved 'admin_compose_project_name' is undefined

Closed this issue · 14 comments

I am trying to build Sdk using the steps defined. The ansible build until it throws the below error

"fatal: [server]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'admin_compose_project_name' is undefined\n\nThe error appears to have been in '/etc
/ansible/role/app/admin/container/up/tasks/main.yml': line 3, column 9, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block
:\n - name: Configure admin namespace environment variable\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'admin_compose_project_name' is
undefined"}"

When i open the .env file in admin repository I see that the name is defined.
COMPOSE_PROJECT_NAME=ds_admin
I dont know if the name should b chnged on the env file or what exactly needs to be done
If you point me to the right direction that would be really helpful

Will investigate...

A few typos got into the develop branch. I have ran a full install, including UI microservices (admin/portal), and everything seems to be good again!

The change fixed the error but am getting this error now...

fatal: [server]: FAILED! => {"attempts": 60, "changed": true, "cmd": "docker-compose exec -T php pidof php-fpm | cat", "
delta": "0:00:01.194044", "end": "2018-02-10 19:38:37.607650", "rc": 0, "start": "2018-02-10 19:38:36.413606", "stderr":
"No container found for php_1", "stderr_lines": ["No container found for php_1"], "stdout": "", "stdout_lines": []}

If you open a console and point to the directory of the failing microservice and run
docker-compose logs php. What is the output?

Also, are you on MAC or Windows or Linux? What is the value of this config?

I had not added the app directory location. Am using Windows 10 pro. When I added the directory location I get a different error:

fatal: [server]: FAILED! => {"msg": "The task includes an option with an undefined variable.
The error was: 'portal_jwt_private_key' is undefined\n\nThe error appears to have been in
'/etc/ansible/role/app/portal/container/up/tasks/main.yml': line 33, column 9,
but may\nbe elsewhere in the file depending on the exact syntax problem.
\n\nThe offending line appears to be:\n\n line:
'DIRECTORY={{ portal_directory }}'\n -
name: Configure jwt private key environment variable\n ^
here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception:
'portal_jwt_private_key' is undefined"}

My inventory.yml file looks like

all:
hosts:
sdk:
ansible_connection: local
server:
ansible_connection: local
vars:
project: ds
directory: /d/Development/DigitalState/Sdk/app
env: lab
timezone: UTC
jwt:
private_key: /root/resource/jwt/lab/key
public_key: /root/resource/jwt/lab/key.pub
key_pass_phase: ~
mail:
transport: smtp
host: 127.0.0.1
port: ~
username: admin@localhost
password: ~
fixtures: dev
user:
system:
password: system
anonymous:
password: anonymous
admin:
password: admin
util:
adminer: /root/resource/util/adminer.php
admin:
enabled: true
repository: https://github.com/DigitalState/Admin.git
version: develop
host: admin.lab.ds
assets:
enabled: true
repository: https://github.com/DigitalState/Assets.git
version: develop
host: api.assets.lab.ds
database:
host: assets_db
port: 5432
name: assets
username: assets
password: assets
authentication:
enabled: true
repository: https://github.com/DigitalState/Authentication.git
version: develop
host: api.authentication.lab.ds
database:
host: authentication_db
port: 5432
name: authentication
username: authentication
password: authentication
camunda:
enabled: true
repository: https://github.com/DigitalState/Camunda.git
version: develop
host: api.camunda.lab.ds
username: admin
password: admin
cases:
enabled: true
repository: https://github.com/DigitalState/Cases.git
version: develop
host: api.cases.lab.ds
database:
host: cases_db
port: 5432
name: cases
username: cases
password: cases
cms:
enabled: true
repository: https://github.com/DigitalState/Cms.git
version: develop
host: api.cms.lab.ds
database:
host: cms_db
port: 5432
name: cms
username: cms
password: cms
core:
enabled: true
repository: https://github.com/DigitalState/Core.git
version: develop
discovery:
enabled: false
repository: https://github.com/DigitalState/Discovery.git
version: develop
host: api.discovery.lab.ds
documentation:
enabled: true
repository: https://github.com/DigitalState/Documentation.git
version: master
formio:
enabled: true
repository: https://github.com/DigitalState/Formio.git
version: develop
host: api.formio.lab.ds
username: admin
password: admin
guide:
enabled: true
repository: https://github.com/DigitalState/Guide.git
version: master
identities:
enabled: true
repository: https://github.com/DigitalState/Identities.git
version: develop
host: api.identities.lab.ds
database:
host: identities_db
port: 5432
name: identities
username: identities
password: identities
interactions:
enabled: false
repository: https://github.com/DigitalState/Interactions.git
version: develop
host: api.interactions.lab.ds
database:
host: interactions_db
port: 5432
name: interactions
username: interactions
password: interactions
logs:
enabled: false
repository: https://github.com/DigitalState/Logs.git
version: develop
host: api.logs.lab.ds
monitor:
enabled: false
repository: https://github.com/DigitalState/Monitor.git
version: develop
host: monitor.lab.ds
portal:
enabled: true
version: develop
repository: https://github.com/DigitalState/Portal.git
host: portal.lab.ds
proxy:
enabled: true
repository: https://github.com/DigitalState/Proxy.git
version: develop
port: 80
records:
enabled: true
version: develop
repository: https://github.com/DigitalState/Records.git
host: api.records.lab.ds
database:
host: records_db
port: 5432
name: records
username: records
password: records
services:
enabled: true
repository: https://github.com/DigitalState/Services.git
version: develop
host: api.services.lab.ds
database:
host: services_db
port: 5432
name: services
username: services
password: services
tasks:
enabled: false
repository: https://github.com/DigitalState/Tasks.git
version: develop
host: api.tasks.lab.ds
database:
host: tasks_db
port: 5432
name: tasks
username: tasks
password: tasks
topics:
enabled: false
repository: https://github.com/DigitalState/Topics.git
version: develop
host: api.topics.lab.ds
database:
host: topics_db
port: 5432
name: topics
username: topics
password: topics
ui:
enabled: true
repository: https://github.com/DigitalState/Ui.git
version: develop

Found the issue aa1fcad (error in refactoring).

However, I need to investigate why you are able to see the error and I'm not on my installation... very weird since we are using the same sdk container.

The only thing off I've noticed in your lab inventory file is your jwt key_pass_phase: ~ line, unless you have created simple key without a password.

I am using a simple key without the pass phrase. Is it a must I use a passphrase? I have rebuilt and am getting below error now

TASK [app/authentication/jwt/configure : Configure authentication jwt key pass phrase] *********************************
fatal: [server]: FAILED! => {"changed": false, "msg": "Destination /srv/authentication/app/config/parameters.yml does not exist !", "rc": 257}

Found the issue aa1fcad (error in refactoring).
This fixed the earlier error

Passphrase is not required.

When you log into the SDK container console and go to /srv/authentication/app/config/, is there a parameters.yml file?

what is the output of docker-compose logs php when you are at /srv/authentication ?

@mario-digitalstate I did a fresh download of the SDK and built it successfully. I have been so eager to have this running in my machine. Thank you. It has worked at last. Your help is invaluable. Thanks again.

Great!

There is one known issue however regarding data fixtures since our last refactor, which im currently working on.