summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/platforms.yaml
blob: cb1c904b8e35f28c6b028b097fda8ceb34a4fd6a (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# ============================= Platform Config ===============================
default_platform_config:
    # all disabled by default
    enabled: false
    # maximum time to retrieve image
    get_image_timeout: 300
    # maximum time to create instance (before waiting for cloud-init)
    create_instance_timeout: 60
    private_key: id_rsa
    public_key: id_rsa.pub
platforms:
    ec2:
        enabled: true
        instance-type: t2.micro
        tag: cii
    lxd:
        enabled: true
        # overrides for image templates
        template_overrides:
            /var/lib/cloud/seed/nocloud-net/meta-data:
                when:
                    - create
                    - copy
                template: cloud-init-meta.tpl
            /var/lib/cloud/seed/nocloud-net/network-config:
                when:
                    - create
                    - copy
                template: cloud-init-network.tpl
            /var/lib/cloud/seed/nocloud-net/user-data:
                when:
                    - create
                    - copy
                template: cloud-init-user.tpl
                properties:
                    default: |
                        #cloud-config
                        {}
            /var/lib/cloud/seed/nocloud-net/vendor-data:
                when:
                    - create
                    - copy
                template: cloud-init-vendor.tpl
                properties:
                    default: |
                        #cloud-config
                        {}
        # overrides image template files
        template_files:
            cloud-init-meta.tpl: |
                #cloud-config
                instance-id: {{ container.name }}
                local-hostname: {{ container.name }}
                {{ config_get("user.meta-data", "") }}
            cloud-init-network.tpl: |
                {% if config_get("user.network-config", "") == "" %}version: 1
                config:
                    - type: physical
                      name: eth0
                      subnets:
                          - type: {% if config_get("user.network_mode", "") == "link-local" %}manual{% else %}dhcp{% endif %}
                            control: auto{% else %}{{ config_get("user.network-config", "") }}{% endif %}
            cloud-init-user.tpl: |
                {{ config_get("user.user-data", properties.default) }}
            cloud-init-vendor.tpl: |
                {{ config_get("user.vendor-data", properties.default) }}
    nocloud-kvm:
        enabled: true

# vi: ts=4 expandtab