Virtual Machine
Docker
Devs
Infra
The matrix from hell
Ops
Al desarrollador le preocupa:
Al ops le preocupa:
Construye una vez ... (por fin) ejecuta en cualquier lugar*
* Donde "en cualquier lugar" significa un servidor x86 ejecutando un kernel Linux moderna (3.2+ general o 2.6.32+ para RHEL 6.5+, Fedora & relacionada)
Configura una vez ... corre lo que sea
Un motor que permite encapsular cualquier carga como un ligero, portátil, autosuficiente contenedor ...
... que puede ser manipulado usando operaciones estándar y ejecutar consistentemente en prácticamente cualquier plataforma de hardware
docker pull <image name>docker commit <container id> user/imagedocker push user/imagedocker commit <container id> user/imageFROM ubuntu:15.10
# Update aptitude with new repo
RUN apt-get update
# Install software
RUN apt-get install -y git python3.5 redis-server wget vim curl
RUN ln -sf /usr/bin/python3.5 /usr/bin/python3 && ln -sf /usr/bin/pyvenv3.5 /usr/bin/pyvenv3
RUN wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
RUN python3 get-pip.py
# Expose ports.
EXPOSE 6379
# Make ssh dir
RUN mkdir /root/.ssh/
# Copy over private key, and set permissoins
ADD id_rsa /root/.ssh/id_rsa
RUN chmod 600 /root/.ssh/id_rsa
# Create known_hosts
RUN touch /root/.ssh/known_hosts
# Add bitbuckets key
RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts
# Clone the conf files into the docker container
RUN git clone git@bitbucket.org:cablevisionarq/cv-provisioning.git
# Set the timezone.
RUN echo "America/Argentina/Buenos_Aires" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
# Place on provisioning path
WORKDIR /cv-provisioning
# Install provisioning dependencies
RUN pip install -r requirements.txt
# Starts provisioning process
CMD redis-server /etc/redis/redis.conf && python3 app.py@aalonzolu