Skip to content

Commit aa519e7

Browse files
committed
chore: sloppy draft
1 parent aaac0df commit aa519e7

167 files changed

Lines changed: 10135 additions & 4510 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.docker/entrypoint.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,19 @@ fi
1717

1818
echo "Druid Version: $(druid version)"
1919

20+
if [ "$1" = "druid-coldstarter" ] || [ "$1" = "/usr/bin/druid-coldstarter" ]; then
21+
exec "$@"
22+
fi
23+
2024
if [ ! -z "${DRUID_REGISTRY_HOST}" ] && [ ! -z "${DRUID_REGISTRY_USER}" ] && [ ! -z "${DRUID_REGISTRY_PASSWORD}" ];
2125
then
2226
echo "Logging into registry ${DRUID_REGISTRY_HOST}"
2327
druid login --host "${DRUID_REGISTRY_HOST}" -u "${DRUID_REGISTRY_USER}" -p "${DRUID_REGISTRY_PASSWORD}"
2428
fi
2529

26-
# Serve as default when no command is provided.
30+
# Daemon is the default container mode when no command is provided.
2731
if [ -z "$input" ]; then
28-
args=(serve)
29-
30-
if [ ! -z "${DRUID_PORT}" ];
31-
then
32-
args+=("--tcp")
33-
args+=("--port" "${DRUID_PORT}")
34-
fi
32+
args=(daemon)
3533

3634
# Reuse global args (cwd/config) for serve as well
3735
args+=("${global_args[@]}")

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
name: build-artifacts
3232
path: |
3333
bin/druid
34-
bin/druid-client
3534
bin/druid-coldstarter
3635
.docker/entrypoint.sh
3736
.docker/druid-install-command.sh
@@ -64,7 +63,6 @@ jobs:
6463
make_latest: true
6564
files: |
6665
bin/druid
67-
bin/druid-client
6866
bin/druid-coldstarter
6967
.docker/entrypoint.sh
7068
.docker/druid-install-command.sh

.github/workflows/docker-builds.yml

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -60,77 +60,6 @@ jobs:
6060
DRUID_ARTIFACTS_REGISTRY_USERNAME: ${{ secrets.DRUID_ARTIFACTS_REGISTRY_USERNAME }}
6161
DRUID_ARTIFACTS_REGISTRY_TOKEN: ${{ secrets.DRUID_ARTIFACTS_REGISTRY_TOKEN }}
6262

