New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create flask upstart script in puppet manifest #1997
Comments
After #2001 has been resolved, we will move corresponding python package installation from
Then, we can safely remove |
We need to create the upstart script,
This will allow us the run the following command: sudo service <servicename> <control> with the following
Note: according to the Ubuntu upstart documentation, the following can ensure that the job defined in
|
4f4f564: we forgot that redhat based distros may have a different format for upstart scripts. |
#1997: Implement flask upstart script
We need to remove an unnecessary |
#1997: start_webserver.pp, remove unnecessary 'notify'
We need to ensure that our * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
/proc/self/fd/9: 2: [: =: unexpected operator One solution is the implement the following within ...
## log shut-down date, remove process id from log before '/vagrant' is unmounted
#
# @[`date`], current date script executed
pre-stop script
echo "[`date`] flask server stopping" >> /vagrant/log/flask_server.log
end script
| EOT
notify => Exec['dos2unix-line-endings'],
}
## convert clrf (windows to linux) in case host machine is windows.
exec {'dos2unix-line-endings':
command => 'dos2unix /etc/init/flask.conf',
refreshonly => true,
notify => Service['flask'],
}
## start webserver
service {'flask':
ensure => 'running',
enable => 'true',
}
}
default: {
}
} |
#1997: ensure proper 'pre-stop script' logs
We need to determine if the following from ...
notify => Service['flask'],
}
## start webserver
service {'flask':
ensure => 'running',
enable => 'true',
}
... The motivation for the above snippet, is because our generated |
We need to adjust our flask upstart script by implementing another workaround upstart script in order to ensure the |
The workaround has been implemented in #2046. However, we will close this issue, since the creation of the upstart script has been resolved, and handle all other bugs, within their own corresponding issue. |
We need to create
start_webserver.pp
. This script will be responsible for installing flask, and defining the necessary upstart script, to ensure that our flask server is running each time the Ubuntu Server has started.The following need to be removed (if present):
flask
in$packages_flask_pip = ['flask', 'requests']
frominstall_packages.pp
The text was updated successfully, but these errors were encountered: