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

PRODENG-1577: Kube deployment #1687

Merged
merged 4 commits into from
Feb 20, 2024
Merged

Conversation

Mac-Lean
Copy link
Contributor

@Mac-Lean Mac-Lean commented Feb 7, 2023

From @voodooGQ:

giphy

Alright, I think we're good to go. After many discussions with @ju-Skinner and @raynorg we decided to strip the qa and dev environment from the deploys. Dev doesn't make sense because dev is not a production-like environment. QA is not really needed because they'll verify via Kajabi Products through Proxy.

Tested on staging seems to be working:

https://sage-lib-sassdocs.staging.kajabi.farm/
https://sage-lib-documentation.staging.kajabi.farm/pages/index
https://sage-lib-storybook.staging.kajabi.farm/?path=/story/sage-accordion--single-panel

This is in conjunction with https://github.com/Kajabi/kubernetes/pull/1103, I'm assuming we need to get this one in play first or K8s will have nothing to pull, but let me know if we need to do it in reverse. Will be getting that PR ready to be reviewed next. (EDIT: Ready to roll)

Things did:

  • Rebased
  • Removed extra github workflows. We had a v2 and v3 of the release which from all I gathered are not needed. Added main and develop to the main release workflow with a switcher to tag the right image path. Not really sure if the tag-release one is needed, but I guess it can't hurt since it's just retagging via a dispatch 🤷
  • Updated the docs/Dockerfile so it would play nice on K8s
  • Removed the deploy workflow that was launching to Heroku 🎉
  • Had to add @babel/plugin-proposal-private-property-in-object in the docs packages because it was barking 🐶

@raynorg since you made the PR I can't add you to review, added you to Assignees instead so you can peek over this.

@Mac-Lean Mac-Lean force-pushed the PRODENG-1577/kube_deployment branch from 101e65b to 8e3a75e Compare February 9, 2023 00:28
@ju-Skinner
Copy link
Collaborator

@raynorg I see you managed to get a Green build...How are we looking in terms of getting this merged?

@Mac-Lean Mac-Lean force-pushed the PRODENG-1577/kube_deployment branch 2 times, most recently from a0aa07c to a3a468d Compare March 20, 2023 23:15
@Mac-Lean Mac-Lean force-pushed the PRODENG-1577/kube_deployment branch from c8985ea to cbf45f5 Compare March 27, 2023 17:19
@Mac-Lean Mac-Lean force-pushed the PRODENG-1577/kube_deployment branch 2 times, most recently from e990529 to 94ef753 Compare April 17, 2023 18:40
@Mac-Lean Mac-Lean force-pushed the PRODENG-1577/kube_deployment branch 3 times, most recently from 72d1444 to 1d03b45 Compare April 26, 2023 00:10
@ju-Skinner
Copy link
Collaborator

Just a heads up I have merged #1641, which updates Ruby to v2.7.7 and Rails to 6.0.6

@ju-Skinner ju-Skinner force-pushed the develop branch 7 times, most recently from 11dde9c to 48f6933 Compare November 13, 2023 15:52
Mac-Lean and others added 2 commits January 26, 2024 12:33
author George MacLean <[email protected]> 1675203466 -0700
committer Shane Smith <[email protected]> 1706293936 -0600

parent 633d0cb
author George MacLean <[email protected]> 1675203466 -0700
committer Shane Smith <[email protected]> 1706293885 -0600

PRODENG-1577: Push containers to ECR

Amending the correct build/deploy file

might not need this guy

updating root URLs for testing kube deployment

updating dockerfile, and fixing typo in application.rb

might be easier

nope

adding tag release image job

Updating root URLs for new DNS zone

nope

Rebased, added development specific release-deploy job

Adding Production URLS to application.rb

Renaming development job, and removing prod/development tags from primary release GH action

One more push to all environments please
@voodooGQ voodooGQ force-pushed the PRODENG-1577/kube_deployment branch from a57ec4c to da97607 Compare January 29, 2024 14:32
Copy link
Contributor

github-actions bot commented Jan 29, 2024

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Manifest Files

.github/workflows/release-deploy.yml
  • actions/checkout@2.*.*
  • aws-actions/amazon-ecr-login@2.*.*
  • aws-actions/configure-aws-credentials@1.*.*
  • docker/build-push-action@2.*.*
  • docker/setup-buildx-action@1.*.*
  • haya14busa/action-cond@1.*.*
.github/workflows/deploy.yml
  • actions/checkout@3.*.*
  • actions/setup-node@3.*.*
  • ruby/setup-ruby@1.*.*
.github/workflows/release-deploy-v2.yml
  • actions/cache@3.*.*
  • actions/cache/restore@3.*.*
  • actions/cache/save@3.*.*
  • actions/checkout@3.*.*
  • actions/setup-node@3.*.*
  • ruby/setup-ruby@1.*.*
.github/workflows/release-deploy-v3.yml
  • actions/cache@3.*.*
  • actions/cache/restore@3.*.*
  • actions/cache/save@3.*.*
  • actions/checkout@3.*.*
  • actions/setup-node@3.*.*
  • ruby/setup-ruby@1.*.*
.github/workflows/tag-release-image.yml
  • akhilerm/[email protected]
  • aws-actions/amazon-ecr-login@1.*.*
  • aws-actions/configure-aws-credentials@1.*.*
  • docker/setup-buildx-action@1.*.*
  • haya14busa/action-cond@1.*.*
docs/package.json
  • @babel/plugin-proposal-private-property-in-object@^7.21.11
yarn.lock

@voodooGQ voodooGQ requested review from ju-Skinner and a team February 6, 2024 16:19
@voodooGQ voodooGQ marked this pull request as ready for review February 6, 2024 16:20
@voodooGQ voodooGQ requested a review from rwc9u February 6, 2024 16:29
Copy link
Member

@prsimp prsimp left a comment

Choose a reason for hiding this comment

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

Looks good to me. A few quick questions, but I'm good with no action responses, just curious:

  • Why set the "default" value to production values vs. using the environmental config?
  • If we're dropping the qa/dev environments, why not remove those environmental config files?

Nice work getting this over the line @voodooGQ @raynorg @ju-Skinner 👍


# Sassdocs deploy url to differentiate in different environments
config.sassdocs_root_url = "https://sage-lib-sassdocs.herokuapp.com/"
config.sassdocs_root_url = "https://sage-lib-sassdocs.production.kajabi.farm/"
Copy link
Member

Choose a reason for hiding this comment

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

Why are these being set here vs. in the config/environments/production.rb file?

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.

Soooo..... leave as is? Or change?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@prsimp dev !== development. There was some finagling to get it to work right on Argo, but now that we're not using dev as an env the dev references have been removed. development is still in use for local.

@ju-Skinner mentioned that QA was in use in some fashion, but it's not a deployed environment. Happy to remove the rb file too if that's what we want to do, but would need an approval from @ju-Skinner

- main
- develop
- PRODENG-1577/kube_deployment
jobs:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason lint,test, and build were removed from this workflow?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a net-new file, so not sure how it was "removed". Do you want me to add the job as a dep?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I wasn't clear. In comparison to release-deploy-v2, we no longer run those in this workflow. Is there a reason it wasn't included?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Mainly because it wasn't in there when I took over. I didn't really go through all the details because we had some environments working, my goal was simply to get the rest of them working. So, no, no particular reason it wasn't included. Happy to add it if that's what you want, just give me the word.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Going through the file diff here I don't see lint/test/build being referenced in any of the old ones. I do see this but that's referring to the lint, test, and build steps in that specific workflow.

Not saying lint/test/build would be a bad thing by any means, but just wondering if it's actually necessary? Your develop and main are protected right (Could be wrong about that, legitimately asking)? And lint/test/build fires on PR, so it would have ran before it got merged technically. Doesn't cover all edge cases but it should work as expected with that kind of setup right?

Either way I'm fine adding it, couple line change and adds some extra protection. But not sure if it's strictly necessary

Copy link
Collaborator

Choose a reason for hiding this comment

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

- develop
- PRODENG-1577/kube_deployment
jobs:
release_deploy:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Having release_deploy as one big job will require rerunning the whole process should one step fail.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What would you like here? I have no stake in this game, so need some direction on how you'd like it handled. Otherwise feel free to make changes and commit to this PR if you have a game plan.

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.

Could it resemble what was in release-deploy-v2?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Added

docs/Dockerfile Outdated
@@ -8,6 +8,10 @@ ARG NODE_VERSION="16.20.2"
ARG YARN_VERSION="1.22.18"
ARG ARCH="x64"
ARG GITHUB_TOKEN
ARG SECRET_KEY_BASE="foobarbaz"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the value we want to use?

Copy link
Collaborator

Choose a reason for hiding this comment

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

🤷 it's what was in there. Would you like something different?

Copy link
Collaborator

Choose a reason for hiding this comment

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

🤷🏾 just called it out. I don't know either. lol

Copy link
Contributor

Choose a reason for hiding this comment

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

You normally need some value in that environment variable when running any asset precompile or rails command. It's set via ENV var in most apps in a production environment, but you just have to have something. It could be changed to "setting_random_secret_for_asset_precompile" if you want

Copy link
Collaborator

@ju-Skinner ju-Skinner Feb 6, 2024

Choose a reason for hiding this comment

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

ℹ️ This is/was used for the current Heroku deployments.

Copy link
Collaborator

Choose a reason for hiding this comment

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

K. Won't be necessary once we merge and verify, so think it's safe to leave out. But you let me know.

@voodooGQ
Copy link
Collaborator

voodooGQ commented Feb 6, 2024

Forgot we merged the Node 18 PR into develop, so gotta go through and update the Dockerfiles. BRB...

@voodooGQ
Copy link
Collaborator

voodooGQ commented Feb 6, 2024

Nevermind, can't really do that until the Node 18 branch is in main. Will have to address once it's been launched.

@voodooGQ voodooGQ force-pushed the PRODENG-1577/kube_deployment branch from 2257f24 to ed1555c Compare February 12, 2024 16:36
@voodooGQ
Copy link
Collaborator

This is mergable at this point, waiting for some information on the Kubernetes side before we merge that one, and then we'll merge this one. Doing it in this order so we don't drop the Heroku stuff before the K8s is ready.

@voodooGQ
Copy link
Collaborator

K8s PR merged: https://github.com/Kajabi/kubernetes/pull/1103

This should be ready to roll. Going to merge in, verify it ran on develop as it should, then reach out to PE to swap the DNS

@voodooGQ voodooGQ merged commit 69eca87 into develop Feb 20, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants