Saturday, 19 March 2022

CI/CD: Basic Level

Basic CI/CD Flow

Below architecture depicts a basic CI/CD flow. 
Detailed components description is as follows:

REPOSITORY: We have taken example of GIT repository which is used a source control versioning repository. This is responsible for storing developer code and also maintains tags/versioning of the code. Developers are responsible for checking-in the code to code repository.

CI TOOL: This is the major component in field of DevOps and acts as a pivot point for complete pipeline. CI Tool in this case Jenkins 








Friday, 10 August 2018

Launch Sample Docker Container - Tomcat

Below steps needs to be followed in order to launch a simple docker container.

Note: Assuming docker-engine is already installed and running.
  1. Create a Dockerfile in any directory having permissions. For example:
    • cd /var
    • mkdir /var/docker
    • cd docker
    • touch Dockerfile
  2. Add contents to Dockerfile as:
    • vi Dockerfile
      • FROM tomcat:8
      • MAINTAINER MAYANK BATRA
      • RUN wget -O /usr/local/tomcat/webapps/demo.war \
      • http://<any sample war file url>/sample.war
      • EXPOSE 8080
      • CMD /usr/local/tomcat/bin/catalina.sh run
    • Here , we are using Base Image as tomcat:8 , which comes bundled up with OS, Java and other required components.
    • The value of war file URL needs to be changed (you may put any webapp url).
  3. Execute command:
    • docker build -t test_image .
    • Above command creates docker image with tag test_image Dockerfile in current working directory.
    • The same can be verified by running command:
      • docker images
  4. Execute command:
    • docker run -d test_image -p 9090:8080
    • This launches container in background with help of -d flag
    • Also host:container port mapping is being done using -p flag
  5. URL can be accessed as :
    • http://<host-ip>:9090/demo 
Cheers !!