<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40" xmlns:ns0="http://macVmlSchemaUri">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Segoe UI Symbol";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:883643051;
        mso-list-template-ids:1849447830;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1
        {mso-list-id:1552841933;
        mso-list-template-ids:579639628;}
@list l2
        {mso-list-id:1658223992;
        mso-list-template-ids:1330647254;}
@list l3
        {mso-list-id:1731265798;
        mso-list-template-ids:-324111080;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">The packaging of stx-gui is complete.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">The panels present in stx-gui are packaged as starlingx-dashboard and included in the iso build. The manual steps listed below are no longer required, everything is integrated into the build
 process.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">David<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Ramirez, Eddie [mailto:eddie.ramirez@intel.com]
<br>
<b>Sent:</b> Wednesday, August 22, 2018 9:43 PM<br>
<b>To:</b> starlingx-discuss@lists.starlingx.io<br>
<b>Subject:</b> [Starlingx-discuss] The stx-gui challenge<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The last few months working on stx-horizon have given me a broad understanding of the customizations, new dependencies, additions and removals of LOCs that WRS have added on top of Horizon. For simplicity,
 let’s imagine stx-horizon as a superset of horizon that makes stx-specific functionality a reality. The downside of having and maintaining a custom “superset” of horizon is that catching up with upstream is expensive, painful and time-consuming that requires
 a having solid understanding of this project. In an attempt to alleviate the tedious, rebase work after every upstream release, a pluggable python package that would carry stx-specific functionality was the most sound option and architecture to adopt.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Horizon supports “plugins”, the recommended way to extend and add to the functionality that already exists and, after removing more than 25,000 lines of code from stx-horizon, the stx-gui horizon was born.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:11.0pt"><img width="533" height="422" id="Picture_x0020_1" src="cid:image001.png@01D4469C.30AB6B50"><o:p></o:p></span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:11.0pt">*<b>the stx-horizon superset of horizon is smaller now</b>*<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><b>What does the plugin do?<o:p></o:p></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Stx-gui isolates new panels (System Inventory, Fault Management, Server Groups, etc), API wrappers for clients (cgtsclient, cgcs_patch, sysinv, etc) and many other utility functions that are specific to the
 StarlingX project. This architecture helps us to:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:38.25pt;text-indent:-.25in;mso-list:l3 level1 lfo1">
<![if !supportLists]><span style="font-size:11.0pt"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">    
</span></span></span><![endif]><span style="font-size:11.0pt">Significantly improve the way we deal with technical debt: rebases will be easier as more LOCs are moved from stx-horizon to stx-gui, until we end up using the upstream version of horizon
</span><span style="font-size:11.0pt;font-family:"Segoe UI Symbol","sans-serif"">☺</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:38.25pt;text-indent:-.25in;mso-list:l3 level1 lfo1">
<![if !supportLists]><span style="font-size:11.0pt"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">    
</span></span></span><![endif]><span style="font-size:11.0pt">Follow a community well-known architecture for extending horizon: “want to add custom functionality to horizon? Write a plugin”… that’s what you’d hear from the community<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Another side-benefits from doing this splitting<o:p></o:p></span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoNormal" style="mso-list:l1 level1 lfo2"><span style="font-size:11.0pt">Detected additions that can make horizon upstream better: this process threw light on the upstreaming work that I do in parallel.<b><o:p></o:p></b></span></li><li class="MsoNormal" style="mso-list:l1 level1 lfo2"><span style="font-size:11.0pt">Detected dead code: some files are still holding portions of code that are never executed<b><o:p></o:p></b></span></li><li class="MsoNormal" style="mso-list:l1 level1 lfo2"><span style="font-size:11.0pt">Found and documented hard dependencies that must be defined somewhere (requirements.txt)<b><o:p></o:p></b></span></li><li class="MsoNormal" style="mso-list:l1 level1 lfo2"><span style="font-size:11.0pt">An x-ray for understanding what the development documentation would look like<b><o:p></o:p></b></span></li><li class="MsoNormal" style="mso-list:l1 level1 lfo2"><span style="font-size:11.0pt">Understanding the dimension of the customizations made by WRS: horizon acts as a proxy between operators/users and API endpoints through python-clients. Future modifications
 to python-clients and APIs will certainly affect the way Horizon talks to them.<b><o:p></o:p></b></span></li></ol>
<p class="MsoListParagraph"><b><span style="font-size:11.0pt"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b>What does NOT the plugin do?<o:p></o:p></b></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoNormal" style="mso-list:l0 level1 lfo3"><span style="font-size:11.0pt">It does not remove all of the customizations made to the internals of Horizon, that includes:</span>
<b><span style="font-size:11.0pt"><o:p></o:p></span></b>
<ul style="margin-top:0in" type="circle">
<li class="MsoNormal" style="mso-list:l0 level2 lfo3"><span style="font-size:11.0pt">Any modification done to existing panels (built in panels like Instances, Containers, etc)<b><o:p></o:p></b></span></li><li class="MsoNormal" style="mso-list:l0 level2 lfo3"><span style="font-size:11.0pt">The horizon Framework (the way tables are rendered or respond to user actions)<b><o:p></o:p></b></span></li><li class="MsoNormal" style="mso-list:l0 level2 lfo3"><span style="font-size:11.0pt">Fixes to JS files, etc.<b><o:p></o:p></b></span></li></ul>
</li><li class="MsoNormal" style="mso-list:l0 level1 lfo3"><span style="font-size:11.0pt">Tests<b><o:p></o:p></b></span></li><li class="MsoNormal" style="mso-list:l0 level1 lfo3"><span style="font-size:11.0pt">Tabs added to Horizon Panels: Network->Routers->Port Forwarding is an example<b><o:p></o:p></b></span></li><li class="MsoNormal" style="mso-list:l0 level1 lfo3"><span style="font-size:11.0pt">It does not specify what dependencies it needs (but they are documented)<b><o:p></o:p></b></span></li></ul>
<p class="MsoNormal"><b><span style="font-size:11.0pt"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b>How do I use it?<o:p></o:p></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The steps below are ONLY for development and assuming you’re developing outside of the VM running StarlingX.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoNormal" style="mso-list:l2 level1 lfo4"><span style="font-size:11.0pt">Git clone stx-horizon and switch to branch post-stx-gui-cleanup,
<a href="https://github.com/ediardo/stx-horizon/tree/post-sxt-gui-cleanup">you can find the branch on my github profile</a> or
<a href="https://github.com/starlingx-staging/stx-horizon/pull/3">check the PR</a>.<o:p></o:p></span></li><li class="MsoNormal" style="mso-list:l2 level1 lfo4"><span style="font-size:11.0pt">cd stx-horizon and create a virtualenv with py27 in it.<o:p></o:p></span></li><li class="MsoNormal" style="mso-list:l2 level1 lfo4"><span style="font-size:11.0pt">Install Horizon dependencies:pip install -r requirements.txt<o:p></o:p></span></li><li class="MsoNormal" style="mso-list:l2 level1 lfo4"><span style="font-size:11.0pt">Git clone stx-gui in a different directory outside of stx-horizon<o:p></o:p></span></li><li class="MsoNormal" style="mso-list:l2 level1 lfo4"><span style="font-size:11.0pt">cd stx-gui and using the same virtualenvironment for stx-horizon, run python setup.py install. This will create a packaged version of the plugin that is accessible by stx-horizon’s
 venv.<o:p></o:p></span></li><li class="MsoNormal" style="mso-list:l2 level1 lfo4"><span style="font-size:11.0pt">Install all stx-gui dependencies<o:p></o:p></span></li><li class="MsoNormal" style="mso-list:l2 level1 lfo4"><span style="font-size:11.0pt">Copy enable files inside of stx-gui/starlingx_dashboard/enabled/ to stx-horizon/openstack_dashboard/local/enabled/<o:p></o:p></span></li><li class="MsoNormal" style="mso-list:l2 level1 lfo4"><span style="font-size:11.0pt">Finally, inside of stx-horizon, run the horizon dev server with “python manage.py runserver”<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;background:yellow;mso-highlight:yellow">The installation can be simplified and automated when building an ISO</span><span style="font-size:11.0pt">. I’m not familiar with the process but I can guide by explaining
 what steps must be followed and in what order. It basically involves moving to the right branches, cloning stx-gui, creating a package and copying files to one directory.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Please read the extensive documentation I’ve put on
<a href="https://etherpad.openstack.org/p/stx-gui">this etherpad for more instructions</a> for better format.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><b>What’s next?<o:p></o:p></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt">There will be a number of things to keep in mind from now on, answering some questions can help to understand if a change goes to stx-horizon or stx-gui. Also, the long work to make stx-gui work with Upstream
 Horizon is still pending, but fairly documented thanks to the splitting process. The developer experience is important too, how can we make working with stx-gui an inviting place for others? Py3 compatibility and many other things that are aligned to our priorities
 and commitments.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Eddie <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
</body>
</html>