Tag: Fabric
Posts of Tag: Fabric
  1. Use fabric to excute code on a remote server from within python

    I would like to call "run()" or "sudo()" with fabric to execute a script on a remote host. However, I want to do this from within python, and not from the command line: so instead of: fab.py: def do_something()...Learn More
    PythonFabric
  2. Python Fabric is hanging

    I've got an instance running on AWS EC2. Doing this: ssh -i keyname.pem [email protected] Works! Using Fabric to deploy my stuff now: fab -i keyname.pem -k deploy:[email protected] Same key, same user/host...Learn More
    PythonFabric
  3. How to set CFLAGS and LDFLAGS to compile pycrypto

    I am trying to install the fabric library to an old machine. There are some legacy libraries in /usr/lib, such as libgmp. (py27)[qrtt1@hcservice app]$ ls /usr/lib|grep gmp libgmp.a libgmp.so libgmp.so.3 libgmp....Learn More
    PythonpipBuildFabricpycrypto
  4. Django - Fabric & collecstatic - can't open file 'manage.py'

    I'm begining to use Fabric for a Django production server. Here is my fabfile.py from fabric.api import * env.hosts = ['[email protected]'] def srefresh(): with path('~me/myproject'): run('python manage.py ...Learn More
    PythonDjangoFabricproduction-environment
  5. Running Fabric with Python script together

    I see most of the Fabric API are use together with function. Example of file (sample.py): from fabric.api import * print "Hello" def deploy(): with settings(hosts_string="Remote", user = "ubuntu", key_file...Learn More
    PythonsshFabric
  6. fabric: connect to remote server, then execute commands after sudo su - user2

    I need to write a python script which must be able to connect to a remote server (to user1), execute some commands (this was easy), then it must switch to user2 through sudo su - user2, and execute some command...Learn More
    PythonsshFabricUser
  7. Unable to truly background an SSH tunnel using Fabric and nohup

    I can't seem to get Fabric to play nice with backgrounding a process that I've used nohup on. . . It should be possible, given various pieces of information, including here and here. def test(): h = 'xxxxx.comp...Learn More
    PythonbashsshFabricnohup
  8. How to prevent Fabric task (in serial mode) from being executed on other hosts when error occurs on one of the hosts list?

    In serial mode, when one of my host has detected a error, I want to cancel the task on all the other following hosts but don't want to exit the whole code. How to do it? Code example: target_hosts = [host1, ho...Learn More
    PythonFabric
  9. Python fabric cannot start squid on the remote server

    I use this command sudo('/opt/squid/sbin/squid'), nothing happend, but if I ran sudo /opt/squid/sbin/squid, it works. What's the difference between fabric ssh and shell? UPDATE: My OS is Amazon Linux, based o...Learn More
    PythonFabricsquid
  10. Python - Fabric maximum 10 parallel SSH connections

    I am using Fabric with the parallel decorator like so: parallel(pool_size=100) def mytask(): # do work I was hoping the program to open 100 distinct SSH connections and run the Fabric task on all those ser...Learn More
    PythonsshFabric
  11. Fabric ssh twice within host

    How do I ssh twice if server2 can only be accessed from server1? fabfile.py: from fabric.api import run from fabric.api import env env.hosts = ['[email protected]'] env.use_ssh_config = True def dothis(): ...Learn More
    PythonsshFabric
  12. Are there any tag values I should disallow for my deploy script?

    I'm writing a semi-automated deploy script that allows users to tag the repository at deploy time. Right now it simply prompts for input and attempts to use whatever value is entered as the tag name: current_ta...Learn More
    PythonGitFabric