Skip to content

Commit d21eac1

Browse files
committed
add(Makefile): setup and k9s commands, minor fixes
1 parent 35f8c38 commit d21eac1

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ kubeconfig*.yaml
55
kubeconfig*.yml
66
kubeconfig*.conf
77

8+
.env
9+
810
cache.yaml
911
default.log

Makefile

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.ONESHELL:
66
expose-services:
7-
kubectl --kubeconfig=$(KUBECONFIG) -n $(NAMESPACE) port-forward service/ecde-webapp 8080:$(WEBAPP_PORT) & \
7+
kubectl --kubeconfig=$(KUBECONFIG) -n $(NAMESPACE) port-forward service/ecde-webapp 8080:80 & \
88
kubectl --kubeconfig=$(KUBECONFIG) -n $(NAMESPACE) port-forward service/ecde-api $(APISERVER_PORT):$(APISERVER_PORT) & \
99
kubectl --kubeconfig=$(KUBECONFIG) -n $(NAMESPACE) port-forward service/skinny-wms $(SKINNYWMS_PORT):$(SKINNYWMS_PORT) & \
1010
echo "Press CTRL-C to stop port forwarding and exit the script"
@@ -13,6 +13,16 @@ expose-services:
1313
dev:
1414
devspace --kubeconfig=$(KUBECONFIG) -n $(NAMESPACE) run-pipeline deploy
1515

16+
k9s:
17+
k9s --kubeconfig=$(KUBECONFIG)
18+
19+
.env:
20+
@echo "KUBECONFIG=./kubeconfig.yaml\nNAMESPACE=${USER}-ecde-dev\n\nAPISERVER_PORT=5000\nSKINNYWMS_PORT=5001" > $@
21+
22+
SILENT:
23+
setup: .env
24+
@echo "\e[1;32mDone!\e[0m\n\e[1;3;33mPlease edit the values in the '.env' file and then run 'make dev' to deploy the application\e[0m"
25+
1626
purge:
1727
devspace --kubeconfig=$(KUBECONFIG) -n $(NAMESPACE) purge \
1828
kubectl delete pv ${USER}-pv-wms

devspace.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ deployments:
2424
pvName: ${USER}-pv-wms
2525
storage: 10Gi
2626
storageclass: nfs-csi
27+
apiServer:
28+
port: ${APISERVER_PORT}
29+
skinnyWms:
30+
port: ${SKINNYWMS_PORT}
2731

2832
dev:
2933
api-server:

ecde-application/templates/api.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ spec:
2626
value: {{ .Values.apiServer.env.rootPath }}
2727
- name: MODE
2828
value: {{ .Values.apiServer.env.mode }}
29+
{{- if .Values.apiServer.env.allowedOrigin }}
2930
- name: ALLOWED_ORIGIN
3031
value: {{ .Values.apiServer.env.allowedOrigin }}
32+
{{- end }}
3133
- name: WMS_SERVER
3234
value: {{ .Values.apiServer.env.wmsServer }}:$(SKINNY_WMS_SERVICE_PORT_WMS_PORT)
3335
- name: WMS_DATA_DIR

ecde-application/templates/ingress.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.ingress.enabled }}
1+
{{- if .Values.ingress.enable }}
22
apiVersion: networking.k8s.io/v1
33
kind: Ingress
44
metadata:

ecde-application/values.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ apiServer:
1313
env:
1414
rootPath: /c3s-apps/ecde/api
1515
mode: production
16-
wmsServer: http://ecds-dev-cci2.copernicus-climate.eu/ecde-wms
16+
wmsServer: http://ecds-dev.bopen.compute.cci2.ecmwf.int/ecde-wms
1717
wmsDataDir: /skinnywms/appdata
1818
wmsStyleDir: /skinnywms/styles
1919
skinnyWms:
2020
image: ecmwf/skinnywms # image for application
2121
tag: 0.10.0 # image tag to use (this )
2222
port: 5000 # Port exposed by the application
23-
replicas: 0
23+
replicas: 1
2424
env:
2525
skinnywmsUwsgiWorkers: $(SKINNYWMS_UWSGI_WORKERS:-4)
2626
skinnywmsDataPath: /skinnywms/appdata
@@ -35,11 +35,11 @@ sharedPvc:
3535
ingress:
3636
enable: true
3737
# Hostname where the app will be published, this must be mapped to the cluster described by the KUBECONFIG
38-
hostname: ecds-dev-cci2.copernicus-climate.eu
38+
hostname: ecds-dev.bopen.compute.cci2.ecmwf.int
3939
# Path to the application, this must be included in the env when building a JS application
4040
webappPath: /c3s-apps/ecde/
4141
apiPath: /c3s-apps/ecde/api/
4242
# SSL certificate secret name:
4343
secretName: star.copernicus-climate.eu
44-
ingressclass: nginx-dev
44+
ingressclass: nginx-c3s
4545

0 commit comments

Comments
 (0)