aboutsummaryrefslogtreecommitdiff
path: root/duply/scripts/duplicity/gen_config_remote.sh
blob: df02e90ca9ae97e09de75f1e9d1a044bc4e1a272 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#!/bin/sh

if test "x${PCA_OS_REGION_NAME}" = x; then
  PCA_OS_REGION_NAME=${OS_REGION_NAME}
fi

if test "x${HOT_OS_REGION_NAME}" = x; then
  HOT_OS_REGION_NAME=${OS_REGION_NAME}
fi

envsubst > $1 << EOF
[
    {
        "description": "Cold storage",
        "url": "pca://${STORAGE_NAME}",
        "env": [
            {
                "name": "PCA_AUTHURL",
                "value": "${OS_AUTH_URL}"
            },
            {
                "name": "PCA_AUTHVERSION",
                "value": "${OS_IDENTITY_API_VERSION}"
            },
            {
                "name": "PCA_PROJECT_DOMAIN_NAME",
                "value": "Default"
            },
            {
                "name": "PCA_TENANTID",
                "value": "${OS_TENANT_ID}"
            },
            {
                "name": "PCA_USERNAME",
                "value": "${OS_USERNAME}"
            },
            {
                "name": "PCA_PASSWORD",
                "value": "${OS_PASSWORD}"
            },
            {
                "name": "PCA_REGIONNAME",
                "value": "GRA"
            }
        ],
        "prefixes": ["cold_"]
    },
    {
        "description": "Hot storage",
        "url": "swift://${STORAGE_NAME}_indexes",
        "env": [
            {
                "name": "SWIFT_AUTHURL",
                "value": "${OS_AUTH_URL}"
            },
            {
                "name": "SWIFT_AUTHVERSION",
                "value": "${OS_IDENTITY_API_VERSION}"
            },
            {
                "name": "SWIFT_PROJECT_DOMAIN_NAME",
                "value": "${OS_PROJECT_DOMAIN_NAME}"
            },
            {
                "name": "SWIFT_TENANTID",
                "value": "${OS_TENANT_ID}"
            },
            {
                "name": "SWIFT_USERNAME",
                "value": "${OS_USERNAME}"
            },
            {
                "name": "SWIFT_PASSWORD",
                "value": "${OS_PASSWORD}"
            },
            {
                "name": "SWIFT_REGIONNAME",
                "value": "GRA"
            }
        ],
        "prefixes": ["hot_"]
    },
    {
        "description": "Cold storage Backup",
        "url": "pca://${STORAGE_NAME}",
        "env": [
            {
                "name": "PCA_AUTHURL",
                "value": "${OS_AUTH_URL}"
            },
            {
                "name": "PCA_AUTHVERSION",
                "value": "${OS_IDENTITY_API_VERSION}"
            },
            {
                "name": "PCA_PROJECT_DOMAIN_NAME",
                "value": "Default"
            },
            {
                "name": "PCA_TENANTID",
                "value": "${OS_TENANT_ID}"
            },
            {
                "name": "PCA_USERNAME",
                "value": "${OS_USERNAME}"
            },
            {
                "name": "PCA_PASSWORD",
                "value": "${OS_PASSWORD}"
            },
            {
                "name": "PCA_REGIONNAME",
                "value": "WAW"
            }
        ],
        "prefixes": ["cold_"]
    },
    {
        "description": "Hot storage Backup",
        "url": "swift://${STORAGE_NAME}_indexes",
        "env": [
            {
                "name": "SWIFT_AUTHURL",
                "value": "${OS_AUTH_URL}"
            },
            {
                "name": "SWIFT_AUTHVERSION",
                "value": "${OS_IDENTITY_API_VERSION}"
            },
            {
                "name": "SWIFT_PROJECT_DOMAIN_NAME",
                "value": "${OS_PROJECT_DOMAIN_NAME}"
            },
            {
                "name": "SWIFT_TENANTID",
                "value": "${OS_TENANT_ID}"
            },
            {
                "name": "SWIFT_USERNAME",
                "value": "${OS_USERNAME}"
            },
            {
                "name": "SWIFT_PASSWORD",
                "value": "${OS_PASSWORD}"
            },
            {
                "name": "SWIFT_REGIONNAME",
                "value": "WAW"
            }
        ],
        "prefixes": ["hot_"]
    }
]
EOF