-
Notifications
You must be signed in to change notification settings - Fork 89
Introduce sample application (spring-petclinic + postgresql) to be used in quickstart #1080
Conversation
7172913
to
2052a82
Compare
@yselkowitz could you please take a look in terms of multi-arch? Thanks |
Codecov Report
@@ Coverage Diff @@
## master #1080 +/- ##
=======================================
Coverage 58.92% 58.92%
=======================================
Files 30 30
Lines 1670 1670
=======================================
Hits 984 984
Misses 560 560
Partials 126 126 Continue to review full report at Codecov.
|
2052a82
to
853f855
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additionally, please avoid folder names starting with a dot, e.g. .minikube
, .openshift
.. they are hidden by default from shell and this can create some confusions.
samples/apps/spring-petclinic/.patch/application-postgresql.properties.patch
Outdated
Show resolved
Hide resolved
sed -e 's,REPLACE_PETCLINIC_APP_IMAGE,'${PETCLINIC_APP_IMAGE}',g' app-deployment.yaml | \ | ||
sed -e 's,REPLACE_PETCLINIC_APP_DBINIT_IMAGE,'${PETCLINIC_APP_DBINIT_IMAGE}',g' | \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rest of the project uses kustomize
, so if really needed we could use that instead of sed
33178c0
to
33e9946
Compare
/retest |
Sent a pull-request spring-projects/spring-petclinic#887 to enable spring cloud bindings in the petclinic application to avoid the need of patching the app source while building the app container. |
60490c8
to
7b53d08
Compare
samples/apps/spring-petclinic/patch/application-postgresql.properties.patch
Outdated
Show resolved
Hide resolved
df6a697
to
213e76d
Compare
ceaf104
to
cf7ef67
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pedjak The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
in quickstart Signed-off-by: Pavel Macík <[email protected]>
cf7ef67
to
1a681b6
Compare
/lgtm |
@pmacik: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
The |
Motivation
Current quickstart uses only REST API server part of the Spring Petclinic as an application and Crunchy Postgresql Operator backed DB. It has couple of UX issues.
The current application:
kubectl port-forward
andcurl
command to send requests to the application's API server and analyze responses for accessing and verifying that the application works as expectedThe current database:
x86_64
architectures, which excludes all users on alternative architecturesChanges
This PR:
Deployment
based onpostgres:13
image that is multi-archminikube
andopenshift
clustersTesting
The following steps involve running some convenient
Makefile
targets that serve here only to ease testing and will be replaced by the actualkubectl
oroc
commands and explained in the quickstart, eventually.Set your environment
export KUBERNETES_RUNTIME=minikube
export KUBERNETES_RUNTIME=openshift
Go to
samples/app/spring-petclinic
directorycd samples/app/spring-petclinic
Create user namespace (
my-postgresql
by default)make namespace
Deploy database Deployment
make deploy-database
Expose DB binding data by setting annotations on database Deployment
make annotate-database
Deploy application Deployment
make deploy-app
URL for the application UI is printed out so open it to access the application, but application's pod is stuck in
Init
state due unavailable DB.Bind application to db
make bind
After the application pod is restarted, the application's pod is
Running
UI should show the web interface.