5

I have to model a deployment based on Docker containers. I see this answer which suggests to use nodes to model Docker containers.

I would prefer to use:

  • Device for physical machines. It is the only element for physical resource, see 19.5.7.1

  • Node for virtual machines, which is compliant with the description provided by 19.5.10.1

    A Node is computational resource upon which artifacts may be deployed for execution

  • ExecutionEnvironment for Docker containers. It is partially compliant with the description provided by 19.5.8.1

    An execution environment is a node that offers an execution environment for specific types of components that are deployed on it in the form of executable artifacts.". Partially because a container may host any types of artifact not specific ones.

  • ExecutionEnvironment for web server, servlet containers or application servers. This is the usage shown in the specification. See fig 19.12

  • Artifact for binaries produced by our software forge.

The conclusion from of above is to separate artifacts such as WAR/EAR from Docker containers and to sperate physical or virtual machines from Docker containers.

Is my proposition logically and correct from an UML point of view?

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
granier
  • 1,739
  • 13
  • 25
  • I guess that yes. I would do it the same way (admittedly not knowing Docker by more than its name). – qwerty_so Feb 06 '18 at 22:41
  • Broadly yes. Bear in mind that Device and ExecutionEnvironment are stereotypes of Node, so ultimately the semantics of Node are augmented by additional meanings for these. Personally I'd stereotype a Node with Container and then define that myself if I was in doubt, so that there is no possibility of confusion. Artifact definitely fo binaries. – muszeo Feb 07 '18 at 06:26
  • @muszeo Worth an answer. – qwerty_so Feb 07 '18 at 09:11
  • @muszeo, please see fig 19.11 Device and Execution Environment are subclass of Node, Node generalizes Device and Execution Environment. These are not stereotypes. – granier Feb 07 '18 at 12:22
  • @muszeo, of course defining stereotypes is a solution but it implies to define a profil, and i prefer to avoid to define a profile. – granier Feb 07 '18 at 12:52
  • Ah ok, i’ll take a look. I’ve always thought they were stereotypes since their syntax is a node with a stereotype. – muszeo Feb 08 '18 at 05:52
  • @ThomasKilian yes, true, noted. – muszeo Feb 08 '18 at 05:53

1 Answers1

0

To represent Docker container in a deployment diagram, two options are available:

As usual, a more precise option is to define a new stereotype of Node or a new subclass of Node but this option implies to define a profile.

granier
  • 1,739
  • 13
  • 25