# Basic file

This file show an extended example of the version 2, which includes several widgets, types, required variables optional ones, etc.

# With special variables

Note: the previous example file already includes special variables.

# With common use-case

In this scenario, you can see that new groups/variables are added to the various use-cases, based on the cycloid-common one. For more details or to migrate to current version, please see the previous versions page.

# With variable sharing

Shared variables are not explicitely indicated to users either, because it's not their responsibility to know in which technology each variables will end up. However it does simplify the configuration of a stack, as you won't have to define variables multiple times across technologies if they are identical.

# With condition

Example for a stack with "advanced configuration":

version: "2"
use_cases:
- name: default
  sections:
  - name: Application
    groups:
    - name: Configuration
      technologies: [ansible]
      vars:
      - name: Application name
        description: What is the name of your app?
        key: app_name
        widget: simple_text
        type: string
      - name: Advanced configuration
        description: Do you wish to make advanced configuration?
        key: app_advanced
        widget: switch
        type: boolean
        default: false
    - name: Advanced configuration
      technologies: [ansible]
      condition: $app_advanced == true
      vars:
      - name: Application port
        description: On which port to listen to?
        key: app_name
        widget: simple_text
        type: string
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

Example for a stack supporting "multiple database engines":

version: "2"
use_cases:
- name: default
  sections:
  - name: Database
    groups:
    - name: Engine
      technologies: [ansible]
      vars:
      - name: Engine
        description: Choose the kind of database that you want
        key: db_engine
        widget: dropdown
        type: string
        values: [mysql, pgsql, mongodb]
        required: true
      - name: Advanced configuration
        description: Do you wish to make advanced configuration?
        key: app_advanced
        widget: switch
        type: boolean
        default: false
    - name: MySQL advanced configuration
      technologies: [ansible]
      condition: $app_advanced == true && $db_engine == 'mysql'
      vars:
      - name: Version of MySQL
        description: Which version of MySQL to use
        key: mysql_version
        widget: dropdown
        type: string
        values: ["8.0", "5.7", "5.6"]
        default: "8.0"
    - name: Postgres configuration
      technologies: [ansible]
      condition: $app_advanced == true && $db_engine == 'pgsql'
      vars:
      - name: Version of PgSQL
        description: Which version of PgSQL to use
        key: pgqsl_version
        widget: dropdown
        type: string
        values: ["14.1", "13.5", "12.9", "11.14"]
        default: "14.1"
    - name: Mongo configuration
      technologies: [ansible]
      condition: $app_advanced == true && $db_engine == 'mongodb'
      vars:
      - name: Version of MongoDB
        description: Which version of MongoDB to use
        key: mongodb_version
        widget: dropdown
        type: string
        values: ["5.0", "4.4", "3.6", "3.2", "2.4", "1.8"]
        default: "5.0"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

# V1 (legacy)

Caution

This file is a legacy format, added for the sole purpose of documentation. For more details please see the previous version page.