Switch from user 'root' to 'catalyst' on VM
hkclark [Sat, 3 Sep 2011 16:37:08 +0000 (12:37 -0400)]
Not only to follow 'best practices', but also to avoid potential confusion
over /root/ and /root/MyApp/root/ when we are talking about the root directory.
Also make it easier for people who want to install X.

lib/Catalyst/Manual/Tutorial/01_Intro.pod
lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod
lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod
lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod
lib/Catalyst/Manual/Tutorial/05_Authentication.pod
lib/Catalyst/Manual/Tutorial/06_Authorization.pod
lib/Catalyst/Manual/Tutorial/07_Debugging.pod
lib/Catalyst/Manual/Tutorial/08_Testing.pod
lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod

index b84c4c4..fa7d9e9 100644 (file)
@@ -196,7 +196,7 @@ virtual machine itself -- the thing where you actually do the tutorial
 (and that you boot up on the "host machine").
 B<Note:> Throughout the tutorial, we will shows the UNIX shell prompt
 as "C<$>".  If you are using Tutorial VM, the prompt will really be
-"C<root@catalyst:~#>", but we will keep it short (and also use "C<$>" in
+"C<catalyst@catalyst:~#>", but we will keep it short (and also use "C<$>" in
 lieu of "C<#>", since "C<#>" looks too much like a Perl comment).
 
 
@@ -224,13 +224,14 @@ L<http://www.virtualbox.org/>.
 
 =item 4
 
-Once you get a login prompt, enter the username B<root> and a password
-for C<catalyst>.  You should now be at a prompt that looks like:
+Once you get a login prompt, enter the username B<catalyst> and a
+password for C<catalyst>.  You should now be at a prompt that looks
+like:
 
-    catalyst login: root
+    catalyst login: catalyst
     Password: catalyst
     ...
-    root@catalyst:~#
+    catalyst@catalyst:~#
 
 =item 5
 
@@ -275,13 +276,13 @@ tutorial.
 B<From your main desktop machine>, open an SSH client and connect to the
 IP address found in the previous step.  You should get a login prompt
 (accept the SSH key if you get a warning message about that).  Login
-with the same username and password as we used in Step 4: B<root> /
+with the same username and password as we used in Step 4: B<catalyst> /
 B<catalyst>
 
-    catalyst login: root
+    catalyst login: catalyst 
     Password: catalyst
     ...
-    root@catalyst:~#
+    catalyst@catalyst:~#
 
 
 =item 7
@@ -352,14 +353,14 @@ You can then start X Windows with:
 
 
 You may note that the Tutorial Virtual Machine uses L<local::lib> so
-that the Perl modules are run from ~/perl5 (in this case, /root/perl5)
-vs. the usual location of your "system Perl".  We recommend that you
-also consider using this very handy module.  It can greatly ease the
-process of maintaining and testing different combinations or Perl
-modules across development, staging, and production servers.  (The
-"relocatable Perl" feature can also be used to to run both the modules
-B<and> Perl itself from your home directory [or any other directory you
-chose]).
+that the Perl modules are run from ~/perl5 (in this case,
+/home/catalyst/perl5) vs. the usual location of your "system Perl".  We
+recommend that you also consider using this very handy module.  It can
+greatly ease the process of maintaining and testing different
+combinations or Perl modules across development, staging, and production
+servers.  (The "relocatable Perl" feature can also be used to to run
+both the modules B<and> Perl itself from your home directory [or any
+other directory you chose]).
 
 B<Note>: Please provide feedback on how the Virtual Machine approach for
 the tutorial works for you.  If you have suggestions or comments, you
index c263c4b..8d5df2f 100644 (file)
@@ -205,8 +205,8 @@ C<Ctrl-C> to breakout of the dev server) if you prefer.
     
     [debug] Loaded dispatcher "Catalyst::Dispatcher"
     [debug] Loaded engine "Catalyst::Engine"
