Git Product home page Git Product logo

Comments (11)

attachmentgenie avatar attachmentgenie commented on August 16, 2024 5

and as an elevated version of this, levant integration, so that we can pass variables to the nomad script

from waypoint.

kaykelins avatar kaykelins commented on August 16, 2024 2

@orenmazor
exec plugin has issues, documetation, but here one example.

### waypoint.hcl
project = "example-python"
app "example-python" {
  labels = {
    "service" = "example-python",
    "env" = "dev"
  }

  build {
    use "docker" {}
    registry {
      use "docker" {
        image = "python-example"
        tag = "1"
        local = true
      }
    }
  }

  deploy {
    use "exec" {
        command = ["nomad","run","job.hcl"]
    }
  }
}
### job.hcl
job "example" {
  datacenters = ["dc1"]

  group "demo" {
    network {
      port "web" {
        to = 8080
      }
    }

    task "python" {
      driver = "docker"
      config {
        image = "python-example:1"
        ports = ["web"]
      }

      resources {
        cpu    = 500
        memory = 256
      }
    }
  }
}

and you right, is not ideal, but works, I don't recommend for production envs, but for dev or demo is ok

from waypoint.

MarilynFranklin avatar MarilynFranklin commented on August 16, 2024 1

I ran into similar issues with the limitations of the nomad plugin and ended up creating a levant plugin. I'll link to it here in case anyone else would find it helpful: https://github.com/MarilynFranklin/waypoint-plugin-levant

from waypoint.

orenmazor avatar orenmazor commented on August 16, 2024

I can't help but assume somebody is out there at this very moment hacking a levant plugin, and I wish I could buy that person a beer

from waypoint.

kaykelins avatar kaykelins commented on August 16, 2024

you can use exec plugin to deploy the job file

from waypoint.

orenmazor avatar orenmazor commented on August 16, 2024

@kaykelins I'm having a hard time visualizing this but I'm super interested. can you post a small example? in my mind the exec plugin is for one-off tasks and not for CD

from waypoint.

akio-outori avatar akio-outori commented on August 16, 2024

That'd get us over the initial hurdle for testing, though I'm guessing that things like job deployment status aren't supported (the main use case for us). Levant might be a better choice for us for now.

from waypoint.

orenmazor avatar orenmazor commented on August 16, 2024

just a followup: this exec+levant approach has turned into the way I deploy 3 different stacks now. A++

from waypoint.

mitchellh avatar mitchellh commented on August 16, 2024

Fixed by #1299, will be in 0.4

from waypoint.

Allan-Nava avatar Allan-Nava commented on August 16, 2024

@orenmazor exec plugin has issues, documetation, but here one example.

### waypoint.hcl
project = "example-python"
app "example-python" {
  labels = {
    "service" = "example-python",
    "env" = "dev"
  }

  build {
    use "docker" {}
    registry {
      use "docker" {
        image = "python-example"
        tag = "1"
        local = true
      }
    }
  }

  deploy {
    use "exec" {
        command = ["nomad","run","job.hcl"]
    }
  }
}
### job.hcl
job "example" {
  datacenters = ["dc1"]

  group "demo" {
    network {
      port "web" {
        to = 8080
      }
    }

    task "python" {
      driver = "docker"
      config {
        image = "python-example:1"
        ports = ["web"]
      }

      resources {
        cpu    = 500
        memory = 256
      }
    }
  }
}

and you right, is not ideal, but works, I don't recommend for production envs, but for dev or demo is ok

But how can I pass the tag= gitrefpretty() to nomad.hcl?

from waypoint.

Allan-Nava avatar Allan-Nava commented on August 16, 2024

I have problem to build ->

✓ Running build v11
✓ Building Docker image with kaniko...
❌ Testing registry and uploading entrypoint layer
! error setting up entrypoint layer to host

from waypoint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.