SDF - packages

January 27, 2021 ยท View on GitHub

  1. Adding the SDF stable repository to your system
  2. Quickstart
  3. Installing individual packages
  4. Upgrading
  5. Running Horizon in production
  6. Building Packages
  7. Running a Full Validator
  8. Publishing a History archive
  9. Backfilling a History archive
  10. Monitoring
  11. Testnet Reset

Quickstart

The stellar-quickstart package configures a local stellar-core and stellar-horizon instance backed by a local PostgreSQL connecting to the SDF Testnet. Once installed you can easily modify either the stellar-core or stellar-horizon configs to suit your needs or to connect to the SDF Pubnet for example.

Installation

# sudo apt-get update && sudo apt-get install stellar-quickstart # install packages
# stellar-core-cmd info # stellar-horizon will only start ingesting when stellar-core is in synch

Accessing the quickstart databases

The stellar-quickstart package configures 2 databases, stellar and horizon. Access to these databases is managed via the stellar PostgreSQL role and it's corresponding stellar system user.

# sudo -u stellar psql -d stellar
psql (9.5.10)
Type "help" for help.

stellar=> \dt
            List of relations
 Schema |     Name      | Type  |  Owner
--------+---------------+-------+---------
 public | accountdata   | table | stellar
 public | accounts      | table | stellar
 public | ban           | table | stellar
 public | ledgerheaders | table | stellar
 public | offers        | table | stellar
 public | peers         | table | stellar
 public | publishqueue  | table | stellar
 public | pubsub        | table | stellar
 public | scphistory    | table | stellar
 public | scpquorums    | table | stellar
 public | signers       | table | stellar
 public | storestate    | table | stellar
 public | trustlines    | table | stellar
 public | txfeehistory  | table | stellar
 public | txhistory     | table | stellar
(15 rows)

stellar-core new-db

As with accessing the database directly, you can re-initialise the stellar-core db by running stellar-core as the stellar system user.

# sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg new-db
2018-01-22T19:43:20.715 GABA2 [Database INFO] Connecting to: postgresql://dbname=stellar user=stellar
2018-01-22T19:43:20.719 GABA2 [SCP INFO] LocalNode::LocalNode@GABA2 qSet: 273af2
2018-01-22T19:43:20.833 GABA2 [Database INFO] Applying DB schema upgrade to version 2
2018-01-22T19:43:20.851 GABA2 [Database INFO] Applying DB schema upgrade to version 3
2018-01-22T19:43:20.857 GABA2 [Database INFO] Applying DB schema upgrade to version 4
2018-01-22T19:43:20.866 GABA2 [Database INFO] Applying DB schema upgrade to version 5
2018-01-22T19:43:20.872 GABA2 [default INFO] *
2018-01-22T19:43:20.872 GABA2 [default INFO] * The database has been initialized
2018-01-22T19:43:20.872 GABA2 [default INFO] *
2018-01-22T19:43:20.874 GABA2 [Ledger INFO] Established genesis ledger, closing
2018-01-22T19:43:20.874 GABA2 [Ledger INFO] Root account seed: SCXXZABQBBVSHQLXASSQU7MQSCOI56JMB24GTJGKKPUY3SYLGBASEGQ6
2018-01-22T19:43:20.879 GABA2 [default INFO] *
2018-01-22T19:43:20.879 GABA2 [default INFO] * The next launch will catchup from the network afresh.
2018-01-22T19:43:20.879 GABA2 [default INFO] *
2018-01-22T19:43:20.879 GABA2 [default INFO] Application destructing
2018-01-22T19:43:20.879 GABA2 [default INFO] Application destroyed
moving on from Quickstart

stellar-quickstart is a configuration package that through it's dependencies pulls in the required packages.

PackageDependenciesComments
stellar-corenoneinstalls stellar-core binary, systemd service, logrotate script, documentation
stellar-core-utilsnoneinstalls useful command line tools (stellar-core-cmd, stellar-core-gap-detect)
stellar-core-prometheus-exporternoneinstalls a Prometheus exporter to facilitate ingesting stellar-core metrics
stellar-core-postgresstellar-core, PostgreSQLconfigures a PostgreSQL server, creates a stellar db,role and system user, the default stellar-core configuration contained in this package will connect to the Testnet
stellar-archivistnoneinstalls stellar-archivist cli tool for managing stellar-core History archives
stellar-horizonnoneinstalls stellar-horizon binary, systemd service
stellar-horizon-utilsnoneinstalls useful command line tools (stellar-horizon-cmd)
stellar-horizon-postgresstellar-horizon, PostgreSQLconfigures a PostgreSQL server, creates a horizon db and stellar role, system user
stellar-quickstartstellar-core-postgres, stellar-horizon-postgrespulls in required packages via it's dependencies
stellar-captive-corestellar-core, stellar-horizonAdds configuration and dependencies to run horizon in captive core mode
stellar-captive-core-apinoneinstalls the horizon captive core middleware which exposes captive core over http

Once you are comfortable with the various packages that stellar-quickstart brings in as dependencies, it is possible to install them individually.

See Running Horizon in production for a generic distributed Horizon cluster, you will need to configure PostgreSQL which unfortunately is out of the scope of this document.