FAQ
Are they are tutorials on deploying a go application to ubuntu, and is it
common to use upstart to start the process?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • James Bardin at Jun 13, 2013 at 2:12 pm

    On Thursday, June 13, 2013 9:50:20 AM UTC-4, gitted wrote:
    Are they are tutorials on deploying a go application to ubuntu, and is it
    common to use upstart to start the process?

    There's nothing special about deploying a go application vs any other
    binary. Upstart is great for this task, since there's no easy way for a go
    executable to daemonize itself, and upstart can run and manage the process
    itself.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • S Ahmed at Jun 13, 2013 at 3:31 pm
    Where can I see a sample upstart script, preferentially something someone
    uses in production?

    On Thu, Jun 13, 2013 at 10:12 AM, James Bardin wrote:


    On Thursday, June 13, 2013 9:50:20 AM UTC-4, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is it
    common to use upstart to start the process?

    There's nothing special about deploying a go application vs any other
    binary. Upstart is great for this task, since there's no easy way for a go
    executable to daemonize itself, and upstart can run and manage the process
    itself.

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Daniel Theophanes at Jun 13, 2013 at 3:33 pm
    The service package: bitbucket.org/kardianos/service
    contains an example of a upstart script. Though if you use the package
    itself, you can just let the package handle it.

    -Daniel

    On Thursday, June 13, 2013 8:24:30 AM UTC-7, gitted wrote:

    Where can I see a sample upstart script, preferentially something someone
    uses in production?


    On Thu, Jun 13, 2013 at 10:12 AM, James Bardin <j.ba...@gmail.com<javascript:>
    wrote:
    On Thursday, June 13, 2013 9:50:20 AM UTC-4, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is
    it common to use upstart to start the process?

    There's nothing special about deploying a go application vs any other
    binary. Upstart is great for this task, since there's no easy way for a go
    executable to daemonize itself, and upstart can run and manage the process
    itself.

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • S Ahmed at Jun 13, 2013 at 3:44 pm
    Interesting package...but I don't see any upstart script in there?

    On Thu, Jun 13, 2013 at 11:33 AM, Daniel Theophanes wrote:

    The service package: bitbucket.org/kardianos/service
    contains an example of a upstart script. Though if you use the package
    itself, you can just let the package handle it.

    -Daniel

    On Thursday, June 13, 2013 8:24:30 AM UTC-7, gitted wrote:

    Where can I see a sample upstart script, preferentially something someone
    uses in production?

    On Thu, Jun 13, 2013 at 10:12 AM, James Bardin wrote:


    On Thursday, June 13, 2013 9:50:20 AM UTC-4, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is
    it common to use upstart to start the process?

    There's nothing special about deploying a go application vs any other
    binary. Upstart is great for this task, since there's no easy way for a go
    executable to daemonize itself, and upstart can run and manage the process
    itself.

    --
    You received this message because you are subscribed to the Google
    Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to golang-nuts...@**googlegroups.com.

    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
    .

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • James Bardin at Jun 13, 2013 at 3:46 pm
    What you need really depends on your program. There's not too much needed
    in an upstart config.
    Maybe take a look at some of the conf files on your system, or from a
    similar service, and checkout http://upstart.ubuntu.com/cookbook/ too.

    On Thursday, June 13, 2013 11:44:12 AM UTC-4, gitted wrote:

    Interesting package...but I don't see any upstart script in there?


    On Thu, Jun 13, 2013 at 11:33 AM, Daniel Theophanes <kard...@gmail.com<javascript:>
    wrote:
    The service package: bitbucket.org/kardianos/service
    contains an example of a upstart script. Though if you use the package
    itself, you can just let the package handle it.

    -Daniel

    On Thursday, June 13, 2013 8:24:30 AM UTC-7, gitted wrote:

    Where can I see a sample upstart script, preferentially something
    someone uses in production?

    On Thu, Jun 13, 2013 at 10:12 AM, James Bardin wrote:


    On Thursday, June 13, 2013 9:50:20 AM UTC-4, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is
    it common to use upstart to start the process?

    There's nothing special about deploying a go application vs any other
    binary. Upstart is great for this task, since there's no easy way for a go
    executable to daemonize itself, and upstart can run and manage the process
    itself.

    --
    You received this message because you are subscribed to the Google
    Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to golang-nuts...@**googlegroups.com.

    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
    .

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Daniel Theophanes at Jun 13, 2013 at 3:54 pm
    https://bitbucket.org/kardianos/service/src/6e2543d89d91bc48dde7692805c1bce04f4b09f6/service_linux.go?at=default#cl-112
    On Thu, Jun 13, 2013 at 8:46 AM, James Bardin wrote:
    What you need really depends on your program. There's not too much needed in
    an upstart config.
    Maybe take a look at some of the conf files on your system, or from a
    similar service, and checkout http://upstart.ubuntu.com/cookbook/ too.


    On Thursday, June 13, 2013 11:44:12 AM UTC-4, gitted wrote:

    Interesting package...but I don't see any upstart script in there?


    On Thu, Jun 13, 2013 at 11:33 AM, Daniel Theophanes <kard...@gmail.com>
    wrote:
    The service package: bitbucket.org/kardianos/service
    contains an example of a upstart script. Though if you use the package
    itself, you can just let the package handle it.

    -Daniel

    On Thursday, June 13, 2013 8:24:30 AM UTC-7, gitted wrote:

    Where can I see a sample upstart script, preferentially something
    someone uses in production?


    On Thu, Jun 13, 2013 at 10:12 AM, James Bardin <j.ba...@gmail.com>
    wrote:

    On Thursday, June 13, 2013 9:50:20 AM UTC-4, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is
    it common to use upstart to start the process?
    There's nothing special about deploying a go application vs any other
    binary. Upstart is great for this task, since there's no easy way for a go
    executable to daemonize itself, and upstart can run and manage the process
    itself.

    --
    You received this message because you are subscribed to the Google
    Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to golang-nuts...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to a topic in the
    Google Groups "golang-nuts" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/golang-nuts/uBrN-G7anKg/unsubscribe?hl=en-US.
    To unsubscribe from this group and all its topics, send an email to
    golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Shivakumar GN at Jun 13, 2013 at 4:14 pm
    Just like any upstart configuration. Ex:


    author "xyz"
    description "xyz"
    version "xyz v0.1"

    start on started network
    stop on stopping network

    console output
    respawn

    # Allow go process to use 2 CPUs
    env GOMAXPROCS=2

    # if start directory is important
    chdir /var/tmp
    /var/tmp/xyz_binary

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Zareone2000 at Jun 13, 2013 at 8:13 pm
    Hi Gitted!
    The script in inside the Go code itself, as a template.
    You can find it here:
    https://bitbucket.org/kardianos/service/src/6e2543d89d91bc48dde7692805c1bce04f4b09f6/service_linux.go?at=default

    var upstartScript = `# {{.Description}}description "{{.Display}}"start on filesystem or runlevel [2345]stop on runlevel [!2345]#setuid usernamekill signal INTrespawnrespawn limit 10 5umask 022console nonepre-start script test -x {{.Path}} || { stop; exit 0; }end script# Startexec {{.Path}}`

    On Thursday, June 13, 2013 5:44:12 PM UTC+2, gitted wrote:

    Interesting package...but I don't see any upstart script in there?


    On Thu, Jun 13, 2013 at 11:33 AM, Daniel Theophanes <kard...@gmail.com<javascript:>
    wrote:
    The service package: bitbucket.org/kardianos/service
    contains an example of a upstart script. Though if you use the package
    itself, you can just let the package handle it.

    -Daniel

    On Thursday, June 13, 2013 8:24:30 AM UTC-7, gitted wrote:

    Where can I see a sample upstart script, preferentially something
    someone uses in production?

    On Thu, Jun 13, 2013 at 10:12 AM, James Bardin wrote:


    On Thursday, June 13, 2013 9:50:20 AM UTC-4, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is
    it common to use upstart to start the process?

    There's nothing special about deploying a go application vs any other
    binary. Upstart is great for this task, since there's no easy way for a go
    executable to daemonize itself, and upstart can run and manage the process
    itself.

    --
    You received this message because you are subscribed to the Google
    Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to golang-nuts...@**googlegroups.com.

    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
    .

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dave Cheney at Jun 13, 2013 at 2:16 pm
    Yes, we do that in Juju.


    On 13/06/2013, at 23:50, S Ahmed wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is it common to use upstart to start the process?


    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Adnaan badr at Jun 13, 2013 at 7:20 pm
    Hey I wrote about it a while ago:
    https://coderwall.com/p/iekaog
    On Thursday, 13 June 2013 19:20:20 UTC+5:30, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is it
    common to use upstart to start the process?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Matt Silverlock at Jun 13, 2013 at 10:35 pm
    Upstart can definitely do the job. It's pretty simple & works well.

    You can also take a look at supervisord (http://supervisord.org/), which is
    a little more flexible and can restart your binary when/if it crashes, on
    top of other things.
    On Thursday, June 13, 2013 9:50:20 PM UTC+8, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is it
    common to use upstart to start the process?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Gustavo Niemeyer at Jun 13, 2013 at 11:07 pm
    Upstart restarts on crashes as well.
    On Jun 13, 2013 7:36 PM, "Matt Silverlock" wrote:

    Upstart can definitely do the job. It's pretty simple & works well.

    You can also take a look at supervisord (http://supervisord.org/), which
    is a little more flexible and can restart your binary when/if it crashes,
    on top of other things.
    On Thursday, June 13, 2013 9:50:20 PM UTC+8, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is it
    common to use upstart to start the process?


    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dave Cheney at Jun 14, 2013 at 12:36 am
    Here is a sample upstart configuration that manages a juju agent process.

    $ cat /etc/init/jujud-machine-0.conf
    description "juju machine-0 agent"
    author "Juju Team <juju@lists.ubuntu.com>"
    start on runlevel [2345]
    stop on runlevel [!2345]
    respawn
    normal exit 0

    limit nofile 20000 20000

    exec /var/lib/juju/tools/machine-0/jujud machine --log-file
    /var/log/juju/machine-0.log --data-dir '/var/lib/juju' --machine-id 0
    --debug >> /var/log/juju/machine-0.log 2>&1
    On Fri, Jun 14, 2013 at 9:07 AM, Gustavo Niemeyer wrote:
    Upstart restarts on crashes as well.
    On Jun 13, 2013 7:36 PM, "Matt Silverlock" wrote:

    Upstart can definitely do the job. It's pretty simple & works well.

    You can also take a look at supervisord (http://supervisord.org/), which
    is a little more flexible and can restart your binary when/if it crashes, on
    top of other things.
    On Thursday, June 13, 2013 9:50:20 PM UTC+8, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is it
    common to use upstart to start the process?
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Mattn at Jun 14, 2013 at 4:54 am
    Thank you. I'll add 'export' command for goreman.

    https://github.com/mattn/goreman
    On Friday, June 14, 2013 9:36:14 AM UTC+9, Dave Cheney wrote:

    Here is a sample upstart configuration that manages a juju agent process.

    $ cat /etc/init/jujud-machine-0.conf
    description "juju machine-0 agent"
    author "Juju Team <ju...@lists.ubuntu.com <javascript:>>"
    start on runlevel [2345]
    stop on runlevel [!2345]
    respawn
    normal exit 0

    limit nofile 20000 20000

    exec /var/lib/juju/tools/machine-0/jujud machine --log-file
    /var/log/juju/machine-0.log --data-dir '/var/lib/juju' --machine-id 0
    --debug >> /var/log/juju/machine-0.log 2>&1
    On Fri, Jun 14, 2013 at 9:07 AM, Gustavo Niemeyer wrote:
    Upstart restarts on crashes as well.
    On Jun 13, 2013 7:36 PM, "Matt Silverlock" wrote:

    Upstart can definitely do the job. It's pretty simple & works well.

    You can also take a look at supervisord (http://supervisord.org/),
    which
    is a little more flexible and can restart your binary when/if it
    crashes, on
    top of other things.
    On Thursday, June 13, 2013 9:50:20 PM UTC+8, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is
    it
    common to use upstart to start the process?
    --
    You received this message because you are subscribed to the Google
    Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Joshua Poehls at Jun 14, 2013 at 4:54 am
    Just wanted to say thanks for asking this, and thanks everyone for the
    great answers! I'm not at all familiar with running services on linux and
    have been meaning to figure out an Upstart script for my Go web app. This
    thread was a very pleasant gift tonight.

    Do you tend to manually install the upstart script manually when setting up
    your app on a server or do you use a bash (or other) script for
    bootstrapping the server for your app, including creating the upstart
    script? I'm leaning towards creating a bootstrap type script that would do
    this and any examples of what you all use would be great.
    On Thursday, June 13, 2013 8:50:20 AM UTC-5, gitted wrote:

    Are they are tutorials on deploying a go application to ubuntu, and is it
    common to use upstart to start the process?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Matt Silverlock at Jun 14, 2013 at 2:49 pm
    On Friday, June 14, 2013 10:29:50 AM UTC+8, Joshua Poehls wrote:

    Do you tend to manually install the upstart script manually when setting up
    your app on a server or do you use a bash (or other) script for
    bootstrapping the server for your app, including creating the upstart
    script? I'm leaning towards creating a bootstrap type script that would do
    this and any examples of what you all use would be great.
    Totally up to you. A bash script is fine, but tools like Puppet
    (https://puppetlabs.com/) and Chef Solo
    (http://docs.opscode.com/chef_solo.html) are pretty powerful and (IMO) easy
    to pick up, at least for basic tasks. If you're planning to automate
    deployment then they become invaluable once you get beyond one machine.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 13, '13 at 1:50p
activeJun 14, '13 at 2:49p
posts17
users11
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase