Changes for page Volume Mapping (On-premise)
Last modified by Erik Bakker on 2024/08/26 12:37
From version 69.1
edited by Erik Bakker
on 2024/03/05 08:56
on 2024/03/05 08:56
Change comment:
There is no comment for this version
Summary
-
Page properties (5 modified, 0 added, 0 removed)
-
Attachments (0 modified, 4 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -Volume Mapping (On-premise) - Parent
-
... ... @@ -1,1 +1,0 @@ 1 -WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ebakker1 +XWiki.marijn - Default language
-
... ... @@ -1,1 +1,0 @@ 1 -en - Content
-
... ... @@ -1,158 +1,97 @@ 1 -{{container}}{{container layoutStyle="columns"}}((( 2 -When you need to read and write files from an on-premise disk, you need to know the path in which the data is stored and ensure that the docker container in your runtime(s) running has access to this path. There are several ways of dealing with this challenge. This microlearning will discuss the various alternatives and best approaches in these scenarios. 1 +{{html wiki="true"}} 2 +<div class="ez-academy"> 3 + <div class="ez-academy_body"> 3 3 4 - Shouldyou haveany questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]].5 +<div class="doc"> 5 5 6 -== 1. Prerequisites == 7 7 8 -* Basic knowledge of the eMagiz platform 9 9 10 -= =2. Key concepts ==9 += Annotations = 11 11 12 - This microlearning centers around learning how tocorrectlysetup yourvolume mapping soyoucan exchangefile-baseddata on-premise.11 +In this microlearning, we will focus on using annotations to clarify your thought process. In the annotation, you either describe a best practice everyone should follow when they change that flow (i.e. within the asynchronous routing), describe how the (more complex) parts of the flow work or describe (parts of) of your message definitions (i.e. CDM, API Gateway Data model, system message, etc.). This will help yourself and others every time changes are needed. 13 13 14 - By volumemapping, we mean creating a configurationthrough which the docker containercanread and write dataonaspecificpath on an on-premise machine. Note that the data can also bestored inside the docker container when (1)theother party writing or reading the datacan access this path or (2) when thedata is onlyrelevant within the context of eMagiz.13 +Should you have any questions, please contact academy@emagiz.com. 15 15 16 -There are several options for volume mapping for your on-premise machine. 17 -* Volume 18 -* Bind mount 19 -* Temporary file system 20 -* Named pipe 15 +* Last update: May 9th, 2021 16 +* Required reading time: 5 minutes 21 21 22 -== 3.VolumeMapping (On-premise)==18 +== 1. Prerequisites == 23 23 24 - Whenyou need to read and write filesfrom an on-premisedisk, youneed toknowthepath in which thedata is stored and ensure that the docker container in your runtime(s) runninghas accesstothis path. There are several ways ofdealing withthis challenge.This microlearningwilldiscuss the various alternatives and best approaches in these scenarios.20 +* Basic knowledge of the eMagiz platform 25 25 26 -There are several options for volume mapping for your on-premise machine. 27 -* Machine volume 28 -* Bind mount 29 -* Network volume 30 -* Temporary file system 31 -* Named pipe 22 +== 2. Key concepts == 32 32 33 -Below, we will explain the differences between the various options available for your volume mapping. But before we do this, we explain how to set up this configuration within eMagiz. First, you must navigate to Deploy -> Architecture on the model level. This overview lets you access the Volume mapping per runtime deployed on-premise. And then, you can right-click on the runtime to access the context menu. 24 +This microlearning centers around using annotations. 25 +With annotations, we mean: A piece of text to explain something to yourself and others 34 34 35 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--volume-option-context-menu.png]]27 +Annotations can be used for: 36 36 37 -Right after you click this option, you will see the following pop-up. In this pop-up, you can define the machine-level, runtime-level, and network-level volumes (more on this volume levels later). This pop-up page is the starting point for configuring your volume mapping. We will walk through each available option and explain how they work and should be configured. 29 +* Describing a best practice everyone should follow 30 +* Describing (more complex) parts of the flow 31 +* Describe (parts of) your message definitions 38 38 39 -[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--volume-mapping-pop-up.png]] 40 40 41 -{{info}}Note that you should be in "Start editing" mode to make any changes to the configuration of your volume mapping.{{/info}} 42 42 43 -== =3.1Volume===35 +== 3. Annotations == 44 44 45 - ThefirstTypeavailabletoyouisvolume.With thisoption,you createoneormore foldersonDocker relevanttothatruntimetoeadand write**persistent**data. To configurethis Type, youneed to linkthe runtimevolumetoamachine volume(ortworkvolume)youcancreate within thesame pop-up. Thismeans youcan re-use a "Machinevolume"ora "Networkvolume" over multiple runtimes(i.e., containers).We firstneed to definea machine(ornetwork) volumetodoso. Oncewehavedonethat, we canlearnhowo linkthevolume tothe machine or network volume.37 +In this microlearning, we will focus on using annotations on the flow level to clarify our thought process. In the annotation, you either describe a best practice everyone should follow when they change that flow (i.e. within the asynchronous routing) or describe how the (more complex) parts of the flow work. This will help yourself and others every time changes are needed within the flow. 46 46 47 - ==== 3.1.1 DefineMachineVolume====39 +Annotations can be used for: 48 48 49 -So, we first open the tab called "Machine volume." Then, by pressing the "New" button, we can define a new "Machine volume." In the following pop-up, we can specify the name of a machine volume and tell whether the volume already exists on your docker installation. 41 +* Describing a best practice everyone should follow 42 +* Describing (more complex) parts of the flow 43 +* Describe (parts of) your message definitions 50 50 51 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--machine-volumes-configuration.png]]45 +To clarify the use cases let us take a look at how annotations can be added within the eMagiz platform. In our first example, we will take a look at asynchronous routing. In many eMagiz projects, a best practice is followed on how to add something to the asynchronous routing (or change something within the asynchronous routing). Because the best practice contains multiple steps it makes sense to use the annotation functionality of eMagiz to define all these steps and register them at the place you need them (i.e. the asynchronous routing). Having done so will result in something like this: 52 52 53 - Onceyou haveoneso, wepress "Save"and switch backtothe "Runtime volumes"tab.47 +<p align="center">[[image:novice-devops-perspectives-annotations--annotation-best-practice-async-routing.png||]]</p> 54 54 55 - {{info}}Whenstating that themachinevolumereadyexists,youcan re-usethe same machinevolumeacrossmultipleruntimes(i.e.,containers).Thisisespeciallyusefulwhenarchiving data.Youcan create acentralvolumein whichthe data is stored,andthroughthelinkageofthevolume tothe machinevolume, you can subsequentlystructureyourarchivingfolder.Thepathswillthenlookasfollows,"/archive/runtimename"{{/info}}49 +The second example is about using annotations on the flow level to describe parts of the flow. In this example, we will use the annotation to describe that we use a filter to determine which messages are picked up from a local directory and how we filter. That way anyway opening the flow has to merely read the annotation to get the context. Having done so will result in something like this: 56 56 57 - ====3.1.2 DefineNetwork Volume ====51 +<p align="center">[[image:novice-devops-perspectives-annotations--describe-parts-of-flow.png||]]</p> 58 58 59 - So, wefirstopen thetabcalled"Networkvolume."Then, by pressing the"New"button,wecandefineanew"Networkvolume."Inthefollowingpop-up,wecanspecify the nameofamachinevolume andconfiguretherelevantinformationforanetworkvolume.Inmostcases,a CIFSis used,andtheonlypertinentoptions thatneed tobefilledinare thehost,path,username,andpassword.53 +The third example does not take place on the flow level but the message definition level. Therefore instead of going to Create, we go to Design. In Design when you navigate to the CDM, API Gateway Data model, Event Streaming Data model, message definitions, etc. you have the option to add annotations to the canvas. In this example, we want to make clear to all that make changes that a certain part of our CDM is used by a lot of integrations within eMagiz and therefore everyone should be careful and think twice before adjusting anything related to that part. Having done so will result in something like this: 60 60 61 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--network-volumes-configuration.png]]55 +<p align="center">[[image:novice-devops-perspectives-annotations--describe-crucial-part-of-cdm.png||]]</p> 62 62 63 - Onceyouhave done so,wepress"Save"andswitchback to the"Runtimevolumes"tab.57 +Now that we saw some examples let us turn our attention to the how. How can I add an annotation and how can I link it. Adding the annotation is simple. You drag the annotation icon from the left context menu onto the canvas. As a result, an empty annotation will be shown on the canvas. By double-clicking on it you can type whatever you want. Note that you need to be in "Start Editing" mode to change anything, including annotations. 64 64 65 -{{warning}}When configuring a network volume, the following information is relevant to know: 66 -* When you create a network volume to a folder that contains sub-folders, all sub-folders are shared automatically and can be accessed from the flow level 67 -* When dealing with multiple hosts, you must create a specific entry per host, as this follows the guiding security principles of the underlying infrastructure.{{/warning}} 59 +<p align="center">[[image:novice-devops-perspectives-annotations--annotation-icon-context-menu.png||]]</p> 68 68 69 - ====3.1.3LinkVolume====61 +When you are satisfied with what you have written down you can press the Save button. After you have done so you can rescale the annotation to ensure that the complete text is visible. To link the annotation to a component (on flow level) or an entity (on message definition level) you hover over the annotation until your mouse indicator changes to a + icon, execute a right-click and drag from the annotation to the component in question. 70 70 71 - In the "Runtime volumes" tab,wepushthe "New" buttontocreateaew "Runtime volume." Inthefollowingpop-up,wemust select theTypewe wanttouse. Forthisexample,weusetheTypecalled"Volume."63 +Now you know what annotations are good for and how you can add them within the eMagiz platform. 72 72 73 - {{info}}Therelevantnput fields willchangebased on your selection. {{/info}}65 +===== Practice ===== 74 74 75 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-volume.png]]67 +== 4. Assignment == 76 76 77 -The first thing we need to select is the "Volume." Once we have chosen our "Volume," we must set the Target specific for this runtime. This target defines the second part of the path to which the runtime will gain access. For example, when you fill in "/target", we can combine this with the "Volume" name to arrive at the correct directory from which eMagiz needs to read data (or write data to). So, in our case, in which we link the volume to the machine volume we created earlier, this would be "/file-directory/target." 69 +Add annotation on the flow level that describes how (a part of) a flow works. 70 +This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. 78 78 79 - Thelastsettingwe needto configure is to define the rights we will grant our runtimeon the volume we create. The default setting is read/write rights for the runtime, which is usuallyufficient.The result of following these steps will be the following.72 +== 5. Key takeaways == 80 80 81 -[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-volume-filled-in.png]] 74 +* Annotations can be used for: 75 + * Describing a best practice everyone should follow 76 + * Describing (more complex) parts of the flow 77 + * Describe (parts of) your message definitions 78 +* You can add annotations by dragging and dropping the annotation icon on the canvas. 82 82 83 -{{warning}}Note the following when considering using the Volume option: 84 -* In the case of using the Volume option in combination with a Machine volume, the external system with which you exchange data on-premise via a file-based method needs to be able to write or read the data from the volume (i.e., directory) you have configured. Should this be a problem, the Bind mount alternative discussed below should be considered. 85 -* The Volume option and Machine volume combination can also be used for eMagiz-only information that needs to be persistable, such as archiving. 86 -* In the case of using the Volume option in combination with a Network volume, the path to read and write from becomes what you define in the target field. 87 -* In case of mapping a volume on a windows host machine to another one on a windows docker runtime, the following small adjustment is required when writing the source/target paths: 88 -** All “\” in the source/target path should be written as “/”. For example: C:\Users\xxxx\tmp should be written as C:/Users/xxxx/tmp. 89 89 90 -{{/warning}} 91 91 92 -== =3.2Bindmount===82 +== 6. Suggested Additional Readings == 93 93 94 - An alternativeoption toreadandwrite **persistent** data ishe"Bindmount" option. We generally advise usingthe "Volume" optionbecausethey perform better,andbind mountsdependon the host machine'sdirectory structure and OS. However, only some external systems can adapt to this that easily. For example, the "Bind mount" optioncan interest your use case.84 +There are no suggested additional readings on this topic 95 95 96 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-bind-mount.png]]86 +== 7. Silent demonstration video == 97 97 98 -T o configurea "Bindmount," you need to define a source and atarget directory linked to each other. Thesourcedirectory represents the directoryonyourlocalsystem (thatmightalreadybeused currentlyto exchangefiles). The target directory definesa directoryn yourdockerinstallationthattheruntimecanaccess.88 +This video demonstrates how you could have handled the assignment and gives you some context on what you have just learned. 99 99 100 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-bind-mount-filled-in.png]]90 +<iframe width="1280" height="720" src="../../vid/microlearning/novice-devops-perspectives-annotations.mp4" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 101 101 102 - {{info}}Note that when you use this option, yourdirectory reference in your flow should refer to the "target" directory configured here.{{/info}}92 +</div> 103 103 104 -{{warning}} 105 -When configuring a bind mount on a windows host machine to another one on a windows docker runtime, the following small adjustment is required when writing the source/target paths: 106 -** All “\” in the source/target path should be written as “/”. For example: C:\Users\xxxx\tmp should be written as C:/Users/xxxx/tmp. 107 -{{/warning}} 94 +</div> 95 +</div> 108 108 109 -=== 3.3 Temporary file system === 110 - 111 -{{info}}This option is only relevant when running on **Linux**.{{/info}} 112 - 113 -The temporary file system option is for you if you do not want to work with **persistent** data but require **non-persistent** data. This way, you can increase the container's performance by avoiding writing into the container's writable layer. 114 - 115 -[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-temp-file-storage.png]] 116 - 117 -To configure this option, you need a target location. On top of that, you can define the maximum size of the temporary file system. 118 - 119 -[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-temp-file-storage-filled-in.png]] 120 - 121 -{{warning}} 122 -We strongly advise you to define this number so that you can limit the potential impact this solution can have on the stability of your machine. {{/warning}} 123 - 124 -=== 3.4 Named pipe === 125 - 126 -{{info}}This option is only relevant when running on **Windows**.{{/info}} 127 - 128 -A named pipe is a named, one-way or duplex pipe for communication between the pipe server and one or more pipe clients. All instances of a named pipe share the same pipe name, but each instance has its own buffers and handles, and provides a separate conduit for client/server communication. Any process can access named pipes, subject to security checks, making named pipes an easy form of communication between related or unrelated processes. 129 - 130 -*The named pipe option can be selected, but we yet have to see a valid use case within the context of eMagiz for using this option. Therefore, we won't discuss this option further in this microlearning. 131 - 132 -{{warning}} 133 -* When configuring a pipe path on a windows host machine to another one on a windows docker runtime, the following small adjustment is required when writing the source/target paths: 134 -** All “\” in the source/target path should be written as “/”. For example: C:\Users\xxxx\tmp should be written as C:/Users/xxxx/tmp.{{/warning}} 135 - 136 -=== 3.5 Deployment consequences === 137 - 138 -{{warning}} 139 -* Note that the runtimes cannot be deployed correctly when the source directory **does not exist**. Consequently, no runtime on that machine will start up. One of the following two configurations displayed below are needed to find the source directory: 140 -** /mnt/host/{local-directory} 141 -** /run/desktop/mnt/host/{local-directory} 142 -* When the source directory can be found but the user has no access, the deployment will **fail** for the specific runtime in question with the volume mapping configured. All other runtimes (i.e., containers) will start up (pending other configuration issues).{{/warning}} 143 - 144 -== 4. Key takeaways == 145 - 146 -* File-based communication on-premise changes in the new runtime architecture 147 -* There are two ways to store **persistent** data 148 - ** Volume 149 - ** Bind mount 150 -* The Volume option is considered the best alternative because they have better performance, and bind mounts are dependent on the directory structure and OS of the host machine 151 -* Before deploying, ensure that the various sources in your configuration exist and that access is granted to avoid problems while deploying. 152 -* The Temporary file storage option is the way to go when dealing with **non-persistent** data. 153 - 154 -== 5. Suggested Additional Readings == 155 - 156 -If you are interested in this topic and want more information, please read the help text provided by eMagiz. 157 - 158 -)))((({{toc/}}))){{/container}}{{/container}} 97 +{{/html}}
- novice-devops-perspectives-annotations--annotation-best-practice-async-routing.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.marijn - Size
-
... ... @@ -1,0 +1,1 @@ 1 +25.7 KB - Content
- novice-devops-perspectives-annotations--annotation-icon-context-menu.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.marijn - Size
-
... ... @@ -1,0 +1,1 @@ 1 +774 bytes - Content
- novice-devops-perspectives-annotations--describe-crucial-part-of-cdm.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.marijn - Size
-
... ... @@ -1,0 +1,1 @@ 1 +15.5 KB - Content
- novice-devops-perspectives-annotations--describe-parts-of-flow.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.marijn - Size
-
... ... @@ -1,0 +1,1 @@ 1 +18.9 KB - Content