Difference between revisions of "Creating a new base environment"

From Supercomputación y Cálculo Científico UIS
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
__NOTOC__
  
Back to [[Kadeploy]]
+
<div class="thumbnail img-thumbnail">http://wiki.sc3.uis.edu.co/images/a/a8/Logo_sc33.png</div>
 +
<p><div class="btn btn-primary"><i class="fa  fa-long-arrow-left"></i> [[Kadeploy]]</div></p>
  
 +
<div class="col-md-14">
 +
    <div class="panel panel-darker-white-border">
 +
        <div class="panel-heading">
 +
            <h3 class="panel-title">Procedure for creating a new base image for kadeploy </h3>
 +
        </div>
 +
        <div class="panel-body">
 +
            <p>
 +
               
 +
1. Boot the machine with a live cd.  If you are in a remote machine you'll probably new ILO access or something similar.
  
'''Procedure for creating a new base image for kadeploy
 
  
1. Boot the machine with a live cdIf you are in a remote machine you'll probably new ILO access or something similar.
+
2. Install the new system selecting the existing swap and /dev/sda4 partitionsYou can start from scratch deleting all partitions and recreating them but it's higly discouraged.
 +
{{Note|<nowiki>In an standard kadeploy setup /dev/sda4 is the deployment partition and /dev/sda2 is the base system partition</nowiki>}}
 +
3. Create the update-host-name script in the adequate directory, for a debian based system is in  /etc/dhcp/dhclient-exit-hooks.d/
 +
{{File|/etc/dhcp/dhclient-exit-hooks.d/update-host-name.sh|<pre><nowiki>
 +
#!/bin/sh
 +
# update-host-name, update hostname with host-name and domain-name
 +
#####################################################################
 +
# Last modification: 2006-04-11
 +
# Maintainer: Xavier Delaruelle <xavier.delaruelle@loria.fr>
 +
#
  
2. Install the new system selecting the existing swap and /dev/sda4 partitions.  You can start from scratch deleting all partitions and recreating them but it's higly discouraged.
+
if [ -n "$new_host_name" ]; then
{{Note|<nowiki>In an standard kadeploy setup /dev/sda4 is the deployment partition and /dev/sd2 is the base system partition</nowiki>}}
+
  if [ -n "$new_domain_name" ]; then
3. Create the update-host-name script in the adequate directory, for a debian based system is in gato, for a redhat based is perro
+
    hostname="${new_host_name}.${new_domain_name}"
 +
  else
 +
    hostname="${new_host_name}"
 +
  fi
  
 +
  echo "$hostname" > /etc/hostname 2>/dev/null
 +
  hostname "$hostname"
 +
fi
 +
</nowiki></pre>}}
 
4. Make sure that an SSH server is running.
 
4. Make sure that an SSH server is running.
  
 
5. Follow the procedure detailed in [[Deploy Procedure in Kadeploy 3 and OAR]] for saving an image file.
 
5. Follow the procedure detailed in [[Deploy Procedure in Kadeploy 3 and OAR]] for saving an image file.
 +
 +
            </p>
 +
        </div>
 +
    </div>
 +
</div>

Latest revision as of 21:01, 9 April 2015


Logo_sc33.png

Procedure for creating a new base image for kadeploy

1. Boot the machine with a live cd. If you are in a remote machine you'll probably new ILO access or something similar. 2. Install the new system selecting the existing swap and /dev/sda4 partitions. You can start from scratch deleting all partitions and recreating them but it's higly discouraged.

NOTE: In an standard kadeploy setup /dev/sda4 is the deployment partition and /dev/sda2 is the base system partition

3. Create the update-host-name script in the adequate directory, for a debian based system is in /etc/dhcp/dhclient-exit-hooks.d/

File: /etc/dhcp/dhclient-exit-hooks.d/update-host-name.sh
#!/bin/sh
# update-host-name, update hostname with host-name and domain-name
#####################################################################
# Last modification: 2006-04-11
# Maintainer: Xavier Delaruelle <xavier.delaruelle@loria.fr>
#

if [ -n "$new_host_name" ]; then
  if [ -n "$new_domain_name" ]; then
    hostname="${new_host_name}.${new_domain_name}"
  else
    hostname="${new_host_name}"
  fi

  echo "$hostname" > /etc/hostname 2>/dev/null
  hostname "$hostname"
fi

4. Make sure that an SSH server is running.

5. Follow the procedure detailed in Deploy Procedure in Kadeploy 3 and OAR for saving an image file.