-
Notifications
You must be signed in to change notification settings - Fork 7
CustomInstallerBuilderTesting
This page outlines how to deploy the Custom Installer Builder using Django's built-in test server on a Linux machine of your choice. For production-level deployment on a real web server, reference these instructions instead. Step 0: Install the required software packages. This is discussed in the installation guide.
Step 1: Check out the Custom Installer Builder from the Github repository.
$ git clone https://github.com/SeattleTestbed/attic
Step 2: From within the "custominstallerbuilder" directory, copy the "local_template" folder to "local".
$ cd /attic/trunk/custominstallerbuilder
$ cp -R local_template local
Step 3: Edit "rebuild_base_Installers_for_seattlegeni.sh" file found in the "/trunk/dist" directory to match your local configuration.
The path/to/publickey and path/to/privatekey of:
PUBLIC_KEY_FILE=/path/to/publickey
PRIVATE_KEY_FILE=/path/to/privatekey
need to be changed to match the location and name of your private and public keys. You can retrieve your own public and private keys from https://seattleclearinghouse.poly.edu/html/profile.
Change the directory of SVN_TRUNK_DIR from:
SVN_TRUNK_DIR=/home/release/trunk
to the location of your "trunk" folder.
You can also change
BASE_INSTALLER_DIRECTORY=/var/www/dist
BASE_INSTALLER_ARCHIVE_DIR=/var/www/dist/old_base_installers
to where you would like the installers located (make sure that the path exists).
If you are running Seattle on a non-Seattle production machine you also need to change the geni of
user=geni
to the user you are currently logged in as.
Step 4: Build the base installers and place them in the "custominstallerbuilder/html/static/installer/base" directory.
Before you build, change the softwareupdatepublickey values located in "../trunk/softwareupdater/softwareupdater.py" to match yours. The 'e' corresponds to the first line and the 'n' corresponds to the second line of your publickey file.
You can find the version of your Seattle installation for VERSION_OF_RELEASE in your nmain.py located in "../trunk/nodemanager/".
$ cd ../dist/
$ ./rebuild_base_installers_for_seattlegeni.sh VERSION_OF_RELEASE
$ pushd /var/www/dist (location your BASE_INSTALLER_DIRECTORY is set to)
$ cp seattle_linux.tgz seattle_mac.tgz seattle_win.zip seattle_android.zip /user/trunk/dist
$ popd
$ cd /attic/trunk/dist
$ tar -xf seattle_linux.tgz
(change seattle_linux.tgz to match whichever operating system you are installing this for)
Step 5: Install Seattle with the base installers.(Optional)
$ cd seattle
$ ./install.sh
Step 6: Edit "local/settings.py" to match your local configuration. On blackbox.cs, it is sufficient to change the following lines:
SECRET_KEY = '***** This should be changed to a random string *****'
...
SERVE_STATIC = False
...
BASE_URL = 'http://domain.com/'
...
PROJECT_URL = BASE_URL + 'custominstallerbuilder/'
to the following:
SECRET_KEY = 'RANDOM_STRING'
...
SERVE_STATIC = True
...
BASE_URL = 'http://blackbox.poly.edu:PORT/'
...
PROJECT_URL = BASE_URL
If you are testing locally, you will use http://127.0.0.1:PORT/ instead. You may use your public facing IP if you want it to be accessible via the internet.
RANDOM_STRING should be a random string of your own choosing do not share it with others. PORT must be an open port number greater than 1024. For smaller port numbers, administrative privileges are required.
Step 7: Still within the "custominstallerbuilder" directory, run the django test server:
$ ./manage.py runserver 0.0.0.0:PORT
This command assumes that the Seattle standard library is in your Python path.
If it isn't, then run:
$ export PYTHONPATH=home/user/attic/trunk/dist/seattle/seattle_repy
You should now be able to access your Custom Installer Builder test server at the address specified for BASE_URL above.