aptly - система
управления Debianрепозиториями пакетов
Андрей Смирнов,

DevOps Meetup Moscow Jan’14
Повторяемость!
Изменения
Окружение
Повторяемость
окружения
Изменение
окружения
Повторяемость
изменений окружения
Окружение - 

набор пакетов
Версии окружения
development

staging

testing

production
Управление окружением
Debian

repo
apt-sources

apt-get

backports
aptpreferences
3rd-party

repo
Не та версия…
apt pinning поможет!
No…
Цель
•

Зафиксированный репозиторий пакетов
(повторяемость)

•

Контролируемые изменения версий
(изменений)
aptly
* не является заменой apt, dpkg!
Сущности
mirror

– зеркало удаленного репозитория

snapshot

– неизменяемый срез набора пакетов

published

repo

– опубликованный репозиторий пакетов
mirror

take snapshot
pull

snapshot

snapshot

update

diff

take snapshot

local

repo

verify

published

repo

snapshot

publish
merge

snapshot
aptly mirror
$ aptly mirror create wheezy-main http://mirror.yandex.ru/
debian/ wheezy main	
Downloading http://mirror.yandex.ru/debian/dists/wheezy/
Release...	
!

Mirror [mirror1]: http://mirror.yandex.ru/debian/ wheezy
successfully added.	
You can run 'aptly mirror update mirror1' to download
repository contents.
aptly mirror
$ aptly mirror update wheezy-main	
Downloading http://mirror.yandex.ru/debian/dists/wheezy/
Release...	
Downloading & parsing package files...	
Downloading http://mirror.yandex.ru/debian/dists/wheezy/
main/binary-i386/Packages.bz2...	
Downloading http://mirror.yandex.ru/debian/dists/wheezy/
main/binary-amd64/Packages.bz2...	
Saving packages to database...	
Building download queue...	
Download queue: 0 items, 0.00 GiB size	
!

Mirror `wheezy-main` has been successfully updated.
mirror

update
aptly snapshot
$ aptly snapshot create deb-main-250114 from mirror wheezymain	
!

Snapshot deb-main-250114 successfully created.	
You can run 'aptly publish snapshot deb-main-250114' to
publish snapshot as Debian repository.
mirror

update

take snapshot

snapshot
aptly snapshot pull
$ aptly snapshot pull deb-main-250114 percona-250114 deb-wpercona 'percona-server-server (>=5.5)’	
…	
[+]
[+]
[+]
[+]
[-]
[+]
[+]
[+]
[+]
[+]
[-]
[+]

percona-server-server-5.5.35-rel33.0-611.wheezy_amd64 added	
percona-server-server-5.5-5.5.35-rel33.0-611.wheezy_amd64 added	
percona-server-client-5.5-5.5.35-rel33.0-611.wheezy_amd64 added	
percona-server-common-5.5-5.5.35-rel33.0-611.wheezy_amd64 added	
libmysqlclient18-5.5.31+dfsg-0+wheezy1_amd64 removed	
libmysqlclient18-5.5.35-rel33.0-611.wheezy_amd64 added	
percona-server-server-5.5.35-rel33.0-611.wheezy_i386 added	
percona-server-server-5.5-5.5.35-rel33.0-611.wheezy_i386 added	
percona-server-client-5.5-5.5.35-rel33.0-611.wheezy_i386 added	
percona-server-common-5.5-5.5.35-rel33.0-611.wheezy_i386 added	
libmysqlclient18-5.5.31+dfsg-0+wheezy1_i386 removed	
libmysqlclient18-5.5.35-rel33.0-611.wheezy_i386 added
aptly snapshot pull
$ aptly snapshot pull aptly snapshot pull deb-main-250114
back-250114 deb-w-xorg rsyslog	
…	
[-]
[+]
[-]
[+]
[+]
[-]
[+]
[-]
[+]

rsyslog-5.8.11-3_amd64 removed	
rsyslog-7.4.4-1~bpo70+1_amd64 added	
libestr0-0.1.1-2_amd64 removed	
libestr0-0.1.9-1~bpo70+1_amd64 added	
init-system-helpers-1.11~bpo70.1_all added	
rsyslog-5.8.11-3_i386 removed	
rsyslog-7.4.4-1~bpo70+1_i386 added	
libestr0-0.1.1-2_i386 removed	
libestr0-0.1.9-1~bpo70+1_i386 added
mirror

take snapshot
pull

update

snapshot

snapshot

snapshot
aptly snapshot diff
$ aptly snapshot diff deb-main-250114 deb-w-percona	
!
+
+
+
+
!
+
+
+
+

