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

Instructions on how to deploy from the custom/local build are missing #531

Closed
gohar94 opened this issue Jan 2, 2020 · 12 comments · Fixed by #583
Closed

Instructions on how to deploy from the custom/local build are missing #531

gohar94 opened this issue Jan 2, 2020 · 12 comments · Fixed by #583

Comments

@gohar94
Copy link

gohar94 commented Jan 2, 2020

The provided instructions from this link are outdated.

@tomkerkhove
Copy link
Member

This is probably what you are looking for - https://github.com/kedacore/keda/blob/master/CREATE-NEW-SCALER.md?

If so, will update the README.

@inuyasha82
Copy link
Contributor

@tomkerkhove i was going throught that file too (i need it to customize an existing scale) btw, probably the instructions there needs to be reviewed, in fact it says:

In the terminal, navigate to the chart/keda folder, and run the following command (don't forget to replace the placeholder text in the command) helm install . --set image.repository=[tag used in step 2],image.pullPolicy=IfNotPresent.

and i think it refers to the step 2 in Readme.md, but that step is not mentioned in the file above, making the documenation pretty confusing!

And another question: when it says go to charts/keda folder, is it referring to those charts: https://kedacore.github.io/charts ?

@tomkerkhove
Copy link
Member

And another question: when it says go to charts/keda folder, is it referring to those charts: kedacore.github.io/charts ?

Charts used to be part of this repo but have been moved to https://github.com/kedacore/charts. It's probably referring to that.

Unfotunately, I cannot speak about the other parts.

@inuyasha82
Copy link
Contributor

@tomkerkhove thanks for your answer (i think this detail should be specified in the readme, i guessed it, but i think not trivial.

Unfotunately, I cannot speak about the other parts.

Maye is my fault i was not completely clear, but i see you added that part on the official documentation, here: c7dc964

what i'm saying is that in the https://github.com/kedacore/keda/blob/master/CREATE-NEW-SCALER.md after point 7, when the document says:

If you want to deploy locally

There is another numbered list, and the step 2 says:

In the terminal, navigate to the chart/keda folder, and run the following command (don't forget to replace the placeholder text in the command) helm install . --set image.repository=[tag used in step 2],image.pullPolicy=IfNotPresent

I think this step is copied and pasted from the original Readme, but in CREATE-NEW-SCALER doc, needs to be adjusted snice it is reffering to itself (and even the previous steplist, at step 2 doesn't contain any image_tag specified.

I also found a typo, on the 7 steps list of deployin a new scaler, at step 2 it says conifugration but i suppose the correct word should be configuration

@tomkerkhove
Copy link
Member

That's correct, but I was just moving things around, I didn't really write the content itself.

You should indeed no longer look for a folder but use the other repo for the charts indeed.

Happy to review a PR for that typo, sorry for that.

@inuyasha82
Copy link
Contributor

inuyasha82 commented Jan 7, 2020

@tomkerkhove i submited a PR for the typos. #535

@inuyasha82
Copy link
Contributor

Questions, i was trying to execute instructions in the create new scaler document (i'm trying to imprrove a scaler).

But i think that

  1. the instructions are little bit outdated
  2. and i can't understand if i'm using the custom deployed version, or not

For point 1

  • if you read the second step 1, it says:

Open the terminal and go to the root of the source code, then build a docker image of KEDA by running docker build . -t [choose a unique tag for your custom image]

i moved into the root of keda source there is no Dockerfile, then any docker build command will fail complaining about it:

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Users/gualandri/Projects/IBM/Agro/new_env/keda/Dockerfile: no such file or directory

and i think the make build now is running docker build so probably this step list has to be updated with the one from Readme.

For point 2
I'm trying to update the redis_scaler, at the moment i didn't changed the logic muchm, but mostly i added some debug prints, but i can't see them in the log, and i think is not picking up my custom version, even if i'm following the steps in README/CREATE_NEW_SCALER.md

i added a log print here:

func NewRedisScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error) {
meta, err := parseRedisMetadata(metadata, resolvedEnv, authParams)
redisLog.Info("TEST")
if err != nil {
return nil, fmt.Errorf("error parsing redis metadata: %s", err)
}

That i think is one of the first things being called in the scaler, but i don't see that print anywhere, in the keda-operator log, plus another thing i saw, there is an exception being thrown by the redis scaler, and the stacktrace is referring to the IsActive function at line 96, but the isActive function is starting at line 103.
That make me think that my custom scaler isn't being used,
and when the operator starts the logs show this commit:

{"level":"info","ts":1578570105.4788666,"logger":"cmd","msg":"Keda Commit: 0099c10"}

but my commit id is:
ecc5ce4301efa8b5e2b70a217e1e01ea9d7b0aca

So i suppose is picking the wrong version.
I followed the steps on the Readme file to build the custom keda version, so what i did is:

  1. export IMAGE_TAG=my_custom_tag
  2. make build (this step apparently is using the IMAGE_TAG to build the docker image)
  3. Then downloaded the keda charts, moved into it and executed the command:
    helm install . --set image.repository=[tag used in step 2],image.pullPolicy=IfNotPresent

where i replaced [tag used in step 2] with my_custom_tag.
It created stuff, but apparently the is using a different image.
Am i doing something wrong?

@tomkerkhove
Copy link
Member

@ahmelsayed Can you elaborate on the above please? You're expert when it comes to dev

@inuyasha82
Copy link
Contributor

inuyasha82 commented Jan 9, 2020

so @tomkerkhove @ahmelsayed i finally got it working, but the documentation apparently is not correct. The command i needed to use was:

helm install . --set image.keda=kedacore/keda:ivan_dev_env,image.pullPolicy=IfNotPresent

In this way it picked up my image. Otherwise was using the original (remote?) one.

So maybe an update on both README and CREATE_NEW_SCALER is needed?

@inuyasha82
Copy link
Contributor

inuyasha82 commented Jan 15, 2020

@tomkerkhove @ahmelsayed so what do you think?
The instruction on the README/CREATE_NEW_SCALER doesn't work, is reasonable to propose a new change with the instructions i used above (that are working for me!)

@tomkerkhove
Copy link
Member

Certainly is, happy to review a PR!

@inuyasha82
Copy link
Contributor

sbumitted PR #541

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 a pull request may close this issue.

3 participants