{"action":"created","issue":{"url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/1997","labels_url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/1997/labels{/name}","comments_url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/1997/comments","events_url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/1997/events","html_url":"https://github.com/jeff1evesque/machine-learning/issues/1997","id":91947272,"number":1997,"title":"Create flask upstart script in puppet manifest","user":{"login":"jeff1evesque","id":2907085,"avatar_url":"https://avatars.githubusercontent.com/u/2907085?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff1evesque","html_url":"https://github.com/jeff1evesque","followers_url":"https://api.github.com/users/jeff1evesque/followers","following_url":"https://api.github.com/users/jeff1evesque/following{/other_user}","gists_url":"https://api.github.com/users/jeff1evesque/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff1evesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff1evesque/subscriptions","organizations_url":"https://api.github.com/users/jeff1evesque/orgs","repos_url":"https://api.github.com/users/jeff1evesque/repos","events_url":"https://api.github.com/users/jeff1evesque/events{/privacy}","received_events_url":"https://api.github.com/users/jeff1evesque/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-06-30T01:09:10Z","updated_at":"2015-07-11T16:01:49Z","closed_at":null,"body":"We need to create `start_webserver.pp`.  This script will be responsible for installing flask, and defining the necessary [upstart](https://www.digitalocean.com/community/tutorials/the-upstart-event-system-what-it-is-and-how-to-use-it) script, to ensure that our flask server is running each time the Ubuntu Server has started.\r\n\r\nThe following need to be removed (if present):\r\n\r\n- `flask` in `$packages_flask_pip   = ['flask', 'requests']` from `install_packages.pp`"},"comment":{"url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/comments/120635856","html_url":"https://github.com/jeff1evesque/machine-learning/issues/1997#issuecomment-120635856","issue_url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/1997","id":120635856,"user":{"login":"jeff1evesque","id":2907085,"avatar_url":"https://avatars.githubusercontent.com/u/2907085?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff1evesque","html_url":"https://github.com/jeff1evesque","followers_url":"https://api.github.com/users/jeff1evesque/followers","following_url":"https://api.github.com/users/jeff1evesque/following{/other_user}","gists_url":"https://api.github.com/users/jeff1evesque/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff1evesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff1evesque/subscriptions","organizations_url":"https://api.github.com/users/jeff1evesque/orgs","repos_url":"https://api.github.com/users/jeff1evesque/repos","events_url":"https://api.github.com/users/jeff1evesque/events{/privacy}","received_events_url":"https://api.github.com/users/jeff1evesque/received_events","type":"User","site_admin":false},"created_at":"2015-07-11T16:01:49Z","updated_at":"2015-07-11T16:01:49Z","body":"We need to define the following:\r\n\r\n- `setuid`\r\n- `setgid`\r\n\r\nOtherwise, we get the following within `/var/log/upstart/flask.log` during `vagrant halt`:\r\n\r\n```\r\n/proc/self/fd/9: 2: /proc/self/fd/9: /vagrant: permission denied\r\nException in thread Thread-1 (most likely raised during interpreter shutdown):\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 810, in __bootstrap_inner\r\n  File \"/usr/lib/python2.7/threading.py\", line 763, in run\r\n  File \"/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py\", line 603 in inner\r\n  File \"/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py\", line 462 in serve_forever\r\n  File \"/usr/lib/python2.7/SocketServer.py\", line 241, in serve_forever\r\n  File \"/usr/lib/python2.7/threading.py\", line 585, in set\r\n  File \"/usr/lib/python2.7/threading.py\", line 406, in notifyAll\r\n<type 'exceptions.TypeError'>: 'NoneType' object is not callable\r\n * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\r\n * Restarting with stat\r\n```"}}