-    [debug] Found home "/root/Hello"
-    [debug] Loaded Config "/root/Hello/hello.conf"
+    [debug] Found home "/home/catalyst/Hello"
+    [debug] Loaded Config "/home/catalyst/Hello/hello.conf"
     [debug] Loaded components:
     .-----------------------------------------------------------------+----------.
     | Class                                                           | Type     |
@@ -329,7 +329,7 @@ Notice in the window running the Development Server that you should
 get output similar to the following:
 
     Saw changes to the following files:
-     - /root/Hello/lib/Hello/Controller/Root.pm (modify)
+     - /home/catalyst/Hello/lib/Hello/Controller/Root.pm (modify)
     
     Attempting to restart the server
     ...
index 56691be..5137dc4 100644 (file)
@@ -64,9 +64,9 @@ will be too limited to be of use to anyone, it should provide a basic
 environment where we can explore a variety of features used in virtually
 all web applications.
 
-Source code for the tutorial in included in the F</root/Final> directory
-of the Tutorial Virtual machine (one subdirectory per chapter).  There
-are also instructions for downloading the code in
+Source code for the tutorial in included in the F</home/catalyst/Final>
+directory of the Tutorial Virtual machine (one subdirectory per
+chapter).  There are also instructions for downloading the code in
 L<Catalyst::Manual::Tutorial::01_Intro>.
 
 Please take a look at
@@ -299,10 +299,10 @@ Use the Catalyst C<create> script to add a controller for book-related
 actions:
 
     $ script/myapp_create.pl controller Books
