Giter Club home page Giter Club logo

unv-update-package's Introduction

Build, distribute and install packages on Debian

A small script I use when working with Univention Corporate Server (UCS). UCS is a Debian based operating system. Developing and testing software usually involves working on a VM where UCS is deployed. Anyways, editing files remotely then copying them back to my local machine in order to check them into version control was a nasty workflow. So I decided to go the other way around: edit locally and distribute the files to the VMs.

The script is easy to use and can be configured using environment variables via direnv. You have to provide Docker image, a directory where packages should be build and a target machine:

usage: update_package.py [-h] [-m MACHINES] [--ssh-config SSH_CONFIG] [-i IMG] [-p PREFIX] [--repository-root REPOSITORY_ROOT] [-b] [-c] [-l {10,20,30,40,50}]
                         FOLDER [FOLDER ...]

Build and update packages. Build packages for each FOLDER, copy them over to the given MACHINES and update them. Package buildings is done via Docker. Note that packages are only updated, i.e. if they are not installed the package will not be installed on the target machine. You can skip the check if the package is installed using "-c". The script is supposed to run anywhere in a git repository and FOLDER has to be relative to the root of the repo.

positional arguments:
  FOLDER                The name of the folders to build (or -if "-b" is given- search) packages for. You have to pass in the relative name from the repository root Note
                        that more than one package can stem from the same folder.

options:
  -h, --help            show this help message and exit
  -m MACHINES, --machines MACHINES
                        The set of machines to update the packages on. This has to be a comma separated list. You can also set this argument via the "UP_MACHINES"
                        environment variable.
  --ssh-config SSH_CONFIG
                        A ssh configuration file to pass on to ssh via the '-F' option. You can also set this argument via the "UP_SSH_CONFIG" environment variable.
  -i IMG, --docker-image IMG
                        Use IMG to build packages. You can also set this argument via the "UP_DOCKER_IMAGE" environment variable.
  -p PREFIX, --prefix PREFIX
                        Prefix all machines with the given string. Empty by default.
  --repository-root REPOSITORY_ROOT
                        The root of the repository. By default the root is searched by walking up the filetree until the `.git' directory is found.
  -b, --skip-package-build
                        Skip the build of the package before distributing it. Note that this results in a slightly different behaviour: the `FOLDER's are now simply
                        searched for `.deb' files which are then assumed to be distributed. Make sure to clean up built packages!.
  -c, --skip-install-check
                        Skip the check if the package is installed on the machines.
  -l {10,20,30,40,50}, --log-level {10,20,30,40,50}
                        Set the levels of logging which should get printed to stdout. The lower the more messages you will see. Default: 20.

These are the configured predefined sets of machines:
single: bsbt1

unv-update-package's People

Contributors

thomasbach-dev avatar

Watchers

 avatar  avatar

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.