Code Monkey home page Code Monkey logo

helloworld2docker-chain's Introduction

title author date
Experiment to learn dockerization
RORO
2020-05-26

Experiment to learn dockerization

Starting from a plain hello world App, we want to learn what needs to be done for creating and running a multi-container "app".

=> Journey from Dev to DevOps with Containers

Goal: Learn how to work with containers, as a base for decision making, when planning for a microservice architecture.

Environment

C#, dotnet core , docker, shell scripts, nuget

Start

  • blank workspace

DoD

  • multiple console apps running in seperate docker containers
  • use each of those processes from a batch file to fulfill a busines-case

Example Business Case

  • Add two numbers:
    • Input two numbers via console
    • Get added numbers printed on console

Planned Journey Milestones

Phase 1: [DEV] BusinessLogic

Bootstrapping

[X] Create standalone Console app

dotnet new console -n HelloWorld -o ./src

[X] Implement Business Use-Case

[X] Add Testing

dotnet new mstest --name AddTwoNumbersTests -o ./src-test

Milestone 1

[X] working Business Use-Case

Phase 2: [DEV] Business-Case Modularization

Functional Refactoring

[X] Separate Business-Tasks on function level

  • separated execution in Main from functionality => separate classes
  • changed high-level interfaces to string[], as this will be what is used when piping on console

[X] Separate Business-Tasks on project level

  • moved bl to class-libs
  dotnet new classlib -n <LibName> -o ./src/<LibName>
  • added build scripts (cmdline)
    • to be called from project root

[X] Separate Business-Tasks on executable level

[X] Use executables via batch file on same machine

Milestone 2

[X] Working Business Use-Case spanning multiple-executables

Phase 3: [DEV] Technical Modularization aka Containerization

Operational Refactoring

[X] Separate Business-Tasks on container level

./scripts/dockerize.bat

[X] Use containers from batch file (without orch.)

./usecase.bat

[ ] Impl container orchestration

[ ] Use containers from batch file (with orch.)

Milestone 3

[ ] Working Business Use-Case spanning multiple containers with simple service startup

(optional) Phase 4: [DEV] Build Modularization

Build-Chain

[ ] dockerize builds for CI

helloworld2docker-chain's People

Watchers

 avatar  avatar

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.