Skip to content

Commit a2e95bc

Browse files
author
xavier
committed
im lost
1 parent 309ccd9 commit a2e95bc

40 files changed

+1107
-116
lines changed

helm2api/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ WORKDIR /app
33

44
RUN apt-get update && apt-get install -y curl wget
55

6-
ENV TAM_CMD="/app/local-eval.sh"
6+
ENV KTEA_EXECUTABLE="/app/local-eval.sh"
77

88
RUN wget -q https://get.helm.sh/helm-v3.4.0-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm \
99
&& chmod +x /usr/local/bin/helm
1010

11-
RUN wget -q https://github.com/nectar-cs/tam_server/releases/download/1.0.5/tam_server.tar.gz \
12-
&& tar -xf tam_server.tar.gz \
13-
&& mv tam_server /usr/local/bin/tam_server \
14-
&& chmod +x /usr/local/bin/tam_server
11+
RUN wget -q https://github.com/nmachine-io/ktea-executable-server/releases/download/1.0.8/ktea-executable-server.tar.gz \
12+
&& tar -xf ktea-executable-server.tar.gz \
13+
&& mv server /usr/local/bin/server \
14+
&& chmod +x /usr/local/bin/server
1515

1616
ADD . .

helm2api/cloudbuild.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
timeout: 1200s
2+
13
substitutions:
2-
_IMG_FQDN: us-central1-docker.pkg.dev/nectar-bazaar/public/helm2api:1.0.0
4+
_IMG_BASE: us-central1-docker.pkg.dev/nectar-bazaar/public/helm2api
35

46
images:
5-
- "${_IMG_FQDN}"
7+
- ${_IMG_BASE}:${TAG_NAME}
8+
- ${_IMG_BASE}:latest
69

710
steps:
811
- id: "Build image"
@@ -12,4 +15,6 @@ steps:
1215
- "build"
1316
- "."
1417
- "-t"
15-
- "${_IMG_FQDN}"
18+
- ${_IMG_BASE}:${TAG_NAME}
19+
- "-t"
20+
- ${_IMG_BASE}:latest

ice-cream/helm/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM us-central1-docker.pkg.dev/nectar-bazaar/public/helm2api:1.0.0
1+
FROM us-central1-docker.pkg.dev/nectar-bazaar/public/helm2api:1.0.1
22
WORKDIR /app
33
ADD . .
4-
CMD ["tam_server"]
4+
CMD ["server"]

ice-cream/kama/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dist/
1919
downloads/
2020
eggs/
2121
.eggs/
22-
lib/
2322
lib64/
2423
parts/
2524
sdist/

ice-cream/kama/configs/glances/glances.yaml

-24
This file was deleted.

ice-cream/kama/configs/glances/master-glances-provider.yaml

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
kind: ConcernCardAdapter
2+
id: org.concern-card-adapter.main-website
3+
title: Website
4+
spec:
5+
type: Block
6+
title: Website Status
7+
elements:
8+
- type: Section
9+
width: 1
10+
elements:
11+
- id::card-adapter.website.header
12+
- id::card-adapter.website.workload-dots
13+
- type: Section
14+
width: 1
15+
elements:
16+
- id::card-adapter.website.memory
17+
- id::card-adapter.website.cpu
18+
- id::card-adapter.website.alerts
19+
20+
---
21+
22+
kind: Provider
23+
id: card-adapter.website.header
24+
source:
25+
type: ThreePartHeader
26+
style:
27+
mb: 13px
28+
title:
29+
type: Line
30+
elements:
31+
- type: Text
32+
text: Ice-Cream Store
33+
style: [bold, calm]
34+
- type: ClearTag
35+
text: get::props concern=>status
36+
subtitle:
37+
type: Line
38+
elements:
39+
- type: Text
40+
text: "localhost:${get::props concern=>port_forward_spec.pod_port}"
41+
style: [hov_underline, hov_point]
42+
action:
43+
type: port_forward
44+
uri:
45+
kind: MergeSupplier
46+
source:
47+
- get::props concern=>port_forward_spec
48+
- logo_url: get::props concern=>logo
49+
- type: Icon
50+
name: open_in_new
51+
style:
52+
emotion: warning2
53+
graphic:
54+
type: Image
55+
uri: get::props concern=>logo
56+
57+
58+
---
59+
60+
kind: Provider
61+
id: card-adapter.website.workload-dots
62+
source:
63+
type: Line
64+
elements:
65+
- Workloads
66+
- type: StatusDots
67+
data: get::props concern=>pod_statuses
68+
shape: square
69+
spacing: 1.5px
70+
71+
---
72+
73+
kind: Provider
74+
id: card-adapter.website.memory
75+
source:
76+
type: SeriesSummary
77+
first: graph
78+
style:
79+
mt: -10px
80+
data:
81+
kind: SeriesSummarySupplier
82+
humanizer: kind::BytesHumanizer
83+
source:
84+
kind: PromMatrixToSeriesSupplier
85+
source: get::props concern=>mem_dump
86+
87+
---
88+
89+
kind: Provider
90+
id: card-adapter.website.cpu
91+
source:
92+
type: SeriesSummary
93+
first: graph
94+
style:
95+
width: 100%
96+
data:
97+
kind: SeriesSummarySupplier
98+
humanizer: kind::CoresHumanizer
99+
source:
100+
kind: PromMatrixToSeriesSupplier
101+
source: get::props concern=>cpu_dump
102+
103+
104+
105+
---
106+
107+
kind: Provider
108+
id: card-adapter.website.alerts
109+
source:
110+
type: SeriesSummary
111+
first: graph
112+
style:
113+
width: 100%
114+
data:
115+
kind: SeriesSummarySupplier
116+
humanizer: kind::CoresHumanizer
117+
source:
118+
kind: PromMatrixToSeriesSupplier
119+
source: get::props concern=>cpu_dump
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
kind: WebsiteHelper
2+
id: org.concern.main-website
3+
labels:
4+
space: app
5+
cached:
6+
best_url:
7+
kind: BestSvcUrlSupplier
8+
source: get::props svc
9+
10+
logo: get::&kind::IceCreamConsts>>site_logo
11+
12+
pod_statuses:
13+
kind: Supplier
14+
inherit: sdk.supplier.pods_in_dots_format
15+
pods: get::self>>svc=>pods
16+
17+
mem_dump:
18+
kind: Supplier
19+
inherit: nmachine.prom.supplier.deployment_memory
20+
resource_name: get::&kind::IceCreamConsts>>workload_name
21+
22+
cpu_dump:
23+
kind: Supplier
24+
inherit: nmachine.prom.supplier.deployment_cpu
25+
resource_name: get::&kind::IceCreamConsts>>workload_name

ice-cream/kama/main.py

+6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
from kama_sdk import entrypoint
44
from kama_sdk.model.base.model import models_man
55
from kama_sdk.core.core import utils, kaml_man
6+
from lib.consts import IceCreamConsts
7+
from lib.website_helper import WebsiteHelper
68

79

810
def register_self():
911
root_dir = os.path.dirname(os.path.abspath(__file__))
1012
yamls = utils.yamls_in_dir(f'{root_dir}/configs', recursive=True)
1113
models_man.add_app_descriptors(yamls)
14+
models_man.add_classes([
15+
IceCreamConsts,
16+
WebsiteHelper
17+
])
1218

1319

1420
def register_libraries():

ice-cream/kerbi/Dockerfile

+6-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
1-
FROM ruby:2.6.3-alpine3.10
2-
WORKDIR /app
3-
4-
# install packages and gems
5-
RUN apk --update add build-base libxslt-dev libxml2-dev
6-
ADD Gemfile Gemfile.lock ./
7-
RUN gem install bundler && bundle install
8-
9-
# add everything else
10-
ADD . /app
11-
12-
# trickery for versions
13-
ARG VERSION=none
14-
RUN sed -i -e "s/version: none"/"version: $VERSION/g" values.yaml
15-
RUN cat values.yaml
16-
17-
ENTRYPOINT ["bundle", "exec", "ruby", "/app/main.rb"]
1+
FROM us-central1-docker.pkg.dev/nectar-bazaar/public/kerbi2api:1.0.1
2+
ADD Gemfile Gemfile.lock /app/
3+
RUN bundle update --bundler
4+
RUN bundle
5+
ADD . .
6+
CMD ["server"]

ice-cream/kerbi/Dockerfile.tams

-38
This file was deleted.

kerbi2api/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ RUN git clone git://github.com/rbenv/ruby-build.git \
2020
&& $RUBY_PATH/plugins/ruby-build/install.sh
2121
RUN ruby-build $RUBY_VERSION $RUBY_PATH
2222

23-
RUN wget -q https://github.com/nectar-cs/tam_server/releases/download/1.0.3/tam_server.tar.gz \
24-
&& tar -xf tam_server.tar.gz \
25-
&& mv tam_server /usr/local/bin/tam_server \
26-
&& chmod +x /usr/local/bin/tam_server
23+
RUN wget -q https://github.com/nmachine-io/ktea-executable-server/releases/download/1.0.8/ktea-executable-server.tar.gz \
24+
&& tar -xf ktea-executable-server.tar.gz \
25+
&& mv server /usr/local/bin/server \
26+
&& chmod +x /usr/local/bin/server
2727

2828
WORKDIR /app
2929
RUN gem install bundler -v 2.1.4
3030
ADD local-eval.sh .
31-
ENV TAM_CMD="/app/local-eval.sh"
31+
ENV KTEA_EXECUTABLE="/app/local-eval.sh"

kerbi2api/cloudbuild.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
timeout: 1200s
22

33
substitutions:
4-
_IMG_FQDN: us-central1-docker.pkg.dev/nectar-bazaar/public/kerbi2api:1.0.0
4+
_IMG_BASE: us-central1-docker.pkg.dev/nectar-bazaar/public/kerbi2api
55

66
images:
7-
- "${_IMG_FQDN}"
7+
- ${_IMG_BASE}:${TAG_NAME}
8+
- ${_IMG_BASE}:latest
89

910
steps:
1011
- id: "Build image"
@@ -14,4 +15,6 @@ steps:
1415
- "build"
1516
- "."
1617
- "-t"
17-
- "${_IMG_FQDN}"
18+
- ${_IMG_BASE}:${TAG_NAME}
19+
- "-t"
20+
- ${_IMG_BASE}:latest

0 commit comments

Comments
 (0)