Arch
amd64
amd64
amd64
amd64
amd64
i386
i386
i386
i386
i386

|
|
|
|
|
|
|
|
|
|
|

Package
libmysqlclient18
percona-server-client-5.5
percona-server-common-5.5
percona-server-server
percona-server-server-5.5
libmysqlclient18
percona-server-client-5.5
percona-server-common-5.5
percona-server-server
percona-server-server-5.5

|
|
|
|
|
|
|
|
|
|
|

Version in A
5.5.31+dfsg-0+wheezy1
5.5.31+dfsg-0+wheezy1
-

|
|
|
|
|
|
|
|
|
|
|

Version in B	
5.5.35-rel33.0-611.wheezy	
5.5.35-rel33.0-611.wheezy	
5.5.35-rel33.0-611.wheezy	
5.5.35-rel33.0-611.wheezy	
5.5.35-rel33.0-611.wheezy	
5.5.35-rel33.0-611.wheezy	
5.5.35-rel33.0-611.wheezy	
5.5.35-rel33.0-611.wheezy	
5.5.35-rel33.0-611.wheezy	
5.5.35-rel33.0-611.wheezy
mirror

take snapshot
pull
snapshot

update

diff

snapshot

snapshot
aptly snapshot verify
$ aptly snapshot verify deb-w-percona	
Missing dependencies (13):	
fenix [amd64]	
fenix-plugins-system [amd64]	
ia32-libs-i386 [amd64]	
ia32-libs-gtk-i386 [amd64]	
vidcontrol [amd64]	
kbdcontrol [amd64]	
libmysqlclient18 (= 5.5.31+dfsg-0+wheezy1) [amd64]	
scsh-0.6 (>= 0.6.6) [amd64]	
scsh-0.6 [amd64]	
mozart (>= 1.4.0) [amd64]	
libmysqlclient18 (= 5.5.31+dfsg-0+wheezy1) [i386]	
vidcontrol [i386]	
kbdcontrol [i386]
mirror

take snapshot
pull
snapshot

update

diff

snapshot

snapshot

verify
aptly snapshot merge
$ aptly snapshot merge deb-w-percona-250114 deb-main-250114
percona-250114	
!

Snapshot deb-w-percona-250114 successfully created.	
You can run 'aptly publish snapshot deb-w-percona-250114'
to publish snapshot as Debian repository.
mirror

take snapshot
pull

snapshot

snapshot

update

diff

snapshot

merge

snapshot

verify
aptly publish snapshot
$ aptly publish snapshot -distribution=wheezy
percona-250114	
Signing file '/Users/smira/.aptly/public/dists/wheezy/
Release' with gpg, please enter your passphrase when
prompted:	
!

…	
!

Snapshot percona-250114 has been successfully published.	
Please setup your webserver to serve directory '/Users/
smira/.aptly/public' with autoindexing.	
Now you can add following line to apt sources:	
deb http://your-server/ wheezy main	
Don't forget to add your GPG key to apt with apt-key.
mirror

take snapshot
pull

snapshot

verify

snapshot

update

diff

published

repo

snapshot

publish
merge

snapshot
Что планируется
•

Поиск

•

Фильтры при выполнении операций

•

Управление локальными репозиториями
(добавление “своих” пакетов)

•

Поддержка source-пакетов и translations

•

Верифицирование удаленных репозиторев
Что не работает пока
•

удаление

•

bash-completion

•

flat-репозитории

•

прогресс скачивания
Конкуренты

•

mirror: ftpsync, reprepro, debmirror, apt-mirror, aptcache…

•

archive generation: dak, mini-dak, reprepro, …
Внутренности
•

Написано на Go

•

База данных - LevelDB

•

Файлы пакетов хранятся один раз
Внутренности
•

~/.aptly.conf - конфигурация

•

~/.aptly/ - рабочий каталог по умолчанию
•

db/ - база данных (мета-информация)

•

pool/ - хранилище файлов

•

public/ - опубликованные репозитории
Ссылки
•

http://www.aptly.info/

•

https://github.com/smira/aptly/

•

@smira

•

me@smira.ru

•

Skype: smirnov.andrey

More Related Content

