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

Service for searching across kubernetes git repositories #96

Closed
wants to merge 1 commit into from

Conversation

dims
Copy link
Member

@dims dims commented Dec 15, 2017

No description provided.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 15, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 15, 2017
@dims
Copy link
Member Author

dims commented Dec 15, 2017

/assign @ixdy

cc @fejta @BenTheElder

Hey @ixdy, i'd like to add a new service for searching across all our git repositories. Can you please take a look when you get a chance?

Thanks,
dims

@dims
Copy link
Member Author

dims commented Dec 15, 2017

oh i have one running if you want to try it - http://dims.dynu.net/hound/

hound/Dockerfile Outdated

COPY config.json /data/config.json

RUN apt-get update && apt-get install -y --no-install-recommends \
Copy link
Member

Choose a reason for hiding this comment

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

If you are going to build in a container, why not use the golang container?

This is going to produce a pretty big image - should it use build stages to minimize?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ack. switching to FROM golang

"dbpath": "data",
"repos": {
"kubernetes": {
"url": "https://github.com/kubernetes/kubernetes.git",
Copy link
Member

Choose a reason for hiding this comment

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

no way to say "all repos under an org" ? feature request time?

Copy link
Member Author

Choose a reason for hiding this comment

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

will check if they support this.

resources:
limits:
cpu: 0.1
memory: 128Mi
Copy link
Member

Choose a reason for hiding this comment

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

empirical or wild guess?

Copy link
Member Author

Choose a reason for hiding this comment

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

copy-paste. removing

template:
metadata:
labels:
app: gcsweb
Copy link
Member

Choose a reason for hiding this comment

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

copy-paster artifact?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep. fixing

terminationGracePeriodSeconds: 30
containers:
- name: hound
image: gcr.io/google_containers/hound:0.1.0
Copy link
Member

Choose a reason for hiding this comment

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

most of our images are tagged vX.Y.Z now

Copy link
Member Author

Choose a reason for hiding this comment

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

ack switching

type: LoadBalancer
# FIXME(dims) - we need a fixed IP address for the load balancer
#loadBalancerIP: 104.197.177.166
ports:
Copy link
Member

Choose a reason for hiding this comment

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

we really need to get kube-lego or something running in the utility cluster, for HTTPS

Copy link
Member Author

Choose a reason for hiding this comment

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

Ack.

Copy link
Member

Choose a reason for hiding this comment

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

indeed. #38 :)

@dims dims force-pushed the add-hound-search-app branch from 67fc1cb to 1f5e40e Compare December 15, 2017 17:23
@dims dims changed the title [WIP] service for searching across kubernetes git repositories Service for searching across kubernetes git repositories Dec 23, 2017
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 23, 2017
@dims
Copy link
Member Author

dims commented Jan 5, 2018

/assign @fejta

@fejta @ixdy - all i need is a loadBalancerIP and this is ready to go ... please help when you get a chance.

hound/Makefile Outdated
# limitations under the License.

TAG = v0.1.0
IMAGE_NAME = gcr.io/google_containers/hound
Copy link
Member

Choose a reason for hiding this comment

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

can we please not put this in gcr.io/google-containers? there's already too much there.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ixdy what's a good spot? i was just following the previous pattern.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure. we may need a utility project or something.

Copy link
Member

@ixdy ixdy left a comment

Choose a reason for hiding this comment

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

is there a reason to build our own image rather than just using the upstream image from dockerhub and loading config.json as a configmap?

hound/Dockerfile Outdated
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang
Copy link
Member

Choose a reason for hiding this comment

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

for reproducibility, maybe specify a version here?

Copy link
Member Author

Choose a reason for hiding this comment

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

ack. doing that

hound/Makefile Outdated
# limitations under the License.

TAG = v0.1.0
IMAGE_NAME = gcr.io/google_containers/hound
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure. we may need a utility project or something.

hound/Dockerfile Outdated

ENV GOPATH /go

RUN go get github.com/etsy/hound/cmds/...
Copy link
Member

Choose a reason for hiding this comment

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

this is also not reproducible. :(

Copy link
Member Author

Choose a reason for hiding this comment

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

they dont' have any recent tags, let me pin it to a recent SHA/hash

@thockin
Copy link
Member

thockin commented Jan 5, 2018 via email

@dims
Copy link
Member Author

dims commented Jan 6, 2018

published @ docker.io/dims/hound:v0.1.0

https://hub.docker.com/r/dims/hound/tags/

@fejta
Copy link
Contributor

fejta commented Jan 8, 2018

/unassign
/assign @thockin

@k8s-ci-robot k8s-ci-robot assigned thockin and unassigned fejta Jan 8, 2018
@ixdy
Copy link
Member

ixdy commented Jan 9, 2018

@dims did you mean to push a new commit here, too?

@dims dims force-pushed the add-hound-search-app branch from 1f5e40e to a8894ab Compare January 9, 2018 00:59
@dims
Copy link
Member Author

dims commented Jan 9, 2018

whoops! done @ixdy

@thockin
Copy link
Member

thockin commented Jan 9, 2018

If we are going to host this, the directory should be named hound.k8s.io or codesearch.k8s,io or whatever we call it..

@dims
Copy link
Member Author

dims commented Jan 9, 2018

@thockin done

@dims
Copy link
Member Author

dims commented Jan 20, 2018

@thockin the rename is done. PTAL

@dims
Copy link
Member Author

dims commented Jan 26, 2018

let's revive this if needed.

@dims dims closed this Jan 26, 2018
@mtaufen
Copy link
Contributor

mtaufen commented Feb 16, 2018

Was there a reason we quit this effort? This looks pretty cool.

@thockin
Copy link
Member

thockin commented Apr 3, 2018

I really want this. @dims - worth reviving?

@dims dims reopened this Apr 3, 2018
@dims dims force-pushed the add-hound-search-app branch from 672fafb to 64e4316 Compare April 3, 2018 19:00
@dims
Copy link
Member Author

dims commented Apr 3, 2018

@thockin happy to!

@dims
Copy link
Member Author

dims commented Apr 3, 2018

worst case we can throw it on GAE ( https://gist.github.com/dims/2cf8363d91c95535eecd586f57ec0ccf ) though we have to fix up the ports from 6080 to 8080 for that

@dims
Copy link
Member Author

dims commented Apr 4, 2018

i am running an instance on GAE if you want to kick the tires - https://k8s-code.appspot.com - don't know how long i'll leave it up there (not sure how much it will cost)

@thockin
Copy link
Member

thockin commented Apr 6, 2018 via email

@dims
Copy link
Member Author

dims commented Apr 6, 2018

https://k8s-code.appspot.com (note the '-')

@mtaufen
Copy link
Contributor

mtaufen commented Apr 6, 2018 via email

terminationGracePeriodSeconds: 30
containers:
- name: hound
image: gcr.io/google_containers/hound:v0.1.0
Copy link
Member

Choose a reason for hiding this comment

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

You should probably have a readiness probe since you say it takes a while to build the index?

Copy link
Member Author

Choose a reason for hiding this comment

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

ack adding

image: gcr.io/google_containers/hound:v0.1.0
ports:
- containerPort: 6080
protocol: TCP
Copy link
Member

Choose a reason for hiding this comment

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

newline at end?

Copy link
Member Author

Choose a reason for hiding this comment

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

ack fixing

spec:
selector:
app: hound
type: LoadBalancer
Copy link
Member

Choose a reason for hiding this comment

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

Why not ingress so we can get HTTPS?

Copy link
Member Author

Choose a reason for hiding this comment

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

just following the previous pattern. i am not sure of what's available in the infrastructure

{
"max-concurrent-indexers": 2,
"dbpath": "data",
"repos": {
Copy link
Member

Choose a reason for hiding this comment

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

Question from before - can we make it pull from all repos?

Copy link
Member

Choose a reason for hiding this comment

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

also, do we need to index kubernetes-sigs and incubator?

Copy link
Member Author

Choose a reason for hiding this comment

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

adding a python script to fetch all the ones from kubernetes/*, once we get this working, we can pull other orgs

# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.9.2
Copy link
Member

Choose a reason for hiding this comment

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

does this produce an enormous result image, still?

Copy link
Member Author

@dims dims Apr 30, 2018

Choose a reason for hiding this comment

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

https://hub.docker.com/r/k8scode/hound/tags/ shows compressed size is 130 MB

@dims
Copy link
Member Author

dims commented Apr 10, 2018

I am just going to maintain the code here - https://github.com/dims/k8s-code.appspot.com since https://k8s-code.appspot.com/ is chugging along fine.

/close

@dims dims closed this Apr 10, 2018
@dims
Copy link
Member Author

dims commented Apr 30, 2018

/reopen

@dims
Copy link
Member Author

dims commented May 7, 2018

@thockin @ixdy can you please help move this to production? So i can shut down the one running on my personal GAE account? ( http://k8s-code.appspot.com/ )

@dims
Copy link
Member Author

dims commented May 29, 2018

Let's try this again when we have access to GCE/GKE credits for running such services

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants