-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathprovider.yaml
209 lines (209 loc) · 6.06 KB
/
provider.yaml
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: gcloud
version: ##VERSION##
description: |-
DevPod on Google Cloud
icon: https://devpod.sh/assets/gcp.svg
optionGroups:
- options:
- DISK_SIZE
- DISK_IMAGE
- MACHINE_TYPE
name: "GCloud options"
- options:
- AGENT_PATH
- INACTIVITY_TIMEOUT
- INJECT_DOCKER_CREDENTIALS
- INJECT_GIT_CREDENTIALS
name: "Agent options"
options:
PROJECT:
description: The project id to use.
required: true
command: gcloud config list --quiet --verbosity=error --format "value(core.project)" 2>/dev/null || true
ZONE:
description: The google cloud zone to create the VM in. E.g. europe-west1-d
required: true
command: |-
GCLOUD_ZONE=$(gcloud config list --quiet --verbosity=error --format "value(compute.zone)" 2>/dev/null || true)
if [ -z "$GCLOUD_ZONE" ]; then
echo "europe-west2-b"
else
echo $GCLOUD_ZONE
fi
suggestions:
- asia-east1-a
- asia-east1-b
- asia-east1-c
- asia-east2-a
- asia-east2-b
- asia-east2-c
- asia-northeast1-a
- asia-northeast1-c
- asia-northeast2-b
- asia-northeast3-b
- asia-south1-a
- asia-south1-b
- asia-southeast1-a
- europe-north1-a
- europe-north1-b
- europe-north1-c
- europe-west1-b
- europe-west1-c
- europe-west1-d
- europe-west2-a
- europe-west2-b
- europe-west2-c
- europe-west3-a
- europe-west3-b
- europe-west3-c
- europe-west4-a
- europe-west4-b
- europe-west4-c
- europe-west9-a
- europe-west9-b
- europe-west9-c
- me-central1-a
- me-central1-b
- me-central1-c
- me-west1-a
- me-west1-b
- me-west1-c
- northamerica-northeast1-a
- northamerica-northeast1-b
- northamerica-northeast1-c
- southamerica-east1-a
- southamerica-east1-b
- southamerica-east1-c
- southamerica-west1-a
- southamerica-west1-b
- southamerica-west1-c
- us-central1-a
- us-central1-b
- us-central1-f
- us-east1-b
- us-east1-c
- us-east1-d
- us-east4-a
- us-east4-b
- us-east4-c
- us-south1-a
- us-south1-b
- us-south1-c
- us-west1-a
- us-west1-b
- us-west1-c
- us-west2-a
- us-west2-b
- us-west2-c
- us-west4-a
- us-west4-b
- us-west4-c
NETWORK:
description: The network id to use.
SUBNETWORK:
description: The subnetwork id to use.
TAG:
description: A tag to attach to the instance.
default: "devpod"
DISK_SIZE:
description: The disk size to use (GB).
default: "40"
DISK_IMAGE:
description: The disk image to use.
default: projects/cos-cloud/global/images/cos-101-17162-127-5
SERVICE_ACCOUNT:
description: A service account to attach
default: ""
PUBLIC_IP_ENABLED:
description: Use a public ip to access the instance
default: "true"
MACHINE_TYPE:
description: The machine type to use.
default: c2-standard-4
suggestions:
- f1-micro
- e2-small
- e2-medium
- n2-standard-2
- n2-standard-4
- n2-standard-8
- n2-standard-16
- n2-highcpu-8
- n2-highcpu-16
- c2-standard-4
- c2-standard-8
- c2-standard-16
- c2-standard-30
- g2-standard-4
- g2-standard-8
- g2-standard-12
- g2-standard-16
- a2-highgpu-1g
- a2-highgpu-2g
INACTIVITY_TIMEOUT:
description: If defined, will automatically stop the VM after the inactivity period.
default: 5m
INJECT_GIT_CREDENTIALS:
description: "If DevPod should inject git credentials into the remote host."
default: "true"
INJECT_DOCKER_CREDENTIALS:
description: "If DevPod should inject docker credentials into the remote host."
default: "true"
AGENT_PATH:
description: The path where to inject the DevPod agent to.
default: /var/lib/toolbox/devpod
GCLOUD_PROVIDER_TOKEN:
local: true
hidden: true
cache: 5m
description: "The Google Cloud auth token to use"
command: |-
${GCLOUD_PROVIDER} token
agent:
path: ${AGENT_PATH}
inactivityTimeout: ${INACTIVITY_TIMEOUT}
injectGitCredentials: ${INJECT_GIT_CREDENTIALS}
injectDockerCredentials: ${INJECT_DOCKER_CREDENTIALS}
binaries:
GCLOUD_PROVIDER:
- os: linux
arch: amd64
path: https://github.com/loft-sh/devpod-provider-gcloud/releases/download/##VERSION##/devpod-provider-gcloud-linux-amd64
checksum: ##CHECKSUM_LINUX_AMD64##
- os: linux
arch: arm64
path: https://github.com/loft-sh/devpod-provider-gcloud/releases/download/##VERSION##/devpod-provider-gcloud-linux-arm64
checksum: ##CHECKSUM_LINUX_ARM64##
exec:
shutdown: |-
${GCLOUD_PROVIDER} stop --raw
binaries:
GCLOUD_PROVIDER:
- os: linux
arch: amd64
path: https://github.com/loft-sh/devpod-provider-gcloud/releases/download/##VERSION##/devpod-provider-gcloud-linux-amd64
checksum: ##CHECKSUM_LINUX_AMD64##
- os: linux
arch: arm64
path: https://github.com/loft-sh/devpod-provider-gcloud/releases/download/##VERSION##/devpod-provider-gcloud-linux-arm64
checksum: ##CHECKSUM_LINUX_ARM64##
- os: darwin
arch: amd64
path: https://github.com/loft-sh/devpod-provider-gcloud/releases/download/##VERSION##/devpod-provider-gcloud-darwin-amd64
checksum: ##CHECKSUM_DARWIN_AMD64##
- os: darwin
arch: arm64
path: https://github.com/loft-sh/devpod-provider-gcloud/releases/download/##VERSION##/devpod-provider-gcloud-darwin-arm64
checksum: ##CHECKSUM_DARWIN_ARM64##
- os: windows
arch: amd64
path: https://github.com/loft-sh/devpod-provider-gcloud/releases/download/##VERSION##/devpod-provider-gcloud-windows-amd64.exe
checksum: ##CHECKSUM_WINDOWS_AMD64##
exec:
init: ${GCLOUD_PROVIDER} init
command: ${GCLOUD_PROVIDER} command
create: ${GCLOUD_PROVIDER} create
delete: ${GCLOUD_PROVIDER} delete
start: ${GCLOUD_PROVIDER} start
stop: ${GCLOUD_PROVIDER} stop
status: ${GCLOUD_PROVIDER} status