EmergencyEMERGENCY? Get 24/7 Help Now!

Experimental Percona Docker images for Percona Server

 | February 2, 2016 |  Posted In: Docker, MySQL, Percona Server

PREVIOUS POST
NEXT POST

Percona DockerDocker is incredibly popular tool for deploying software, so we decided to provide a Percona Docker image for both Percona Server MySQL and Percona Server for MongoDB.

We want to create an easy way to try our products.

There are actually some images available from https://hub.docker.com/_/percona/, but these images are provided by Docker itself, not from Percona.

In our images, we provide all the varieties of storage engines available in Percona Server (MySQL/MongoDB).

Our images are available from https://hub.docker.com/r/percona/.

The simplest way to get going is to run the following:

for Percona Server/MySQL, and:

for Percona Server/MongoDB.

It is very easy to try the different storage engines that comes with Percona Server for MongoDB. For example, to use RocksDB, run:

or PerconaFT:

We are looking for any feedback  you’d like to provide: if this is useful, and what improvements we could make.

PREVIOUS POST
NEXT POST
Vadim Tkachenko

Vadim Tkachenko co-founded Percona in 2006 and serves as its Chief Technology Officer. Vadim leads Percona Labs, which focuses on technology research and performance evaluations of Percona’s and third-party products. Percona Labs designs no-gimmick tests of hardware, filesystems, storage engines, and databases that surpass the standard performance and functionality scenario benchmarks. Vadim’s expertise in LAMP performance and multi-threaded programming help optimize MySQL and InnoDB internals to take full advantage of modern hardware. Oracle Corporation and its predecessors have incorporated Vadim’s source code patches into the mainstream MySQL and InnoDB products. He also co-authored the book High Performance MySQL: Optimization, Backups, and Replication 3rd Edition.

19 Comments

  • Thanks for publishing these images.
    I have a few questions:
    1) Why is the percona-server image almost twice the size of mysql-server?
    2) The description on docker hub says that TokuDB is already enabled, but it does not show up in “show engines.” What should users do to enable it?
    3) Recently the MySQL team has introduced a change to allow passing a file containing a password rather than the password instead. Could you do the same?
    4) Where is the source code of the image?
    5) Is a 5.7 version of the image coming along?

    Thanks

    Giuseppe

    • Giuseppe,

      Thanks for the interest.

      1) I am not really sure about size, I think MySQL may strip debug symbols. I need to investigate more if this is a big problem
      2) This is not properly documented yet. you need to run docker with -e INIT_TOKUDB=1 to initialize TokuDB
      3) I will look into passing file with the password
      4) sources are there Source code is https://github.com/percona/percona-docker/tree/master/percona-server
      5) Sure, we will do Percona Server 5.7 images as soon as it gets GA. Should be fairly soon.

      Thanks,
      Vadim

  • Experimental bug report:

    After running
    time docker run –name mybox -e MYSQL_ROOT_PASSWORD=secret -d -e INIT_TOKUDB=1 percona/percona-server

    the container fails. At the end of ‘docker logs mybox’, I get:

    Version: ‘5.6.28-76.1’ socket: ‘/var/lib/mysql/mysql.sock’ port: 0 Percona Server (GPL), Release 76.1, Revision 5759e76
    Warning: Unable to load ‘/usr/share/zoneinfo/iso3166.tab’ as time zone. Skipping it.
    Warning: Unable to load ‘/usr/share/zoneinfo/zone.tab’ as time zone. Skipping it.
    which: no sestatus in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
    Checking if Percona Server is running with jemalloc enabled…
    WARNING: The file /proc/64/environ is not readable so impossible to check LD_PRELOAD for jemalloc.
    Possibly running inside container so assuming jemalloc is preloaded and continuing…
    If there will be an error during plugin installation try to restart mysql service and run this script again.

    Checking transparent huge pages status on the system…
    INFO: Transparent huge pages are enabled (should be disabled).

    Checking if thp-setting=never option is already set in config file…
    INFO: Option thp-setting=never is not set in the config file.
    (needed only if THP is not disabled permanently on the system)

    Checking TokuDB engine plugin status…
    INFO: TokuDB engine plugin is not installed.

    Disabling transparent huge pages for the current session…
    /usr/bin/ps_tokudb_admin: line 348: /sys/kernel/mm/transparent_hugepage/defrag: Read-only file system
    /usr/bin/ps_tokudb_admin: line 351: /sys/kernel/mm/transparent_hugepage/enabled: Read-only file system
    ERROR: Failed to disable transparent huge pages for this session.

    • Giuseppe,

      That’s indeed what I suspected.

      Please execute on the host system before starting container:

      echo never >
      /sys/kernel/mm/transparent_hugepage/enabled
      echo never > /sys/kernel/mm/transparent_hugepage/defrag

      Unfortunately I can’t do from inside container.
      I only need to document this.

      • Vadim,
        you can fix this issue at run time with the following commands, without touching the host environment:

        echo never > never.txt
        docker run \
        –name mybox \
        -e MYSQL_ROOT_PASSWORD=secret -d \
        -e INIT_TOKUDB=1 \
        -v $PWD/never.txt:/sys/kernel/mm/transparent_hugepage/defrag \
        -v $PWD/never.txt:/sys/kernel/mm/transparent_hugepage/enabled \
        percona/percona-server

        This way, the container will see your local file instead of the corresponding one from the host.

  • Vadim, This is less of a percona specific thing, and more of a docker/docker hub thing, but I’d love to see you guys using automated docker hub builds so everytime you checkin to git, a new image is created. Additionally, it’d be kind of great if you could make the CentOS image a dependancy, so that when they update their image (generally with security enhancements) the percona image also gets updated automatically.

  • Hello Vadim,
    I tried to start mongo with PerconaFT/RocksDB engines:
    docker run –name psmdbperconaft -d percona/percona-server-mongodb:latest –storageEngine=PerconaFT
    But container does not work. Without –storageEngine option it works well.
    Why?

  • TokuDB does not start with this command…

    docker run -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e INIT_TOKUDB=1 -d percona/percona-server

    Log is available here…

    https://gist.github.com/shantanuo/35832764d58f3b1dfa7b035c248c2bf6

  • Is there any additional benefit of using your docker image compared to standard docker version of Percona (from https://hub.docker.com/_/percona/) ? Because standard mysqld options support specification of storage engine

Leave a Reply