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-5_2-0 libsodium17 libzmq5 python-backports.ssl_match_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-5_2-0 libsodium17 libzmq5 python-backports.ssl_match_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

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

  • Comments

    • kwk
      about 6 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

    Uyuni/SUSE Manager: build Python APE and a Salt+Python bundle to support ANY client operating system by pagarcia

    Uyuni/SUSE Manager build client tools for each ...


    Unified Config Management Tool (UCMT) by jreidinger

    [comment]: # (Please use the project descriptio...


    Create short "videos/screencasts" demoing cool stuff in 5 minutes by PSuarezHernandez

    [comment]: # (Please use the project descriptio...


    Language Server Protocol implementation for Salt States by cbosdonnat

    [Language Server Protocol](https://microsoft.gi...


    Uyuni/SUSE Manager: Windows client support by pagarcia

    I'll continue the effort I started at last Hack...


    Phoebe - where AI meets Linux by mvarlese

    Project Description

    Phoeβe (/ˈfiːbi/) wan...


    YAML 1.2 Schema support for PyYAML by tinita

    [comment]: # (Please use the project descriptio...


    Learn python by building a homepage with Flask by mbrugger

    I thought it would be time to learn a new progr...


    Develop a monitoring system with web frontend for virtualization servers by nzhang

    [comment]: # (Please use the project descriptio...


    Create short "videos/screencasts" demoing cool stuff in 5 minutes by PSuarezHernandez

    [comment]: # (Please use the project descriptio...