Difference between revisions of "Upgrade to 1.x.x"
m (Tom-elliott.7271 moved page Upgrade to 1.0.0 to Upgrade to 1.x.x: Less confusion) |
m (Changed terminology to use capture instead of upload.) |
||
(136 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
= Overview = | = Overview = | ||
− | '''NOTE: 1. | + | '''NOTE: 1.x.x is a, nearly, complete rewrite from previous versions of FOG. There may be issues when upgrading from past revisions of FOG so please backup your installation before upgrading! |
− | Migration for | + | *Migration for v0.32 to version v1.x.x will cause you to loose the operation system information that was associated with your hosts. This information has been moved to the image item now, so you will need to update all your images to set the appropriate operating system! Please see the Migration Instructions section below for more information. |
− | All commands are assumed to be run as root. If you don't have access to root, prepend the installation with sudo (ex. | + | *Many successful upgrades from v0.32 have occurred. It is possible to upgrade from v0.1 all the way to v1.x.x. |
− | <pre>sudo svn co https://svn.code.sf.net/p/freeghost/code/ | + | |
+ | ---- | ||
+ | |||
+ | |||
+ | *All commands are assumed to be run as root. If you don't have access to root, prepend the installation with sudo (ex. | ||
+ | <pre>sudo svn co https://svn.code.sf.net/p/freeghost/code/tags/1.2.0 /opt/fog_1.2.0</pre> | ||
<pre>sudo ./installfog.sh</pre> | <pre>sudo ./installfog.sh</pre> | ||
− | = Download = | + | == Download == |
− | + | *Three Download Methods currently exist: | |
− | # | + | # To get the Source from [[SVN]] |
− | #* <pre>svn co https://svn.code.sf.net/p/freeghost/code/tags/1.0 | + | #* <pre>svn co https://svn.code.sf.net/p/freeghost/code/tags/1.2.0 /opt/fog_1.2.0</pre> |
− | # | + | # To get tarball file. |
#* <pre>wget http://sourceforge.net/projects/freeghost/files/latest/download</pre> | #* <pre>wget http://sourceforge.net/projects/freeghost/files/latest/download</pre> | ||
+ | # Click to get tarball file | ||
+ | #*http://sourceforge.net/projects/freeghost/files/FOG/fog_1.2.0/fog_1.2.0.tar.gz/download | ||
− | = Prepare for install = | + | = Check your network switches = |
+ | Please check your network switches so that they will handle '''[[IPXE]]''' correctly. | ||
+ | |||
+ | = Upgrade Methods = | ||
+ | |||
+ | *For <span style="background-color:Green;"><span style="color:White">'''Direct'''</span></span> upgrade from 0.32 to 1.x.x --> '''[[Upgrade_to_1.x.x#Direct_Upgrade | Direct Upgrade]]''' | ||
+ | |||
+ | *For <span style="background-color:Yellow;"><span style="color:Black">'''Migration'''</span></span> from Old Server 0.32 to a New Server 1.x.x --> '''[[Upgrade_to_1.x.x#Migration_Upgrade| Migration Upgrade]]''' (Requires 2 separate Servers) | ||
+ | ==Direct Upgrade== | ||
+ | * '''Requirements:''' | ||
+ | #Current server that has 0.32 | ||
+ | #The new download from the [[Upgrade_to_1.x.x#Download|Download]] section above | ||
+ | ==== Prepare for install ==== | ||
# Change to the downloaded source installation folder. | # Change to the downloaded source installation folder. | ||
− | #* <pre>cd /opt/fog_1.0 | + | #* <pre>cd /opt/fog_1.2.0/bin</pre> |
− | # | + | === Install === |
+ | # Confirm your settings in .fogsettings <span style="background-color:Yellow;"><span style="color:Black">'''UNLESS YOU HAVE TO MAKE CHANGES'''</span></span> | ||
+ | #* Example: If you added a password to mysql you will need to confirm the settings there. Also, if you changed the default user. | ||
+ | # Begin installing. | ||
#* <pre>./installfog.sh</pre> | #* <pre>./installfog.sh</pre> | ||
− | |||
− | = | + | === Post Install === |
+ | |||
+ | # Go to the link you normally go to and you should notice the upgrade/install database screen. (http://<ip-address-of-FOG-Server/fog/management>/) | ||
+ | #* Click the '''Submit''' button and it should move on to say, Click here to login, once complete. | ||
+ | # '''Finish''' the install in the '''terminal window'''. | ||
+ | |||
+ | *Continue to [[Upgrade_to_1.x.x#Operating_System_Information | Operating_System_Information ]] | ||
− | # | + | ==Migration Upgrade== |
− | #* | + | * '''Requirements:''' |
− | #* | + | # Old Server with 0.32 installed |
− | #* | + | # New Server with your choice flavor of Linux |
− | + | *If using a VM please create a second VM to serve as the ''second'' server | |
− | + | === Prepare for install === | |
− | #* | + | * On the Old Server |
+ | # Backup old database | ||
+ | #* <pre>mysqldump --opt -u'root' [-p'passwordhere' #only if password set] fog > fog_backup.sql</pre> | ||
+ | #* '''NOTE:''' ''There is no space between -u and root also -p and password, also the name and password are wrapped with quotes. In the case a single quote is used in your password, replace the current single quotes with double quotes. If there is both a double and single quote (for whatever reason) in the password, you will need to escape the appropriate quote [ the one matching the quotes wrapping the entire field ] with a backslash (e.g. \ )'' | ||
+ | #* <span style="background-color:RED;"><span style="color:White">DO NOT tar ball or gz</span></span> | ||
+ | # Save file to an easily up-loadable location | ||
+ | *Keep this server on and operational we will be getting back to this. | ||
+ | === Install === | ||
+ | * On the New Server | ||
+ | *Click below for step-by-step guides written for your favorite flavor of Linux: | ||
+ | |||
+ | {{Installation}} | ||
+ | |||
+ | # Change to the downloaded source installation folder. | ||
+ | #* <pre>cd /opt/fog_1.2.0/bin</pre> | ||
+ | |||
+ | === Post Install === | ||
+ | # Go to the link you normally go to and you should notice the upgrade/install database screen. (http://<ip-address-of-FOG-Server/fog/management>/) | ||
+ | #* Click the '''Submit''' button and it should move on to say, Click here to login, once complete. | ||
+ | # '''Finish''' the install in the '''terminal window'''. | ||
+ | # '''Sign in''' into the FOG GUI with your normal user and password. | ||
+ | # Record <span style="background-color:Green;"><span style="color:White">ALL</span></span> information on [[File:Config.png]]'''Fog Confiuration''' --> '''Fog Settings''' and [[File:Storage.png]]'''Storage management''' pages | ||
+ | # Import old database backup '''fog_backup.sql''' on [[File:Config.png]] '''Fog Configuration''' --> '''Configuration Save''' | ||
+ | #* <span style="background-color:RED; color:white;">Warning! Doing this will wipe out all other hosts/images/groups on your current server. This is assumed to be a fresh install of Fog v1.x.x server.</span> | ||
+ | # '''Click''' [[File:Home.png]] HOME. | ||
+ | #* The upgrade/install database screen will reappear. | ||
+ | # Click the '''Submit''' button and it should move on to say, Click here to login, once complete. | ||
+ | # Edit any settings in the [[File:Config.png]] '''Fog Configuration''' --> '''Fog Settings''' page that may have changed from the server move (ip, paths, etc) that you recorded from the [[File:Config.png]] '''Fog Configuration''' --> '''Fog Settings''' page and [[File:Storage.png]]'''Storage Management''' pages | ||
+ | # '''Finish''' the install in the '''terminal window'''. | ||
+ | |||
+ | ===Migrate Old Images === | ||
+ | |||
+ | See also: [[Migrate images manually]] | ||
+ | |||
+ | *Now that you have a operational v1.x.x server you will notice that you have not transferred your images yet. They may be listed in the Web GUI but the sizes read zero. On the old server you will mount /images directory(of new server) to a new directory /images2 and copy all contents. | ||
+ | *Login to old server and run: | ||
+ | <pre> | ||
+ | cd / | ||
+ | sudo mkdir images2 | ||
+ | sudo chmod 777 images2 | ||
+ | sudo mount <ip_of_new_server>:/images /images2 | ||
+ | sudo cp /images /images2 | ||
+ | sudo umount /images2 | ||
+ | </pre> | ||
+ | *Once this is complete match the file sizes in the ternmal windows to confirm that both of them are exactly the same | ||
+ | **<pre>ls -l</pre> | ||
+ | *Please then refer to '''[[Upgrade_to_1.x.x#Old_Images | Old Images]]''' for Web GUI and partImage changes. | ||
+ | *Dispose of '''Old Server''' properly | ||
+ | |||
+ | = Operating System Information = | ||
+ | * As the hostOS column has been moved to the images table rather than the hosts table, you need to specify the Operating system of the images currently on your system. | ||
+ | * To do so, login to the FOG GUI and navigate to the [[File:Images.png]]Image Management Page. Click on each of your images and set the OSID accordingly. | ||
= Change your DHCP Option 67 = | = Change your DHCP Option 67 = | ||
− | # Go to your DHCP server and change your Option 67 from pxelinux.0 to undionly.kpxe (or other iPXE file) | + | # Go to your DHCP server and change your Option 67 from ''pxelinux.0'' to '''undionly.kpxe''' (or other iPXE file) |
+ | #* '''Default undionly.kpxe''' (Other boot files include ipxe.kkpxe, ipxe.pxe, default.ipxe, ipxe.kpxe, undionly.pxe, pxelinux.0.old, undionly.kkpxe and even custom ones if you wish to create them) | ||
+ | |||
+ | == Old Images == | ||
+ | * Fog 1.x.x uses PartClone instead of PartImage. Meaning that your old Images will not deploy correctly, unless you do the following steps. | ||
+ | * If you do a straight upgrade, existing Image definitions should automatically be set to partimage type but please verify these settings | ||
+ | #Confirm that '''FOG_FORMAT_FLAG_IN_GUI''' is enable in your Fog settings | ||
+ | #* [[File:Config.png]] '''Fog Configurations''' --> '''Fog Settings''' --> '''General Settings --> FOG_FORMAT_FLAG_IN_GUI | ||
+ | #Go to your image and Change the '''Image Type''' to '''partImage''' | ||
+ | #* [[File:Images.png]] '''Image Management''' --> '''[Select the ''OLD'' Image]''' --> '''Image Type:''' | ||
+ | * '''Best practices:''' You should download these to your hardware and re-capture <u>'''''BEFORE'''''</u> deploying on to multiple machines. If '''Image Type''' is set to '''partImage''' on next capture it will automatically change '''Image Type''' to '''partClone'''. NO need to go back and change that setting. Once all your images are re-captured you can then go and disable '''FOG_FORMAT_FLAG_IN_GUI''' in '''Fog Settings''' | ||
= Congratulations = | = Congratulations = | ||
− | You should now have an UPGRADED FOG server that will be able to perform all the tasks we've all come to know and love. | + | *You should now have an UPGRADED FOG server that will be able to perform all the tasks we've all come to know and love. |
Latest revision as of 04:26, 8 July 2016
Contents
Overview
NOTE: 1.x.x is a, nearly, complete rewrite from previous versions of FOG. There may be issues when upgrading from past revisions of FOG so please backup your installation before upgrading!
- Migration for v0.32 to version v1.x.x will cause you to loose the operation system information that was associated with your hosts. This information has been moved to the image item now, so you will need to update all your images to set the appropriate operating system! Please see the Migration Instructions section below for more information.
- Many successful upgrades from v0.32 have occurred. It is possible to upgrade from v0.1 all the way to v1.x.x.
- All commands are assumed to be run as root. If you don't have access to root, prepend the installation with sudo (ex.
sudo svn co https://svn.code.sf.net/p/freeghost/code/tags/1.2.0 /opt/fog_1.2.0
sudo ./installfog.sh
Download
- Three Download Methods currently exist:
- To get the Source from SVN
-
svn co https://svn.code.sf.net/p/freeghost/code/tags/1.2.0 /opt/fog_1.2.0
-
- To get tarball file.
-
wget http://sourceforge.net/projects/freeghost/files/latest/download
-
- Click to get tarball file
Check your network switches
Please check your network switches so that they will handle IPXE correctly.
Upgrade Methods
- For Direct upgrade from 0.32 to 1.x.x --> Direct Upgrade
- For Migration from Old Server 0.32 to a New Server 1.x.x --> Migration Upgrade (Requires 2 separate Servers)
Direct Upgrade
- Requirements:
- Current server that has 0.32
- The new download from the Download section above
Prepare for install
- Change to the downloaded source installation folder.
-
cd /opt/fog_1.2.0/bin
-
Install
- Confirm your settings in .fogsettings UNLESS YOU HAVE TO MAKE CHANGES
- Example: If you added a password to mysql you will need to confirm the settings there. Also, if you changed the default user.
- Begin installing.
-
./installfog.sh
-
Post Install
- Go to the link you normally go to and you should notice the upgrade/install database screen. (http://<ip-address-of-FOG-Server/fog/management>/)
- Click the Submit button and it should move on to say, Click here to login, once complete.
- Finish the install in the terminal window.
- Continue to Operating_System_Information
Migration Upgrade
- Requirements:
- Old Server with 0.32 installed
- New Server with your choice flavor of Linux
- If using a VM please create a second VM to serve as the second server
Prepare for install
- On the Old Server
- Backup old database
-
mysqldump --opt -u'root' [-p'passwordhere' #only if password set] fog > fog_backup.sql
- NOTE: There is no space between -u and root also -p and password, also the name and password are wrapped with quotes. In the case a single quote is used in your password, replace the current single quotes with double quotes. If there is both a double and single quote (for whatever reason) in the password, you will need to escape the appropriate quote [ the one matching the quotes wrapping the entire field ] with a backslash (e.g. \ )
- DO NOT tar ball or gz
-
- Save file to an easily up-loadable location
- Keep this server on and operational we will be getting back to this.
Install
- On the New Server
- Click below for step-by-step guides written for your favorite flavor of Linux:
- Change to the downloaded source installation folder.
-
cd /opt/fog_1.2.0/bin
-
Post Install
- Go to the link you normally go to and you should notice the upgrade/install database screen. (http://<ip-address-of-FOG-Server/fog/management>/)
- Click the Submit button and it should move on to say, Click here to login, once complete.
- Finish the install in the terminal window.
- Sign in into the FOG GUI with your normal user and password.
- Record ALL information on
Fog Confiuration --> Fog Settings and
Storage management pages
- Import old database backup fog_backup.sql on
Fog Configuration --> Configuration Save
- Warning! Doing this will wipe out all other hosts/images/groups on your current server. This is assumed to be a fresh install of Fog v1.x.x server.
- Click
HOME.
- The upgrade/install database screen will reappear.
- Click the Submit button and it should move on to say, Click here to login, once complete.
- Edit any settings in the
Fog Configuration --> Fog Settings page that may have changed from the server move (ip, paths, etc) that you recorded from the
Fog Configuration --> Fog Settings page and
Storage Management pages
- Finish the install in the terminal window.
Migrate Old Images
See also: Migrate images manually
- Now that you have a operational v1.x.x server you will notice that you have not transferred your images yet. They may be listed in the Web GUI but the sizes read zero. On the old server you will mount /images directory(of new server) to a new directory /images2 and copy all contents.
- Login to old server and run:
cd / sudo mkdir images2 sudo chmod 777 images2 sudo mount <ip_of_new_server>:/images /images2 sudo cp /images /images2 sudo umount /images2
- Once this is complete match the file sizes in the ternmal windows to confirm that both of them are exactly the same
ls -l
- Please then refer to Old Images for Web GUI and partImage changes.
- Dispose of Old Server properly
Operating System Information
- As the hostOS column has been moved to the images table rather than the hosts table, you need to specify the Operating system of the images currently on your system.
- To do so, login to the FOG GUI and navigate to the
Image Management Page. Click on each of your images and set the OSID accordingly.
Change your DHCP Option 67
- Go to your DHCP server and change your Option 67 from pxelinux.0 to undionly.kpxe (or other iPXE file)
- Default undionly.kpxe (Other boot files include ipxe.kkpxe, ipxe.pxe, default.ipxe, ipxe.kpxe, undionly.pxe, pxelinux.0.old, undionly.kkpxe and even custom ones if you wish to create them)
Old Images
- Fog 1.x.x uses PartClone instead of PartImage. Meaning that your old Images will not deploy correctly, unless you do the following steps.
- If you do a straight upgrade, existing Image definitions should automatically be set to partimage type but please verify these settings
- Confirm that FOG_FORMAT_FLAG_IN_GUI is enable in your Fog settings
- Go to your image and Change the Image Type to partImage
- Best practices: You should download these to your hardware and re-capture BEFORE deploying on to multiple machines. If Image Type is set to partImage on next capture it will automatically change Image Type to partClone. NO need to go back and change that setting. Once all your images are re-captured you can then go and disable FOG_FORMAT_FLAG_IN_GUI in Fog Settings
Congratulations
- You should now have an UPGRADED FOG server that will be able to perform all the tasks we've all come to know and love.