<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" >

<channel><title><![CDATA[Minimum Viable Architecture - Little Details]]></title><link><![CDATA[https://www.minimumviablearchitecture.com/little-details]]></link><description><![CDATA[Little Details]]></description><pubDate>Sun, 03 Apr 2022 21:57:33 -0700</pubDate><generator>Weebly</generator><item><title><![CDATA[Simple makefile tests]]></title><link><![CDATA[https://www.minimumviablearchitecture.com/little-details/simple-makefile-tests]]></link><comments><![CDATA[https://www.minimumviablearchitecture.com/little-details/simple-makefile-tests#comments]]></comments><pubDate>Fri, 10 Sep 2021 20:19:49 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.minimumviablearchitecture.com/little-details/simple-makefile-tests</guid><description><![CDATA[Getting a handle on testing requires you become comfortable writing test. The place to start is with the simplest test you can think of. Even though Make will notify you if a file is missing, learning how to write these simple test and to format useful output is a valuable skill to practice.  Helper variable for a timestamp:&#8203;DTS = $(shell date +%Y-%m-%dT%H:%M:%S-%Z)  Test for a directory:define test_dir&nbsp;&nbsp; &nbsp;# tests the directory in the &lt;first dependency&gt;&nbsp;&nbsp; &nb [...] ]]></description><content:encoded><![CDATA[<div class="paragraph">Getting a handle on testing requires you become comfortable writing test. The place to start is with the simplest test you can think of. Even though Make will notify you if a file is missing, learning how to write these simple test and to format useful output is a valuable skill to practice.</div>  <div class="paragraph"><strong>Helper variable for a timestamp:</strong><br />&#8203;<span>DTS = $(shell date +%Y-%m-%dT%H:%M:%S-%Z)</span></div>  <div class="paragraph"><strong>Test for a directory:</strong><br /><span>define test_dir</span><br /><span>&nbsp;&nbsp; &nbsp;# tests the directory in the &lt;first dependency&gt;</span><br /><span>&nbsp;&nbsp; &nbsp;if ! test -d $&lt;; \</span><br /><span>&nbsp;&nbsp; &nbsp;then echo $(DTS) &nbsp; &nbsp;[FAIL] - $&lt; does not exist; \</span><br /><span>&nbsp;&nbsp; &nbsp;else true; fi</span><br /><span>endef</span><br /><br /><span>ROOTDIR := $(shell pwd)</span><br /><span>&#8203;</span><br /><span>ROOTDIR: $(ROOTDIR)</span><br /><span>&nbsp;&nbsp; &nbsp;@$(test_dir)</span></div>  <div>  <!--BLOG_SUMMARY_END--></div>  <div class="paragraph"><strong>Test for a file:</strong><br />define test_file<br />&nbsp;&nbsp; &nbsp;# tests the file in the &lt;first dependency&gt;<br />&nbsp;&nbsp; &nbsp;if ! test -s $@; \<br />&nbsp;&nbsp; &nbsp;then echo $(DTS) &nbsp; &nbsp;[FAIL] - $@ does not exist; \<br />&nbsp;&nbsp; &nbsp;else true; fi<br />endef<br /><br />etc/sql/INFO_WEEKLY_TOP_SALES_RANK_002_load.sql:<br />&nbsp;&nbsp; &nbsp;@$(test_file)<br /></div>  <div class="paragraph"><strong>Test for a dependent file:</strong><br /><br /><span>define test_dependent_file</span><br /><span>&nbsp;&nbsp; &nbsp;# tests the file in the &lt;first dependency&gt;</span><br /><span>&nbsp;&nbsp; &nbsp;if ! test -s $&lt;; \</span><br /><span>&nbsp;&nbsp; &nbsp;then echo $(DTS) &nbsp; &nbsp;[FAIL] - $&lt; does not exist; \</span><br /><span>&nbsp;&nbsp; &nbsp;else true; fi</span><br /><span>endef<br /><br /></span>SHELL := $(which bash)<span><br /><br /></span>SHELL: $(SHELL)<br />&nbsp;&nbsp; &nbsp;@$(test_dependent_file)<span></span><br /></div>]]></content:encoded></item><item><title><![CDATA[Host Name naming conventions]]></title><link><![CDATA[https://www.minimumviablearchitecture.com/little-details/host-name-naming-conventions]]></link><comments><![CDATA[https://www.minimumviablearchitecture.com/little-details/host-name-naming-conventions#comments]]></comments><pubDate>Tue, 24 Nov 2015 22:01:43 GMT</pubDate><category><![CDATA[Policies]]></category><guid isPermaLink="false">https://www.minimumviablearchitecture.com/little-details/host-name-naming-conventions</guid><description><![CDATA[&#8203;The first rule of naming conventions is that there isn't, nor will there ever be, a single best way to define a host name. The best you can do it to pick a standard that seems to work for your particular situation and stick with it for as long as it is useful.The ideal host name provides just enough information to help identify the device but not so much information that the name limits the flexibility to accommodate future requirements.      The ideal host name provides just enough infor [...] ]]></description><content:encoded><![CDATA[<div class="paragraph" style="text-align:left;">&#8203;The first rule of naming conventions is that there isn't, nor will there ever be, a single best way to define a host name. The best you can do it to pick a standard that seems to work for your particular situation and stick with it for as long as it is useful.<br /><br />The ideal host name provides just enough information to help identify the device but not so much information that the name limits the flexibility to accommodate future requirements.</div>  <div>  <!--BLOG_SUMMARY_END--></div>  <div class="paragraph" style="text-align:left;">The ideal host name provides just enough information to help identify the device but not so much information that the name limits the flexibility to accommodate future requirements. It is a [standard industry practice](http://www.ibm.com/developerworks/aix/library/au-name_standards/) to overload the name of a server with many specific physical details. However, as the role of a server or a network device becomes more ephemeral, overloading a hostname with things like physical location, whether it is a virtual or physical device, or even ownership can become a problem in the future.<br /><br /><font size="5">An industry standard</font><br />Here is one suggested standard from IBM.</div>  <div id="537746507734403928"><div><style type="text/css">	#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table-wrapper {  padding: 20px 0;}#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table {  width: 100%;  border: 1px solid #C9CDCF;  border-spacing: 0;}#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table td.cell {  border-right: 1px solid #C9CDCF;  border-bottom: 1px solid #C9CDCF;  word-break: break-word;  background-color: #FFFFFF;  width: 33.333333333333%;}#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table td.cell .paragraph {  width: 90%;  margin: 0 5%;  padding-bottom: 10px;  padding-top: 10px;  text-align: center;}#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table.style-top tr:first-child td,#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table.style-side td:first-of-type {  background-color: #F8F8F8;}#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table.style-top tr:first-child td .paragraph,#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table.style-side td:first-of-type .paragraph {  font-weight: 700;}#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table tr:last-child td {  border-bottom: none;}#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table td:last-of-type {  border-right: none;}#element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f .simple-table .empty-content-area-element {  padding-left: 0px !important;}</style><div id="element-d181a7fd-ee3a-4a56-a23b-8871b3038a8f" class="platform-element-contents">	<div class="simple-table-wrapper">  <table class="simple-table style-top">      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Node Name Component</span></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">Number of Characters</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Example Values</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Location Code</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">3</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>bos = Boston dal = Dallas phx = Phoenix</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;">OS Type<br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">1</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>a = AIX l = Linux o = OS/400 v = VIO Server w= Microsoft&reg; Windows&reg;</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Environment</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">1</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>a = Acceptance Testing d = Development p = Production t = Testing x = Disaster Recovery</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Application Code</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">3</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>vio = VIO Server nim = NIM Server sap = SAP mqs = MQ Series ora = Oracle db2 = DB2 ifx = Informix</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Sequence ID</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">2</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>A two-character identifier to distinguish multiple instances of a node type. This two-character identifier may contain the following characters: 0-9, A-Z, a-z</span><br /></div></td>      </tr>  </table></div></div><div style="clear:both;"></div></div></div>  <div class="paragraph" style="text-align:left;"><strong>dtwldora05.ibm.com</strong>&nbsp;would represent node 5 of an Oracle database, being used for development, running on linux, in Detroit.<br />This looks like a pretty good standard but it could be improved. Let&rsquo;s consider a couple of these situations.<br /><br /><strong>Q:</strong>&nbsp;What happens if the server is retired and the application is moved to Google Compute Engine?<br /><strong>A:</strong>&nbsp;It&rsquo;s a new server and therefore would get a new host name.<br />&#8203;<br /><strong>Discussion:</strong>&nbsp;This is a correct answer but you need to ask yourself what was the purpose of including the location code? Typically, this is to provide some hint to the physical location of the device. This matters to the operations team but does it matter to the end user? If you shift focus to the actual consumer, specifying city level granularity might be too restrictive. I think Amazon zones are a good example of the level of granularity we need to be considering. Thinking in terms of regional geography is more important than identifying specific locations. Therefore, tracking regional geography may be sufficient.&nbsp;<br /><br /><strong>Q:</strong>&nbsp;What benefit is there in tracking OS Type?<br /><strong>A:</strong>&nbsp;It helps the operations team easily identify the operating system and therefore know the skills needed to administer the machine.<br /><br /><strong>Discussion:</strong>&nbsp;Again, a good answer if your environment consists of many operating systems. However, if there is a standardization on a particular type of OS (e.g., Linux) this doesn&rsquo;t add much value. The case could be made that if you switch a server from Windows to Linux, you have a different server and therefore need a new host name. Correct, but does the OS really matter to the end user? I would argue that it may be time to switch to a Host Type designation.<br />Shifting the focus from OS to Host Type provides a more accurate and flexible reflection of what the device does. For a physical server the following might apply:<br /><br /><strong>p</strong>&nbsp;= Bare metal server<br /><strong>v</strong>&nbsp;= Virtual host (bare metal + hypervisor)<br /><strong>c</strong>&nbsp;= Container host (bare metal + container engine)<br /><strong>g</strong>&nbsp;= Guest image (OS image running on a VM or Container)<br /><strong>n</strong>&nbsp;= Network device (bare metal + networking software)&nbsp;<br /><br /><strong>Q:</strong>&nbsp;What benefit is there in tracking Application Type?<br /><strong>A:</strong>&nbsp;It is important to know the application role of a server for the same reason you need to know the OS. It helps to identify the skills needed to fix any issues.<br /><strong>Discussion:</strong>&nbsp;Here I would argue for maintaining the flexibility to change the purpose of the server or the applications running on the server without having to change the host name. The same can be said for production status. It isn&rsquo;t uncommon for a staging server to be pushed into a production role pre for a development server to be moved into staging. Therefore, I think you could eliminate both the Application Code and Environment from the host name definition.<br />Remember, this discussion is about the device host name. Application DNS names are a different matter. These additional names for a device are simply aliases and they should be more descriptive, especially if you are implementing DNS based application discovery.<br /><br /><font size="5">Initial Recommendation</font></div>  <div id="113094709913735602"><div><style type="text/css">	#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table-wrapper {  padding: 20px 0;}#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table {  width: 100%;  border: 1px solid #C9CDCF;  border-spacing: 0;}#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table td.cell {  border-right: 1px solid #C9CDCF;  border-bottom: 1px solid #C9CDCF;  word-break: break-word;  background-color: #FFFFFF;  width: 33.333333333333%;}#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table td.cell .paragraph {  width: 90%;  margin: 0 5%;  padding-bottom: 10px;  padding-top: 10px;  text-align: left;}#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table.style-top tr:first-child td,#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table.style-side td:first-of-type {  background-color: #F8F8F8;}#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table.style-top tr:first-child td .paragraph,#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table.style-side td:first-of-type .paragraph {  font-weight: 700;}#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table tr:last-child td {  border-bottom: none;}#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table td:last-of-type {  border-right: none;}#element-fec59f91-3528-4404-9dbf-6d5ce1a357b1 .simple-table .empty-content-area-element {  padding-left: 0px !important;}</style><div id="element-fec59f91-3528-4404-9dbf-6d5ce1a357b1" class="platform-element-contents">	<div class="simple-table-wrapper">  <table class="simple-table style-top">      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Node Name Component</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Number of Characters</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Example Values</span></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Geographic Code</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">2</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>us = USA, la = Latin America, eu = Europe, ch = China</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Host Type</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">1</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>p = Bare metal server, v = Virtual host, c = Container host, g = Guest image, n = Network device</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Sequence ID</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">4</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>A random four-character identifier to distinguish multiple instances of a device. This four-character identifier may contain the following easy to distinguish characters: [abcdfghjkmnprstvwxyz] and [0-9].</span></div></td>      </tr>  </table></div></div><div style="clear:both;"></div></div></div>  <div class="paragraph" style="text-align:left;"><span><font size="5">Examples</font></span></div>  <div id="128180418253442828"><div><style type="text/css">	#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table-wrapper {  padding: 20px 0;}#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table {  width: 100%;  border: 1px solid #C9CDCF;  border-spacing: 0;}#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table td.cell {  border-right: 1px solid #C9CDCF;  border-bottom: 1px solid #C9CDCF;  word-break: break-word;  background-color: #FFFFFF;  width: 50%;}#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table td.cell .paragraph {  width: 90%;  margin: 0 5%;  padding-bottom: 10px;  padding-top: 10px;  text-align: left;}#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table.style-top tr:first-child td,#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table.style-side td:first-of-type {  background-color: #F8F8F8;}#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table.style-top tr:first-child td .paragraph,#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table.style-side td:first-of-type .paragraph {  font-weight: 700;}#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table tr:last-child td {  border-bottom: none;}#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table td:last-of-type {  border-right: none;}#element-02be8b86-7254-42cc-bb9f-7741d8b287f1 .simple-table .empty-content-area-element {  padding-left: 0px !important;}</style><div id="element-02be8b86-7254-42cc-bb9f-7741d8b287f1" class="platform-element-contents">	<div class="simple-table-wrapper">  <table class="simple-table style-top">      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Host Name</span></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Description</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>uspxa9s.migratory.io</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Bare metal server xa9s serving the US region.</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>usg7xrh.migratory.io</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Guest image 7xrh serving the US region.</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>usntfy30.migratory.io</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Network device tfy30 serving the US region.</span><br /></div></td>      </tr>  </table></div></div><div style="clear:both;"></div></div></div>  <div class="paragraph" style="text-align:left;"><font size="6">Conclusion</font><br />Seven characters leaves a lot of ambiguity! This is by design. Computers are general use tools and should be treated that way. By maintaining the flexibility to repurpose and device for nearly any purpose as needed, you give yourself flexibility to meet changing requirements without having to resort to complicated migration projects. Need to stand up a new server? You only need to know the region it is supporting and its general role. I suppose that as more and more environments migrate to being completely defined by software running on standardized commodity hardware the only necessary information might be the geography and a random unique identifier.<br /><br />So where does this leave all of other important information about a device? This is best stored and managed in some type of Configuration Management System tied to your Continuous Deployment infrastructure.<br /><br /><font size="6">Second thoughts</font><br />What would the simplest, most flexible, but still useful host name scheme look like?</div>  <div id="570759097737084816"><div><style type="text/css">	#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table-wrapper {  padding: 20px 0;}#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table {  width: 100%;  border: 1px solid #C9CDCF;  border-spacing: 0;}#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table td.cell {  border-right: 1px solid #C9CDCF;  border-bottom: 1px solid #C9CDCF;  word-break: break-word;  background-color: #FFFFFF;  width: 33.333333333333%;}#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table td.cell .paragraph {  width: 90%;  margin: 0 5%;  padding-bottom: 10px;  padding-top: 10px;  text-align: center;}#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table.style-top tr:first-child td,#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table.style-side td:first-of-type {  background-color: #F8F8F8;}#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table.style-top tr:first-child td .paragraph,#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table.style-side td:first-of-type .paragraph {  font-weight: 700;}#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table tr:last-child td {  border-bottom: none;}#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table td:last-of-type {  border-right: none;}#element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb .simple-table .empty-content-area-element {  padding-left: 0px !important;}</style><div id="element-4a90043a-2a4f-4ef5-9d8c-99c3170a93fb" class="platform-element-contents">	<div class="simple-table-wrapper">  <table class="simple-table style-top">      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Node Name Component</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Number of Characters</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Example Values</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Geographic Code</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">2</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>us = USA, LA = Latin America, EU = Europe, CH = China</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Sequence ID</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">5</div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>A random five-character identifier to distinguish multiple instances of a device. This five-character identifier may contain the following easy to distinguish characters: [abcdfghjkmnprstvwxyz] and [0-9].</span><br /></div></td>      </tr>  </table></div></div><div style="clear:both;"></div></div></div>  <div class="paragraph" style="text-align:left;"><span><font size="5">Examples</font></span><font size="4"></font><span></span></div>  <div id="402263104400047962"><div><style type="text/css">	#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table-wrapper {  padding: 20px 0;}#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table {  width: 100%;  border: 1px solid #C9CDCF;  border-spacing: 0;}#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table td.cell {  border-right: 1px solid #C9CDCF;  border-bottom: 1px solid #C9CDCF;  word-break: break-word;  background-color: #FFFFFF;  width: 50%;}#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table td.cell .paragraph {  width: 90%;  margin: 0 5%;  padding-bottom: 10px;  padding-top: 10px;  text-align: center;}#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table.style-top tr:first-child td,#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table.style-side td:first-of-type {  background-color: #F8F8F8;}#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table.style-top tr:first-child td .paragraph,#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table.style-side td:first-of-type .paragraph {  font-weight: 700;}#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table tr:last-child td {  border-bottom: none;}#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table td:last-of-type {  border-right: none;}#element-3dc9a943-d097-4891-874d-7f0ee00bde90 .simple-table .empty-content-area-element {  padding-left: 0px !important;}</style><div id="element-3dc9a943-d097-4891-874d-7f0ee00bde90" class="platform-element-contents">	<div class="simple-table-wrapper">  <table class="simple-table style-top">      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Host Name</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span style="font-weight:bold">Description</span><br /></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>us1z527.migratory.io</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Bare metal server 1z527 serving the US region. Running MySQL.</span></div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>us1z527.migratory.io</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;">Docker container 1z527 serving the US region. Running MySQL.</div></td>      </tr>      <tr>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>us1z527.migratory.io</span><br /></div></td>          <td class="cell"><div class="paragraph" style="text-align:center;"><span>Docker container 1z527 serving the US region. Running Crate.</span><br /></div></td>      </tr>  </table></div></div><div style="clear:both;"></div></div></div>  <div class="paragraph" style="text-align:left;">&#8203;Three server migrations to very different platforms but still maintaining the same host name. At the end of the day, you have a computer doing some work. What it looks like, where it is installed, and the specific applications it utilizes don't really matter.</div>  <blockquote style="text-align:left;"><span>Permutations on a 5 character string made up of 30 possible characters = 17,100,720 unique possibilities&nbsp;</span><br /><span>4 char = 657,720&nbsp;</span><br /><span>3 char = 24,360 &nbsp;</span><br /><span>2 char = 870 &nbsp;</span></blockquote>  <div class="paragraph" style="text-align:left;">You could simplify even further if you wanted but 5 characters are easy to remember and give plenty of headroom to grow.<br /><font size="6"><br />Example code</font><br />The following code snippet could be used to dynamically create a hostname at the time a system image is being created.<br /><font size="4"><br />Test Code</font><br /><font color="#248d6c">$ GEO=$"us" &amp;&amp; OLD=$HOSTNAME &amp;&amp; SEQ=$(cat /dev/urandom | tr -cd 'a-hj-np-z1-9' | head -c 5) &amp;&amp; echo $HOSTNAME " =&gt; " $GEO$SEQ</font><br />Returns:&nbsp;<font color="#248d6c">ubuntu =&gt; usyfvds</font><br /><br />Implementation<br />&#8203;<font color="#248d6c">$ GEO=$"us" &amp;&amp; OLD=$HOSTNAME &amp;&amp; SEQ=$(cat /dev/urandom | tr -cd 'a-hj-np-z1-9' | head -c 5) &amp;&amp; sudo sed -i "s/$OLD/$GEO$SEQ/" /etc/hostname &amp;&amp; sudo sed -i "s/$OLD/$GEO$SEQ/g" /etc/hosts &amp;&amp; sudo reboot</font></div>]]></content:encoded></item></channel></rss>