Ryvn allows you to configure certain resources via the ryvn.yaml file, defined in a Git repository. This enables you to manage your environments, services, blueprints, and installations as code, providing version control, collaboration, and automated synchronization.

Setting Up Git Sync

Prerequisites

To start using Infrastructure as Code, you must have already configured or enabled the following:
  • Ryvn GitHub App: Must be connected to your Ryvn organization and any pending permissions must be approved

Setup

To configure Git Sync for your organization:
1

Navigate to Settings

Go to the Settings tab in the Ryvn Dashboard
2

Access Git Sync

Click on Git Sync (IaC) in the settings menu
3

Add Git Sync

  1. Click Add Git Sync button
  2. Select a repository from the dropdown list
  3. Optionally specify a branch name (defaults to the repository’s default branch)
  4. Click Configure to set up the sync
4

Create ryvn.yaml

  1. In your selected repository, create a ryvn.yaml file in the root directory
  2. Define your resources using the Ryvn YAML specification
  3. Commit and push the file to your repository
5

Monitor Sync Status

  1. Return to the Git Sync page to monitor the sync status
  2. Check for any validation errors or sync failures
  3. Verify that your resources are created in the Ryvn Dashboard
You must have GitHub integration configured and access to the repository you want to sync with.

ryvn.yaml File Structure

Your ryvn.yaml file should follow this structure. It must define a valid apiVersion at the top level. Currently, the only valid version is v1.
apiVersion: v1
...

Usage Examples

Creating a Helm Chart Installation

Here’s a simple example of creating an environment with a helm-chart installation:
apiVersion: v1

environments:
  - name: production
    installations:
      - name: nginx-ingress
        service: nginx-ingress
        namespace: ingress-nginx
        config: |
          controller:
            replicaCount: 2
            resources:
              requests:
                cpu: 100m
                memory: 128Mi
              limits:
                cpu: 200m
                memory: 256Mi
        secrets:
          - name: tls-certificate
            orgSecret: production-tls-cert
This example installs an nginx-ingress helm chart on the production environment. The configuration sets up the controller with 2 replicas and resource limits, placing the installation in the ingress-nginx namespace. It also demonstrates how to reference an organization secret for the TLS certificate.
You can reference organization secrets in your configuration using the orgSecret syntax for sensitive values.

Reference

See Ryvn YAML Reference

Managing Organization Secrets

Organization secrets can be referenced in your ryvn.yaml file to securely store sensitive values like API keys, passwords, and configuration data.
1

Access Organization Settings

Go to the Settings tab in the Ryvn Dashboard
2

Navigate to Secrets

Click on Organization Secrets in the settings menu
3

Add Secret

Define a new organization secret
4

Select secret type

Choose between Value (simple secret) or Map (key-value pairs)
5

Enter secret value

Enter the secret value(s)
Organization secrets are encrypted and stored securely. They can be referenced in your ryvn.yaml file using the orgSecret syntax for environment variables and service secrets, or valueFromOrgSecret for blueprint inputs and other configuration values.

Sync Status and Monitoring

The Git Sync page displays the current status of your repository synchronization:
StatusDescriptionAction Required
In ProgressCurrently syncing repositoryWait for completion
CompletedLast sync was successfulNone - resources are up to date
FailedSync failed due to errorsCheck validation errors and fix issues
File Not Foundryvn.yaml not found in repositoryCreate the file in the repository root

Validation Errors

If sync fails due to validation errors, you’ll see:
  • Resource Type: The type of resource that failed validation
  • Resource Name: The name of the specific resource
  • Error Message: Detailed description of the validation issue
Fix all validation errors in your ryvn.yaml file before the sync can complete successfully.