Giter Site home page Giter Site logo

amesken / cd-tool-stack Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 9.0 4.7 MB

source files to create a set of docker containers to use for continuous delivery purposes

Home Page: http://amesken.github.io/cd-tool-stack/

License: MIT License

HTML 100.00%

cd-tool-stack's Introduction

CD Tools Demo

This repository contains Dockerfiles for running a set of Continuous Delivery Tools with a single command (docker-compose). Click for details The diagram contains all tools used in the Docker containers.

Docker CD Tools

The setup is blatantly copied from https://blog.codecentric.de/en/2015/10/continuous-integration-platform-using-docker-container-jenkins-sonarqube-nexus-gitlab , so all credits go to Marcel Birkner.

Prerequisites (Windows)

You should have Docker Toolbox installed, see https://www.docker.com/toolbox

I am using docker-compose to start several docker container at once. Since all containers run in a single VM (virtualbox), this VM needs enough memory.

Step 0 - List Docker Machine

~/github/cd-tool-stack$ docker-machine ls

NAME      ACTIVE   DRIVER       STATE     URL                         SWARM
default   *        virtualbox   Running   tcp://192.168.99.100:2376

Step 1 - Stop your docker VM

docker-machine stop default

Step 2 - Increase Memory via VirtualBox UI

I am using 6000MB for my VM.

VirtualBox

Step 3 - Start VM

docker-machine start default

Getting started

Create the folder structure used to mount the data volumes of the images:

<USER_HOME> = c:\Users\<USER_NAME>
<DOCKER_VOLUMES> = <USER_HOME>\docker\data
<DOCKER_VOLUMES>\artifactory\data
<DOCKER_VOLUMES>\artifactory\logs
<DOCKER_VOLUMES>\artifactory\backup
<DOCKER_VOLUMES>\jenkins
<DOCKER_VOLUMES>\sonarqube\data
<DOCKER_VOLUMES>\sonarqube\logs
<DOCKER_VOLUMES>\sonarqube\extensions

To get all docker containers up and running use:

git clone [email protected]:amesken/cd-tool-stack.git
cd cd-tool-stack
docker-compose up -d

When all containers have been build, check their status:

$ docker-compose ps
          Name                         Command               State                           Ports
--------------------------------------------------------------------------------------------------------------------------
cdtoolstack_artifactory_1   catalina.sh run                  Up      0.0.0.0:18081->8080/tcp, 8081/tcp
cdtoolstack_gitlab_1        /sbin/entrypoint.sh app:start    Up      0.0.0.0:10022->22/tcp, 443/tcp, 0.0.0.0:10080->80/tcp
cdtoolstack_jenkins_1       /bin/tini -- /usr/local/bi ...   Up      50000/tcp, 0.0.0.0:18080->8080/tcp
cdtoolstack_nodechrome_1    /opt/bin/entry_point.sh          Up      0.0.0.0:32769->5900/tcp
cdtoolstack_nodefirefox_1   /opt/bin/entry_point.sh          Up      0.0.0.0:32768->5900/tcp
cdtoolstack_postgresql_1    /start                           Up      5432/tcp
cdtoolstack_redis_1         /sbin/entrypoint.sh              Up      6379/tcp
cdtoolstack_selhub_1        /opt/bin/entry_point.sh          Up      0.0.0.0:4444->4444/tcp
cdtoolstack_sonar_1         ./bin/run.sh                     Up      0.0.0.0:19000->9000/tcp

Access Tools

Tool Link Credentials
Jenkins http://${docker-machine ip default}:18080/ no login required
SonarQube http://${docker-machine ip default}:19000/ admin/admin
Artifactory http://${docker-machine ip default}:18081/artifactory admin/password
GitLab http://${docker-machine ip default}:10080/ root/5iveL!fe
Selenium Grid http://${docker-machine ip default}:4444/grid/console no login required

Screenshots

Here is an overview of all tools:

  • GitLab is used for storing the Sourcecode
  • Jenkins contains build job and is triggered once projects in GitLab are updated
  • As part of the CI build, Jenkins triggers a static code analysis and the results are stored in SonarQube
  • The Maven build uses Artifactory as a Proxy Repository for all 3rd party libs. The build artefacts are deployed to the Artifactory Release Repository
  • The Selenium Grid contains Docker containers running Chrome and Firefox and is used for UI tests

Gitlab

Gitlab interface

Jenkins Jobs

There are several jobs preconfigured in Jenkins. The Jobs cover the following tasks:

  • Continuous Integration Build with Maven
  • Unit Tests
  • Static Source Analysis results are stored in SonarQube
  • JaCoCo Test Coverage
  • Deployment to Artifactory
  • Jenkins Job DSL examples
  • Selenium UI Test

Conference App Jobs

Conference App CI Job

SonarQube Dashboard

Jenkins Jobs

Artifactory Repository

Artifactory Proxy Repository

Selenium Grid

Selenium Grid

cd-tool-stack's People

Contributors

amesken avatar br41n avatar marcelbirkner avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cd-tool-stack's Issues

Error for Artifactory

Downloading: http://172.17.0.4:8081/artifactory/org/springframework/boot/spring-boot-starter-parent/1.2.1.RELEASE/spring-boot-starter-parent-1.2.1.RELEASE.pom

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for de.codecentric:conference-app:3.0.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.2.1.RELEASE from/to artifactory (http://172.17.0.4:8081/artifactory): Connect to 172.17.0.4:8081 [/172.17.0.4] failed: Connection refused and 'parent.relativePath' points at no local POM @ line 18, column 10
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project de.codecentric:conference-app:3.0.0 (/var/jenkins_home/jobs/conference-app-2-sonar-analysis/workspace/app/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for de.codecentric:conference-app:3.0.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.2.1.RELEASE from/to artifactory (http://172.17.0.4:8081/artifactory): Connect to 172.17.0.4:8081 [/172.17.0.4] failed: Connection refused and 'parent.relativePath' points at no local POM @ line 18, column 10 -> [Help 2]
[ERROR]

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.