cleaning up config files
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 2 Jul 2009 08:01:21 +0000 (08:01 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 2 Jul 2009 08:01:21 +0000 (08:01 +0000)
12 files changed:
INSTALL.txt
cmdline/configSfi.sh [deleted file]
cmdline/demoAggregate.sh
cmdline/sfi.py
cmdline/testSfi.sh
cmdline/testSfiDelegate.sh
cmdline/testSfiSliceRegister.sh
config/aggregates.xml [moved from geni/aggregates.xml with 100% similarity]
config/config_sfi [new file with mode: 0644]
config/registries.xml [moved from geni/registries.xml with 100% similarity]
geniwrapper.spec
setup.py

index 2ff74da..2025654 100644 (file)
@@ -77,13 +77,13 @@ Use:
 Copy my private PL (RSA) ssh key to ~/.sfi/quetier.pkey
 
 in cmdline
-edit  configSfi.sh
+edit  config_sfi
 export SFI_AUTH=ple.upmc
 export SFI_USER=$SFI_AUTH.quetier
 export SFI_REGISTRY=http://138.96.255.199:12345/
 export SFI_SM=http://138.96.255.199:12346/
 
-source configSfi.sh
+source config_sfi
 
 ./sfi.py list ple
 ./sfi.py show ple.upmc.quetier
diff --git a/cmdline/configSfi.sh b/cmdline/configSfi.sh
deleted file mode 100644 (file)
index 07ec014..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#export SFI_AUTH=planetlab.us.arizona
-#export SFI_USER=$SFI_AUTH.Baker_Scott
-
-#export TEST_USER_2=$SFI_AUTH.Hartman_John
-
-export SFI_AUTH=plc.princeton
-export SFI_USER=$SFI_AUTH.faiyaza
-
-export SFI_REGISTRY=http://128.112.139.120:12345/
-#export SFI_SM=http://128.112.139.120:12347/
-
-#export SFI_REGISTRY=http://www.planet-lab.org:12345/
-export SFI_SM=http://www.planet-lab.org:12347/
index 9749d3b..14e50c2 100644 (file)
@@ -1,8 +1,9 @@
 #!/bin/bash
 
-source configSfi.sh
+export PATH=$PATH:/etc/geni
+source config_sfi
+CWD=$(pwd)
 
-CWD=`pwd`
 DEMO_AUTH='planetlab.us'
 DEMO_PL_AUTH='planetlab.us.pl'
 
@@ -10,45 +11,45 @@ echo XXXXX ------------------------------------------------
 echo XXXXX list contents of authority
 echo XXXXX ------------------------------------------------
 
-python ./sfi.py list $DEMO_PL_AUTH
+python $(CWD)/sfi.py list $DEMO_PL_AUTH
 
 echo XXXXX ------------------------------------------------
 echo XXXXX show contents of authority
 echo XXXXX ------------------------------------------------
 
-python ./sfi.py show $DEMO_PL_AUTH
+python $(CWD)/sfi.py show $DEMO_PL_AUTH
 
 
 echo XXXXX ------------------------------------------------
 echo XXXXX show users authority
 echo XXXXX ------------------------------------------------
 
-python ./sfi.py show $DEMO_PL_AUTH
+python $(CWD)/sfi.py show $DEMO_PL_AUTH
 
 echo XXXXX ------------------------------------------------
 echo XXXXX list available node +rspec+
 echo XXXXX ------------------------------------------------
 
-python ./sfi.py nodes
+python $(CWD)/sfi.py nodes
 
 echo XXXXX ------------------------------------------------
 echo XXXXX list available node +dns+
 echo XXXXX ------------------------------------------------
 
-python ./sfi.py nodes dns
+python $(CWD)/sfi.py nodes dns
 
 echo XXXXX ------------------------------------------------
 echo XXXXX list slices at the aggregate
 echo XXXXX ------------------------------------------------
 
-python ./sfi.py slices 
+python $(CWD)/sfi.py slices 
 
 
 echo XXXXX ------------------------------------------------
 echo XXXXX list resources being used by pl_tmack
 echo XXXXX ------------------------------------------------
 
-python ./sfi.py resources planetlab.us.pl.tmack
+python $(CWD)/sfi.py resources planetlab.us.pl.tmack
 
 
 
index 47fb18e..a8dfeb5 100755 (executable)
@@ -15,6 +15,8 @@ from geni.util.record import *
 from geni.util.rspec import Rspec
 from types import StringTypes, ListType
 
+# xxx todo xxx auto-load ~/.sfi/config_sfi
+
 sfi_dir = os.path.expanduser("~/.sfi/")
 slicemgr = None
 registry = None
index f47c8da..a82524c 100644 (file)
@@ -1,10 +1,12 @@
 #!/bin/bash
 
-source configSfi.sh
+export PATH=$PATH:/etc/geni
+source config_sfi
+CWD=$(pwd)
 
 rm -f saved_record.*
 
-python ./sfi.py show -o saved_record.$SFI_USER $SFI_USER
-python ./sfi.py list -o saved_record.$SFI_AUTH $SFI_AUTH
+python $(CWD)/sfi.py show -o saved_record.$SFI_USER $SFI_USER
+python $(CWD)/sfi.py list -o saved_record.$SFI_AUTH $SFI_AUTH
 
 #rm -f saved_record.*
index 567856e..4eb72e9 100644 (file)
@@ -1,10 +1,12 @@
 #!/bin/bash
 
-source configSfi.sh
+export PATH=$PATH:/etc/geni
+source config_sfi
+CWD=$(pwd)
 
 rm -f saved_record.*
 
-python ./sfi.py show $SFI_USER
-python ./sfi.py delegate --user plc.arizona.gackscentral
+python $(CWD)/sfi.py show $SFI_USER
+python $(CWD)/sfi.py delegate --user plc.arizona.gackscentral
 
 #rm -f saved_record.*
index 56e4aa5..2447036 100644 (file)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-source configSfi.sh
-
-CWD=`pwd`
+export PATH=$PATH:/etc/geni
+source config_sfi
+CWD=$(pwd)
 
 # private key to use when creating GID for new slice
 export TEST_KEY=$CWD/testkey.pkey
@@ -18,61 +18,61 @@ echo XXXXX Removing the test slice. this will cause an error if the slice does
 echo XXXXX not exist -- this error can be ignored
 echo XXXXX -------------------------------------------------------------------
 
-python ./sfi.py remove --type slice $TEST_SLICE_HRN
+python $(CWD)/sfi.py remove --type slice $TEST_SLICE_HRN
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Creating a record for the test slice
 echo XXXXX -------------------------------------------------------------------
 
-python ./editRecord.py --hrn $TEST_SLICE_HRN --pubkeyfile $TEST_KEY --type slice --addresearcher $SFI_USER --outfile $TEST_SLICE_RECORD
+python $(CWD)/editRecord.py --hrn $TEST_SLICE_HRN --pubkeyfile $TEST_KEY --type slice --addresearcher $SFI_USER --outfile $TEST_SLICE_RECORD
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Adding the test slice, $TEST_SLICE_HRN
 echo XXXXX -------------------------------------------------------------------
 
-python ./sfi.py add $TEST_SLICE_RECORD
+python $(CWD)/sfi.py add $TEST_SLICE_RECORD
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX The slice should have one researcher, $SFI_USER
 echo XXXXX -------------------------------------------------------------------
 
-python ./sfi.py show $TEST_SLICE_HRN
+python $(CWD)/sfi.py show $TEST_SLICE_HRN
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Adding $TEST_USER_2 to the slice researchers
 echo XXXXX -------------------------------------------------------------------
 
-python ./editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --addresearcher $TEST_USER_2
+python $(CWD)/editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --addresearcher $TEST_USER_2
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Updating the slice
 echo XXXXX -------------------------------------------------------------------
 
-python ./sfi.py update $TEST_SLICE_RECORD
+python $(CWD)/sfi.py update $TEST_SLICE_RECORD
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX The slice record should now have two users: $SFI_USER, $TEST_USER_2
 echo XXXXX -------------------------------------------------------------------
 
-python ./sfi.py show $TEST_SLICE_HRN
+python $(CWD)/sfi.py show $TEST_SLICE_HRN
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Removing $SFI_USER from the slice researchers
 echo XXXXX -------------------------------------------------------------------
 
-python ./editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --delresearcher $SFI_USER
+python $(CWD)/editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --delresearcher $SFI_USER
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Updating the slice
 echo XXXXX -------------------------------------------------------------------
 
-python ./sfi.py update $TEST_SLICE_RECORD
+python $(CWD)/sfi.py update $TEST_SLICE_RECORD
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX The slice record should now have one users: $TEST_USER_2
 echo XXXXX -------------------------------------------------------------------
 
-python ./sfi.py show $TEST_SLICE_HRN
+python $(CWD)/sfi.py show $TEST_SLICE_HRN
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Updating the slice
@@ -80,5 +80,5 @@ echo XXXXX ... this verifies escalation from slice_cred to auth_cred
 echo XXXXX -------------------------------------------------------------------
 
 rm ~/.sfi/slice_testslice.cred
-python ./sfi.py update $TEST_SLICE_RECORD
+python $(CWD)/sfi.py update $TEST_SLICE_RECORD
 
similarity index 100%
rename from geni/aggregates.xml
rename to config/aggregates.xml
diff --git a/config/config_sfi b/config/config_sfi
new file mode 100644 (file)
index 0000000..b148473
--- /dev/null
@@ -0,0 +1,16 @@
+# user-level configuration for sfi
+
+### hrn of your authority
+export SFI_AUTH=plc.princeton
+# or planetlab.us.arizona
+
+### your user hrn
+export SFI_USER=plc.princeton.faiyaza
+# or planetlab.us.arizona.Baker_Scott 
+# or planetlab.us.arizona.Hartman_John
+
+### where to find the registry
+export SFI_REGISTRY=http://www.planet-lab.org:12345/
+
+# where to find the slice manager
+export SFI_SM=http://www.planet-lab.org:12347/
similarity index 100%
rename from geni/registries.xml
rename to config/registries.xml
index 9f1b85f..c1e9943 100644 (file)
@@ -53,6 +53,10 @@ rm -rf $RPM_BUILD_ROOT
 %files -f GENI_INSTALLED_FILES.all
 %defattr(-,root,root)
 /usr/share/keyconvert
+%config (noreplace) /etc/geni/geni_config
+%config (noreplace) /etc/geni/sfi_config
+%config (noreplace) /etc/geni/aggregates.xml
+%config (noreplace) /etc/geni/registries.xml
 
 %post
 chmod 0744 /etc/init.d/geniwrapper
index bd2fcaa..ed2c757 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ import shutil
 version = '0.2'
 scripts = ['geni/gimport.py', 'geni/plc.py', 'cmdline/sfi.py', 'config/geni-config-tty']
 package_dirs = ['geni', 'geni/util', 'geni/methods']
-data_files = [('/etc/geni/', ['geni/aggregates.xml', 'geni/registries.xml', 'config/geni_config', 'cmdline/configSfi.sh']),
+data_files = [('/etc/geni/', ['config/aggregates.xml', 'config/registries.xml', 'config/geni_config', 'config/config_sfi']),
               ('/etc/init.d/', ['geni/geniwrapper'])]
 symlinks = ['/usr/share/geniwrapper']
 initscripts = ['/etc/init.d/geniwrapper']