Closed ghost closed 5 years ago
I have same issue on windows 10
I'll ping the maintainer.
@acornies
Alex
Thanks for the report. Unfortunately Nomad 0.9 isn't officially supported yet, although it's definitely on my priority list.
The defined vagrant up
flow in this repo technically doesn't use the startNomad.sh
script, but the salt directory in provisioning/saltstack/... which provisions Nomad 0.8.6, Consul and Vault w/ Docker.
I should also mention that vagrant flow is designed to locally develop/debug faas-nomad itself, so it assumes you're running vagrant but also running faas-nomad on your local system. I use these settings in vscode + installed Go in conjunction with the vagrant setup:
{
"version": "0.2.0",
"configurations": [
{
"name": "faas-nomad",
"type": "go",
"request": "launch",
"mode": "auto",
"remotePath": "",
"host": "0.0.0.0",
"port": 8081,
"program": "${workspaceFolder}",
"env": {},
"args": [
"-nomad_region", "global",
"-nomad_addr", "192.168.50.2:4646",
"-enable_consul_dns=true",
"-consul_addr", "http://192.168.50.2:8500",
"-statsd_addr", "192.168.50.2:9125",
"-basic_auth_secret_path", "provisioning/secrets",
"-enable_basic_auth=false",
"-vault_default_policy", "openfaas",
"-vault_addr", "http://192.168.50.2:8200",
"-vault_app_role_id", "...",
"-vault_app_secret_id", "...",
"-port=8081"
],
"showLog": true
}
]
}
If you're just interested in running not developing, using the docker image from quay.io/nicholasjackson/faas-nomad:v0.4.1 along with he files in nomad_job_files should be sufficient.
@acornies I run vagrant up on Windows 10 without local Nomad, have same problem, how can I fix the problem? Thanks!
@nwong4932 can you try pulling latest master? I believe the config data needed to be updated for local vagrant flow to work.
@acornies, I read the README, but figured it would install openfaas as well as the local hashicorp stack in VMs which was a mistake. Trouble is, faas docs expect docker to be already installed the system, and cover swarm and k8s as orchestrators - which is exactly what I'm trying to use nomad for in order to avoid, i.e. I don't want to install docker for mac but never used faas so I was relying on the guides over there to get faas working first. How is your setup setup? Do I need to get a man-made docker VM running first (i.e. also using Vagrant as I don't do docker desktop)?
@phosphre Let me know how it goes. This repo is a bit of a mess right now and my full-time work is consuming all my energy atm. The plan is to revamp this provider using Nomad 0.9 deps, increase test coverage and make provider configuration simpler.
I don't want to install docker for mac but never used faas so I was relying on the guides over there to get faas working first. How is your setup setup?
I use the Vagrantfile + supporting files in provisioning/...
and simply run vagrant up
(both virtualbox and vmware fusion supported) which installs Nomad, Consul and Vault and deploys the OpenFaaS components on Nomad. However, if you want to run this provider in the VM as well, just add this example block to this file: provisioning/saltstack/salt/nomad/files/faas.hcl
task "nomadd" {
driver = "docker"
config {
image = "quay.io/nicholasjackson/faas-nomad:v0.4.1"
args = [
"-nomad_region", "${NOMAD_REGION}",
"-nomad_addr", "${NOMAD_IP_http}:4646",
"-consul_addr", "http://${NOMAD_IP_http}:8500",
"-statsd_addr", "${NOMAD_ADDR_statsd_statsd}",
"-node_addr", "${NOMAD_IP_http}",
"-basic_auth_secret_path", "/secrets",
"-enable_basic_auth=false",
"more..."
]
port_map {
http = 8080
}
}
resources {
cpu = 500 # 500 MHz
memory = 128 # 128MB
network {
port "http" {
static = 8081
}
}
}
service {
port = "http"
name = "faasd-nomad"
tags = ["faas"]
}
}
}
You can use the same runtime args I posted higher up in this issue. You can use vagrant provision
to rerun/provision the VM again.
(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?
What happens?
$ consul version Consul v1.4.4 Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
$ nomad version Nomad v0.9.0 (18dd59056ee1d7b2df51256fe900a98460d3d6b9)
$ vagrant version Installed Version: 2.2.4 Latest Version: 2.2.4
$ VBoxManage --version 5.2.26r128414
$ uname -a Darwin myMac.my.net 17.7.0 Darwin Kernel Version 17.7.0: Wed Feb 27 00:43:23 PST 2019; root:xnu-4570.71.35~1/RELEASE_X86_64 x86_64
$ vagrant up <errors - see below>
What were you expecting to happen?
Vagrant to deliver 1+ docker hosts with the stack running
Any logs, error output, etc?
All went OK until:
Any other comments?
What versions of software are you using?
Operating System: macOS 10.13.6 (17G6030)
OpenFaaS Version: 0.8.4 cli
Nomad Version: 0.9.0