Skip to content
Snippets Groups Projects
Commit fc058557 authored by Zoltan Mathe's avatar Zoltan Mathe
Browse files

remove the skeleton file and modify the script accordenly.

parent 6ddbd25f
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,16 @@
import os, re, sys
skel_commands = """
#
set host LHCB_MACHINE_NAME
show info
update LHCB_VERSION
exec lhcb-restart-agent-service
restart Framework SystemAdministrator
#
"""
if len( sys.argv ) != 2:
print 'usage: ' + sys.argv[0] + ' LHCbDirac_version'
sys.exit( 1 )
......@@ -25,21 +35,13 @@ D_list = ['lbvobox06.cern.ch', 'lbvobox104.cern.ch','lbvobox105.cern.ch','lbvobo
file_E = os.path.join( HOME_DIR, 'vobox_update_E' )
E_list = ['lbvobox43.cern.ch', 'lbvobox46.cern.ch', 'lbvobox47.cern.ch', 'volhcb04.cern.ch', 'volhcb05.cern.ch']
def generateTemplate(hosts, filename):
fdr = open( file_skel )
lines = fdr.readlines()
fdr.close()
def generateTemplate( hosts, filename ):
fdw = open( filename, 'w' )
for machine in hosts:
print machine
for line in lines:
if 'LHCB_MACHINE_NAME' in line:
newline = line.replace( 'LHCB_MACHINE_NAME', machine )
elif 'LHCB_VERSION' in line:
newline = line.replace( 'LHCB_VERSION', lhcbver )
else:
newline = line
fdw.write( newline )
command = skel_commands.replace( 'LHCB_MACHINE_NAME', machine )
command = command.replace( 'LHCB_VERSION', lhcbver )
fdw.write( command )
fdw.close()
......
......@@ -275,17 +275,15 @@ To install it on the VOBOXes from lxplus::
>update LHCbDIRAC-v8r3p32
>restart *
The (better) alternative is using the web portal or using the following script: LHCbDIRAC/LHCbDiracPolicy/scripts/create_vobox_update.
The (better) alternative is using the web portal or using the following script: https://gitlab.cern.ch/lhcb-dirac/LHCbDIRAC/blob/devel/dist-tools/create_vobox_update.py
CAUTION: THESE SCRIPTS DO NOT EXIST ANYMORE !! What replaced them ?
The recommended way is the following::
ssh lxplus
mkdir DiracInstall; cd DiracInstall
cp LHCbDIRAC/LHCbDiracPolicy/scripts/create_vobox_update .
cp LHCbDIRAC/LHCbDiracPolicy/scripts/skel_vobox_update .
python create_vobox_update v8r2p30
wget https://gitlab.cern.ch/lhcb-dirac/LHCbDIRAC/blob/devel/dist-tools/create_vobox_update.py
python create_vobox_update.py vArBpC
This command will create 6 files called "vobox_update_MyLetter" then you can run in 6 windows the recipe for one single machine like that::
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment