Skip to content

FreesideHull/Freeside-Fabfiles

 
 

Repository files navigation

Freeside-Fabfiles

Build Status

The official Fabfile for Freeside.

A FabFile is a configuration file for fabric a way of automatically deploying commands on many machines at once. If you'd like some software installed or a configuration changed on the Freeside machines, then it's the Fabfile in this repository that you'll want to edit! See the instructions below for more details.

Architecture

We use Drone as our continuous integration server. On every push , it pulls it down and checks the configuration with a tool called Flake8, to ensure there aren't any syntactical errors etc. Then, if it's ok and the push was to the master branch, it will automatically wake up the PCs in the Freeside lab, and deploy any updates to them.

Setup

Simply run the following sequence of commands:

git clone https://github.com/FreesideHull/Freeside-Fabfiles
cd Freeside-Fabfiles
virtualenv .venv
. ./.venv/bin/activate
pip3 install -r requirements.txt

Make sure you pay attention to the output, in case an error is thrown.

Usage

Using the fabric FabFile in this repository is easy. Here's how:

Run a task:

$ fab -H comma,seperated,hosts taskname 

List tasks

$ fab -l

Example usage:

$ fab -H fs-desktop01 install.app.neovim

Running multiple tasks in a collection:

# Installs all desktop apps
$ source hosts
$ fab -H "$desktops" $(fab --complete | grep "desktop.install")

Contributing

Want some software installing on the Freeside computers? You've come to the right place! Here's a simple guide on how to request software to be installed:

  1. Make sure you're logged into your GitHub account.
  2. Take a look at fabfile/desktop/install.py.
  3. Press the edit button in the top-right.
  4. Figure out how to install the software you want on a standard Fedora machine.
  5. Add a new function to the Fabfile in the same vein that the existing ones that installs the software you want. We prefer it if the software is available through dnf, Fedora's official package manager. That way it stays up-to-date automatically!
  6. Click Propose File Change at the bottom of the page and follow it through to submit a Pull Request for your changes.
  7. Take a look at fabfile/desktop/__init__.py.
  8. Add a task to the all() function that calls your new install function.
  9. Create a Pull Request for this as before.
  10. Once your pull requests are accepted, then your software will get installed automatically within a few minutes!

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.4%
  • Shell 10.6%