Skip to content

Commit 7d88ce9

Browse files
authored
chore: adds voting-node deployment (#751)
1 parent 4b502f1 commit 7d88ce9

File tree

1 file changed

+225
-0
lines changed

1 file changed

+225
-0
lines changed

services/voting-node/blueprint.cue

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,230 @@
1+
import "encoding/json"
2+
13
project: {
24
name: "voting-node"
5+
6+
deployment: {
7+
on: {
8+
merge: {}
9+
tag: {}
10+
}
11+
12+
bundle: {
13+
env: string | *"dev"
14+
modules: main: {
15+
name: "app"
16+
version: "0.12.0"
17+
values: {
18+
deployment: {
19+
containers: main: {
20+
image: {
21+
name: _ @forge(name="CONTAINER_IMAGE")
22+
tag: _ @forge(name="GIT_HASH_OR_TAG")
23+
}
24+
env: {
25+
TESTNET_DBSYNC_URL: {
26+
secret: {
27+
name: "preprod-url"
28+
key: "url"
29+
}
30+
}
31+
MAINNET_DBSYNC_URL: {
32+
secret: {
33+
name: "mainnet-url"
34+
key: "url"
35+
}
36+
}
37+
EVENTDB_URL: {
38+
secret: {
39+
name: "eventdb-url"
40+
key: "url"
41+
}
42+
}
43+
COMMITTEE_CRS: {
44+
secret: {
45+
name: "generated"
46+
key: "crs"
47+
}
48+
}
49+
SECRET_SECRET: {
50+
secret: {
51+
name: "generated"
52+
key: "secret"
53+
}
54+
}
55+
DBSYNC_SSH_PRIVKEY: {
56+
secret: {
57+
name: "ssh"
58+
key: "private"
59+
}
60+
}
61+
DBSYNC_SSH_PUBKEY: {
62+
secret: {
63+
name: "ssh"
64+
key: "public"
65+
}
66+
}
67+
DBSYNC_SSH_HOST_KEY: {
68+
secret: {
69+
name: "ssh"
70+
key: "host-key"
71+
}
72+
}
73+
SSH_SNAPSHOT_TOOL_DESTINATION: {
74+
secret: {
75+
name: "ssh-address"
76+
key: "address"
77+
}
78+
}
79+
IDEASCALE_API_URL: {
80+
secret: {
81+
name: "external"
82+
key: "ideascale_url"
83+
}
84+
}
85+
IDEASCALE_API_TOKEN: {
86+
secret: {
87+
name: "external"
88+
key: "ideascale_token"
89+
}
90+
}
91+
SNAPSHOT_TOOL_SSH: value: string | *"true"
92+
SSH_SNAPSHOT_TOOL_PATH: value: string | *"/home/snapshot/.local/bin/snapshot_tool"
93+
SSH_SNAPSHOT_TOOL_OUTPUT_DIR: value: string | *"/home/snapshot/dev_snapshot_tool_out"
94+
GVC_API_URL: value: string | *"unused"
95+
IS_NODE_RELOADABLE: value: string | *"true"
96+
VOTING_HOST: value: string | *"0.0.0.0"
97+
VOTING_PORT: value: string | *"8000"
98+
VOTING_LOG_LEVEL: value: string | *"debug"
99+
JORM_PATH: value: string | *"jormungandr"
100+
JCLI_PATH: value: string | *"jcli"
101+
IDEASCALE_CONFIG_PATH: value: string | *"/configs/ideascale.json"
102+
IDEASCALE_CAMPAIGN_GROUP: value: string | *"66"
103+
IDEASCALE_STAGE_ID: value: string | *"4385"
104+
IDEASCALE_LOG_LEVEL: value: string | *"debug"
105+
IDEASCALE_LOG_FORMAT: value: string | *"text"
106+
SNAPSHOT_INTERVAL_SECONDS: value: string | *"1800"
107+
SNAPSHOT_CONFIG_PATH: value: string | *"/app/snapshot-importer-example-config.json"
108+
SNAPSHOT_OUTPUT_DIR: value: string | *"/tmp/snapshot-output"
109+
SNAPSHOT_NETWORK_IDS: value: string | *"testnet"
110+
SNAPSHOT_LOG_LEVEL: value: string | *"debug"
111+
SNAPSHOT_LOG_FORMAT: value: string | *"text"
112+
}
113+
mounts: {
114+
ideascale: {
115+
ref: config: name: "ideascale"
116+
path: "/configs/ideascale.json"
117+
subPath: "ideascale.json"
118+
}
119+
snapshot: {
120+
ref: volume: name: "snapshot"
121+
path: "/tmp/snapshot-output"
122+
readOnly: false
123+
}
124+
}
125+
ports: {
126+
http: port: 8080
127+
}
128+
securityContext: {}
129+
}
130+
hostname: "leader0"
131+
strategy: "Recreate"
132+
}
133+
134+
configs: ideascale: data: "ideascale.json": json.Marshal({
135+
proposals: {
136+
extra_field_mappings: {
137+
auto_translated: "auto_translated"
138+
brief: "challenge_brief"
139+
budget_breakdown: "please_provide_a_detailed_budget_breakdown"
140+
challenges_or_risks: "what_main_challenges_or_risks_do_you_foresee_to_deliver_this_project_successfully_"
141+
full_solution: "please_describe_your_proposed_solution"
142+
goal: "how_does_success_look_like_"
143+
how_solution_address_challenge: "please_describe_how_your_proposed_solution_will_address_the_challenge_"
144+
importance: "importance"
145+
metrics: "key_metrics_to_measure"
146+
new_proposal: "is_this_proposal_is_a_continuation_of_a_previously_funded_project_in_catalyst__or_an_entirely_new_o"
147+
progress_metrics: "what_will_you_measure_to_track_your_project_s_progress__and_how_will_you_measure_it_"
148+
relevant_link_1: "relevant_link_1"
149+
relevant_link_2: "website__github_repository__or_any_other_relevant_link__"
150+
relevant_link_3: "relevant_link_3"
151+
return_in_a_later_round: "if_you_are_funded__will_you_return_to_catalyst_in_a_later_round_for_further_funding__please_explain"
152+
sdg_rating: "sdg_rating"
153+
solution: "problem_solution"
154+
team_details: "please_provide_details_of_the_people_who_will_work_on_the_project_"
155+
timeline_and_key_milestones: "please_provide_a_detailed_plan__a_timeline__and_key_milestones_for_delivering_your_proposal_"
156+
}
157+
field_mappings: {
158+
funds: [
159+
"requested_funds",
160+
"requested_funds_in_ada",
161+
"requested_funds_coti",
162+
]
163+
proposer_relevant_experience: "relevant_experience"
164+
proposer_url: [
165+
"relevant_link_1",
166+
"website__github_repository__or_any_other_relevant_link__",
167+
"relevant_link_3",
168+
]
169+
public_key: "ada_payment_address__"
170+
}
171+
}
172+
proposals_scores_csv: {
173+
id_field: "proposal_id"
174+
score_field: "Rating"
175+
}
176+
})
177+
178+
secrets: {
179+
external: {
180+
ref: "voting-node/external"
181+
}
182+
"eventdb-url": {
183+
ref: "db/eventdb"
184+
template: url: "postgres://{{ .username }}:{{ .password }}@{{ .host }}:{{ .port }}/eventdb"
185+
}
186+
generated: {
187+
ref: "voting-node/generated"
188+
}
189+
mainnet: {
190+
ref: "db/dbsync-mainnet"
191+
global: true
192+
}
193+
"mainnet-url": {
194+
ref: "db/dbsync-mainnet"
195+
global: true
196+
template: url: "postgres://{{ .username }}:{{ .password }}@{{ .host }}:{{ .port }}/{{ .dbInstanceIdentifier }}"
197+
}
198+
preprod: {
199+
ref: "db/dbsync-preprod"
200+
global: true
201+
}
202+
"preprod-url": {
203+
ref: "db/dbsync-preprod"
204+
global: true
205+
template: url: "postgres://{{ .username }}:{{ .password }}@{{ .host }}:{{ .port }}/{{ .dbInstanceIdentifier }}"
206+
}
207+
ssh: {
208+
ref: "db/dbsync-ssh"
209+
global: true
210+
}
211+
"ssh-address": {
212+
ref: "db/dbsync-ssh"
213+
global: true
214+
template: address: "{{ .user }}@{{ .host }}"
215+
}
216+
}
217+
218+
service: {}
219+
220+
volumes: snapshot: {
221+
size: "1Gi"
222+
}
223+
}
224+
}
225+
}
226+
}
227+
3228
release: {
4229
docker: {
5230
on: {

0 commit comments

Comments
 (0)