Coder Social home page Coder Social logo

apt-mirror-zfs's Introduction

This tool snapshots the directory holding the mirrored debian repository. To use it, you must use zfs and create a zfs pool_apt/mirror mounted on /var/spool/apt-mirror/mirror. The script will create snapshots in /var/spool/apt-mirror/mirror/snap.

It actually does create and maintain the snapshots:

  • week-0
  • week-1
  • working-day-0
  • working-day-1
  • working-day-2
  • working-day-3
  • working-day-4
  • working-day-5
  • working-day-6

working-day-X is a snapshot that won't change during the day, it will rotate at the next working day. So if working-day-0 was created on friday, it won't change neither on saturday neither on sunday (as they are not working day). That means that if a machine is pointing on any working-day-X it will see an updated repository only on monday, thuesday, wednesday, thursday, friday.

week-X means that it is the snapshot at the beginning of a week. It won't change during the whole week. It will rotate at the beginning of the week.

The idea was to have "lab" machines pointing to working-day-0, testing machines pointing to working-day-1, 5%, 25% and 70% of production machines pointing respectively to working-day-2, working-day-3 and working-day-4. That way, the patch apply to "lab" first, then to "test", then "5%" to "prod" and so on.

For clustering machines we knew that we need to have at least one working. So all the machines belonging to the same cluster where pointing at the same snapshot: week-0. But we will apply the patches, restart service or reboot the machine at different date. For example, the first node on monday and the second node on wednesday.

For information, we do use on our debian machines:

  • needrestart : to automatically restart service or reboot the kernel
  • unattended-upgrades: to automatically install patches
  • create /etc/systemd/system/apt-daily-upgrade.timer.d/central-it-only-on-monday with:
[Timer]
OnCalendar=
OnCalendar=Mon *-*-* 06:00

We also do not change the repository during the christmass period.

cED

apt-mirror-zfs's People

Contributors

briner 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.