The repository is a GitHub/BitBucket/GitLab repository where you keep the blueprint definition files and configurations. The repository can host YAML as well as Helm blueprint files.
- The Helm blueprint files consist of your Helm charts, which can reside directly under the repository’s root folder or in any folder hierarchy within the root.
- The YAML blueprint files are arranged under dedicated subfolders within the repository, as explained in the YAML Repository’s Structure section that follows, and include blueprint, application and service definition files, as well as scripts and additional assets, such as configuration and health check scripts.
Each space in Torque is associated with such a repository. Torque reads the blueprints from the repository, validates them and exposes them in the blueprint catalog.
The repository defines two types of blueprints - sandbox and production environments. Note that it is possible to specify the same repository for both types (see Environment type indication for details).
In this article:
The YAML repository's structure
The repository must be structured in a certain way so that Torque will be able to read and use it.
The repository should look something like this:
The repository has three main folders: blueprints, applications and services.
IMPORTANT: These three folders' names are case-sensitive and must be in lowercase letters.
- blueprints contains blueprint's YAML files. To learn more about the content of the YAML files see The Blueprint's YAML File.
- applications contains the applications you modeled. Each application is stored in its own subfolder and includes relevant application YAML files and optional deployment scripts. To learn more about the application's YAML file see The Application's YAML File.
Applications can optionally include additional scripts that run as part of deploying and configuring applications in a sandbox. Learn more about Application Scripts.
- services contains YAMLs that define managed infrastructure services, which you can optionally include in your blueprint. Each service is stored in its own subfolder and includes relevant service YAML and terraform files. To learn more about defining services in Torque, see Integrating Cloud Services.
Setting up your repository
This section explains how to set up and connect your repository to Torque.
To add a Repository to your space:
- In GitHub/BitBucket/GitLab, create a repository. Copy the repository's URL.
We recommend you create a repository by forking the sample repository (in the Sample space).
- In Torque perform the following steps:
- Access your space.
- Open the Settings page.
- Click the Repositories tab.
You can set two different repositories in the space, one for sandbox environments and another for production environments. For details, about these types of environments, see Sandbox vs. Production Environments.
- Click Add a Repository.
The Select your version control service dialog box is displayed.
- Select the source control tool you wish to use (GitHub, BitBucket or GitLab) and paste the copied URL.
- Click Connect.
- Authorize Torque's access to your GitHub/BitBucket/GitLab repository.
Your repository is now set up. You can now launch sandboxes out of the blueprints in your repository using Torque.
NOTE: It is also possible to launch sandboxes out of the repository's branches using the API. For details, contact Torque Support.