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

Director cli hookup #12

Merged
merged 13 commits into from
Jul 27, 2023
Merged

Conversation

jhiemstrawisc
Copy link
Member

@jhiemstrawisc jhiemstrawisc commented Jul 21, 2023

PR #7 introduced a framework for including the Director in the Pelican CLI, toward making all Pelican services available under a single binary. This commit extends that PR to hook the Director package up to the CLI, the Pelican's configuration mechanisms, and to actually sort out a few bugs related to the untested director code.

It should be noted that there are currently a few hacks in the code that need clearing up before any merge, but as of now the commit makes the following possible:
pelican director serve --cache-port 8000
This will serve the Director's cache-redirection service on port 8000 using a gin engine. When we've figured out how to handle Origin redirects and implemented an origin-redirect service, we'll be able to do:
pelican director serve --cache-port 8000 --origin-port 8001
to split apart the two endpoints.

As for the local lint... I'm still trying to figure out how to shut that feature off in my editor. Sorry for the noise!

bbockelm and others added 8 commits July 4, 2023 18:10
This has director code which compiles but does not populate the
origin/cache information nor does it do GeoIP yet.
PR #7 introduced a framework for including the Director in the Pelican CLI,
toward making all Pelican services available under a single binary. This commit
extends that PR to hook the Director package up to the CLI, the Pelican's
configuration mechanisms, and to actually sort out a few bugs related to the
untested director code.

It should be noted that there are currently a few hacks in the code that need
clearing up before any merge, but as of now the commit makes the following
possible:
`pelican director serve --cache-port 8000`
This will serve the Director's cache-redirection service on port 8000 using a gin
engine. When we've figured out how to handle Origin redirects and implemented an
origin-redirect service, we'll be able to do:
`pelican director serve --cache-port 8000 --origin-port 8001`
to split apart the two endpoints.

As for the local lint... I'm still trying to figure out how to shut that feature
off in my editor. Sorry for the noise!
The Director must be able to redirect to origins, so we modified
topology such that the needed information can be fed into the
Director. Now the `/api/v1.0/director/object` and
`/api/v1.0/director/origin` endpoints direct to caches and origins,
respectively.

There are also a few smaller bug fixes in here, like fixing the
ttlcache timing out and having no reload mechanism.
@bbockelm
Copy link
Collaborator

@jhiemstrawisc - there's still the merge conflict left to resolve. What else remains on the punch list?

@jhiemstrawisc
Copy link
Member Author

AFAIK, it should just be the merge conflict. I left that for myself to do this morning. I'm still waiting for the updates in topology (pretty sure that PR just needs a rebase and merge), but I was able to test with the new draft JSON that has the correct ports -- and ospool origin.

Once I get this merged, I'll start working on a deployment.

@jhiemstrawisc jhiemstrawisc marked this pull request as ready for review July 27, 2023 16:07
@jhiemstrawisc
Copy link
Member Author

@bbockelm I think this is ready

Copy link
Collaborator

@bbockelm bbockelm left a comment

Choose a reason for hiding this comment

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

Fantastic! Let's get this out the door.

@bbockelm bbockelm merged commit 17942e5 into PelicanPlatform:main Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants