Skip to content

Instantly share code, notes, and snippets.

@alexleventer
Last active August 29, 2015 14:21
Show Gist options
  • Save alexleventer/96d66ce388f87742895b to your computer and use it in GitHub Desktop.
Save alexleventer/96d66ce388f87742895b to your computer and use it in GitHub Desktop.
Python CentOS Distelli Manifest
<username>/PythonCentOSSimpleApp:
# This Basic Distelli Manifest assumes the following
# has been provisioned on the destination deploy server:
#
# OS: CentOS7
# Installed Packages:
# Python >= 2.5 [sudo yum install python]
# Pip >= 1.4 (python-pip) [sudo rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm]
# [sudo yum update]
# [sudo yum install python-pip]
# virtualenv >= 1.9 [sudo yum install python-virtualenv]
#
Env:
- PORT: 8005
PkgInclude:
- simpleapp/simpleapp.py
- requirements.txt
PreInstall:
- echo "Starting PreInstall for SimplePythonApp"
PostInstall:
- echo "Starting PostInstall for SimplePythonApp"
- virtualenv .
- sudo pip install -r requirements.txt
Exec:
- echo "Executing SimplePythonApp"
- exec python simpleapp/simpleapp.py -p $PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment