<div dir="ltr"><div><div><div><div>As far as managing your perl/cpan version goes here&#39;s one low friction solution:<br><br></div>1.  Make sure your dev box and production box are the same architecture.<br></div>2.  Use perlbrew or similar to install a perl to /opt/perl<br></div>3.  Copy the /opt/perl directory  between development and production (rsync, make a deb and dpkg -i or whatever).<br></div>4.  Make sure your PATH environment variables are set correctly.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 3, 2016 at 7:23 AM, James Leu <span dir="ltr">&lt;<a href="mailto:jleu@mindspring.com" target="_blank">jleu@mindspring.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It all comes down to the apps &#39;environment`.<br>
<br>
Do you remember when you started developing your catalyst app you had to<br>
install a bunch of perl modules?<br>
<br>
Those same modules (preferabbly the EXACT same versions as you installed<br>
on your development machine) need to be installed on your<br>
production machine.  Once you have the same &#39;environment&#39;<br>
between dev and prod, then yeah, you can just &#39;copy&#39; your<br>
app&#39;s source tree to prod, and it will &quot;just work&quot;.<br>
<br>
The problem we run into is that CPAN is a moving target.<br>
Install Catalyst today might result in different versions<br>
of modules, then when you install catalyst to start you development.<br>
Those differences in versions of modules can result in complete<br>
failure of the app or small subtle changes in the way it runs, or even<br>
worse, exposes a new exploitable bug in your app.<br>
<br>
So consistency of you apps &#39;environment&#39; between dev, production,<br>
and production a year from now, it one of the biggest challenges<br>
to your approach.<br>
<br>
You can look into things like Carton, PAR, FatPacker which will<br>
bundle up the perl environment for an App so you can<br>
deploy it.<br>
<br>
If you like to be &#39;ahead of the curve&#39;, start looking at using docker<br>
or atomic for each of you web apps.<br>
<br>
Best of luck<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Mar 02, 2016 at 07:04:53PM -0000, Andrew wrote:<br>
&gt; ---&gt; Really looking to keep it simple stupid, to be fair.<br>
&gt;<br>
&gt; ---&gt; Looks like a lot to learn atm, so am likely to just copy and paste<br>
&gt; folders for the time being.<br>
&gt;<br>
&gt; ---&gt; I got a bit confused here:<br>
&gt;<br>
&gt; As a baby-step prior to doing builds and auto deployment, you can<br>
&gt; checkout your code from your production server(s).  While this is still<br>
&gt; a manual step, it&#39;s probably better than copying folders and files.<br>
&gt;<br>
&gt; ---&gt; If you&#39;re not doing an auto deployment, and you&#39;re not copying folders<br>
&gt; and files, how are you checking out your code from the production server?<br>
&gt;<br>
&gt; Grateful for all the insights,<br>
&gt;<br>
&gt; Yours,<br>
&gt; Andrew.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt; From: &quot;Trevor Leffler&quot; &lt;<a href="mailto:tleffler@uw.edu">tleffler@uw.edu</a>&gt;<br>
&gt; To: &quot;The elegant MVC web framework&quot; &lt;<a href="mailto:catalyst@lists.scsys.co.uk">catalyst@lists.scsys.co.uk</a>&gt;<br>
&gt; Sent: Wednesday, March 02, 2016 6:54 PM<br>
&gt; Subject: Re: [Catalyst] From Development to Production.<br>
&gt;<br>
&gt;<br>
&gt; Yes, that.  But to be a tad verbose about it...<br>
&gt;<br>
&gt; Use version control and branches (or whatever your VCS prefers).  Cut a<br>
&gt; new branch whenever you want to create a new &quot;release&quot; for production.<br>
&gt; This will let you switch from one branch to the next (upgrade) or back<br>
&gt; again if things blow up.<br>
&gt;<br>
&gt; As a baby-step prior to doing builds and auto deployment, you can<br>
&gt; checkout your code from your production server(s).  While this is still<br>
&gt; a manual step, it&#39;s probably better than copying folders and files.<br>
&gt;<br>
&gt; Once you&#39;re there, start looking into &quot;builds.&quot;  Generally folks use<br>
&gt; some kind of Continuous Integration (CI) software that polls your VCS<br>
&gt; for recent commits and then &quot;kicks off a build.&quot;  The simplest thing it<br>
&gt; might do is checkout the latest code revision and tar it up.  This<br>
&gt; tarfile is a &quot;build artifact&quot; ready for you to deploy (i.e. copy into<br>
&gt; production and untar).  Your work after this point is to figure out what<br>
&gt; else you&#39;d like to happen during a build -- run tests? create<br>
&gt; documentation? do code inspections? -- and research how your build<br>
&gt; artifacts could be automatically deployed.<br>
&gt;<br>
&gt; I&#39;ll echo Toomas in that there&#39;s a lot to learn here and keep you busy<br>
&gt; depending on how far you want/can take it.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; --Trevor<br>
&gt;<br>
&gt;<br>
&gt; On 03/02/2016 10:32 AM, Toomas Pelberg wrote:<br>
&gt; &gt; Go learn about version control and deployment automation, you can google<br>
&gt; &gt; these keywords and will likely be busy for the next few weeks ;-) it&#39;s a<br>
&gt; &gt; pretty wide and interesting reading<br>
&gt; &gt; ------------------------------------------------------------------------<br>
&gt; &gt; From: Andrew &lt;mailto:<a href="mailto:catalystgroup@unitedgames.co.uk">catalystgroup@unitedgames.co.uk</a>&gt;<br>
&gt; &gt; Sent: ‎3/‎2/‎2016 20:17<br>
&gt; &gt; To: The elegant MVC web framework &lt;mailto:<a href="mailto:catalyst@lists.scsys.co.uk">catalyst@lists.scsys.co.uk</a>&gt;<br>
&gt; &gt; Subject: [Catalyst] From Development to Production.<br>
&gt; &gt;<br>
&gt; &gt; So, I&#39;m trying to learn Modern Perl workflows,<br>
&gt; &gt; and I heard it&#39;s best to do all your development on a development server,<br>
&gt; &gt; rather than mess around with code live, on the production server.<br>
&gt; &gt; So let&#39;s say I&#39;ve coded my Catalyst app on a dev server, and it&#39;s in a<br>
&gt; &gt; folder called MyApp....<br>
&gt; &gt; Do I just copy the MyApp folder to the Production Server?<br>
&gt; &gt; [Am likely to copy and paste the folder using Cyberduck].<br>
&gt; &gt; I mean, assuming the production server is setup to run it, and so forth...<br>
&gt; &gt; Let&#39;s for example say, I&#39;d already published Version 1.0 of my website<br>
&gt; &gt; on the production server.<br>
&gt; &gt; And it&#39;s running from a MyApp directory on the production server.<br>
&gt; &gt; Then I code a version 2.0 on my development server, in a folder called<br>
&gt; &gt; MyApp, and I want to publish that....<br>
&gt; &gt; ...do I just again, copy MyApp from my development server, over to my<br>
&gt; &gt; production server?<br>
&gt; &gt; Obviously, new files would overwrite old ones.<br>
&gt; &gt; What about if version 2.0 saw me delete some old unused stuff, do I have<br>
&gt; &gt; to make a note of what they were,<br>
&gt; &gt; and go through the folder on the production server and delete them?<br>
&gt; &gt; Or is there some graceful way to sync the development and production<br>
&gt; &gt; versions of my code?<br>
&gt; &gt; What are other people doing?<br>
&gt; &gt; Grateful for any insights.<br>
&gt; &gt; Yours,<br>
&gt; &gt; Andrew.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
&gt; &gt; Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
&gt; &gt; Searchable archive:<br>
&gt; <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" rel="noreferrer" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
&gt; &gt; Dev site: <a href="http://dev.catalyst.perl.org/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/</a><br>
&gt; &gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
&gt; Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
&gt; Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" rel="noreferrer" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
&gt; Dev site: <a href="http://dev.catalyst.perl.org/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
&gt; Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
&gt; Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" rel="noreferrer" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
&gt; Dev site: <a href="http://dev.catalyst.perl.org/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
James R. Leu<br>
<a href="mailto:jleu@mindspring.com">jleu@mindspring.com</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" rel="noreferrer" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/</a><br>
</div></div></blockquote></div><br></div>