Changes for page Volume Mapping (On-premise)
Last modified by Erik Bakker on 2024/08/26 12:37
From version 39.1
edited by Erik Bakker
on 2022/10/31 09:06
on 2022/10/31 09:06
Change comment:
There is no comment for this version
To version 54.1
edited by Erik Bakker
on 2023/04/11 12:31
on 2023/04/11 12:31
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,4 +1,9 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 + 3 +{{warning}} 4 +Please note that this microlearning is for the new monitoring stack only. 5 +{{/warning}} 6 + 2 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 make sure that the docker container in your runtime(s) running has access to this path. There are several ways of dealing with this challenge. First, this microlearning will discuss the various alternatives and best approaches in these scenarios. 3 3 4 4 Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]]. ... ... @@ -24,8 +24,9 @@ 24 24 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 make sure that the docker container in your runtime(s) running has access to this path. There are several ways of dealing with this challenge. First, this microlearning will discuss the various alternatives and best approaches in these scenarios. 25 25 26 26 There are several options for volume mapping for your on-premise machine. 27 -* Volume32 +* Machine volume 28 28 * Bind mount 34 +* Network volume 29 29 * Temporary file system 30 30 * Named pipe 31 31 ... ... @@ -33,75 +33,112 @@ 33 33 34 34 [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--volume-option-context-menu.png]] 35 35 36 -When you click this option, you will see the following pop-up. In this pop-up, you can define the machine-level andruntime-level volumes. More on that later. This 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.42 +When you click this option, you will see the following pop-up. In this pop-up, you can define the machine-level, runtime-level volumes and network-level volumes. More on that later. This 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. 37 37 38 38 [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--volume-mapping-pop-up.png]] 39 39 40 -{{info}}Note that you should be in "Start editing" mode to make any changes to the configuration of your volume mapping. 46 +{{info}}Note that you should be in "Start editing" mode to make any changes to the configuration of your volume mapping.{{/info}} 41 41 42 42 === 3.1 Volume === 43 43 44 -T o makethiswork in eMagizyou needto navigate tothe Create phaseofeMagizandopentheentryflowinwhichyouwanttoarchivethe files.Within the contextof this flow, weneed toadd functionalitythatwill ensurethateach inputfileisarchivedandcleanedupwhenolderhanhreedays. Todosofirstenter"Start Editing"mode onflowlevel.Thefirstdecision wehave totakeishow wearegoingtonamethefiles within the archiving.The best practice,inthiscase, istheoriginal filename+ the currenttimea suffix. You candefinethisby dragginga format file namegenerator(supportobject)tothe canvas.50 +The first Type available to you is Volume. With this option, you create one or more folders on Docker relevant to that runtime to read and write **persistent** data. To configure this Type, you need to link the runtime volume to a machine volume (or network volume) you can create within the same pop-up. This means you can re-use a "Machine volume" or a "Network volume" over multiple runtimes (i.e., containers). 45 45 46 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-archiving--file-name-generator.png]]52 +==== 3.1.1 Link to Machine Volume ==== 47 47 48 - Afterwehavedone this pleaseaddafile outboundchanneladapter to theflowincludinganinputchannel.Ensure thatyou use a propertyforthedirectorythatreferencesanotherdirectorycomparedto thenputdirectorytopreventcreatinganinfinite loop.54 +So, we first open the tab called "Machine volume." Then, by pressing the "New" button, we can define a new "Machine volume." In the pop-up that follows, we can specify the name of a machine volume and tell whether the Volume already exists on your docker installation or not. 49 49 50 -[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-a rchiving--archiving-config-file-outbound-basic.png]]56 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--machine-volumes-configuration.png]] 51 51 52 - Now that we have configured the basics letus turnourattention to theadvancedconfiguration. In theadvanced tab of thiscomponent, weneed to select the file name generator toensure that the files arenamedcorrectly. In case you process each line separately youhavetochoosewhether tosavethemas separate files inhe archive or by appending themagain. This can beachieved by selecting the correct Mode. Inmost cases,however,the default Mode of Replace will suffice.58 +Once you have done so, we press "Save" and switch back to the "Runtime volumes" tab. 53 53 54 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-archiving--archiving-config-file-outbound-advanced.png]]60 +In here, we push the "New" button to create a new "Runtime volume." In the following pop-up, we first need to select the Type we want to use. For this example, we use the Type called "Volume." 55 55 56 - The moment youaresatisfiedpress Save. Nowthat we have configuredthisit becomestime todeterminehow we gettheneeded input to writeto our archive. In the exampleweare using here we wantto archive our input fileso we needto ensurethat the datawe received is written to the archive as soon as possible. To do so placea wiretap on the firstchannel after retrievingthefile.This will make sure that the message is archived before processed further. The result should be something as shown below. Note that this same piece oflogic could be applied in other flows within the eMagiz platform in a similar manner.62 +{{info}}Based on your selection, the relevant input fields will change.{{/info}} 57 57 58 -[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-a rchiving--archiving-result.png]]64 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-volume.png]] 59 59 60 - ===3.2Clean up theArchive===66 +The first thing we need to select is the "Machine volume." Once we have chosen our "Machine 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 "Machine volume" name to arrive at the correct directory from which eMagiz needs to read data (or write data to). So in our case, this would be "/file-directory/target." 61 61 62 -T o ensure that thedata isnotkeptdefinitelywe need to cleanp the archive.We dosotoprevent problemswithdisk spacebutalsoto preventdataleaks of olddatathat couldimpact theprivacyofothers.Before wecan setup the logicineMagizweneedto talktothecustomero seewhatanacceptableterm is withinwhichthe dataiskept.In most cases,this is a weekorwo weeks. In this example,wehavechosenthreedays.68 +The last setting we need to configure is to define which rights we will grant our runtime on the Volume we are creating. The default setting is read/write rights for the runtime, which is sufficient in most cases. The result of following these steps will be the following. 63 63 64 - Now that weknow the limit it istime toconfigurethe components. We start with a compositefilter (support object). Withinthis filter, weat least define how old a fileust bebefore it canbe deleted (inmilliseconds). If we turn three days intomilliseconds weget 259200000. Furthermore, weatleast definethat wenly want to delete regularfiles.70 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-volume-filled-in.png]] 65 65 66 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-archiving--file-list-filter-for-archive-cleanup.png]]72 +==== 3.1.2 Link to Network Volume ==== 67 67 68 - Having donesowecan add afileinboundchanneladaptertothecanvasincludingan output channel.Ensure thatthepropertyreferenceforthedirectorymatchesthe one you haveused beforein theoutboundchanneladapter.Furthermorelink the filtertothecomponentanddefine thepolleraccordingtothebestpractice.74 +So, we first open the tab called "Network volume." Then, by pressing the "New" button, we can define a new "Network volume." In the pop-up that follows, we can specify the name of a machine volume and configure the relevant information for a network volume. 69 69 70 -[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-a rchiving--file-inbound-archive-cleanup.png]]76 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--network-volumes-configuration.png]] 71 71 72 -One thing we shouldnot forgetwithin this configurationistosettheMax messagesper poll on the Advanced tab of thepoller-configurationtoa sufficientlyhigh number(i.e. 50). If youforget to do so and you only check once a day itwillmeanthatonly onemessagewill be deleted that day.78 +Once you have done so, we press "Save" and switch back to the "Runtime volumes" tab. 73 73 74 - [[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-archiving--file-inbound-archive-cleanup-max-messages-per-poll.png]]80 +In here, we push the "New" button to create a new "Runtime volume." In the following pop-up, we first need to select the Type we want to use. For this example, we use the Type called "Volume." 75 75 76 - Now eMagiz will check ont time interval whether there are files that are olderthanthree days that are ready fordeletion.One laststep to go. This last stepwill ensurethat all files thatfitthe bill will be deletedfrom the archive. Simply add astandardserviceactivator to the canvas and define thefollowing SPeL expression within the component: payload.delete().82 +{{info}}Based on your selection, the relevant input fields will change.{{/info}} 77 77 78 -[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-a rchiving--archive-cleanup-deletion.png]]84 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-volume.png]] 79 79 80 -This willensure thateachfile that is retrieved will indeedbedeleted fromthe archive.86 +The first thing we need to select is the "Machine volume." Once we have chosen our "Machine 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 "Machine volume" name to arrive at the correct directory from which eMagiz needs to read data (or write data to). So in our case, this would be "/file-directory/target." 81 81 88 +The last setting we need to configure is to define which rights we will grant our runtime on the Volume we are creating. The default setting is read/write rights for the runtime, which is sufficient in most cases. The result of following these steps will be the following. 89 + 90 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-volume-filled-in.png]] 91 + 92 +{{warning}}Note that when you use the Volume option, 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 in Docker. Should this be a problem, the Bind mount alternative discussed below should be considered.{{/warning}} 93 + 94 +=== 3.2 Bind mount === 95 + 96 +An alternative option to read and write **persistent** data is to use the "Bind mount" option. In general, we advise using the "Volume" option because they have better performance, and bind mounts depend on the host machine's directory structure and OS. However, only some external systems can adapt to this that easily. For example, the "Bind mount" option can interest your use case. 97 + 98 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-bind-mount.png]] 99 + 100 +To configure a "Bind mount," you need to define a source and a target directory linked to each other. The source directory represents the directory on your local system (that might already be used currently to exchange files). The target directory defines a directory on your docker installation that the runtime can access. 101 + 102 +{{warning}}Note that when the source directory does not exist, the runtimes cannot be deployed correctly. One of the following two configurations displayed below are needed to find the source directory: 103 +* /mnt/host/{local-directory} 104 +* /run/desktop/mnt/host/{local-directory}{{/warning}} 105 + 106 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-bind-mount-filled-in.png]] 107 + 108 +{{info}}Note that when you use this option, your directory reference in your flow should refer to the "target" directory configured here.{{/info}} 109 + 110 +=== 3.3 Temporary file system === 111 + 112 +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. 113 + 114 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-temp-file-storage.png]] 115 + 116 +To configure this option, you need a target location. On top of that, you can define the maximum size of the temporary file system. 117 + 118 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-volume-mapping-on-premise--runtime-volumes-configuration-type-temp-file-storage-filled-in.png]] 119 + 120 +{{warning}}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}} 121 + 122 +=== 3.4 Named pipe === 123 + 124 +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. 125 + 82 82 == 4. Assignment == 83 83 84 - Configureanentryinwhich youbuild the archivingand thecleanup ofthe archiving.85 -This assignment can be completed with the help of the (Academy) project thatyouhavecreated/used in the previous assignment.128 +Navigate to Deploy -> Architecture and look at the Volume mapping options, read the help texts, and play around with the settings (if it is not a customer environment). 129 +This assignment can be completed with the help of the (Academy) project you created/used in the previous assignment. 86 86 87 87 == 5. Key takeaways == 88 88 89 -* Archiving is used for audit purposes 90 -* Archiving is used for retry scenarios 91 -* Ensure that data is cleaned after a retention period to keep in control of the data 92 -* Don't forget the max messages per poll 133 +* File-based communication on-premise changes in the new runtime architecture 134 +* There are two ways to store **persistent** data 135 + ** Volume 136 + ** Bind mount 137 +* 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 138 +* When you want to deal with **non-persistent** data, the Temporary file storage option is the way to go. 93 93 94 94 == 6. Suggested Additional Readings == 95 95 96 -If you are interested in this topic and want more information on itplease read the help text provided by eMagizand check out the following store content:142 +If you are interested in this topic and want more information, please read the help text provided by eMagiz. 97 97 98 -* [[File Archiving>>doc:Main.eMagiz Store.Accelerators.File Archiving.WebHome||target="blank"]] 99 -* [[Delete Folder(s)>>doc:Main.eMagiz Store.Accelerators.Delete Folder(s).WebHome||target="blank"]] 100 - 101 101 == 7. Silent demonstration video == 102 102 103 -This video demonstrates how you could have handled the assignment and gives you somecontext onwhat you have just learned.146 +This video demonstrates how you could have handled the assignment and gives context to what you have just learned. 104 104 105 - {{video attachment="novice-file-based-connectivity-characterset.mp4" reference="Main.Videos.Microlearning.WebHome"/}}148 +TBA 106 106 107 107 )))((({{toc/}}))){{/container}}{{/container}}