I have a binary file which I need to deploy or run on my linux server. Currently I'm using a vagrant, here is my Vagrantfile :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
......
config.vm.provision "shell", path: "./provisioner"
config.vm.provision "shell", binary: true , path: "./code/service"
end
Notice that on the second last line I have config.vm.provision "shell", binary: true , path: "./code/service"
. This service file is a compiled file from application written in Go.
Above configuration works but it doesn't run the file in the background. when using vagrant provision
using this Vagrantfile
will keep running on my terminal.
I know that I can achieve this using screen
. But suppose that I have 100 server running that needs to run this file, it will be painfull to repeat it using screen
.
Any idea how to automate it ? maybe using other tools?
any help would be appreciated.