-     exists "/root/MyApp/script/../lib/MyApp/Controller"
-     exists "/root/MyApp/script/../t"
-    created "/root/MyApp/script/../lib/MyApp/Controller/Books.pm"
-    created "/root/MyApp/script/../t/controller_Books.t"
+     exists "/home/catalyst/MyApp/script/../lib/MyApp/Controller"
+     exists "/home/catalyst/MyApp/script/../t"
+    created "/home/catalyst/MyApp/script/../lib/MyApp/Controller/Books.pm"
+    created "/home/catalyst/MyApp/script/../t/controller_Books.t"
 
 Then edit C<lib/MyApp/Controller/Books.pm> (as discussed in
 L<Chapter 2|Catalyst::Manual::Tutorial::02_CatalystBasics> of
@@ -461,10 +461,10 @@ For our book application, enter the following command to enable the
 C<TT> style of view rendering:
 
     $ script/myapp_create.pl view HTML TT
-     exists "/root/MyApp/script/../lib/MyApp/View"
-     exists "/root/MyApp/script/../t"
-     created "/root/MyApp/script/../lib/MyApp/View/HTML.pm"
-     created "/root/MyApp/script/../t/view_HTML.t"
+     exists "/home/catalyst/MyApp/script/../lib/MyApp/View"
+     exists "/home/catalyst/MyApp/script/../t"
+     created "/home/catalyst/MyApp/script/../lib/MyApp/View/HTML.pm"
+     created "/home/catalyst/MyApp/script/../t/view_HTML.t"
 
 This creates a view called C<HTML> (the first argument) in a file called
 C<HTML.pm> that uses L<Catalyst::View::TT> (the second argument) as the
@@ -765,12 +765,12 @@ automatically build the required files for us:
     $ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \
         create=static dbi:SQLite:myapp.db \
         on_connect_do="PRAGMA foreign_keys = ON"
-     exists "/root/MyApp/script/../lib/MyApp/Model"
-     exists "/root/MyApp/script/../t"
-    Dumping manual schema for MyApp::Schema to directory /root/MyApp/script/../lib ...
+     exists "/home/catalyst/MyApp/script/../lib/MyApp/Model"
+     exists "/home/catalyst/MyApp/script/../t"
+    Dumping manual schema for MyApp::Schema to directory /home/catalyst/MyApp/script/../lib ...
     Schema dump completed.
-    created "/root/MyApp/script/../lib/MyApp/Model/DB.pm"
-    created "/root/MyApp/script/../t/model_DB.t"
+    created "/home/catalyst/MyApp/script/../lib/MyApp/Model/DB.pm"
+    created "/home/catalyst/MyApp/script/../t/model_DB.t"
 
 Please note the '\' above.  Depending on your environment, you might be
 able to cut and paste the text as shown or need to remove the '\'
@@ -962,8 +962,8 @@ display something like:
     
     [debug] Loaded dispatcher "Catalyst::Dispatcher"
     [debug] Loaded engine "Catalyst::Engine"
-    [debug] Found home "/root/MyApp"
-    [debug] Loaded Config "/root/MyApp/myapp.conf"
+    [debug] Found home "/home/catalyst/MyApp"
+    [debug] Loaded Config "/home/catalyst/MyApp/myapp.conf"
     [debug] Loaded components:
     .-----------------------------------------------------------------+----------.
     | Class                                                           | Type     |
index f609941..5cf0952 100644 (file)
@@ -75,9 +75,9 @@ of tool to automate the process.  You get less control, but it can be
 quick and easy.  For example, see L<Catalyst::Plugin::AutoCRUD>,
 L<CatalystX::CRUD>, and L<CatalystX::CRUD::YUI>.
 
-Source code for the tutorial in included in the F</root/Final> directory
-of the Tutorial Virtual machine (one subdirectory per chapter).  There
-are also instructions for downloading the code in
+Source code for the tutorial in included in the F</home/catalyst/Final>
+directory of the Tutorial Virtual machine (one subdirectory per
+chapter).  There are also instructions for downloading the code in
 L<Catalyst::Manual::Tutorial::01_Intro>.
 
 
@@ -966,11 +966,11 @@ the new fields:
     $ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \
         create=static components=TimeStamp dbi:SQLite:myapp.db \
         on_connect_do="PRAGMA foreign_keys = ON"
-     exists "/root/dev/MyApp/script/../lib/MyApp/Model"
-     exists "/root/dev/MyApp/script/../t"
-    Dumping manual schema for MyApp::Schema to directory /root/dev/MyApp/script/../lib ...
+     exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model"
+     exists "/home/catalyst/dev/MyApp/script/../t"
+    Dumping manual schema for MyApp::Schema to directory /home/catalyst/dev/MyApp/script/../lib ...
     Schema dump completed.
-     exists "/root/dev/MyApp/script/../lib/MyApp/Model/DB.pm"
+     exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model/DB.pm"
 
 Notice that we modified our use of the helper slightly: we told it to
 include the L<DBIx::Class::TimeStamp> in the C<load_components> line of
index 8692eed..c6f43db 100644 (file)
@@ -63,7 +63,7 @@ L<Chapter 6|Catalyst::Manual::Tutorial::06_Authorization>).
 This chapter of the tutorial is divided into two main sections: 1)
 basic, cleartext authentication and 2) hash-based authentication.
 
-Source code for the tutorial in included in the F</root/Final> directory
+Source code for the tutorial in included in the F</home/catalyst/Final> directory
 of the Tutorial Virtual machine (one subdirectory per chapter).  There
 are also instructions for downloading the code in
 L<Catalyst::Manual::Tutorial::01_Intro>.
@@ -132,11 +132,11 @@ for us:
     $ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \
         create=static components=TimeStamp dbi:SQLite:myapp.db \
         on_connect_do="PRAGMA foreign_keys = ON"
-     exists "/root/dev/MyApp/script/../lib/MyApp/Model"
-     exists "/root/dev/MyApp/script/../t"
-    Dumping manual schema for MyApp::Schema to directory /root/dev/MyApp/script/../lib ...
+     exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model"
+     exists "/home/catalyst/dev/MyApp/script/../t"
+    Dumping manual schema for MyApp::Schema to directory /home/catalyst/dev/MyApp/script/../lib ...
     Schema dump completed.
