hashicorp / faas-nomad

OpenFaaS plugin for Nomad
https://www.openfaas.com
MIT License
254 stars 46 forks source link

typo in file nomad_job_files/faas.hcl #39

Closed herveleclerc closed 5 years ago

herveleclerc commented 5 years ago

(Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. nomad run -verbose ./nomad_job_files/faas.hcl

What happens?

faas-nomadd fails with error :

Template: error parsing env template "secrets/gateway.env": error on line 6: missing =


To fix it edit the file faas.hcl change functions_provider_url="http://{{ env "NOMAD_IP_http" }}:8081/" {{ range service "prometheus" }} faas_prometheus_host="{{ .Address }}" faas_prometheus_port="{{ .Port }}"{{ end }} {{ range service "nats" }} faas_nats_address: "{{ .Address }}"{{ end }} faas_nats_port: 4222 EOH

to

functions_provider_url="http://{{ env "NOMAD_IP_http" }}:8081/" {{ range service "prometheus" }} faas_prometheus_host="{{ .Address }}" faas_prometheus_port="{{ .Port }}"{{ end }} {{ range service "nats" }} faas_nats_address="{{ .Address }}"{{ end }} faas_nats_port=4222 EOH

alexellis commented 5 years ago

What's the difference between the two?

How far did you get after this change?

acornies commented 5 years ago

This typo affects Nomad's specific template rendering stanza for environment var injection into a container. I've confirmed (Aug 23, 2018) the suggested change properly deploys faas components in a Nomad environment.

alexellis commented 5 years ago

@nicholasjackson

nicholasjackson commented 5 years ago

Thanks, all merged