How to Manage Environments
Hookdeck Projects can be used to represent different environments such as Development, Staging, and Production. Each environment can be configured has distinct secrets (API Key) and access control settings. There's no limit to the number of projects, and therefore environments that you can have in your organization. This helps segments your configuration and data.
Using Projects for Different Environments
By default, each Organization has a single project called "Default Project". This project name can be updated in the project settings to reflect the name of your first environment.
Key Features:
- Distinct API Keys: Each project (environment) is assigned a unique API key.
- Access Control: Projects can be public or private, with access control settings to manage visibility for organization members.
- Isolated Data & Configuration: Each project has its own configuration, request and event, making it easier to work with different environments.
Setting Up Projects for Different Environments
To set up projects for different environments:
- Navigate to the Hookdeck dashboard and create a new project for each environment (e.g.,
Dev
,Staging
,Production
). - Each project will have its own API key for configuring your connections.
- Set the visibility of the project to either public or private, depending on your needs. A common practice is to make Dev and Staging public, while keeping Production private.
Configuration Management
Manual Configuration
Configurations in Hookdeck are not automatically copied between environments. You must manually configure copy each configuration from one project to another.
Using the API for Configuration
To automate the process, use the Hookdeck API to copy configurations between projects. This can streamline the setup for multiple environments.
CI/CD Integration
For more advanced setups, integrate Hookdeck configurations into your CI/CD pipeline. Tools like Terraform can be used to manage and automate the configurations across environments.
Best Practices
- Environment Segregation: Keep environments isolated to prevent accidental changes in production.
- Access Restrictions: Limit access to sensitive environments like Production.
- Automation: Use the API or Terraform to manage configurations efficiently.