punchplatform / punchbox

the punchbox tool to deploy servers, kubernetes or punch
Apache License 2.0
4 stars 2 forks source link

Punchbox + deployer 6.1.1 not working #31

Closed jmerdy closed 3 years ago

jmerdy commented 3 years ago

J'ai un soucis avec la punchbox et le deployer 6.1.1

punchplatform-deployer.sh --generate-platform-config     --templates-dir $PUNCHBOX_DIR/punch/platform_template/     --model $PUNCHBOX_DIR/punch/build/model.json
Generated files:
Traceback (most recent call last):
  File "/punchbox/punch/build/punch-deployer-6.1.1//bin/renderJinja2Template.py", line 174, in <module>
    result = render_jinja2_template(template_file_Name, customization_dictionary)
  File "/punchbox/punch/build/punch-deployer-6.1.1//bin/renderJinja2Template.py", line 139, in render_jinja2_template
    return template.render()
  File "/home/tools/pyenv-master/versions/3.6.8/lib/python3.6/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/tools/pyenv-master/versions/3.6.8/lib/python3.6/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/tools/pyenv-master/versions/3.6.8/lib/python3.6/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/punchbox/punch/platform_template/check_platform.sh.j2", line 10, in top-level template code
    punchplatform-push-es-templates.sh --directory $PUNCHPLATFORM_CONF_DIR/resources/elasticsearch/templates/ --url {{ punch.elasticsearch.cluster_production_transport_address }}:9200
  File "/home/tools/pyenv-master/versions/3.6.8/lib/python3.6/site-packages/jinja2/environment.py", line 471, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'punch' is undefined
  /punchbox/punch/build/pp-conf/check_platform.sh
Traceback (most recent call last):
  File "/punchbox/punch/build/punch-deployer-6.1.1//bin/renderJinja2Template.py", line 174, in <module>
    result = render_jinja2_template(template_file_Name, customization_dictionary)
  File "/punchbox/punch/build/punch-deployer-6.1.1//bin/renderJinja2Template.py", line 139, in render_jinja2_template
    return template.render()
  File "/home/tools/pyenv-master/versions/3.6.8/lib/python3.6/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/tools/pyenv-master/versions/3.6.8/lib/python3.6/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/tools/pyenv-master/versions/3.6.8/lib/python3.6/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/punchbox/punch/platform_template/resolv.hjson.j2", line 3, in top-level template code
    {% if punch.elasticsearch is defined %}
  File "/home/tools/pyenv-master/versions/3.6.8/lib/python3.6/site-packages/jinja2/environment.py", line 471, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'punch' is undefined
  /punchbox/punch/build/pp-conf/resolv.hjson

Une idée de ce qui peut causé cela ?

jmerdy commented 3 years ago

La procédure pour reproduire est la suivante :

punchbox --platform-config-file complete_punch_32G.json \
        --punch-user-config /wspace-ssd/tools/punch/deploy/punchboxes/punchbox-6.1/punch-standalone-6.1.1-linux/conf \
        --deployer  /wspace-ssd/tools/punch/deploy/punchboxes/punchbox-6.1/punchplatform-deployer-6.1.1.zip \
        --interface ens3d1

qui réussi :

INFO:punchplatform deployer archive successfully unzipped
INFO: platform model file successfully generated in /wspace-ssd/tools/punch/deploy/punchboxes/punchbox-6.1/punch/build/model.json
INFO: punch user configuration successfully imported in /wspace-ssd/tools/punch/deploy/punchboxes/punchbox-6.1/punch/build/pp-conf
INFO: platform resolv.hjson successfully generated in /wspace-ssd/tools/punch/deploy/punchboxes/punchbox-6.1/punch/build/pp-conf/resolv.hjson

et enfin :

punchplatform-deployer.sh --generate-platform-config \
     --templates-dir $PUNCHBOX_DIR/punch/platform_template/ \
     --model $PUNCHBOX_DIR/punch/build/model.json

Echoue avec l'erreur du ticket

jmerdy commented 3 years ago

C'est un oublie de ma part. Je n'ai pas activé le virtual env avant de lancer les commandes.