63-
docker-coldstarter-amd64:
64-
uses: ./.github/workflows/docker-build-reusable.yml
65-
with:
66-
dockerfile: Dockerfile.coldstarter
67-
runs_on: ubuntu-latest
68-
tags: |
69-
highcard/druid-coldstarter:${{ inputs.version_tag }}-amd64
70-
artifacts.druid.gg/druid-team/druid-coldstarter:${{ inputs.version_tag }}-amd64
71-
build_args: |
72-
VERSION=${{ inputs.version_tag }}
73-
secrets:
74-
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
75-
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
76-
DRUID_ARTIFACTS_REGISTRY_USERNAME: ${{ secrets.DRUID_ARTIFACTS_REGISTRY_USERNAME }}
77-
DRUID_ARTIFACTS_REGISTRY_TOKEN: ${{ secrets.DRUID_ARTIFACTS_REGISTRY_TOKEN }}
78-
79-
docker-coldstarter-arm64:
80-
uses: ./.github/workflows/docker-build-reusable.yml
81-
with:
82-
dockerfile: Dockerfile.coldstarter
83-
runs_on: ubuntu-24.04-arm
84-
tags: |
85-
highcard/druid-coldstarter:${{ inputs.version_tag }}-arm64
86-
artifacts.druid.gg/druid-team/druid-coldstarter:${{ inputs.version_tag }}-arm64
87-
build_args: |
88-
VERSION=${{ inputs.version_tag }}
89-
secrets:
90-
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
91-
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
92-
DRUID_ARTIFACTS_REGISTRY_USERNAME: ${{ secrets.DRUID_ARTIFACTS_REGISTRY_USERNAME }}
93-
DRUID_ARTIFACTS_REGISTRY_TOKEN: ${{ secrets.DRUID_ARTIFACTS_REGISTRY_TOKEN }}
94-
95-
docker-coldstarter-manifest:
96-
name: Create multi-arch coldstarter manifests
97-
needs: [docker-coldstarter-amd64, docker-coldstarter-arm64]
98-
runs-on: ubuntu-latest
99-
steps:
100-
- name: Login to Docker Hub
101-
uses: docker/login-action@v3
102-
with:
103-
username: ${{ secrets.DOCKERHUB_USERNAME }}
104-
password: ${{ secrets.DOCKERHUB_TOKEN }}
105-
- name: Create and push coldstarter manifests
106-
uses: Noelware/docker-manifest-action@v1
107-
with:
108-
inputs: highcard/druid-coldstarter:${{ inputs.version_tag }}-amd64,highcard/druid-coldstarter:${{ inputs.version_tag }}-arm64
109-
tags: >-
110-
highcard/druid-coldstarter:${{ inputs.version }},
111-
highcard/druid-coldstarter:${{ inputs.version_tag }}${{ inputs.is_pr != true && ',highcard/druid-coldstarter:latest,highcard/druid-coldstarter:stable' || '' }}
112-
push: true
113-
114-
docker-coldstarter-manifest-artifacts:
115-
name: Create multi-arch coldstarter manifests (artifacts registry)
116-
needs: [docker-coldstarter-amd64, docker-coldstarter-arm64]
117-
runs-on: ubuntu-latest
118-
steps:
119-
- name: Login to Artifacts Registry
120-
uses: docker/login-action@v3
121-
with:
122-
registry: artifacts.druid.gg
123-
username: ${{ secrets.DRUID_ARTIFACTS_REGISTRY_USERNAME }}
124-
password: ${{ secrets.DRUID_ARTIFACTS_REGISTRY_TOKEN }}
125-
- name: Create and push coldstarter manifests (artifacts)
126-
uses: Noelware/docker-manifest-action@v1
127-
with:
128-
inputs: artifacts.druid.gg/druid-team/druid-coldstarter:${{ inputs.version_tag }}-amd64,artifacts.druid.gg/druid-team/druid-coldstarter:${{ inputs.version_tag }}-arm64
129-
tags: >-
130-
artifacts.druid.gg/druid-team/druid-coldstarter:${{ inputs.version }},
131-
artifacts.druid.gg/druid-team/druid-coldstarter:${{ inputs.version_tag }}${{ inputs.is_pr != true && ',artifacts.druid.gg/druid-team/druid-coldstarter:latest,artifacts.druid.gg/druid-team/druid-coldstarter:stable' || '' }}
132-
push: true
133-
13463
docker-base-manifest:
13564
name: Create multi-arch base manifests
13665
needs: [docker-base-amd64, docker-base-arm64]

.github/workflows/pr.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
name: build-artifacts
4949
path: |
5050
bin/druid
51-
bin/druid-client
5251
bin/druid-coldstarter
5352
.docker/entrypoint.sh
5453
.docker/druid-install-command.sh
@@ -75,7 +74,6 @@ jobs:
7574
prerelease: true
7675
files: |
7776
bin/druid
78-
bin/druid-client
7977
bin/druid-coldstarter
8078
.docker/entrypoint.sh
8179
.docker/druid-install-command.sh

.vscode/launch.json

Lines changed: 53 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,36 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "druid: serve",
5+
"name": "druid: daemon",
66
"type": "go",
77
"request": "launch",
88
"mode": "debug",
99
"console": "integratedTerminal",
1010
"program": "${workspaceFolder}/apps/druid",
11+
"preLaunchTask": "k3d: build/import druid-cli pull image",
12+
"env": {
13+
"DRUID_K8S_PULL_IMAGE": "druid-cli:local"
14+
},
1115
"args": [
12-
"serve",
16+
"daemon",
1317
"--socket",
1418
"/tmp/druid-vscode-runtime.sock",
19+
"--listen",
20+
"127.0.0.1:8081",
21+
"--public-listen",
22+
"127.0.0.1:8082",
23+
"--worker-callback-listen",
24+
"0.0.0.0:8083",
25+
"--worker-callback-url",
26+
"http://host.docker.internal:8083",
1527
"--state-dir",
1628
"${workspaceFolder}/.runtime-state",
1729
"--runtime",
18-
"${input:runtimeBackend}"
30+
"${input:runtimeBackend}",
31+
"--k8s-kubeconfig",
32+
"${env:HOME}/.kube/config",
33+
"--k8s-namespace",
34+
"default"
1935
]
2036
},
2137
{
@@ -69,12 +85,12 @@
6985
]
7086
},
7187
{
72-
"name": "druid-client: login",
88+
"name": "druid: login",
7389
"type": "go",
7490
"request": "launch",
7591
"mode": "debug",
7692
"console": "integratedTerminal",
77-
"program": "${workspaceFolder}/apps/druid-client",
93+
"program": "${workspaceFolder}/apps/druid",
7894
"cwd": "${workspaceFolder}",
7995
"args": [
8096
"login",
@@ -87,38 +103,38 @@
87103
]
88104
},
89105
{
90-
"name": "druid-client: pull",
106+
"name": "druid: pull",
91107
"type": "go",
92108
"request": "launch",
93109
"mode": "debug",
94110
"console": "integratedTerminal",
95-
"program": "${workspaceFolder}/apps/druid-client",
111+
"program": "${workspaceFolder}/apps/druid",
96112
"args": [
97113
"pull",
98114
"${input:artifactRef}",
99115
"${workspaceFolder}/${input:scrollPath}"
100116
]
101117
},
102118
{
103-
"name": "druid-client: push",
119+
"name": "druid: push",
104120
"type": "go",
105121
"request": "launch",
106122
"mode": "debug",
107123
"console": "integratedTerminal",
108-
"program": "${workspaceFolder}/apps/druid-client",
124+
"program": "${workspaceFolder}/apps/druid",
109125
"args": [
110126
"push",
111127
"${input:artifactRef}",
112128
"${workspaceFolder}/${input:scrollPath}"
113129
]
114130
},
115131
{
116-
"name": "druid-client: push category",
132+
"name": "druid: push category",
117133
"type": "go",
118134
"request": "launch",
119135
"mode": "debug",
120136
"console": "integratedTerminal",
121-
"program": "${workspaceFolder}/apps/druid-client",
137+
"program": "${workspaceFolder}/apps/druid",
122138
"args": [
123139
"push",
124140
"category",
@@ -128,56 +144,58 @@
128144
]
129145
},
130146
{
131-
"name": "druid-client: create",
147+
"name": "druid: create",
132148
"type": "go",
133149
"request": "launch",
134150
"mode": "debug",
135151
"console": "integratedTerminal",
136-
"program": "${workspaceFolder}/apps/druid-client",
152+
"program": "${workspaceFolder}/apps/druid",
137153
"cwd": "${workspaceFolder}",
138154
"args": [
139155
"--daemon-socket",
140156
"/tmp/druid-vscode-runtime.sock",
141157
"create",
142-
"--state-dir",
143-
"${workspaceFolder}/.runtime-state",
144158
"${input:artifactPath}"
145159
]
146160
},
147161
{
148-
"name": "druid-client: register",
162+
"name": "druid: dev",
149163
"type": "go",
150164
"request": "launch",
151165
"mode": "debug",
152166
"console": "integratedTerminal",
153-
"program": "${workspaceFolder}/apps/druid-client",
167+
"program": "${workspaceFolder}/apps/druid",
154168
"args": [
155169
"--daemon-socket",
156170
"/tmp/druid-vscode-runtime.sock",
157-
"register",
158-
"${workspaceFolder}/${input:scrollPath}"
171+
"dev",
172+
"${input:scrollId}",
173+
"--watch",
174+
"data/private/dist",
175+
"--command",
176+
"${input:commandName}"
159177
]
160178
},
161179
{
162-
"name": "druid-client: list",
180+
"name": "druid: list",
163181
"type": "go",
164182
"request": "launch",
165183
"mode": "debug",
166184
"console": "integratedTerminal",
167-
"program": "${workspaceFolder}/apps/druid-client",
185+
"program": "${workspaceFolder}/apps/druid",
168186
"args": [
169187
"--daemon-socket",
170188
"/tmp/druid-vscode-runtime.sock",
171189
"list"
172190
]
173191
},
174192
{
175-
"name": "druid-client: describe",
193+
"name": "druid: describe",
176194
"type": "go",
177195
"request": "launch",
178196
"mode": "debug",
179197
"console": "integratedTerminal",
180-
"program": "${workspaceFolder}/apps/druid-client",
198+
"program": "${workspaceFolder}/apps/druid",
181199
"args": [
182200
"--daemon-socket",
183201
"/tmp/druid-vscode-runtime.sock",
@@ -186,12 +204,12 @@
186204
]
187205
},
188206
{
189-
"name": "druid-client: ports",
207+
"name": "druid: ports",
190208
"type": "go",
191209
"request": "launch",
192210
"mode": "debug",
193211
"console": "integratedTerminal",
194-
"program": "${workspaceFolder}/apps/druid-client",
212+
"program": "${workspaceFolder}/apps/druid",
195213
"args": [
196214
"--daemon-socket",
197215
"/tmp/druid-vscode-runtime.sock",
@@ -200,12 +218,12 @@
200218
]
201219
},
202220
{
203-
"name": "druid-client: run",
221+
"name": "druid: run",
204222
"type": "go",
205223
"request": "launch",
206224
"mode": "debug",
207225
"console": "integratedTerminal",
208-
"program": "${workspaceFolder}/apps/druid-client",
226+
"program": "${workspaceFolder}/apps/druid",
209227
"args": [
210228
"--daemon-socket",
211229
"/tmp/druid-vscode-runtime.sock",
@@ -215,12 +233,12 @@
215233
]
216234
},
217235
{
218-
"name": "druid-client: delete",
236+
"name": "druid: delete",
219237
"type": "go",
220238
"request": "launch",
221239
"mode": "debug",
222240
"console": "integratedTerminal",
223-
"program": "${workspaceFolder}/apps/druid-client",
241+
"program": "${workspaceFolder}/apps/druid",
224242
"args": [
225243
"--daemon-socket",
226244
"/tmp/druid-vscode-runtime.sock",
@@ -229,12 +247,12 @@
229247
]
230248
},
231249
{
232-
"name": "druid-client: attach",
250+
"name": "druid: attach",
233251
"type": "go",
234252
"request": "launch",
235253
"mode": "debug",
236254
"console": "integratedTerminal",
237-
"program": "${workspaceFolder}/apps/druid-client",
255+
"program": "${workspaceFolder}/apps/druid",
238256
"args": [
239257
"--daemon-socket",
240258
"/tmp/druid-vscode-runtime.sock",
@@ -251,8 +269,8 @@
251269
"console": "integratedTerminal",
252270
"program": "${workspaceFolder}/apps/druid-coldstarter",
253271
"args": [
254-
"--runtime-config",
255-
"${workspaceFolder}/${input:scrollPath}/data/.druid/runtime.json",
272+
"--root",
273+
"${workspaceFolder}/${input:scrollPath}",
256274
"--status-file",
257275
"coldstart/status.json"
258276
]
@@ -284,9 +302,10 @@
284302
"type": "pickString",
285303
"description": "Runtime backend",
286304
"options": [
305+
"kubernetes",
287306
"docker"
288307
],
289-
"default": "docker"
308+
"default": "kubernetes"
290309
},
291310
{
292311
"id": "scrollPath",

0 commit comments

Comments
 (0)