Comments (1)
Hi Zach,
Here is how I would install PostgreSQL 9.2 on a Debian/Ubuntu box using fabtools.
I've tested this recipe on Ubuntu 12.04 (precise) and Debian 6.0 (squeeze), but it should work on other variants too.
Hope this helps!
from fabric.api import task
import fabtools
from fabtools import require
@task
def postgresql():
"""
Install the latest stable PostgreSQL version on Debian/Ubuntu
from the PostgreSQL Global Development Group APT repository
See: https://wiki.postgresql.org/wiki/Apt
"""
# Get the distrib codename
#
# Note that with fabtools >= 0.14.0 this will be:
#
# distrib = fabtools.system.distrib_codename()
#
distrib = fabtools.deb.distrib_codename()
# Add the PGDG key
require.file(url='http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc')
fabtools.deb.add_apt_key('ACCC4CF8.asc', update=False)
# Add the PGDG repository
require.deb.source(
'PGDG',
'http://apt.postgresql.org/pub/repos/apt/',
'%s-pgdg' % distrib,
'main'
)
# Install PostgreSQL
require.postgres.server()
from fabtools.
Related Issues (20)
- centos 7 support - fabtools.require.rpm.repository('epel') fails
- feature request: with fabtools.python.version(3.4): do smth HOT 2
- install_pip or package fails on centos 7 with sudo config setting <Defaults requiretty> HOT 3
- fabtools.require.python.virtualenv() is installing wheel from sources?
- Travis Tests?
- require tries to create home dir even if create_home is False
- mysql.query does not allow the use of --defaults-file
- Redis v3.2.x require fails because of binary rename
- fix md5sum in files.py
- require.oracle_jdk.installed fails due to change in Oracle download URL
- Issue while installing fabtools3 inside a container. HOT 1
- Fabric v2 support HOT 3
- sudo will fail when checking Postgres user
- systemd and supervisor processes can freeze due to pager HOT 1
- Update setup.py to pull fabric3 for Python 3
- `fabtools.files.mode` does not work properly with character expansion HOT 3
- `fabtools.require.files.file` mode type HOT 1
- error on add_ssh_public_key HOT 2
- how pytest run ?
- Fix simple typo: occured -> occurred
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fabtools.