Packaging

Nick Vyzas edited this page May 8, 2018 · 2 revisions

How do I package ProxySQL for all the platforms it supports?

The simplest way is to go to the root folder of the repo and run "make packages". This command assumes that you have Docker installed. Rather than creating the full suite of packages for all operating systems (CentOS / Debian / Ubuntu / Fedora / Debug build etc.) it is also possible to create individual packages for a specific operating system and version - the following make targets are available:

centos6.7 centos7 centos6.7-dbg centos7-dbg centos5 centos5-dbg ubuntu12 ubuntu14 debian7 debian8 ubuntu14-dbg debian7-dbg debian8-dbg ubuntu16 ubuntu16-dbg fedora24 fedora24-dbg debian9 debian9-dbg ubuntu16-clickhouse debian9-clickhouse centos7-clickhouse fedora24-clickhouse

So for example, you can just create a package for CentOS version 7.0 by running make centos7, for the ClickHouse integrations you would run make centos7-clickhouse and for the DEBUG build make centos7-dbg.

Frequent errors

If you're getting an error like this from the packaging script: "FATA[0000] Error response from daemon: Conflict. The name "ubuntu14_build" is already in use by container d4c8dface7bc. You have to delete (or rename) that container to be able to reuse that name."

.. then all you have to do is run docker rm ubuntu14_build (or the equivalent container name it complains about) and re-run the packaging script.

How long does the packaging take?

Each run will take up to 20 minutes depending on your host's hardware specifications and internet speed. The reason is that it's pulling the fresh package from the source and recompiling ProxySQL against those versions of packages. This time can be reduced to about half, by making use of the Docker layer caching mechanism. Right now we're bypassing it completely in order to be sure that we're always building the latest source tree for ProxySQL into a package.

Which operating system can I run the packaging on?

In theory, it should work on any debian-based operating system. We usually test on Ubuntu however it should work on other flavours of Linux as well since it is Docker based. The most important thing it depends on is Docker's ability to run containers for the supported operating systems on top of another operating system. If this proves to be unfeasible, we'll move away from Docker containers to real VMs in the long run.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.