afzal442 / keptn-pg-killerway

This repo contains keptn CD walkthrough tutorial to understand the out-of-the-box demo.
https://agardnerit.github.io/thekindkeptn/full-tour.html
MIT License
8 stars 5 forks source link

Update to v1.2.0 #74

Closed agardnerIT closed 1 year ago

agardnerIT commented 1 year ago

Update killercoda demo to use Keptn v1.1.0

Amishakumari544 commented 1 year ago

I am interested to work on this @agardnerIT how can I start working on this?

rakshitgondwal commented 1 year ago

I would like to work on this too! @agardnerIT

agardnerIT commented 1 year ago

Excellent!

  1. Fork this repo
  2. Sign in to killercoda.com with GitHub and set up the sync for your forked repo as per their instructions
  3. You will get a duplicate killercoda scenario under your account eg. https://killercoda.com/YOU

Due to the webhook that you need to set up in step 2 (follow the instructions), Killercoda will automatically sync whenever you change your fork.

Update the scenario to use Keptn v1.1.0 rather than v1.0.0 and when you've tested it, raise a PR back here = all done.

I'll let you co-ordinate between yourselves on how / when best to work :)

Any problems, let me know!

agardnerIT commented 1 year ago

Start with something small like changing a word in one of the markdown files. Killercoda should see the changes on main and "auto-refresh" the tutorial. You'll see the spinner on Killercoda.com and if that works, you know the mechanics are working correctly.

The good thing is that you can't "break" anything because this is your own copy, so experiment :)

Then, it should just be a case of changing this line: https://github.com/afzal442/keptn-pg-killerway/blob/877034701854b453e9a126155419e8fe7b2a14ae/keptn-end-to-end-delivery/intro_foreground.sh#L8 so it matches the version number of the latest release (eg. 1.1.0)

image

Hint: You might want to increment the DEBUG_VERSION just so when you refresh the Killercoda site you know it actually has been updated - that's all I use that field for.

Run through the tutorial and validate it works then raise the PR :)

You may also wish to implement the new logic that was suggested by @LeslieMurphy as discussed in #73 and we can release it all together as 1.1.0

rakshitgondwal commented 1 year ago

@agardnerIT Everything is working perfectly untill the step 3. I am facing issues in step 4, i.e the automated go/non-go decision step using prometheus. I am getting this 502 bad gateway-nginx error. Can you help me out with this.

Here are some screenshots of the error I faced- Screenshot from 2023-02-09 18-41-24 Screenshot from 2023-02-09 18-52-04

rakshitgondwal commented 1 year ago

Also, I didn't get you with the DEBUG_VERSION thing. Why do we need to increment it? I did increment it to 2 and it is working perfectly fine but I didn't understood the use of it.

agardnerIT commented 1 year ago

What is your killercoda.com account so I can run through the tutorial. Also where is the repo that you're using for Killercoda?

DEBUG_VERSION really has only one use. On killercoda.com when you access a tutorial, it's hard to tell whether it has been updated or not. I use DEBUG_VERSION just to make it easier for me to see that the update has "taken effect" and killercoda is actually service my latest version. That's all. It has no real use. It's just for us as developers.

agardnerIT commented 1 year ago

1.2.0 has been released. Let's use this opportunity to move straight to that version?

If you agree, I'll change the title of this issue.

rakshitgondwal commented 1 year ago

What is your killercoda.com account so I can run through the tutorial. Also where is the repo that you're using for Killercoda?

DEBUG_VERSION really has only one use. On killercoda.com when you access a tutorial, it's hard to tell whether it has been updated or not. I use DEBUG_VERSION just to make it easier for me to see that the update has "taken effect" and killercoda is actually service my latest version. That's all. It has no real use. It's just for us as developers.

Killercoda account Killercoda repo. I am using dev1 branch for the syncing.

rakshitgondwal commented 1 year ago

1.2.0 has been released. Let's use this opportunity to move straight to that version?

If you agree, I'll change the title of this issue.

Wow amazing!! Sure you can change the title of the issue. I'll also try using the tutorial with 1.2.0 version now.

rakshitgondwal commented 1 year ago

I was trying to follow the tutorial with version 1.2.0 but I am getting an error in the installation stap itself @agardnerIT Screenshot from 2023-02-10 21-01-33

agardnerIT commented 1 year ago

I think something went wrong with the v1.2.0 release. It only includes 2 files rather than the 26 for all other releases - so the Killercoda install fails. I don't think it is anything you've done.

Either they've changed the way they release or it is actually broken. I've posted in Keptn slack. Let's see what come back. We're blocked until we get an answer.

The error on this line of Killercoda gave me the hint:

Error: INSTALLATION FAILED: failed to fetch https://github.com/keptn/keptn/releases/download/1.2.0/keptn-1.2.0.tgz : 404 Not Found
agardnerIT commented 1 year ago

They have solved the v1.2.0 release issue and your startup script should now "just work". You should be unblocked now.

rakshitgondwal commented 1 year ago

@agardnerIT I just tried this out again but I am still facing some errors. I was able to access the bridge but while setting up the git repo, I am facing errors.

Screenshot from 2023-02-13 16-36-34 Screenshot from 2023-02-13 16-41-44

agardnerIT commented 1 year ago

Your error is indicated in the screenshot - something went wrong with the ghp_*** token:

1) Did you use your GitHub PAT token not your password? 2) Did your PAT token have full repo access? 3) Was the Git repo non-existent before you ran that command?

Keptn v1 requires a brand new and uninitialised repo every time you run the command to create a project. Re-using an existing with even a single commit will cause issues.

I cannot recreate this. It works for me: image

Side note: It looks like there's a new version of gh available so perhaps we can also update that during this work?

rakshitgondwal commented 1 year ago

Hey @agardnerIT. Yes there was some issue with the github token but it got resolved. I was able to complete the whole tutorial with keptn version 1.2.0 and with gh cli version 2.23.0. I just had one doubt. During the Attempt to release slow build in the step 4, the quality checks should fail while running a slow build and the artifact should not be released into production, but while trying out the tutorial, the slow build ran successfully and the artifact was released into production too. Screenshot from 2023-02-14 22-17-53

Screenshot from 2023-02-14 22-18-19

Also after this step, the application versions should be v0.1.2 in qa and v0.1.1 in production, but I got v0.1.2 for both.

Screenshot from 2023-02-14 22-19-14

agardnerIT commented 1 year ago

That is an "issue" with any statically provided threshold. Basically it is because, in your case (and perhaps not in someone else's) YOUR "slow" service was "too quick" - probably because the VM was good.

In other words, your quality gate actually passed - even for a supposedly slow build.

I bet if you look at the response time (sadly you trimmed the table off the screenshot) you'll see it is acceptable to the threshold and therefore Keptn acted correctly.

No bug here.

The "fix" would be to adjust your quality gate threshold(s) in this file to bring them back into line.

TLDR: No bug and you are ready to create the PR and release v1.2.0 🎊