Difference between revisions of "Bright:upgrade image"

From Define Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
From here the image will need to be edited tom ake the required changes.  There are two way to do this.  Clicking the image in the GUI you can access the root shell under the tasks tab.
+
From here the image will need to be edited to make the required changes.  There are two way to do this.  Clicking the image in the GUI you can access the root shell under the tasks tab.
  
 
From the command line you can run the command:
 
From the command line you can run the command:
Line 18: Line 18:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
If you want a node category to boot off this now image/clone, then move the category software image across: (in this example, we cloned a dtn-image, data transfer node)
 +
<syntaxhighlight>
 +
[root@hyalite ~]# cmsh
 +
[hyalite]% softwareimage
 +
[hyalite->softwareimage]% clone dtn-image dtn-image-copy-01-09-16.1
 +
[hyalite->softwareimage*[dtn-image-copy-01-09-16.1*]]% commit
 +
[hyalite->softwareimage[dtn-image-copy-01-09-16.1]]%
 +
Mon Sep  5 06:46:26 2016 [notice] hyalite: Started to copy: /cm/images/dtn-image -> /cm/images/dtn-image-copy-01-09-16.1
 +
# wait a few mins until finished (not necessary but didnt take too long)
 +
[hyalite->softwareimage]% category
 +
[hyalite->category]% list
 +
Type  Name (key)              Software image         
 +
------ ------------------------ ------------------------
 +
Node  default                  default-image-copy-01-0+
 +
Node  dtn                      dtn-image             
 +
Node  mds                      default-image         
 +
Node  oss                      default-image         
 +
Node  perfsonar                default-image         
 +
Node  vmware                  samba-image
 +
[hyalite->category]% use dtn
 +
[hyalite->category[dtn]]% set softwareimage dtn-image-copy-01-09-16.1
 +
[hyalite->category*[dtn*]]% commit
 +
[hyalite->category[dtn]]%
 +
[hyalite->category[dtn]]% list
 +
Type  Name (key)              Software image         
 +
------ ------------------------ ------------------------
 +
Node  default                  default-image-copy-01-0+
 +
Node  dtn                      dtn-image-copy-01-09-16+
 +
# then reboot dtn nodes to provison new image - after making whatever changes required in /cm chroot
 +
</syntaxhighlight>
  
 
==  Run a new Kernel ==
 
==  Run a new Kernel ==
Line 26: Line 56:
 
[root@head1 ~]# cmsh
 
[root@head1 ~]# cmsh
 
[head1]% softwareimage set <image_name> kernelversion <kernel>
 
[head1]% softwareimage set <image_name> kernelversion <kernel>
 +
# note wait for the ramdisk to finished being regenerated
 +
</syntaxhighlight>
 +
 +
Example in action:
 +
<syntaxhighlight>
 +
# note: we had 2 provisioning systems also that needed to sync.
 +
[root@hyalite ~]# cmsh
 +
[hyalite]% softwareimage
 +
[hyalite->softwareimage]% list
 +
Name (key)                    Path                                      Kernel version           
 +
------------------------------ ----------------------------------------- ---------------------------
 +
default-image                  /cm/images/default-image                  2.6.32-431.29.2.el6.x86_64
 +
default-image-copy-01-09-16.1  /cm/images/default-image-copy-01-09-16.1  2.6.32-642.3.1.el6.x86_64 
 +
default-image-copy-01-09-16.2  /cm/images/default-image-copy-01-09-16.2  2.6.32-431.29.2.el6.x86_64
 +
dtn-image                      /cm/images/dtn-image                      2.6.32-431.29.2.el6.x86_64
 +
dtn-image-copy-01-09-16.1      /cm/images/dtn-image-copy-01-09-16.1      2.6.32-431.29.2.el6.x86_64
 +
samba-image                    /cm/images/samba-image                    2.6.32-431.29.2.el6.x86_64
 +
[hyalite->softwareimage]% set dtn-image-copy-01-09-16.1 kernelversion 2.6.32-642.3.1.el6.x86_64
 +
[hyalite->softwareimage*]% list
 +
Name (key)                    Path                                      Kernel version           
 +
------------------------------ ----------------------------------------- ---------------------------
 +
default-image                  /cm/images/default-image                  2.6.32-431.29.2.el6.x86_64
 +
default-image-copy-01-09-16.1  /cm/images/default-image-copy-01-09-16.1  2.6.32-642.3.1.el6.x86_64 
 +
default-image-copy-01-09-16.2  /cm/images/default-image-copy-01-09-16.2  2.6.32-431.29.2.el6.x86_64
 +
dtn-image                      /cm/images/dtn-image                      2.6.32-431.29.2.el6.x86_64
 +
dtn-image-copy-01-09-16.1      /cm/images/dtn-image-copy-01-09-16.1      2.6.32-642.3.1.el6.x86_64 
 +
samba-image                    /cm/images/samba-image                    2.6.32-431.29.2.el6.x86_64
 +
[hyalite->softwareimage*]% commit
 +
Successfully committed 1 SoftwareImages
 +
[hyalite->softwareimage]%
 +
Mon Sep  5 07:52:26 2016 [notice] hyalite: Initial ramdisk for image dtn-image-copy-01-09-16.1 is being generated
 +
[hyalite->softwareimage]%
 +
Mon Sep  5 07:53:00 2016 [notice] hyalite: Initial ramdisk for image dtn-image-copy-01-09-16.1 was generated successfully
 +
[hyalite->softwareimage]%
 +
Mon Sep  5 07:53:31 2016 [notice] hyalite: Provisioning started: sending hyalite:/cm/images/dtn-image to hyalite2:/cm/images/dtn-image
 +
[hyalite->softwareimage]%
 +
Mon Sep  5 07:53:51 2016 [notice] hyalite: Provisioning completed: sent hyalite:/cm/images/dtn-image to hyalite2:/cm/images/dtn-image
 +
[hyalite->softwareimage]%
 +
Mon Sep  5 07:53:51 2016 [notice] hyalite: Provisioning started: sending hyalite:/cm/images/dtn-image-copy-01-09-16.1 to hyalite2:/cm/images/dtn-image-copy-01-09-16.1
 +
[hyalite->softwareimage]%
 +
Mon Sep  5 07:54:06 2016 [notice] hyalite: Provisioning completed: sent hyalite:/cm/images/dtn-image-copy-01-09-16.1 to hyalite2:/cm/images/dtn-image-copy-01-09-16.1
 +
[hyalite->softwareimage]%
 +
Mon Sep  5 07:54:07 2016 [notice] hyalite: Provisioning started: sending hyalite:/cm/images/dtn-image-copy-01-09-16.1/boot to hyalite2:/cm/images/dtn-image-copy-01-09-16.1/boot
 +
[hyalite->softwareimage]%
 +
Mon Sep  5 07:54:08 2016 [notice] hyalite: Provisioning completed: sent hyalite:/cm/images/dtn-image-copy-01-09-16.1/boot to hyalite2:/cm/images/dtn-image-copy-01-09-16.1/boot
 +
[hyalite->softwareimage]%
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Latest revision as of 13:59, 5 September 2016

Clone and Edit and Existing Image

If you are using the same OS as a previously created image, cloning it is the easiest method to create a new image. Clicking on clone will ask you for a name for the new image. Click save and the new image wll be created in /cm/images. It will also appear in the list in the GUI.

Using cmsh:

softwareimage clone <oldimage> <newimage>
#It will take some time for the image to be cloned, wait until this has completed before making further changes

From here the image will need to be edited to make the required changes. There are two way to do this. Clicking the image in the GUI you can access the root shell under the tasks tab.

From the command line you can run the command:

chroot /cm/images/<image name>

If you want a node category to boot off this now image/clone, then move the category software image across: (in this example, we cloned a dtn-image, data transfer node)

[root@hyalite ~]# cmsh
[hyalite]% softwareimage
[hyalite->softwareimage]% clone dtn-image dtn-image-copy-01-09-16.1
[hyalite->softwareimage*[dtn-image-copy-01-09-16.1*]]% commit
[hyalite->softwareimage[dtn-image-copy-01-09-16.1]]% 
Mon Sep  5 06:46:26 2016 [notice] hyalite: Started to copy: /cm/images/dtn-image -> /cm/images/dtn-image-copy-01-09-16.1
# wait a few mins until finished (not necessary but didnt take too long) 
[hyalite->softwareimage]% category 
[hyalite->category]% list
Type   Name (key)               Software image          
------ ------------------------ ------------------------
Node   default                  default-image-copy-01-0+
Node   dtn                      dtn-image               
Node   mds                      default-image           
Node   oss                      default-image           
Node   perfsonar                default-image           
Node   vmware                   samba-image 
[hyalite->category]% use dtn 
[hyalite->category[dtn]]% set softwareimage dtn-image-copy-01-09-16.1
[hyalite->category*[dtn*]]% commit
[hyalite->category[dtn]]% 
[hyalite->category[dtn]]% list
Type   Name (key)               Software image          
------ ------------------------ ------------------------
Node   default                  default-image-copy-01-0+
Node   dtn                      dtn-image-copy-01-09-16+
# then reboot dtn nodes to provison new image - after making whatever changes required in /cm chroot

Run a new Kernel

Since the image cannot be rebooted the kernel will not change. To force the new kernel to un after isntalltion use cmsh:

[root@head1 ~]# cmsh
[head1]% softwareimage set <image_name> kernelversion <kernel>
# note wait for the ramdisk to finished being regenerated

Example in action:

# note: we had 2 provisioning systems also that needed to sync. 
[root@hyalite ~]# cmsh
[hyalite]% softwareimage 
[hyalite->softwareimage]% list
Name (key)                     Path                                      Kernel version             
------------------------------ ----------------------------------------- ---------------------------
default-image                  /cm/images/default-image                  2.6.32-431.29.2.el6.x86_64 
default-image-copy-01-09-16.1  /cm/images/default-image-copy-01-09-16.1  2.6.32-642.3.1.el6.x86_64  
default-image-copy-01-09-16.2  /cm/images/default-image-copy-01-09-16.2  2.6.32-431.29.2.el6.x86_64 
dtn-image                      /cm/images/dtn-image                      2.6.32-431.29.2.el6.x86_64 
dtn-image-copy-01-09-16.1      /cm/images/dtn-image-copy-01-09-16.1      2.6.32-431.29.2.el6.x86_64 
samba-image                    /cm/images/samba-image                    2.6.32-431.29.2.el6.x86_64 
[hyalite->softwareimage]% set dtn-image-copy-01-09-16.1 kernelversion 2.6.32-642.3.1.el6.x86_64 
[hyalite->softwareimage*]% list 
Name (key)                     Path                                      Kernel version             
------------------------------ ----------------------------------------- ---------------------------
default-image                  /cm/images/default-image                  2.6.32-431.29.2.el6.x86_64 
default-image-copy-01-09-16.1  /cm/images/default-image-copy-01-09-16.1  2.6.32-642.3.1.el6.x86_64  
default-image-copy-01-09-16.2  /cm/images/default-image-copy-01-09-16.2  2.6.32-431.29.2.el6.x86_64 
dtn-image                      /cm/images/dtn-image                      2.6.32-431.29.2.el6.x86_64 
dtn-image-copy-01-09-16.1      /cm/images/dtn-image-copy-01-09-16.1      2.6.32-642.3.1.el6.x86_64  
samba-image                    /cm/images/samba-image                    2.6.32-431.29.2.el6.x86_64 
[hyalite->softwareimage*]% commit
Successfully committed 1 SoftwareImages
[hyalite->softwareimage]% 
Mon Sep  5 07:52:26 2016 [notice] hyalite: Initial ramdisk for image dtn-image-copy-01-09-16.1 is being generated
[hyalite->softwareimage]% 
Mon Sep  5 07:53:00 2016 [notice] hyalite: Initial ramdisk for image dtn-image-copy-01-09-16.1 was generated successfully
[hyalite->softwareimage]% 
Mon Sep  5 07:53:31 2016 [notice] hyalite: Provisioning started: sending hyalite:/cm/images/dtn-image to hyalite2:/cm/images/dtn-image
[hyalite->softwareimage]% 
Mon Sep  5 07:53:51 2016 [notice] hyalite: Provisioning completed: sent hyalite:/cm/images/dtn-image to hyalite2:/cm/images/dtn-image
[hyalite->softwareimage]% 
Mon Sep  5 07:53:51 2016 [notice] hyalite: Provisioning started: sending hyalite:/cm/images/dtn-image-copy-01-09-16.1 to hyalite2:/cm/images/dtn-image-copy-01-09-16.1
[hyalite->softwareimage]% 
Mon Sep  5 07:54:06 2016 [notice] hyalite: Provisioning completed: sent hyalite:/cm/images/dtn-image-copy-01-09-16.1 to hyalite2:/cm/images/dtn-image-copy-01-09-16.1
[hyalite->softwareimage]% 
Mon Sep  5 07:54:07 2016 [notice] hyalite: Provisioning started: sending hyalite:/cm/images/dtn-image-copy-01-09-16.1/boot to hyalite2:/cm/images/dtn-image-copy-01-09-16.1/boot
[hyalite->softwareimage]% 
Mon Sep  5 07:54:08 2016 [notice] hyalite: Provisioning completed: sent hyalite:/cm/images/dtn-image-copy-01-09-16.1/boot to hyalite2:/cm/images/dtn-image-copy-01-09-16.1/boot
[hyalite->softwareimage]%

Create a new category

It may be that you need to clone a category and change the image used to keep other settings the same:

category clone <oldcategory > <newcategory >
#wait until the image has been cloned
category set <category > softwareimage <image>