Skip to content

Commit

Permalink
Make the service host configurable when loading site.psh
Browse files Browse the repository at this point in the history
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 <mic.bowman@intel.com>
  • Loading branch information
cmickeyb authored and prakashngit committed Mar 28, 2023
1 parent 8938d58 commit ef17ec5
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions build/opt/pdo/etc/template/site.psh
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ if --null "${data}"
exit
fi

set --conditional -s service_host -v "SERVICE_HOST"

## -----------------------------------------------------------------
## Set the default set of eservices that this file knows
## about. There may be more that have been added to the
## eservice database. This list is primarily that ones that
## will be used by the local client to create & interact with
## contracts.
## -----------------------------------------------------------------
set -s eservice1 -v http://SERVICE_HOST:7101
set -s eservice2 -v http://SERVICE_HOST:7102
set -s eservice3 -v http://SERVICE_HOST:7103
set -s eservice4 -v http://SERVICE_HOST:7104
set -s eservice5 -v http://SERVICE_HOST:7105
set -s eservice1 -v http://${service_host}:7101
set -s eservice2 -v http://${service_host}:7102
set -s eservice3 -v http://${service_host}:7103
set -s eservice4 -v http://${service_host}:7104
set -s eservice5 -v http://${service_host}:7105

## load the local database if it exists
set --conditional -s dbfile --state Service EnclaveServiceDatabaseFile
Expand Down Expand Up @@ -58,12 +60,11 @@ fi
## provisioning services that will be used for provisioning keys
## into the contract enclaves.
## -----------------------------------------------------------------

set -s pservice1 -v http://SERVICE_HOST:7001
set -s pservice2 -v http://SERVICE_HOST:7002
set -s pservice3 -v http://SERVICE_HOST:7003
set -s pservice4 -v http://SERVICE_HOST:7004
set -s pservice5 -v http://SERVICE_HOST:7005
set -s pservice1 -v http://${service_host}:7001
set -s pservice2 -v http://${service_host}:7002
set -s pservice3 -v http://${service_host}:7003
set -s pservice4 -v http://${service_host}:7004
set -s pservice5 -v http://${service_host}:7005

## default pservice group
pservice add --url ${pservice1}
Expand Down Expand Up @@ -145,12 +146,11 @@ eservice --group all use --url ${eservice1}
## current state of the object can be retrieved from the
## persistent storage service
## -----------------------------------------------------------------

set -s sservice1 -v http://SERVICE_HOST:7201
set -s sservice2 -v http://SERVICE_HOST:7202
set -s sservice3 -v http://SERVICE_HOST:7203
set -s sservice4 -v http://SERVICE_HOST:7204
set -s sservice5 -v http://SERVICE_HOST:7205
set -s sservice1 -v http://${service_host}:7201
set -s sservice2 -v http://${service_host}:7202
set -s sservice3 -v http://${service_host}:7203
set -s sservice4 -v http://${service_host}:7204
set -s sservice5 -v http://${service_host}:7205

set -s persistent_storage_service -v ${sservice1}

Expand Down

0 comments on commit ef17ec5

Please sign in to comment.