Compare commits

...

1 Commits
main ... nico

Author SHA1 Message Date
Nicolas CARON 882403258b add diags services 2024-11-20 17:21:09 +01:00
8 changed files with 82 additions and 2 deletions

View File

@ -18,12 +18,14 @@ mobility_accounts_dir = os.environ.get('MOBILITY_ACCOUNTS_DIR', 'src/mobility-ac
agenda_dir = os.environ.get('AGENDA_DIR', 'src/agenda') agenda_dir = os.environ.get('AGENDA_DIR', 'src/agenda')
fleets_dir = os.environ.get('FLEETS_DIR', 'src/fleets') fleets_dir = os.environ.get('FLEETS_DIR', 'src/fleets')
groups_management_dir = os.environ.get('GROUPS_MANAGEMENT_DIR', 'src/groups-management') groups_management_dir = os.environ.get('GROUPS_MANAGEMENT_DIR', 'src/groups-management')
diags_dir = os.environ.get('DIAGS_DIR', 'src/diags')
parcoursmob_image = os.environ.get('PARCOURSMOB_IMAGE', 'git.coopgo.io/coopgo-apps/parcoursmob') parcoursmob_image = os.environ.get('PARCOURSMOB_IMAGE', 'git.coopgo.io/coopgo-apps/parcoursmob')
mobility_accounts_image = os.environ.get('MOBILITY_ACCOUNTS_IMAGE', 'git.coopgo.io/coopgo-platform/mobility-accounts') mobility_accounts_image = os.environ.get('MOBILITY_ACCOUNTS_IMAGE', 'git.coopgo.io/coopgo-platform/mobility-accounts')
agenda_image = os.environ.get('AGENDA_IMAGE', 'git.coopgo.io/coopgo-platform/agenda') agenda_image = os.environ.get('AGENDA_IMAGE', 'git.coopgo.io/coopgo-platform/agenda')
fleets_image = os.environ.get('FLEETS_IMAGE', 'git.coopgo.io/coopgo-platform/fleets') fleets_image = os.environ.get('FLEETS_IMAGE', 'git.coopgo.io/coopgo-platform/fleets')
groups_management_image = os.environ.get('GROUPS_MANAGEMENT_IMAGE', 'git.coopgo.io/coopgo-platform/groups-management') groups_management_image = os.environ.get('GROUPS_MANAGEMENT_IMAGE', 'git.coopgo.io/coopgo-platform/groups-management')
diags_image = os.environ.get('DIAGS_IMAGE', 'git.coopgo.io/coopgo-platform/diags')
allow_k8s_contexts(allowed_k8s_context) allow_k8s_contexts(allowed_k8s_context)
@ -72,5 +74,11 @@ if os.path.exists(groups_management_dir):
print("Directory : {dir}".format(dir=groups_management_dir)) print("Directory : {dir}".format(dir=groups_management_dir))
deploy_go('groups-management', groups_management_dir, groups_management_image) deploy_go('groups-management', groups_management_dir, groups_management_image)
if os.path.exists(diags_dir):
diags_dir =os.path.realpath(diags_dir)
print("DIAGS")
print("Directory : {dir}".format(dir=diags_dir))
deploy_go('diags', diags_dir, diags_image)
k8s_yaml(kustomize('k8s_config/dev')) k8s_yaml(kustomize('k8s_config/dev'))

View File

@ -0,0 +1,16 @@
dev_env: true
storage:
db:
type: mongodb
mongodb:
host: mongodb
port: 27017
db_name: coopgo_platform
collections:
events: diags
services:
grpc:
port: 8080

View File

@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: diags
spec:
selector:
matchLabels:
app: diags
template:
metadata:
labels:
app: diags
spec:
containers:
- name: diags
image: git.coopgo.io/coopgo-platform/diags:dev
ports:
- name: grpc
containerPort: 8080
protocol: TCP
volumeMounts:
- name: diags-config-volume
mountPath: /config.yaml
subPath: config.yaml
volumes:
- name: diags-config-volume
configMap:
name: diags-config
items:
- key: config.yaml
path: config.yaml

View File

@ -0,0 +1,8 @@
resources:
- deployment.yaml
- service.yaml
configMapGenerator:
- name: diags-config
files:
- config.yaml

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: diags
spec:
selector:
app: diags
ports:
- port: 8080
name: grpc
targetPort: 8080

View File

@ -6,6 +6,7 @@ resources:
- ./fleets/ - ./fleets/
- ./groups-management/ - ./groups-management/
- ./mobility-accounts/ - ./mobility-accounts/
- ./diags/
# Apps # Apps
- ./parcoursmob/ - ./parcoursmob/

View File

@ -30,6 +30,8 @@ services:
dial: fleets:8080 dial: fleets:8080
agenda: agenda:
dial: agenda:8080 dial: agenda:8080
diags:
dial: diags:8080
navitia: navitia:
api_key: abcd api_key: abcd
@ -97,4 +99,7 @@ modules:
- name: Auto-école sociale (classique) - name: Auto-école sociale (classique)
- name: Information collective - name: Information collective
- name: Autre - name: Autre
documents_types:
- notice
- pieces
- other

View File

@ -13,7 +13,7 @@ spec:
spec: spec:
containers: containers:
- name: parcoursmob - name: parcoursmob
image: git.coopgo.io/coopgo-apps/parcoursmob image: git.coopgo.io/coopgo-apps/parcoursmob:dev
ports: ports:
- containerPort: 80 - containerPort: 80
volumeMounts: volumeMounts: