<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to CustomizingImage1</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>Recent changes to CustomizingImage1</description><atom:link href="https://sourceforge.net/p/kluster/wiki/CustomizingImage1/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 05 Jun 2015 02:42:27 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/kluster/wiki/CustomizingImage1/feed" rel="self" type="application/rss+xml"/><item><title>CustomizingImage1 modified by Carl Pupa</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v11
+++ v12
@@ -24,19 +24,9 @@

     PermitRootLogin without-password 

-(the default in previous versions of Debian was `no`).  On startup, Debian 7 inserts a command into authorized keys entries which disallows root login.  Later we will push a script that will handle that on startup, but if you want to test a root login now, we can change it manually (it will only last while the instance is running) by eitehr editing /root/.ssh/authorized_keys so as to remove ",command=" and the text that continues up until the space before "ssh-rsa", or else by using this commandline:
+(the default in previous versions of Debian was `no`).

-    sed -i ’s/,command=.*\bssh-rsa\b/ ssh-rsa/g' /root/.ssh/authorized_keys
-
-Now do, on the instance,
-
-    service ssh restart
-
-and, from a separate window on your local machine, verify that you can now ssh to the instance as root: something like
-
-    ssh -i ~/.ssh/mycluster.pem root@ec2-54-235-5-54.compute-1.amazonaws.com
-
-You can also now verify that the instance can ssh to itself:
+Verify that the instance can ssh to itself:

     ssh localhost

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carl Pupa</dc:creator><pubDate>Fri, 05 Jun 2015 02:42:27 -0000</pubDate><guid>https://sourceforge.net294e6c9ab22ab6902bbef6dccef42e072b71123e</guid></item><item><title>CustomizingImage1 modified by Carl Pupa</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v10
+++ v11
@@ -24,7 +24,11 @@

     PermitRootLogin without-password 

-(the default in previous versions of Debian was `no`).  Now do, on the instance,
+(the default in previous versions of Debian was `no`).  On startup, Debian 7 inserts a command into authorized keys entries which disallows root login.  Later we will push a script that will handle that on startup, but if you want to test a root login now, we can change it manually (it will only last while the instance is running) by eitehr editing /root/.ssh/authorized_keys so as to remove ",command=" and the text that continues up until the space before "ssh-rsa", or else by using this commandline:
+
+    sed -i ’s/,command=.*\bssh-rsa\b/ ssh-rsa/g' /root/.ssh/authorized_keys
+
+Now do, on the instance,

     service ssh restart

@@ -36,11 +40,13 @@

     ssh localhost

-(this command should succeed).  Next, from your local machine, stop the instance: something like
+(this command should succeed).
+
+Next, we want to make an image.  To do this we need to stop the instance, so from your local machine, stop it: something like

     ec2stop i-7877a019

-Now create an image.  You have to think of a name for it (the `-n` option): from the client, do as follows:
+Now create an image from the instance.  You have to think of a name for it (the `-n` option): from the client, do as follows:

     # ec2cim i-7877a019 -n 'customized_phase_1_try1'
     IMAGE   ami-8eaf37e7
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carl Pupa</dc:creator><pubDate>Fri, 05 Jun 2015 01:45:30 -0000</pubDate><guid>https://sourceforge.net64e2750bf5470625567b5f00344f434aedaad184</guid></item><item><title>CustomizingImage1 modified by Carl Pupa</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v9
+++ v10
@@ -8,7 +8,7 @@
     sudo bash  
     apt-get -y update
     apt-get -y upgrade
-    apt-get -y install emacs less
+    apt-get -y install emacs less vim

 Here, `emacs` and `less` are packages that I find it hard to navigate a machine without.  The option `-y` avoids Aptitude prompting to confirm the install.  When we create the cluster, there will be a "head node" called "master" that acts as the server for the GridEngine and NIS services.  (NIS is something that used to be called YP, or yellow pages, that enables us to sync various important system files across a cluster).  We will be setting up the image to "look like" the master, but the same image will be used to create the nodes.  If we want it to be a node, we will put something in the EC2 "user data" to tell it so, and scripts on the image will set it up as a node.  In order for the master and nodes to be able to securely ssh to each other, we will set up the image with an ssh key that allows. this.  Type the following command on the instance.  Make sure you are root when you do this; if you did `sudo bash` above you should still be root.

@@ -20,11 +20,11 @@
     cp -r /home/admin/.ssh .
     (echo; cat .ssh/id_rsa.pub) &amp;gt;&amp;gt; .ssh/authorized_keys

-This will mean that different instances spawned from this image will be able to ssh to each other as root.  We'll be logging into this machine as root directly, so edit the file /etc/ssh/sshd_config so it says
+This will mean that different instances spawned from this image will be able to ssh to each other as root.  We'll be logging into this machine as root directly, so make sure the file /etc/ssh/sshd_config says:

     PermitRootLogin without-password 

-(the default is `no`).  Now do, on the instance,
+(the default in previous versions of Debian was `no`).  Now do, on the instance,

     service ssh restart

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carl Pupa</dc:creator><pubDate>Fri, 05 Jun 2015 01:41:16 -0000</pubDate><guid>https://sourceforge.net2c0c6593b6913394544db9a6c889c68868dd40eb</guid></item><item><title>CustomizingImage1 modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -20,7 +20,7 @@
     cp -r /home/admin/.ssh .
     (echo; cat .ssh/id_rsa.pub) &amp;gt;&amp;gt; .ssh/authorized_keys

-This will mean that different instances spawned from this image will be able to ssh to each other as root.  We'll be logging into this machine as root directly, so edit the file /etc/ssh/ssh_config so it says
+This will mean that different instances spawned from this image will be able to ssh to each other as root.  We'll be logging into this machine as root directly, so edit the file /etc/ssh/sshd_config so it says

     PermitRootLogin without-password 

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Thu, 04 Jun 2015 21:43:20 -0000</pubDate><guid>https://sourceforge.net112149c299f4e65c2fcb5e13b7105e1981a1ce67</guid></item><item><title>Discussion for CustomizingImage1 page</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;"This will mean that different instances spawned from this image will be able to ssh to each other as root. We'll be logging into this machine as root directly, so edit the file /etc/ssh/ssh_config so it says&lt;br /&gt;
PermitRootLogin without-password"&lt;/p&gt;
&lt;p&gt;--&amp;gt;It should be sshd_config or?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joseph D</dc:creator><pubDate>Thu, 04 Jun 2015 21:25:55 -0000</pubDate><guid>https://sourceforge.net078fb660e83b9e171a47da7d14fda8a9358ac96c</guid></item><item><title>Discussion for CustomizingImage1 page</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;added 8.8.8.8 to /etc/resolv.conf  because Amazon nameserver did not work&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joseph D</dc:creator><pubDate>Thu, 04 Jun 2015 21:00:04 -0000</pubDate><guid>https://sourceforge.net824300a3fee83b7ca59ec9c65210c952348cd1f3</guid></item><item><title>CustomizingImage1 modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -17,7 +17,7 @@
 The command `ssh-keygen` will prompt you for various things; just press enter three times.  Next do as follows:

     cd
-    sudo cp -r /home/admin/.ssh .
+    cp -r /home/admin/.ssh .
     (echo; cat .ssh/id_rsa.pub) &gt;&gt; .ssh/authorized_keys

 This will mean that different instances spawned from this image will be able to ssh to each other as root.  We'll be logging into this machine as root directly, so edit the file /etc/ssh/ssh_config so it says
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Wed, 09 Oct 2013 00:59:01 -0000</pubDate><guid>https://sourceforge.net978743379ab1b7a9f37e167b62a8c04f8606946f</guid></item><item><title>CustomizingImage1 modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -4,25 +4,39 @@

 We assume at this point that you are logged in as root to the Debian instance you just created (see the [previous section](CreatingInstance) if not).  Type or paste the following commands one by one on the instance (don't copy and paste them all as a single block, it won't work):

-    apt-get update
-    apt-get upgrade
-    apt-get install emacs less
-    apt-get remove rightscale --purge
+    ## want to get a root prompt.  yes, this is bad form.
+    sudo bash  
+    apt-get -y update
+    apt-get -y upgrade
+    apt-get -y install emacs less

-Here, `emacs` and `less` are packages that I find it hard to navigate a machine without.  I am removing `rightscale` because it's something that came with the image that I don't want.  Some of these commands will prompt for confirmation; using the option `-y` will prevent this.
-
-When we create the cluster, there will be a "head node" called "master" that acts as the server for the GridEngine and NIS services.  (NIS is something that used to be called YP, or yellow pages, that enables us to sync various important system files across a cluster).  We will be setting up the image to "look like" the master, but the same image will be used to create the nodes.  If we want it to be a node, we will put something in the EC2 "user data" to tell it so, and scripts on the image will set it up as a node.  In order for the master and nodes to be able to securely ssh to each other, we will set up the image with an ssh key that allows. this.  Type the following command on the instance:
+Here, `emacs` and `less` are packages that I find it hard to navigate a machine without.  The option `-y` avoids Aptitude prompting to confirm the install.  When we create the cluster, there will be a "head node" called "master" that acts as the server for the GridEngine and NIS services.  (NIS is something that used to be called YP, or yellow pages, that enables us to sync various important system files across a cluster).  We will be setting up the image to "look like" the master, but the same image will be used to create the nodes.  If we want it to be a node, we will put something in the EC2 "user data" to tell it so, and scripts on the image will set it up as a node.  In order for the master and nodes to be able to securely ssh to each other, we will set up the image with an ssh key that allows. this.  Type the following command on the instance.  Make sure you are root when you do this; if you did `sudo bash` above you should still be root.

     ssh-keygen

 The command `ssh-keygen` will prompt you for various things; just press enter three times.  Next do as follows:

     cd
-    cp .ssh/id_rsa.pub .ssh/authorized_keys
+    sudo cp -r /home/admin/.ssh .
+    (echo; cat .ssh/id_rsa.pub) &gt;&gt; .ssh/authorized_keys

-This will mean that different instances spawned from this image will be able to ssh to each other as root.  It will also mean that you can't any more ssh to this instance using the key "mycluster", because we've just discarded that entry in `/root/.ssh/authorized_keys` by overwriting it.  But this doesn't matter because once we exit we won't need to log into this instance again.  Exit from the instance (type `exit`).  Try to ssh to it the same way as before-- you should't be able to get in.
+This will mean that different instances spawned from this image will be able to ssh to each other as root.  We'll be logging into this machine as root directly, so edit the file /etc/ssh/ssh_config so it says

-Next, from your local machine, stop the instance: something like
+    PermitRootLogin without-password 
+
+(the default is `no`).  Now do, on the instance,
+
+    service ssh restart
+
+and, from a separate window on your local machine, verify that you can now ssh to the instance as root: something like
+
+    ssh -i ~/.ssh/mycluster.pem root@ec2-54-235-5-54.compute-1.amazonaws.com
+
+You can also now verify that the instance can ssh to itself:
+
+    ssh localhost
+
+(this command should succeed).  Next, from your local machine, stop the instance: something like

     ec2stop i-7877a019

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Mon, 07 Oct 2013 00:24:07 -0000</pubDate><guid>https://sourceforge.net01dae609721a8e69ddac07fdff3f29c61e6eabb4</guid></item><item><title>WikiPage CustomizingImage1 modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -11,27 +11,27 @@

 Here, `emacs` and `less` are packages that I find it hard to navigate a machine without.  I am removing `rightscale` because it's something that came with the image that I don't want.  Some of these commands will prompt for confirmation; using the option `-y` will prevent this.

-When we create the cluster, there will be a "head node" called "master" that acts as the server for the GridEngine and NIS services.  (NIS is something that used to be called YP, or yellow pages, that enables us to sync various important system files across a cluster).  We will be setting up the image to "look like" the master, but the same image will be used to create the nodes.  If we want it to be a node, we will put something in the EC2 "user data" to tell it so, and scripts on the image will set it up as a node.  Anyway, for now just type the following commands on the instance:
+When we create the cluster, there will be a "head node" called "master" that acts as the server for the GridEngine and NIS services.  (NIS is something that used to be called YP, or yellow pages, that enables us to sync various important system files across a cluster).  We will be setting up the image to "look like" the master, but the same image will be used to create the nodes.  If we want it to be a node, we will put something in the EC2 "user data" to tell it so, and scripts on the image will set it up as a node.  In order for the master and nodes to be able to securely ssh to each other, we will set up the image with an ssh key that allows. this.  Type the following command on the instance:

-    hostname master
-    echo master &gt; /etc/hostname
+    ssh-keygen

-and edit the file `etc/hosts` on the instance to add the line `127.0.0.1 master` at the top of the file.  This is needed at the moment because both the NIS and GridEngine installers are quite finicky about needing an explicit /etc/hosts entry for the machine.  Next, we want the master and nodes to be able to ssh each other as root, so *from your local machine*, do as follows (replace the name below with the actual FQDN of your instance):
+The command `ssh-keygen` will prompt you for various things; just press enter three times.  Next do as follows:

-    master=ec2-54-235-5-54.compute-1.amazonaws.com
-    scp -i ~/.ssh/mycluster.pem ~/.ssh/mycluster.pem root@$master:.ssh/id_rsa
-    scp -i ~/.ssh/mycluster.pem ~/.ssh/mycluster.pub root@$master:.ssh/id_rsa.pub
+    cd
+    cp .ssh/id_rsa.pub .ssh/authorized_keys

-This means that when you save your instance it will have your private key "mycluster.pem" on it, so if you make the machine image public in future, bear this in mind and don't use the key "mycluster" for anything important.  Next, we will save our work by creating an AMI.  First it's best to stop the image: from the client, do:
+This will mean that different instances spawned from this image will be able to ssh to each other as root.  It will also mean that you can't any more ssh to this instance using the key "mycluster", because we've just discarded that entry in `/root/.ssh/authorized_keys` by overwriting it.  But this doesn't matter because once we exit we won't need to log into this instance again.  Exit from the instance (type `exit`).  Try to ssh to it the same way as before-- you should't be able to get in.
+
+Next, from your local machine, stop the instance: something like

     ec2stop i-7877a019

 Now create an image.  You have to think of a name for it (the `-n` option): from the client, do as follows:

-    # ec2cim i-7877a019 -n 'customized_phase_1'
+    # ec2cim i-7877a019 -n 'customized_phase_1_try1'
     IMAGE   ami-8eaf37e7

-In order to create an instance from this you will need to remember the AMI-ID (`ami-8eaf37e7` in this case), but if you forget it, just type `ec2dim` and it will list all the images you have made.  It may take a few minutes for this AMI (Amazon Machine Image) to be ready; wait until you can type `ec2dim ami-8eaf37e7` and it says `available` rather than `pending`.
+In order to create an instance from this you will need to remember the AMI-ID (`ami-8eaf37e7` in this case), but if you forget it, just type `ec2dim` and it will list all the images you have made.  It may take a few minutes for this AMI (Amazon Machine Image) to be ready; wait until you can type something like `ec2dim ami-8eaf37e7` and it says `available` rather than `pending`.

 Previous: [Creating a Debian Linux Instance](CreatingInstance)
 Next: [Customizing your Image (Phase 2)](CustomizingImage2)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Mon, 25 Mar 2013 02:00:01 -0000</pubDate><guid>https://sourceforge.netf4c317e1ca124e39cc376112f9927c34a0002382</guid></item><item><title>WikiPage CustomizingImage1 modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/CustomizingImage1/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -33,5 +33,6 @@

 In order to create an instance from this you will need to remember the AMI-ID (`ami-8eaf37e7` in this case), but if you forget it, just type `ec2dim` and it will list all the images you have made.  It may take a few minutes for this AMI (Amazon Machine Image) to be ready; wait until you can type `ec2dim ami-8eaf37e7` and it says `available` rather than `pending`.

+Previous: [Creating a Debian Linux Instance](CreatingInstance)
 Next: [Customizing your Image (Phase 2)](CustomizingImage2)
 Up: [Kluster Wiki](Home)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Mon, 25 Mar 2013 00:23:01 -0000</pubDate><guid>https://sourceforge.neta74a57e76e07bd4a4fd25a49f721a9aaf4db2aac</guid></item></channel></rss>