Giter Club home page Giter Club logo

tomcat_sidecar_pattern's Introduction

##Tomcat application deployment container

###This is a POC that puts the sidecar container pattern to use

Deploys the sample.war from a container to a mounted VOLUME exposed inside the tomcat container in /usr/local/tomcat/webapps/

##Sidecar Container Pattern

https://www.usenix.org/system/files/conference/hotcloud16/hotcloud16_burns.pdf

###Vagrant environment

This image can run locally as long as the docker engine is isntalled, and comes with Vagrantfile VM on CentOS 7 with the latest Docker engine.

###Server Container

FROM tomcat:8.0-jre8

# Mount point for the sidecar container
VOLUME [ "/usr/local/tomcat/webapps" ]

###Side Container

FROM busybox:latest

ADD sample.war /usr/local/tomcat/webapps/sample.war

VOLUME [ "/usr/local/tomcat/webapps/" ]
WORKDIR /usr/local/tomcat/webapps/

Build the image: $ docker buid sidecar/

Run the container:

$ docker run -t -i --name sidecar_test sidecar_war

Keep the container running:

$ docker run -d --name sidecar_test03 sidecar_war tail -f /dev/null

Build the stack:

$ docker run --name sample_app05 --volumes-from sidecar_test -d  -p 8080:8080  tomcat_server0

###Docker Compose

This example app deployment also includes a docker-compose.yml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.