This guide will provide a high-level outline of the steps required to stand up a new instance of p8e-cee-api
for use against an actual Provenance network.
It is highly recommended one first goes through the process of standing up a local environment for p8e-cee-api
per the instructions in the README to understand the various processes involved and how they communicate with each other.
A connection will be needed to the following services, which can be either an existing deployment you have permission to connect to or a self-hosted instance:
p8e-cee-api
- Use one of the published Docker images, or build an image from source if you need to make your own customizations
- Object stores which contains or replicates the data in the metadata scopes you will be operating on
- See the README for the currently supported storage backends
- See an example of an object store gateway as a possible way to access an object store
- Key Management System (KMS)
p8e-cee-api
consumes the provenance-io/kms-connector library to allow for fetching of Provenance account keys from any plugin defined there (as of writing, there is default support for Vault & tentative support for Fortanix and Keystone)
p8e-cee-api
runs as a Java JAR and uses Java & Kotlin reflection in order to instantiate p8e-scope-sdk contracts based on classnames provided in a contract execution request's body. This means that the Java classes of contracts one wishes to execute need to be in p8e-cee-api
's classpath in order to run them.
By default, p8e-cee-api
includes the contracts defined in loan-package-contracts in its classpath, allowing them to be executed via the contract execution endpoints. The contracts in that repository are published as a JAR and then included as a dependency in p8e-cee-api. In order to include your own contracts, you will need to pull p8e-cee-api
, add your own contracts in a similar manner, and then build your own Docker image of p8e-cee-api
from your local source.
p8e-cee-api
is a Spring application which sets various application properties based on definitions determined by the active Spring profile.
Any environment variable defined in the active Spring profile's *.properties
file will need to be defined in order for the service to run.
Data types should be inferrable from the corresponding Kotlin classes annotated with @ConfigurationProperties
.
Some environment variables, e.g. DART_UUID
and PORTFOLIO_MANAGER_ADDRESS
, exist only to tailor to common users of p8e-cee-api
, and as such, can be deleted if not used.
⚠️ Note that doing this deletion requires modification to Kotlin/Spring code and then building the Docker image from the modified source.