-
Notifications
You must be signed in to change notification settings - Fork 15
Release Windows
This page describes:
- Running omni as a Python program on Windows
- Converting omni into a native Windows executable
- Creating an installer for omni.exe
- to do list and future work
- attachments (completed installer and scripts)
To recreate the process, everything under used by omni 2.4.2 should work. There was an attempt to update package versions in omni 2.5, and where they differ is noted in the instructions.
Go here Cranking Out the Windows Omni Release if you have have the Windows 7 VM that is already set up using the steps below.
These instructions are for running omni as a Python program on Windows 7
Install required programs and libraries
Most of these libraries/programs have several versions available. Make sure you download and install the one that matches your OS and Python version
Most dependencies mentioned here are cached: http://www.gpolab.bbn.com/internal/projects/gcf/dependencies/
A. Python 2.7 Python
- omni 2.4.2 used http://python.org/ftp/python/2.7.5/python-2.7.5.msi
- omni 2.5.2 used http://python.org/ftp/python/2.7.6/python-2.7.6.msi
- Also install Pip and Easy_Install: Instructions from: http://docs.python-guide.org/en/latest/starting/install/win/ Run: python ez_setup.py and python get-pip.py
B. M2Crypto M2Crypto
- you need to specifically download M2Crypto-0.20.2.win32-py2.7
- For omni 2.5.2, there was an attempt to build M2Crypto from src but it was unreliable. So since we could not move the version forward, we stay with the M2Crypto 0.20.2 version for Windows. This page http://www.gooli.org/blog/building-m2crypto-on-windows did work once, but the result could not be reproduced. And if you try to rebuild, this Microsoft package is also necessary - http://go.microsoft.com/?linkid=7729279, for Microsoft VSC++
C. pyOpenSSL pyOpenSSL
- omni 2.4.2 used https://launchpad.net/pyopenssl/main/0.11/+download/pyOpenSSL-0.11.winxp32-py2.7.msi
- omni 2.5.2 used pip to install pyOpenSSL v0.14 (pip install pyOpenSSL==0.14)
D. swigwin (swig for Windows) swig
- omni 2.4.2 extracts into `C:\Program Files\swig" the following http://sourceforge.net/projects/swig/files/swigwin/swigwin-2.0.11/swigwin-2.0.11.zip/download?use_mirror=hivelocity
- omni 2.5.2 extracts into `C:\Program Files\swig" the following http://sourceforge.net/projects/swig/files/swigwin/swigwin-2.0.12/swigwin-2.0.12.zip/download?use_mirror=hivelocity
- winzip or 7-zip http://www.7-zip.org/download.htmlis needed to unzip the swig zip file and the package needs to be moved to C:\Program Files\swig" if you cannot successfully unzip there.
E. OpenSSL http://slproweb.com/products/Win32OpenSSL.html
- omni 2.4.2 used BOTH: http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF and http://slproweb.com/download/Win32OpenSSL-1_0_1e.exe
- omni 2.5.2 used BOTH: http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF and http://slproweb.com/download/Win32OpenSSL-1_0_1g.exe
F. dateutil python dateutil
- after extracting the file into
C:\Python27\Lib\site-packages
, copy thedateutil
folder and paste it into the\Lib\site-packages\
folder in your Python folder (usuallyC:\Python27\
)
G. mkdir C:\tmp
- on Windows XP there was an
IOError: [Errno 2] No such file or directory: 'C:\\tmp\\sfa.log'
when trying to runomni.py
(no arguments). The solution was to createC:\tmp
H. Download git http://git-scm.com/download/win
- Choose: Run from the command prompt
I. Create a .gcf in your local directory. You need to at least configure your user.name and user.email when pulling from git.
J. Clone the geni-tools repository. Make sure you know which branch you should be building.
-
After the initial checkout, it may be necessary to checkout the correct branch i.e. git checkout rel-2.5. Note: I had a lot of trouble with using git from the command line. I ended up resorting to the GUI to get my initial clone checkout to work. And then I could use git from the command line.
git clone https://github.com/GENI-NSF/geni-tools.git
- Set PYTHONPATH to
C:\gcf\src;C:\gcf\examples
C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\gcf\src;C:\gcf\src\omnilib\frameworks\;C:\gcf\src\sfa
- Add to PATH:
;C:\Python27;C:\gcf\src;C:\gcf\examples
Use Omni Quick Start instructions
-
Download the omni bundle and leave it in the Downloads folder
-
In the Windows CMD shell, run:
omni-configure.py
i. If there are warnings about your key permissions ignore them and enter your passphrase for your cert when prompted. This generates geni_cert_portal.PEM
in the .ssl
folder and geni_key_portal
and geni_key_portal.pub
in .ssh
. It should also generate omni-config
in .gcf
.
Run omni, from the src
folder in the gcf install, run
omni.py -h
The arguments are the same as omni on Unix, e.g.
omni.py createslice myslice
Try running at least
omni.py getusercred
omni.py -a gpo-ig getversion
This ensures that omni can talk to the clearinghouse and at least 1 aggregate manager.
Even better, do a real run of stitcher and then readyToLogin.
These instructions are for generating omni.exe using py2exe
This should create a Windows executable that does not require Python to run. However, for the py2exe compilation to work, omni must first be running as a Python program. Once py2exe is run successfully, the dist
folder should contain everything needed to run the executable.
Also note: py2exe needs all imports explicit and not on the fly. This should be already changed in the main version of omni.py and you shouldn't have to deal with it. In particular, the following includes need to be explicit (a .* does not work)
import gcf.omnilib.frameworks.framework_apg
import gcf.omnilib.frameworks.framework_base
import gcf.omnilib.frameworks.framework_gcf
import gcf.omnilib.frameworks.framework_gch
import gcf.omnilib.frameworks.framework_gib
import gcf.omnilib.frameworks.framework_of
import gcf.omnilib.frameworks.framework_pg
import gcf.omnilib.frameworks.framework_pgch
import gcf.omnilib.frameworks.framework_sfa
-
install py2exe py2exe i. omni 2.4.2 used: http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.7.exe/download
-
In the Windows CMD shell, go to your gcf installation's
src
folder. From that folder runcd gcf/src python ..\windows_install\setup.py py2exe
-
This should create two folders in
src
,dist
which is the files to be distributed and that are necessary to run your.exe
andbuild
. Test that the executables were created:cd dist omni.exe -h # should work omni-configure.exe -h # should work readyToLogin.exe -h # should work clear-passphrases.exe -h # should work stitcher.exe -h addMemberToSliceAndSlivers.exe -h
-
More fully test, particularly if new files have been added to the installer (like config files). For example, use stitcher to reserve a stitched toplogy, then readyToLogin to confirm the resources are ready.
These instructions are for creating a Windows installer for omni.exe - leveraging the work done from below.
Since there is already a package_builder.iss file, the only thing really necessary to do is to run the Inno Setup Tool using the package_builder.iss.
The only thing necessary is to install the Inno Setup Tool. A file in gcf/windows_install
called, package_builder.iss, is all that is necessary to open in the Inno Tool and then run. This will create on omniTools-rel#-win-rc#-setup.exe, ex omniTools-2.5.3-win-rc4-setup.exe. Updating the field, OutputBaseFilename, in the file is usually all that is necessary unless new files need to be added to the omniTools package.
The other big difference is that Windows 7 has a new notion of running things as sudo, [administrator]. To get the instructions below to work - the ISTool needs to be run as administrator. Running as a regular user does not allow the ISTool to get associated with .iss files. And installation of things is done in the /Users/local_user space instead of in generic system directories. So, the omniTools package will be found in /Users/local_user/gcf/executables as specified by the package_builder.iss file. And setting up the ISTool was not verified when omni 2.5 was built.
These instructions are for creating a Windows installer for omni.exe
I created an installer using Inno Setup, ISTool, and a Windows VB Script that installs Omni and then downloads and installs OpenSSH and OpenSSL for Windows. This uses hardcoded direct links to download OpenSSH and OpenSSL from their respective host sites and may break if those pages are ever taken down.
-
Download and install Inno Setup and ISTool
-
- omni 2.4.2 used http://www.jrsoftware.org/download.php/is.exe?site=1
Inno Setup is the program to create a Windows installer, ISTool is a GUI to generate Inno Setup scripts.
-
-
Open ISTool to create the Inno Setup script
In Windows 7 and above, ISTool needs to be explicitly run as Administrator. When choosing the app, you have to right-click to ask the program to be run as administrator.
Emily adapted this ISTool tutorial to create the Inno Setup script, which is in git under gcf/windows_install/package_builder.iss
. Opening this file in ISTool will allow you to see all the options that were used to make the file.
To sum up the steps to create the script (Note that the latest version of the script is in gcf/windows_install/package_builder.iss
):
-
In ISTools under Preferences select the button "Associated IS Tool with Inno Setup scripts"
-
Save the blank project as a new Inno Setup Script
-
Under Project -> Setup Options
-
Under the Compiler tab, edit the Output Directory to be where the final setup executable will be saved, and the Output Based Filename to be the name of the setup executable
- Output directory:
C:\Program Files\gcf\executables
- Output base filename:
omni-tools-X.X.X-setup
(where X.X.X is the version number egomni-2.4.2-setup
)
- Output directory:
-
The name, version and privileges required are set in the Application tab. Also under this tab, BBN may want to add files to the Info Before, Info After, or License area so they are displayed during setup.
- Application name:
Omni
- Application version:
Omni Tools vX.X.X
(this should include the "Application Name followed by the version number (e.g. omni v2.4.2)) - Application copyright:
2010-2013
(where the final year is the present year) - Info after file:
InfoAfterFile.rtf
(found in thegcf/windows_install
directory) - License file:
license.rtf
(found in thegcf/windows_install
directory)
- Application name:
-
App Directory tab is where you set the directory the program will be installed into.
- Create application directory:
{pf}\omniTools
(where{pf}
will generate the Program Files directory)
- Create application directory:
-
Under Program Group put Omni Tools as the group name.
- Default group name:
Omni Tools
- Default group name:
-
Pages has options for what steps appear during the installation
-
-
Go to the
Files and Dirs
section in the main ISTool window. Select everything in thedist
folder and drag and drop it into this area -
Drag and drop the following files to this page as well:
install.vbs
swdev.ico
-
Configure Icons (add an icon by right clicking and selecting
New item...
)-
Documentation
- Name:
{group}\Documentation
- Filename:
https://github.com/GENI-NSF/geni-tools
- Comment:
omni wiki
- Name:
-
Configuration
- Name:
{group}\How To Configure Omni
- Filename:
https://github.com/GENI-NSF/geni-tools/wiki/Omni-Configuration-Automatically
- Comment:
Instructions for configuring omni
- Name:
-
Uninstall
- Project menu -> "Create Uninstall Icon"
-
-
Go to the Install Run section
- click the New Item icon that looks like a little file with a pen
- From the Filename dropdown find
install.vbs
- Select "Shell execute". This is necessary because the script is not an .exe or .com file
-
hit
ctl+F9
to generate omnisetup.exe
After running omnisetup.exe to install omni, the user should be able to navigate to that folder in the Windows CMD Shell and run omni.exe
as they would the python version. By default it is installed in Program Files (x86)\omniTools
.
GENI is sponsored by the National Science Foundation.