Skip to content

Commit ef17ec5

Browse files
cmickeybprakashngit
authored andcommitted
Make the service host configurable when loading site.psh
Trying to add some flexibility to how endpoints are specified. This just makes it possible to change the endpoints in the shell through a single pdo-shell variable Signed-off-by: Mic Bowman <[email protected]>
1 parent 8938d58 commit ef17ec5

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

build/opt/pdo/etc/template/site.psh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ if --null "${data}"
1919
exit
2020
fi
2121

22+
set --conditional -s service_host -v "SERVICE_HOST"
23+
2224
## -----------------------------------------------------------------
2325
## Set the default set of eservices that this file knows
2426
## about. There may be more that have been added to the
2527
## eservice database. This list is primarily that ones that
2628
## will be used by the local client to create & interact with
2729
## contracts.
2830
## -----------------------------------------------------------------
29-
set -s eservice1 -v http://SERVICE_HOST:7101
30-
set -s eservice2 -v http://SERVICE_HOST:7102
31-
set -s eservice3 -v http://SERVICE_HOST:7103
32-
set -s eservice4 -v http://SERVICE_HOST:7104
33-
set -s eservice5 -v http://SERVICE_HOST:7105
31+
set -s eservice1 -v http://${service_host}:7101
32+
set -s eservice2 -v http://${service_host}:7102
33+
set -s eservice3 -v http://${service_host}:7103
34+
set -s eservice4 -v http://${service_host}:7104
35+
set -s eservice5 -v http://${service_host}:7105
3436

3537
## load the local database if it exists
3638
set --conditional -s dbfile --state Service EnclaveServiceDatabaseFile
@@ -58,12 +60,11 @@ fi
5860
## provisioning services that will be used for provisioning keys
5961
## into the contract enclaves.
6062
## -----------------------------------------------------------------
61-
62-
set -s pservice1 -v http://SERVICE_HOST:7001
63-
set -s pservice2 -v http://SERVICE_HOST:7002
64-
set -s pservice3 -v http://SERVICE_HOST:7003
65-
set -s pservice4 -v http://SERVICE_HOST:7004
66-
set -s pservice5 -v http://SERVICE_HOST:7005
63+
set -s pservice1 -v http://${service_host}:7001
64+
set -s pservice2 -v http://${service_host}:7002
65+
set -s pservice3 -v http://${service_host}:7003
66+
set -s pservice4 -v http://${service_host}:7004
67+
set -s pservice5 -v http://${service_host}:7005
6768

6869
## default pservice group
6970
pservice add --url ${pservice1}
@@ -145,12 +146,11 @@ eservice --group all use --url ${eservice1}
145146
## current state of the object can be retrieved from the
146147
## persistent storage service
147148
## -----------------------------------------------------------------
148-
149-
set -s sservice1 -v http://SERVICE_HOST:7201
150-
set -s sservice2 -v http://SERVICE_HOST:7202
151-
set -s sservice3 -v http://SERVICE_HOST:7203
152-
set -s sservice4 -v http://SERVICE_HOST:7204
153-
set -s sservice5 -v http://SERVICE_HOST:7205
149+
set -s sservice1 -v http://${service_host}:7201
150+
set -s sservice2 -v http://${service_host}:7202
151+
set -s sservice3 -v http://${service_host}:7203
152+
set -s sservice4 -v http://${service_host}:7204
153+
set -s sservice5 -v http://${service_host}:7205
154154

155155
set -s persistent_storage_service -v ${sservice1}
156156

0 commit comments

Comments
 (0)