Resolve "Docker images created propely"

Proposers

  • Jorge Moratinos Salcines (Telefónica)

Description

We must fix some issues related with deployment and generation of images with CI/CD. Also we will setup propely the path for docker images at registry:

  • development -> /ocf/capif/dev/:<commit_ci>
  • staging -> /ocf/capif/staging/:staging
  • release -> /ocf/capif/prod/:<release_version>

This will decrease the number of rows at container registry, by grouping them in same path with different version for each branch at development.

On the other hand, celery has some library issue and dockerfile must be fixed.

Acknowledgements

This work is funded by the European Commission through HORIZON-JU-SNS-2022 6G-VERSUS project with Grant Agreement number 101192633.

Edited by Jorge Moratinos

Merge request reports

Loading
+1 −1
Changes for helm/00_capif_monitoring/charts/fluentbit/values.yaml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ image:
  repository: grafana/fluent-bit-plugin-loki
  pullPolicy: Always
  # Overrides the image tag whose default is the chart appVersion.
  tag: "latest"
  tag: "3.6.21"

imagePullSecrets: []
nameOverride: ""
+1 −1
Changes for helm/00_capif_monitoring/charts/grafana/values.yaml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ image:
  repository: grafana/grafana
  pullPolicy: Always
  # Overrides the image tag whose default is the chart appVersion.
  tag: "latest"
  tag: "12.3.0"

imagePullSecrets: []
nameOverride: ""
+2 −2
Changes for helm/00_capif_monitoring/charts/renderer/values.yaml: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ image:
  repository: grafana/grafana-image-renderer
  pullPolicy: Always
  # Overrides the image tag whose default is the chart appVersion.
  tag: "latest"
  tag: "v5.12.11"

imagePullSecrets: []
nameOverride: ""
@@ -71,7 +71,7 @@ resources:
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  limits:
    cpu: 200m
    memory: 256Mi
    memory: 768Mi
  requests:
    cpu: 1m
    memory: 1Mi
+6
Changes for services/celery/.dockerignore: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
.git
__pycache__
*.pyc
.venv
celerybeat-schedule*
*.log
 No newline at end of file
+13 −3
Changes for services/celery/Dockerfile: 13 added lines, 3 removed lines.
Original line number Diff line number Diff line
FROM labs.etsi.org:5050/ocf/capif/python:3.13-slim

# User withouth privileges
RUN useradd --create-home --uid 1000 celery \
 && mkdir -p /celery \
 && chown celery:celery /celery

WORKDIR /celery

# Dependencies as root
COPY requirements.txt /celery/
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt \
 && pip check

COPY . /celery
# Code and script with propely user and permissions
COPY --chown=celery:celery . /celery
COPY --chown=celery:celery --chmod=755 start_celery.sh /celery/

RUN chmod +x /celery/start_celery.sh
# Next commands executed as celery user
USER celery

CMD ["/celery/start_celery.sh"]
Loading
Loading