Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upgrade to CKAN 2.11.0 official Docker image #71

Open
wants to merge 59 commits into
base: main
Choose a base branch
from

Conversation

aleksandralazoroska
Copy link
Collaborator

@aleksandralazoroska aleksandralazoroska commented Nov 14, 2024

This PR includes updates to the SDDI base for CKAN 2.11.0 along with the following key changes:

  • Updated the CKAN version to 2.11.0 in the sddi-base image.
  • Added required extensions as specified in Issue CKAN 2.11 and official base image support #64, integrating them into the environment.
  • Added necessary configurations for extensions, ensuring compatibility with the sddi-base.
  • Removed unsupported plugins and optimized the Docker build process to align with CKAN 2.11.0 standards and the sddi setup.
  • We are using the official Docker image from ckan/ckan-base.

Other todos:

ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \
ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \
ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600"

Copy link

@tino097 tino097 Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" && \
  ckan config-tool "${CKAN_INI}" "ckanext.security.redis.host = redis" && \
  ckan config-tool "${CKAN_INI}" "ckanext.security.redis.port = 6379" && \
  ckan config-tool "${CKAN_INI}" "ckanext.security.redis.db = 1"

we should add this settings

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would try to avoid hardcoding this. Or is this just defaults, that we can override with env vars?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The harvest configuration is fully removed from the Dockerfile.

@BWibo
Copy link
Member

BWibo commented Feb 15, 2025

The build currently fails with this:

#4 [1/4] FROM ghcr.io/tum-gis/ckan-sddi-dev:sddi-base-pr-71-0530154
#4 DONE 0.1s

#5 [3/4] ADD https://raw.githubusercontent.com/ckan/ckan/ckan-2.9.9/dev-requirements.txt /dev-requirements.txt
#5 DONE 0.2s

#6 [2/4] RUN mkdir /docker-entrypoint.d
#6 0.132 mkdir: cannot create directory ‘/docker-entrypoint.d’: File exists
#6 ERROR: process "/bin/sh -c mkdir /docker-entrypoint.d" did not complete successfully: exit code: 1

#5 [3/4] ADD https://raw.githubusercontent.com/ckan/ckan/ckan-2.9.9/dev-requirements.txt /dev-requirements.txt
#5 DONE 0.2s
------
 > [2/4] RUN mkdir /docker-entrypoint.d:
0.132 mkdir: cannot create directory ‘/docker-entrypoint.d’: File exists
------
Dockerfile.debug:1
--------------------
   1 | >>> ARG BASEIMAGE_REPOSITORY=ghcr.io/tum-gis/ckan-sddi-base
   2 |     ARG BASEIMAGE_VERSION=edge
   3 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c mkdir /docker-entrypoint.d" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c mkdir /docker-entrypoint.d" did not complete successfully: exit code: 1

@ilchebedelovski
Copy link
Collaborator

The build currently fails with this:


#4 [1/4] FROM ghcr.io/tum-gis/ckan-sddi-dev:sddi-base-pr-71-0530154

#4 DONE 0.1s



#5 [3/4] ADD https://raw.githubusercontent.com/ckan/ckan/ckan-2.9.9/dev-requirements.txt /dev-requirements.txt

#5 DONE 0.2s



#6 [2/4] RUN mkdir /docker-entrypoint.d

#6 0.132 mkdir: cannot create directory ‘/docker-entrypoint.d’: File exists

#6 ERROR: process "/bin/sh -c mkdir /docker-entrypoint.d" did not complete successfully: exit code: 1



#5 [3/4] ADD https://raw.githubusercontent.com/ckan/ckan/ckan-2.9.9/dev-requirements.txt /dev-requirements.txt

#5 DONE 0.2s

------

 > [2/4] RUN mkdir /docker-entrypoint.d:

0.132 mkdir: cannot create directory ‘/docker-entrypoint.d’: File exists

------

Dockerfile.debug:1

--------------------

   1 | >>> ARG BASEIMAGE_REPOSITORY=ghcr.io/tum-gis/ckan-sddi-base

   2 |     ARG BASEIMAGE_VERSION=edge

   3 |     

--------------------

ERROR: failed to solve: process "/bin/sh -c mkdir /docker-entrypoint.d" did not complete successfully: exit code: 1

Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c mkdir /docker-entrypoint.d" did not complete successfully: exit code: 1

Hey @BWibo thanks for the review, actually the build is failing because of the code in the Dockerfile.debug files, I even changed the FROM image version to 2.11.1 and again we have the some issue.

Is it ok for you to comment/remove the build part for the .debug images? The upgrade to 2.11.1 is not dependent on the .debug stages and that part is blocking our progress to making a final release for 2.11.1.

@BWibo
Copy link
Member

BWibo commented Feb 17, 2025

@ilchebedelovski It's working now, so your comment above is obsolete, right?
In general I would like to keep the debug image, otherwise we would have to change documentaition too.

# #############################################################################
# # Runtime stage
# #############################################################################
FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} as runtime
Copy link
Member

@BWibo BWibo Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sddi image needs to use our base image as base.
@MarijaKnezevic Discuss with @aleksandralazoroska @ilchebedelovski which extension go in which Dockerfile.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extensions are solved, part of them are in sddi-base and the rest of them are in sddi according to the documentation in the Readme file.

@ilchebedelovski
Copy link
Collaborator

@ilchebedelovski It's working now, so your comment above is obsolete, right? In general I would like to keep the debug image, otherwise we would have to change documentaition too.

Yes, now looks good, thanks.

@MarijaKnezevic MarijaKnezevic requested a review from BWibo February 18, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Brand new functionality, features, pages, workflows, endpoints, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove sddi-social image variant
5 participants