SeattleTestbed / custominstallerbuilder

Django app to customize SeattleTestbed installers with public keys
MIT License
0 stars 7 forks source link

Fix Django 1.6 support, XML-RPC handler, tar file dirs, doc link, etc. #14

Closed aaaaalbert closed 8 years ago

aaaaalbert commented 8 years ago

Fixes SeattleTestbed/custominstallerbuilder#5 (XML-RPC interface) and SeattleTestbed/custominstallerbuilder#9 (vesselinfo directory mishap).

See the commit messages for details.

lukpueh commented 8 years ago

I am on it. But I spent half a day trying to actually set up CIB and CH to test the patches, and was forced to deal with other issues:

https://github.com/SeattleTestbed/custominstallerbuilder/issues/15 https://github.com/SeattleTestbed/docs/pull/14 https://github.com/SeattleTestbed/custominstallerbuilder/issues/10#issuecomment-219859131

I think the process and the docs to setup CH and CIB could be dramatically simplified. But I don't no if this is a pressing concern.

lukpueh commented 8 years ago

This PR just grew dramatically because I merged albert's django16support branch into his master (this PR's merge candidate).

Nevertheless, we can still focus on the last couple of commits as initially addressed by this PR, because in production we already use albert's django16support branch at commit 8bfafc2 (see production server git ouputs below) which is 7 commits behind HEAD of django16support (we want to merge HEAD). Also in the CIB installation docs we instruct to checkout django16support.

I suggest that we update the docs and maybe also the production server's remote urls as soon as this has been reviewed and merged.

custominstallerbuilder@sensibilityclearinghouse:~/custominstallerbuilder$ git remote -v
origin  https://github.com/aaaaalbert/custominstallerbuilder.git (fetch)
origin  https://github.com/aaaaalbert/custominstallerbuilder.git (push)
custominstallerbuilder@sensibilityclearinghouse:~/custominstallerbuilder$ git branch
* django16support
custominstallerbuilder@sensibilityclearinghouse:~/custominstallerbuilder$ git log

commit 8bfafc2c04cce2eaf5ae853629ef5bd1d8330188
Author: aaaaalbert <aaaaalbert@users.noreply.github.com>
Date:   Mon Apr 13 16:03:17 2015 +0200

    Fix SeattleTestbed/custominstallerbuilder#9

    Remove the prefix `./` from `config_dir_rel`. This keeps `tar` from creating
lukpueh commented 8 years ago

Here is how I tested this PR:

  1. Installed CIB (c.f. CIB Installation)
  2. Configured ~/custominstallerbuilder/local/settings.py (c.f. Create and configure local settings)
  3. Created a keypair (cf. generatekeys.py)
  4. Did not adapt the build scripts. Instead cloned, initialized and built installer-packaging repo

    • Changed the variables in ~/installer-packaging/RUNNABLE/rebuild_base_installers.py like so:

      software_update_url = 'http://seattle.cs.washington.edu/couvb/updatesite/0.1/'
      public_key_file = '/root/cib.publickey'
      private_key_file = '/root/cib.privatekey'
      
      base_installer_directory = '/home/cib/custominstallerbuilder/html/static/installers/base/'
      base_installer_archive_dir = '/home/cib/custominstallerbuilder/html/static/installers/old_base_installers/'
      
      user = 'cib'

      _Note: The CIB docs suggest to use http://blackbox.poly.edu/updatesite/ as software_updateurl but it seemed to me that this url was outdated

  5. Created base_installer and base_installer_archive_dir directories
  6. Modified both ~/custominstallerbuilder/DEPENDENCIES/softwareupdater.py and ~/installer-packaging/RUNNABLE/seattle_repy/softwareupdater.py to match with the above generated publickey like explained in the docs (c.f. softwareupdater URL and Keys)
  7. Created base installers:

    $ python ~/installer-packaging/RUNNABLE/rebuild_base_installers.py <version as in nmmain.py>
  8. Configured apache

I don't think CIB and installer-packaging are supposed to be used like this. What if we would only clone installer-packaging repo when building CIB and use the installer-packaging for both, creating the base installers and also to create a repy_runtime for the cib django app.

aaaaalbert commented 8 years ago

@lukpueh, asking for clarification of your last comment. Are you saying that the whole PR is good, or are you referring to the last bit in views.py only?

lukpueh commented 8 years ago

Clarification: I just moved my inline-comments from the outdated diffs to the actual diffs that are going to be merged with this PR. All commits that this PR addressed initially are now tested and commented on.

How I tested this - Part 2:

  1. Locally set up CIB (Ubuntu 15.10., Python 2.7.10, Django 1.8.3, @aaaaalbert's cib/master)
  2. Locally set up CH (Ubuntu 15.10., Python 2.7.10, Django 1.8.3, @awwad's ch/fix_django)
  3. Surfed to the parts of CIB/CH that invoked the code from the relevant commits, before and after the change.
  4. Wrote comments on GitHub

Conclusion: As stated earlier, I only reviewed the most recent diffs, those that were originally addressed by this PR. All the earlier commits are already used in production and therefor belong to master anyways. Let's merge this PR!

Caveats:

aaaaalbert commented 8 years ago

OK, merging!