Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Configure CA path in web/ during nimbus-configure
Browse files Browse the repository at this point in the history
  • Loading branch information
labisso committed Feb 25, 2010
1 parent 2ee52af commit 00f68d1
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions home/sbin/setup.py
Expand Up @@ -21,7 +21,7 @@
# relative to base directory # relative to base directory
hostcert: var/hostcert.pem hostcert: var/hostcert.pem
hostkey: var/hostkey.pem hostkey: var/hostkey.pem
CA.dir: var/ca ca.dir: var/ca
gridmap: services/etc/nimbus/nimbus-grid-mapfile gridmap: services/etc/nimbus/nimbus-grid-mapfile
Expand Down Expand Up @@ -225,7 +225,7 @@ def gtdir_path(self):
return self.resolve_path('services/') return self.resolve_path('services/')


def cadir_path(self): def cadir_path(self):
path = self.get_config('CA.dir') path = self.get_config('ca.dir')
return self.resolve_path(path or 'var/ca/') return self.resolve_path(path or 'var/ca/')


def hostcert_path(self): def hostcert_path(self):
Expand Down Expand Up @@ -291,17 +291,14 @@ def perform_setup(self):
if not webconf.read(webconfpath): if not webconf.read(webconfpath):
raise IncompatibleEnvironment( raise IncompatibleEnvironment(
"nimbus web config does not exist: %s" % webconfpath) "nimbus web config does not exist: %s" % webconfpath)
webconf.set('nimbusweb', 'ssl.cert', hostcert) relpath = pathutil.relpath
webconf.set('nimbusweb', 'ssl.key', hostkey) webconf.set('nimbusweb', 'ssl.cert', relpath(hostcert, webdir))
webconf.set('nimbusweb', 'ssl.key', relpath(hostkey, webdir))
webconf.set('nimbusweb', 'ca.dir', relpath(cadir, webdir))


with open(webconfpath, 'wb') as webconffile: with open(webconfpath, 'wb') as webconffile:
webconf.write(webconffile) webconf.write(webconffile)


if not os.path.exists(gridmap):
example_gridmap = self.resolve_path('var/gridmap.example')
import shutil
shutil.copyfile(example_gridmap, gridmap)

# then setup GT container # then setup GT container
gtcontainer.adjust_hostname(hostname, webdir, gtdir, log) gtcontainer.adjust_hostname(hostname, webdir, gtdir, log)
gtcontainer.adjust_secdesc_path(webdir, gtdir, log) gtcontainer.adjust_secdesc_path(webdir, gtdir, log)
Expand Down

0 comments on commit 00f68d1

Please sign in to comment.