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

Update ingestion server removal IP with EC2 approach #4615

Merged
merged 4 commits into from
Jul 19, 2024

Conversation

stacimc
Copy link
Collaborator

@stacimc stacimc commented Jul 16, 2024

Fixes

Description

Updates the ingestion server removal IP to reflect changes discussed here (moving away from the ASG approach and back to managing EC2 instances more directly).

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (./ov just catalog/generate-docs for catalog
    PRs) or the media properties generator (./ov just catalog/generate-docs media-props
    for the catalog or ./ov just api/generate-docs for the API) where applicable.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@stacimc stacimc added 🟧 priority: high Stalls work on the project or its dependents 📄 aspect: text Concerns the textual material in the repository 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🧱 stack: ingestion server Related to the ingestion/data refresh server 🧱 stack: catalog Related to the catalog and Airflow DAGs labels Jul 16, 2024
@stacimc stacimc self-assigned this Jul 16, 2024
@stacimc stacimc requested a review from a team as a code owner July 16, 2024 01:41
@stacimc stacimc requested review from zackkrida, dhruvkb, AetherUnbound and sarayourfriend and removed request for dhruvkb July 16, 2024 01:41
@openverse-bot openverse-bot added 🧱 stack: documentation Related to Sphinx documentation 🧭 project: implementation plan An implementation plan for a project labels Jul 16, 2024
@stacimc
Copy link
Collaborator Author

stacimc commented Jul 16, 2024

Adding @sarayourfriend as a reviewer because of infrastructure implications, and since we first discussed this approach! Also pinging @AetherUnbound for the catalog.

Copy link

Full-stack documentation: https://docs.openverse.org/_preview/4615

Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again.

You can check the GitHub pages deployment action list to see the current status of the deployments.

Changed files 🔄:

Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

Great! Just two small comments, neither blocking. This is a great simplification and is a good step in the right direction to eventually remove the API from the workers, and just have them immediately start their job when starting. Doing that would make it easy to use spot instances for this work, saving us a huge sum of money on each run.

Comment on lines +444 to +448
- Note: it's possible to use this operator to launch all the workers at once
by setting the `min_count` and `max_count` parameters. We will instead be
using dynamic task mapping to create a separate task for creating each
indexer worker individually: this is so that if a single worker fails
later in the process, we can retry that worker in isolation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for making this explicit!

@sarayourfriend
Copy link
Collaborator

I've opened a PR with the required infrastructure code change to make this happen: https://github.com/WordPress/openverse-infrastructure/pull/980

Comment on lines +612 to +618
### ASG approach

An earlier draft of this implementation plan used an AutoScaling Group for each
environment. Airflow would use `set_desired_capacity` to set the ASG's capacity,
and the ASG itself would then spin up (and down) EC2 instances. A disadvantage
of this approach was that it is impossible to retry a single indexer worker.

Copy link
Member

Choose a reason for hiding this comment

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

Nice, this looks good. I've been meaning to suggest we find a standardized way to denote changes to our IPs and other documents. Perhaps a "changelog" section that links to the PR file diff and summarizes the changes?

What you've done seems sufficient for now, but reminded me to create an issue for this, so thanks 😄

#4619

Copy link
Collaborator

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

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

No objections, only one small formatting suggestion I found while looking at the rendered document. Looks good!

Comment on lines +444 to +448
- Note: it's possible to use this operator to launch all the workers at once
by setting the `min_count` and `max_count` parameters. We will instead be
using dynamic task mapping to create a separate task for creating each
indexer worker individually: this is so that if a single worker fails
later in the process, we can retry that worker in isolation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for making this explicit!

Co-authored-by: Madison Swain-Bowden <bowdenm@spu.edu>
@stacimc stacimc merged commit 6198601 into main Jul 19, 2024
43 checks passed
@stacimc stacimc deleted the update/ingestion-server-removal-ec2-approach branch July 19, 2024 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 aspect: text Concerns the textual material in the repository 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟧 priority: high Stalls work on the project or its dependents 🧭 project: implementation plan An implementation plan for a project 🧱 stack: catalog Related to the catalog and Airflow DAGs 🧱 stack: documentation Related to Sphinx documentation 🧱 stack: ingestion server Related to the ingestion/data refresh server
Projects
Status: Accepted
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants