Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dbdeployer demo
### Dockerfile
FROM ubuntu:18.04
LABEL MAINTAINER Giuseppe Maxia <gmax@cpan.org>
RUN groupadd -r msandbox \
&& useradd -m -s /bin/bash -g msandbox msandbox
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y make sudo libaio1 vim-tiny libnuma1 \
perl-modules binutils bash-completion \
xz-utils wget less net-tools lsof rsync parallel \
&& rm -rf /var/lib/apt/lists/* \
&& echo "msandbox ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
&& mkdir -p /home/msandbox/.parallel \
&& touch /home/msandbox/.parallel \
&& mkdir -p /home/msandbox/bin \
&& mkdir -p /etc/bash_completion.d \
&& echo 'export PATH=$HOME/bin:$PATH' >> /home/msandbox/.bashrc \
&& chown -R msandbox.msandbox /home/msandbox/
USER msandbox
WORKDIR /home/msandbox
ENV USER=msandbox
### set up
mkdir -p $HOME/opt/mysql
wget -q https://github.com/datacharmer/dbdeployer/releases/download/v1.51.0/dbdeployer-1.51.0.linux.tar.gz
wget -q https://github.com/datacharmer/dbdeployer/releases/download/v1.51.0/dbdeployer-1.51.0.linux.tar.gz.sha256
sha256sum -c dbdeployer-1.51.0.linux.tar.gz.sha256
tar -xzf dbdeployer-1.51.0.linux.tar.gz
mv dbdeployer-1.51.0.linux ~/bin/dbdeployer
dbdeployer defaults enable-bash-completion --remote --run-it
dbdeployer update --verbose
dbdeployer downloads list
dbdeployer downloads get-unpack mysql-8.0.20-linux-x86_64-minimal.tar.xz
# or
dbdeployer downloads get-by-version 8.0 --minimal --newest
# or
dbdeployer downloads get-by-version 8.0.20 --minimal
dbdeployer unpack mysql-8.0.20-linux-x86_64-minimal.tar.xz
dbdeployer deploy single 8.0.20
### examples
Most of the examples to know dbdeployer are available using
1. dbdeployer cookbook list
2. dbdeployer cookbook create all
3. look into the files created in ./recipes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment