@@ -128,7 +133,7 @@ class InstallationWizardControl(ComponentControl):
@staticmethod
def_true_false(ask,default_val=''):
deftrue_false(ask,default_val=''):
ifdefault_val:
ask='\n'+ask+' (ENTER for default value: '+default_val+')'
else:
...
...
@@ -228,29 +233,64 @@ class InstallationWizardControl(ComponentControl):
defget_user_input(self):
use_all_defaults=self.true_false('Use all defaults? [y/n]: ')
#use_all_defaults = self.true_false('Use all defaults? (If yes, you might as well just use the zero-conf shipped with ARC which is placed at /tmp/arc.conf) [y/n]: ')
use_all_defaults=False
ifnotuse_all_defaults:
non_default=self.text_answ('Full path to arc.conf',self.confdict['conf_path'])
ifnon_default:
self.confdict['conf_path']=non_default
""" Authorization groups """
print('The recommended way of authorizing groups of users is by using authorization groups. \nA group can be identified either by voms, by a userlist produced by the nordugridmap utility or by pointing to a grid-mapfile.')
if(self.true_false('Use voms identification [y/n]')):
vomses=self.text_answ('Enter a comma-separated list of vomses like: atlas * * * *, atlas * lcgadmin *')
vomses=(vomses).split(',')
print'vomses: ',vomses
forvoinvomses:
vo=vo.strip()
print'vo: ',vo
txt='Which (custom-named) authgroup does the vo: '+vo+' belong to'
@@ -332,14 +369,14 @@ class InstallationWizardControl(ComponentControl):
try:
withopen(conf_path,'w')asf:
f.write(rendered)
print(rendered)
#print(rendered)
exceptIOErrorase:
ife.errno==errno.EACCES:
logger.debug('***** You do not have permission to write to %s Instead writing it to /tmp/arc.conf - please copy it manually to %s *****',conf_path,conf_path)
print'='*90
print'====>>> IMPORTANT MESSAGE'
print'====>>> You do not have permission to write to '+conf_path+'. File is temporarily stored in /tmp/arc.conf - please copy file manually to '+conf_path
print'='*90
print_str='====>>> IMPORTANT MESSAGE'
print_str+='====>>> You do not have permission to write to '+conf_path+'. File is temporarily stored in /tmp/arc.conf - please copy file manually to '+conf_path
self.print_notice(print_str)
withopen('/tmp/arc.conf','w')asf:
f.write(rendered)
exceptExceptionase:
...
...
@@ -384,7 +421,7 @@ class InstallationWizardControl(ComponentControl):
@staticmethod
defget_config(args):
defget_config(args=None):
printconfig
__runconfig='/tmp/.arcctl.arc.run.conf'
try:
...
...
@@ -410,16 +447,17 @@ class InstallationWizardControl(ComponentControl):
defcontrol(self,args):
""" Ask user for custom values for arc.conf """
ifargs.action=='dump':
""" save the configuration options in json format, and dump to screen"""
self.print_notice('====>> To create a test host certificate please run \narcctl test-ca init\nto create a self-signed TestCA, followed by \narcctl test-ca hostcert\nand optionally \narcctl test-ca usercert\n if you need both a test host certificate and test user certificate')
installwiz_conf.add_argument('--force',action='store_true',default=False,help='If the TestCA or host key and/or cert already exists, the generation of the CA and/or host certificate will fail. Select --force if you want to delete the old files and create new ones.')