confiuratioon, deploymenti and manaiementi of multiple types of IT system resources (servers, network, access, software, etc) Provisioning is the fourth step in the Operations, Administration, Maintenance and Provisioning (OAMP) management framework
perfect, but simple and pragmatic solution to get container up and running • There are other ways to solve provisioning problem and reproduce the state of the machines • Out of the box, Docker does not reuse existing states, recipes, cookbooks, playbooks, etc.
Dockerfle • But the same thrift compiler and lein are used • There is no thrift-compiler packaged for latest version, therefore it is compiled and installed manually • There is no leiningen package for latest version, therefore it is downloaded and installed
file.encoding ENV LANG C.UTF-8 RUN apt-get update \ && apt-get install -y unzip curl htop tree dstat wget ca-certificates \ && rm -rf /var/lib/apt/lists/* # Salt install script uses runlevel (which is unknown) to help determine if packages are installed # This is a hack so installation will complete RUN ln -s /etc/rc2.d/ /etc/rc.d # Install salt-minion RUN wget -O /root/install_salt.sh http://bootstrap.saltstack.org RUN sh /root/install_salt.sh -D -X -U -p procps -p pciutils # Copy the salt states COPY salt /root/salt # Apply salt states RUN salt-call --local -l debug --retcode-passthrough --file-root=/root/salt/salt-prod/state state.sls tool.thrift RUN salt-call --local -l debug --retcode-passthrough --file-root=/root/salt/salt-prod/state state.sls tool.lein
extra-layer in provisioning – git submodule for salt repository – avoid long Dockerfles in favor of reusing existing salt states • Pulling the updates from salt repository – reusing tools – being on the same page about tools in diferent projects • Opportunity to test some salt states • If salt fles were updated, then cache is going to be invalid and all of the states after this step are going to be applied again, increasing the build time. Still faster, than in Vagrant, but remember, no runlevel, no init, no systemd. • You can easily recreate your build environment in Jenkins, without installing anything on Jenkins node, except Docker.