Challenge

The salt-minion client-side agent is still a bit hefty due to its dependencies and SUSE's strange Python packaging. Let's see how to create a minimal salt-minion packaging.

Results

Just by splitting off the .py files, I achieved a dramatic saving from 32.7 MB to 18.7 MB (14 MB less !).

See here for packages.

See mipy for a python-spec minimizer.

Normal (32.7 MB)

> sudo zypper in salt-minion Loading repository data... Reading installed packages... Resolving package dependencies...

The following 15 NEW packages are going to be installed: libpgm-52-0 libsodium17 libzmq5 python-backports.sslmatch_hostname python-futures python-Jinja2 python-MarkupSafe python-msgpack-python python-psutil python-PyYAML python-pyzmq python-requests python-tornado salt salt-minion

The following 2 recommended packages were automatically selected: python-futures python-tornado

15 new packages to install. Overall download size: 6,4 MiB. Already cached: 0 B. After the operation, additional 32,7 MiB will be used.

Minified (18.8 MB)

> sudo zypper in salt-minion Loading repository data... Reading installed packages... Resolving package dependencies...

The following 15 NEW packages are going to be installed: libpgm-52-0 libsodium17 libzmq5 python-backports.sslmatch_hostname python-futures python-Jinja2 python-MarkupSafe python-msgpack-python python-psutil python-PyYAML python-pyzmq python-requests python-tornado salt salt-minion

The following 2 recommended packages were automatically selected: python-futures python-tornado

15 new packages to install. Overall download size: 4,6 MiB. Already cached: 0 B. After the operation, additional 18,8 MiB will be used.

Looking for hackers with the skills:

salt saltstack python

This project is part of:

Hack Week 13

Activity

  • over 6 years ago: bruclik liked this project.
  • over 8 years ago: kbaikov liked this project.
  • over 8 years ago: kwk started this project.
  • over 8 years ago: kwk added keyword "salt" to this project.
  • over 8 years ago: kwk added keyword "saltstack" to this project.
  • over 8 years ago: kwk added keyword "python" to this project.
  • over 8 years ago: kwk originated this project.

  • Comments

    • kwk
      over 8 years ago by kwk | Reply

      Ubuntu Server 15.10 Standard Install

      sudo apt-get install salt-minion Reading package lists... Done Building dependency tree
      Reading state information... Done The following extra packages will be installed: dctrl-tools debconf-utils libpgm-5.1-0 libpython-stdlib libsodium13 libyaml-0-2 libzmq3 python python-apt python-cffi python-cffi-backend python-chardet python-croniter python-crypto python-cryptography python-dateutil python-enum34 python-idna python-ipaddress python-jinja2 python-m2crypto python-markupsafe python-minimal python-msgpack python-ndg-httpsclient python-openssl python-pkg-resources python-ply python-pyasn1 python-pycparser python-requests python-six python-tz python-urllib3 python-yaml python-zmq python2.7 python2.7-minimal salt-common Suggested packages: debtags python-doc python-tk python-apt-dbg python-apt-doc python-dev python-crypto-dbg python-crypto-doc python-cryptography-doc python-cryptography-vectors python-enum34-doc python-jinja2-doc python-openssl-doc python-openssl-dbg python-setuptools python-ply-doc doc-base cpp python-ntlm python2.7-doc binutils binfmt-support salt-doc python-mako python-augeas The following NEW packages will be installed: dctrl-tools debconf-utils libpgm-5.1-0 libpython-stdlib libsodium13 libyaml-0-2 libzmq3 python python-apt python-cffi python-cffi-backend python-chardet python-croniter python-crypto python-cryptography python-dateutil python-enum34 python-idna python-ipaddress python-jinja2 python-m2crypto python-markupsafe python-minimal python-msgpack python-ndg-httpsclient python-openssl python-pkg-resources python-ply python-pyasn1 python-pycparser python-requests python-six python-tz python-urllib3 python-yaml python-zmq python2.7 python2.7-minimal salt-common salt-minion 0 upgraded, 40 newly installed, 0 to remove and 44 not upgraded. Need to get 6,710 kB of archives. After this operation, 29.3 MB of additional disk space will be used.

    Similar Projects