-
Notifications
You must be signed in to change notification settings - Fork 59
Heimdall Heroku Documentation
Heimdall is hosted in Keroku, there are two instances, one for staging, and another for production. Both instances use the Heroku Postgres add-on where Heimdall Server stores its content. If there is a need to do any database maintenances, it can be accomplished locally using the appropriate Heroku Postgres credentials.
If Heroku notifies that the database size limit (based on the PLAN being used - we are using essential-0, it has a limit of 1GB ) is or has been exceeded, follow these procedures to reduce its size.
- Backup the Database
- Delete data from the database as needed - Use pgAdmin4 to Connect to Heimdall Heroku Postgres Instances or
- Reset the Database
NOTES:
PGBackups stores backups in a compressed binary format. The backups include commands to recreate indexes instead of storing the indexes themselves.
The backups are store in Heroku Datastores for the database. The mitre-heimdall datastore is located here
Reset Database - resets the database to its originally-provisioned state, deleting all data inside it. This action may require that the session table be created manually, see How to Create thesession
Table
If operating within a restrictive network environment an organization chain certificate may be needed. After obtaining the necessary certificate create an environment variable called NODE_EXTRA_CA_CERTS and set it to point to the certificate
Test the connection by using the CLI: heroku login
For additional information see Quick Start: Heroku Connect CLI
To retrieve the database credentials install The Heroku CLI, and use the heroku CLI to retrieve the connection information for both Heimdall instances (staging and production).
To get the credential for the staging instance use:
heroku pg:credentials:url DATABASE -a mitre-heimdall-staging
To get the credential for the production instances use:
heroku pg:credentials:url DATABASE -a mitre-heimdall
See Connecting to Heroku Postgres for additional information
The pgAdmin4 from PostgreSQL Tools can be use to establish a connection to the Heimdall Heroku Database. Use the output of the heroku pg:credentials:url
CLI command to obtain the necessary information to add a server to pgAdmin4.
Follow the instruction below to setup a connection to a Heroku Postgres.
To manually create the session
table connect to the database using pgAdmin4 open a Query Tool
panel and invoke this SQL
command:
CREATE TABLE public."session"( sid character varying(255) NOT NULL, sess json NOT NULL, expire timestamp with time zone NOT NULL, CONSTRAINT session_pkey PRIMARY KEY(sid) );
Helping the overall cybersecurity strength of organizations.
- Home
- How to create a release
- Environment Variables Configuration
- Heimdall Authentication Methods
- Heimdall API Documentation
- Group and User Management
- Heimdall Interface Connections
- Heimdall Architecture Information
- Heimdall Class Diagrams
- Heimdall Development Tips & Tricks
- Heimdall Frontend Components
- Heimdall Processes Documentation
- Heimdall Heroku Documentation
- Developers Code Style
- Troubleshooting
- HDF Converter Mappings
- HDF Converters How Tos
- Manual Attestations
- Control Correlation Identifier (CCI) Converter