-
Notifications
You must be signed in to change notification settings - Fork 14
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
Guide Rewrite #7
Conversation
The guide contained several sections that had become dated or could be optimized by using fewer external tools. This large commit attempts to tackle the bulk of the work at once since the guide instructions updated in the README are very much tied to the coding examples. There are a few major themes of this commit: Reduced reliance on additional tooling. References to Kind and Kustomize were removed. All code required is in this repository. An additional project was added to this repository and files were restructured accordingly. Improved navigation. The instructions are broken into multiple parts. Multiple solution folders. Each section has a corresponding set of solution assets. Code update. Spring Boot and Maven versions were updated.
This commit adds configuration files required to establish GitHub Actions as the CI system as well as Dependabot.
Asking for a review from @ryanjbaxter and perhaps @rstoyanchev as the original authors of the guide. |
@robertmcnees remind me is there a way to build the guide so I can see the final result making it easier to read an review? |
I need to pull out the It might take a few steps to get those files off of this PR but I'll get it fixed. |
@ryanjbaxter The easiest way to view the code is to pull down the code and view the README in IntelliJ. |
This commit is required so that files that were originally included in the PR can now be removed in a future commit.
Addressing GH issue 8. The prestop command is not required. As of Spring Boot 3.4 the build-image command will not include a shell that will also fail on deployment.
Added a commit to address #8. |
This looks good. I would consider adding a note about building container on ARM64 (Mx chips for Macs) architectures. While the default buildpack will work it is built using a different architecture and when you run the apps on ARM64 the performance of the containers are pretty poor. To solve this DaShaun has been managing a buildpack for compiling containers for ARM64. To use it when you are on a Mac you would need to do |
@ryanjbaxter Probably best if you merge this PR. It should be all ready to go as is. My apologies I didn't merge myself and clear this off my list before last week. |
This PR suggests several changes to the existing material. I tried to preserve the structure and fundamental teachings of the existing guide.
There are a few general topics in this PR.
Reduction in tooling
I removed references to Kind and Kustomize. Removing references to Kind and instead using Docker Desktop with kubernetes necessitated a change to the container spec when creating the deployment. Removing references to Kustomize required the addition of a project and 2 additional yaml files (only used in the final section of the guide) to manage the deployment and service creation.
All required code in this repository
The previous guide instructed users to load a deployment located in Ryan Baxter's personal repository with Kustomize. When I removed Kustomize from the guide, it made sense to have all of the code required for the tutorial managed in this repository. This necessitated a second app in the project and restructured all of the existing code files.
Code rename and restructure
Previously the guide included a single project located in the
app
folder. It wasn't clear to me what the app should be throughout much of the tutorial. The code provided in theapp
folder was written to call a second application. These instructions were not given until the end of the guide, making me wonder what I should have been deploying throughout the guide. The code in Ryan's repository was the base 'hello world' example and is what I based all teachings around in the restructured guide. Ryan's code came into the project ashello-spring-k8s
and is the foundation for the guide. The existing code in theapp
folder was moved tohello-caller
and only used at the end to demonstrate service registration and discovery.Called out sections separately
When following along with the guide, it naturally fell into 4 distinct sections. I created headings and links so that the user can more easily navigate to the section that they are looking for.
Created multiple solution yaml files
Since the guide focuses primarily on creating kubernetes resources, I chose to only provide solutions to the Java projects. Because this guide does not focus on the Java code nor help users build an application step by step, I removed references to starting a new project with Spring Initializr. This helped reduce the size of the guide and focus only on what is being taught in the guide. Instead of focusing on the Java code, I added multiple folders in the
k8s-artifacts
folder that have yaml files that correspond to the sections of the guide. My hope is that his more easily allows the user the ability to jump in at a specific point if they want to.Project Maintenance
I updated all Spring Boot applications to the latest version. The Maven wrapper was updated. I also added GitHub configuration files for CI as well as Dependabot.