PPTX
Build & test Apache Hawq
PPTX
03 - Refresher on buffer overflow in the old days
PDF
Automated monitoring with NSClient++ and Icinga
PDF
Using Test Kitchen for testing Chef cookbooks
DOCX
Oracle upgrade
PDF
SANS @Night There's Gold in Them Thar Package Management Databases
PPTX
aptly: система управления репозиториями пакетов (РИТ-2014)
PDF
Анатомия веб-сервиса (РИТ-2014)
Build & test Apache Hawq
03 - Refresher on buffer overflow in the old days
Automated monitoring with NSClient++ and Icinga
Using Test Kitchen for testing Chef cookbooks
Oracle upgrade
SANS @Night There's Gold in Them Thar Package Management Databases
aptly: система управления репозиториями пакетов (РИТ-2014)
Анатомия веб-сервиса (РИТ-2014)

Similar to aptly - система управления Debian-репозиториями пакетов (20)

PDF
aptly: Debian repository management tool
PDF
Instrumentación de entrega continua con Gitlab
KEY
Ruby and Rails Packaging to Production
PDF
glance replicator
PDF
Hudson以外の何か with 任意
PDF
Deploying Symfony | symfony.cat
PDF
Capistrano
PDF
Arbeiten mit distribute, pip und virtualenv
PDF
PHP selber bauen
PDF
Ansible 實戰:top down 觀點
PDF
Composer, putting dependencies on the score
PDF
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
PDF
Composer: putting dependencies on the score
PDF
Using Buildout to Develop and Deploy Python Projects
PDF
빈스톡 첫인상 with Git
PDF
Kubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdf
PDF
PDF
Testing Your Automation Code (Vagrant Version)
PDF
DevOps for Opensource Geospatial Applications
PDF
OSS AWS 핸즈온 강의
aptly: Debian repository management tool
Instrumentación de entrega continua con Gitlab
Ruby and Rails Packaging to Production
glance replicator
Hudson以外の何か with 任意
Deploying Symfony | symfony.cat
Capistrano
Arbeiten mit distribute, pip und virtualenv
PHP selber bauen
Ansible 實戰:top down 觀點
Composer, putting dependencies on the score
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Composer: putting dependencies on the score
Using Buildout to Develop and Deploy Python Projects
빈스톡 첫인상 with Git
Kubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdf
Testing Your Automation Code (Vagrant Version)
DevOps for Opensource Geospatial Applications
OSS AWS 핸즈온 강의
Ad

More from Andrey Smirnov (15)

PDF
Remote Highload
PDF
Вебинар "Разработка высоконагруженных и надежных систем": Введение
PDF
Анатомия веб сервиса (HighLoad-2014)
PDF
Клиентские приложения под нагрузкой (HighLoad 2014)
PDF
Консольные приложения на Go
PDF
Курс высокие нагрузки: сеть (отрывок)
PDF
Курс высокие нагрузки: очереди (отрывок)
PDF
Курс высокие нагрузки и надежность: отрывок
ODP
Smirnov twisted-python
PDF
Twisted Framework - сетевые приложения в Python
PDF
Twisted Framework - сетевые приложения в Python
PPT
Доклад на РИТ: Высокие нагрузки (2008)
PPT
PPT
ODP
PGDBObject
Remote Highload
Вебинар "Разработка высоконагруженных и надежных систем": Введение
Анатомия веб сервиса (HighLoad-2014)
Клиентские приложения под нагрузкой (HighLoad 2014)
Консольные приложения на Go
Курс высокие нагрузки: сеть (отрывок)
Курс высокие нагрузки: очереди (отрывок)
Курс высокие нагрузки и надежность: отрывок
Smirnov twisted-python
Twisted Framework - сетевые приложения в Python
Twisted Framework - сетевые приложения в Python
Доклад на РИТ: Высокие нагрузки (2008)
PGDBObject
Ad

Recently uploaded (20)

PPT
Geologic Time for studying geology for geologist
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
The various Industrial Revolutions .pptx
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
CloudStack 4.21: First Look Webinar slides
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
STKI Israel Market Study 2025 version august
Geologic Time for studying geology for geologist
1 - Historical Antecedents, Social Consideration.pdf
Final SEM Unit 1 for mit wpu at pune .pptx
sustainability-14-14877-v2.pddhzftheheeeee
The various Industrial Revolutions .pptx
A review of recent deep learning applications in wood surface defect identifi...
CloudStack 4.21: First Look Webinar slides
sbt 2.0: go big (Scala Days 2025 edition)
NewMind AI Weekly Chronicles – August ’25 Week III
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Flame analysis and combustion estimation using large language and vision assi...
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
A proposed approach for plagiarism detection in Myanmar Unicode text
UiPath Agentic Automation session 1: RPA to Agents
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Taming the Chaos: How to Turn Unstructured Data into Decisions
Convolutional neural network based encoder-decoder for efficient real-time ob...
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
STKI Israel Market Study 2025 version august

aptly - система управления Debian-репозиториями пакетов