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

refactor concrete configs out of openeo-aggregator #117

Open
soxofaan opened this issue Sep 20, 2023 · 8 comments
Open

refactor concrete configs out of openeo-aggregator #117

soxofaan opened this issue Sep 20, 2023 · 8 comments

Comments

@soxofaan
Copy link
Member

As we're starting to play with multiple aggregator instances, it's confusing to have the original concrete (openeo platform) configs still hardcoded in this repo. It's probably better to refactor them out.
(would also help with #94)

@soxofaan
Copy link
Member Author

@soxofaan
Copy link
Member Author

I tried to work with more explicit env vars for clarity (replace ENV with OPENEO_AGGREGATOR_CONFIG), e.g. here:

docker_run_options_dev = ['-e OPENEO_AGGREGATOR_CONFIG=/home/openeo/aggregator/conf/aggregator.dev.py', '-p 8081:8080']
docker_run_options_prod = ['-e OPENEO_AGGREGATOR_CONFIG=/home/openeo/aggregator/conf/aggregator.prod.py', '-p 8081:8080']

but after a lot of head scratching I suspect these "docker_run_options" don't do anything anymore, the real env settings are now in puptap/hiera-resenv repo, as far as I understand

soxofaan added a commit that referenced this issue Sep 20, 2023
soxofaan added a commit that referenced this issue Sep 20, 2023
require full explicit config paths
soxofaan added a commit that referenced this issue Sep 20, 2023
require full explicit config paths
soxofaan added a commit that referenced this issue Sep 20, 2023
require full explicit config paths
soxofaan added a commit that referenced this issue Oct 4, 2023
now managed from hiera-resenv (see GDD-2861)
@soxofaan soxofaan self-assigned this Feb 2, 2024
@soxofaan
Copy link
Member Author

soxofaan commented Feb 7, 2024

started with new project openeo-platform-aggregator on VITO bitbucket

@soxofaan
Copy link
Member Author

Also to take into account here: https://github.com/Open-EO/openeo-aggregator/tree/master/integration-tests is currently openeo.cloud oriented as well. Make it more reusable or split off to standalone project?

@soxofaan
Copy link
Member Author

Strongly related with this ticket is refactoring out the concrete dockerfile (which has hard references to configs):

soxofaan added a commit that referenced this issue Aug 30, 2024
to allow including example configs in src tree
@soxofaan
Copy link
Member Author

started working some more on this, but got sidetracked by #151 due to change in openeo_driver

soxofaan added a commit that referenced this issue Aug 30, 2024
to allow including example configs in src tree
soxofaan added a commit that referenced this issue Aug 30, 2024
to allow including example configs in src tree
@soxofaan
Copy link
Member Author

soxofaan commented Sep 4, 2024

Hi @tcassaert,

I already took various steps in various repo's, but now I'm a bit unsure about the next steps. Can you help me? I'll try to explain the situation below:

Current setup of openEO Platform (aka openeo.cloud) build/deploy workflow:

  • Jenkins job openEO/job/openeo-aggregator
    • defined in openeo-aggregator repo: github.com/Open-EO/openeo-aggregator:Jenkinsfile
    • builds docker image openeo-aggregator
    • pushed to vito-docker-private-dev.artifactory.vgt.vito.be/openeo-aggregator
    • triggers a "dockerDeploy" with dev_hosts = 'docker-services-dev-01.vgt.vito.be'
      • involves sudo /bin/systemctl restart docker-openeo-aggregator.service
      • as far as I understand the details of the docker run are defined at hiera-resenv/resenv_generic_int/nodes/docker-services-dev-01.vgt.vito.be.yaml, e.g.
 openeo-aggregator:
   image: "vito-docker-private-dev.artifactory.vgt.vito.be/openeo-aggregator"
   ports:
     - 8081:8080
   env:
     - "OPENEO_BACKEND_CONFIG=/home/openeo/aggregator/conf/aggregator.dev.py"
     - "ENV=dev"
   subscribe: "Docker::Image[openeo-aggregator]"

This has to/is being split up a bit. Target situation:

  • Jenkins job openEO/openeo-aggregator defined at github.com/Open-EO/openeo-aggregator:Jenkinsfile juist builds a wheel. No docker images are to be built here anymore
  • Separate job openEO/openeo-platform-aggregator-image (already set up), defined at git.vito.be/BIGGEO/openeo-platform-aggregator (already set up)
    • builds docker image openeo-platform-aggregator with a containerImageBuildPipeline (already set up)
    • pushed to vito-docker-private-dev.artifactory.vgt.vito.be/openeo-platform-aggregator (already set up)
    • there is a "dockerDeploy" trigger that
      • pulls from (new) vito-docker-private-dev.artifactory.vgt.vito.be/openeo-platform-aggregator
      • uses a different OPENEO_BACKEND_CONFIG env vars.
        • for dev: "OPENEO_BACKEND_CONFIG=/home/openeo/aggregator/conf/openeo-platform-aggregator.dev.py"
        • for prod: "OPENEO_BACKEND_CONFIG=/home/openeo/aggregator/conf/openeo-platform-aggregator.prod.py"
    • create promotion job somewhere

I'm a bit unsure on how to do these lasts steps correctly in the appropriate repos, with the appropriate tools and workflows.

To avoid the risk of having to "hot swap" several things, I think it makes sense to:

  • keep exisiting "openeo-aggregator" resources in a first step
  • introduce new resources named "openeo-platform-aggregator" and make sure it works properly
  • switch over (e.g. DNS)
  • remove the now unused "openeo-aggregator" resources

(Once the above is done, I can continue removing the then unused resources from the openeo-aggregator repo)

@tcassaert
Copy link
Contributor

The flow that's implemented now:

  1. On push to openeo-aggregator, openeo-aggregator pipeline is triggered
  2. On succes, openeo-platform-aggregator-image pipeline is triggered
  • Creates image
  • Deploys image in dev
  • Creates promotion job for image and deploy in prod
  1. On success, openeo-aggregator-integrationtests pipeline is triggered
  2. The promotion job can be manually triggered to deploy to prod

https://openeocloud-dev.vito.be is already using the new deployment and the integrationtests ran successfully against it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants