Created
February 22, 2016 16:29
-
-
Save masahide/3b741f025bfe7fe69e0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 | |
from fabric.decorators import task | |
from cuisine import * | |
mode_local() | |
select_package("yum") | |
@task | |
def set_env(): | |
setup_packages() | |
fetch_test() | |
set_symlinks() | |
@task | |
def setup_packages(): | |
package_ensure('wget') | |
@task | |
def fetch_test(): | |
if not dir_exists('memcachedump_linux_amd64'): | |
run('wget https://github.com/masahide/memcachedump/releases/download/v1.0.2/memcachedump_linux_amd64 -O memcachedump_linux_amd64') | |
run('chmod 755 memcachedump_linux_amd64') | |
@task | |
def set_symlinks(): | |
with cd('/root'): | |
run('ln -s memcachedump_linux_amd64 memcachedump') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment