Giter Site home page Giter Site logo

twisted-infra / braid Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 12.0 2.79 MB

Automation scripts for twistedmatrix.com

License: Other

Python 48.16% Shell 1.34% Makefile 0.53% CSS 21.95% JavaScript 21.86% HTML 4.37% DIGITAL Command Language 1.31% Smarty 0.49%

braid's People

Contributors

adiroiban avatar cyli avatar dreid avatar exarkun avatar glasnt avatar glyph avatar graingert avatar hawkowl avatar jyknight avatar markrwilliams avatar mithrandi avatar radix avatar rodrigc avatar tomprince avatar twm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

braid's Issues

"Command(s) not found: t-web.uploadRelease"

Following the instructions in the ReleaseProcess[1] on the wiki, I run into an error on the final step:

(braid)red ~/braid/ (master) $
cd ~/braid; fab config.production t-web.uploadRelease:13.2.0,~/release.tar.bz2

Warning: Command(s) not found:
    t-web.uploadRelease

<rest of available commands here>

I'm not sure if anything is in a branch, so if it is, the ReleaseProcess document should match it. If the functionality doesn't exist, it should be reverted to the old version.

[1] https://twistedmatrix.com/trac/wiki/ReleaseProcess

Use absolute paths in run/sudo.

froztbyte commented:

I tend to use absolute paths for system utils just in case there's PATH fuckery (a good recent example I've run into is sensible-browser vs xdg-open vs not having either of those), and would suggest perhaps just being a bit more specific about the path layout of all the various bits which braid sets up.

Create a system-admin user to administer services

By creating a specific user to administer services, and using its .ssh/authorized_keys as target for the Match Group directive, we can assign different privileges to users (install/setup for root only and restart/update for every service admin).

Functions to add/remove keys to the authorized_keys file should be provided.

In braid.twisted.service, link all scripts that we know about.

Rather than having each class link ~/config/start to ~/bin/start, have the base class do this, and also do it for stop if that exists, rather than using the default one.

Also, we could perhaps generate a typical start, and we should create a restart as well.

Put buildbot's private config somewhere private but accessible.

This probably means on wolfwood. One tricky bit, is how to make it accesible to the service user.

Either there needs to be a shared user on wolfwood for accessing it, or people need to put their user in ~/.config/braid/production.env somehow. (But the latter means the remote won't be correct).

Provide a better method of doing interpolation into shell commands.

Is there something as convenient as .format, but that properly handles
shell quoting?

'from pipes import quote'. You'll need to write a function that combines that with 'format', of course.

Note that there are a couple of places where we currently depend on spaces in interpolated strings causing arguments to be separated. (Nothing that isn't fixable, but something to look out for an fix, when addressing this.)

Execute tasks in parallel by default

Currently, tasks which support multiple target hosts, are run in sequence. It is possible to run them in parallel by passing the -P command line flag when invoking fabric.

We can make this behavior the default by wrapping the generated tasks in the parallel decorator inside Service.getTasks.

t.names commands fail

$ fab -f fabfile.py t-names.start

Fatal error: The following specified roles do not exist:
nameserver

Aborting.

eliminate "server dependencies" section

Currently 3 dependencies are listed:

  1. the target server must have 'precise' installed
  2. the target server must have 'universe' enabled
  3. the target server must have 'sudo' installed.

It would be nice to eliminate this documentation and, for each of these, respectively:

  1. run a command to verify that 'precise' is installed, and give a useful, comprehensible error message if it isn't.
  2. enable the universe component automatically
  3. install sudo automatically

Make environment shortcuts easy to integrate

Currently environment shortcuts (test and prod) have to be imported manually into all service fabfiles which want to make use of them. We should eventually get rid of them completely or make them a generic single import.

A possible solution can be to move them to the braid.env package and make the environment task the default one. This would have as consequences a slightly longer but more explicit command line syntax: fab env.test myTask

Create README's for all services

They should say what the service is, pointers to the config file, additional paths used, fabric commands available, dump/restore procedure, etc.

  • t-names
  • twisted-website
  • buildbot
  • diffresource
  • kenaan
  • hiscore
  • trac
  • mailman

Clean up generation of service README.

The code probably wants to be factored into a function for generating the readme, as well as a generic function like fabric.contrib.file.upload_template.

installation fails when trying to use pip to install things for PyPy

Both pyOpenSSL and Twisted installation on PyPy fails:

[54.242.142.31] sudo: ~pypy/bin/pip install svn+svn://svn.twistedmatrix.com/svn/Twisted/trunk/
[54.242.142.31] out: Wheel installs require setuptools >= 0.8 for dist-info support.
[54.242.142.31] out: pip's wheel support requires setuptools >= 0.8 for dist-info support.
[54.242.142.31] out: Storing debug log for failure in /home/ubuntu/.pip/pip.log
[54.242.142.31] out:

Use virtualenvs

(just keeping track of things to discuss over here)

Virtual environments should probably still be preferred to user local installations as they provide more isolation from the system site-packages, allow to run different versions of python and don't require scripts to be invoked by specifiying the correct interpreter.

We could also activate the correct environment in each user's .profile in order to have it available for each command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.