-     exists "/root/dev/MyApp/script/../lib/MyApp/Model/DB.pm"
+     exists "/home/catalyst/dev/MyApp/script/../lib/MyApp/Model/DB.pm"
     $
     $ ls lib/MyApp/Schema/Result
     Author.pm  BookAuthor.pm  Book.pm  Role.pm  User.pm  UserRole.pm
index 930163c..cb0d599 100644 (file)
@@ -64,9 +64,9 @@ actions.  The first half looks at basic authorization concepts. The
 second half looks at how moving your authorization code to your model
 can simplify your code and make things easier to maintain.
 
-Source code for the tutorial in included in the F</root/Final> directory
-of the Tutorial Virtual machine (one subdirectory per chapter).  There
-are also instructions for downloading the code in
+Source code for the tutorial in included in the F</home/catalyst/Final>
+directory of the Tutorial Virtual machine (one subdirectory per
+chapter).  There are also instructions for downloading the code in
 L<Catalyst::Manual::Tutorial::01_Intro>.
 
 
index 25b56ab..65be2f0 100644 (file)
@@ -59,6 +59,12 @@ L<Appendices|Catalyst::Manual::Tutorial::10_Appendices>
 This chapter of the tutorial takes a brief look at the primary options
 available for troubleshooting Catalyst applications.
 
+Source code for the tutorial in included in the F</home/catalyst/Final>
+directory of the Tutorial Virtual machine (one subdirectory per
+chapter).  There are also instructions for downloading the code in
+L<Catalyst::Manual::Tutorial::01_Intro>.
+
+
 Note that when it comes to debugging and troubleshooting, there are two
 camps:
 
@@ -179,7 +185,7 @@ in.  Once the breakpoint is encountered in the
 C<MyApp::Controller::list> method, the console session running the
 development server will drop to the Perl debugger prompt:
 
-    MyApp::Controller::Books::list(/root/MyApp/script/../lib/MyApp/Controller/Books.pm:48):
+    MyApp::Controller::Books::list(/home/catalyst/MyApp/script/../lib/MyApp/Controller/Books.pm:48):
     48:         $c->stash->{books} = [$c->model('DB::Book')->all];
     
       DB<1>
@@ -191,7 +197,7 @@ C<single-step> into methods/subroutines):
 
       DB<1> n
     SELECT me.id, me.title, me.rating, me.created, me.updated FROM book me:
-    MyApp::Controller::Books::list(/root/MyApp/script/../lib/MyApp/Controller/Books.pm:53):
+    MyApp::Controller::Books::list(/home/catalyst/MyApp/script/../lib/MyApp/Controller/Books.pm:53):
     53:         $c->stash->{template} = 'books/list.tt2';
     
       DB<1>
index b90b0e3..30dc008 100644 (file)
@@ -63,9 +63,9 @@ ensure that your application is working correctly at the present time,
 but also provide automated regression testing as you upgrade various
 pieces of your application over time.
 
-Source code for the tutorial in included in the F</root/Final> directory
-of the Tutorial Virtual machine (one subdirectory per chapter).  There
-are also instructions for downloading the code in
+Source code for the tutorial in included in the F</home/catalyst/Final>
+directory of the Tutorial Virtual machine (one subdirectory per
+chapter).  There are also instructions for downloading the code in
 L<Catalyst::Manual::Tutorial::01_Intro>.
 
 For an excellent introduction to learning the many benefits of testing
index e7dfaa9..d910d8f 100644 (file)
@@ -63,9 +63,9 @@ and restore data to/from the database.
 See L<Catalyst::Manual::Tutorial::09_AdvancedCRUD> for additional form
 management options other than L<HTML::FormFu>.
 
-Source code for the tutorial in included in the F</root/Final> directory
-of the Tutorial Virtual machine (one subdirectory per chapter).  There
-are also instructions for downloading the code in
+Source code for the tutorial in included in the F</home/catalyst/Final>
+directory of the Tutorial Virtual machine (one subdirectory per
+chapter).  There are also instructions for downloading the code in
 L<Catalyst::Manual::Tutorial::01_Intro>.