06-30-2022
11:51 AM
- last edited on
07-14-2022
6:52 PM
by
thomas_jung
07-15-2022 11:49 AM
07-15-2022 2:57 PM
Week 2
https://ui5-walkthrough.c-5a642e4.kyma.ondemand.com/
Deployed the famous SAPUI5 Walkthrough to Kyma. 😉
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: ui5-walkthrough
labels:
app: ui5-walkthrough
spec:
replicas: 1
selector:
matchLabels:
app: ui5-walkthrough
template:
metadata:
labels:
app: ui5-walkthrough
spec:
containers:
- name: ui5-walkthrough
image: docker.io/jacobtan89/ui5-walkthrough:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
limits:
ephemeral-storage: 256M
memory: 256M
cpu: 100m
requests:
cpu: 100m
ephemeral-storage: 256M
memory: 256M
imagePullSecrets:
- name: regcred
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: ui5-walkthrough
spec:
selector:
app: ui5-walkthrough
ports:
- port: 8080
targetPort: 8080
protocol: TCP
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: ui5-walkthrough
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: ui5-walkthrough
port: 8080
host: ui5-walkthrough
rules:
- path: /.*
methods: ["GET"]
accessStrategies:
- handler: noop
config: {}
07-16-2022 11:18 AM
Week 2
based on https://cap.cloud.sap/docs/guides/deployment/deploy-to-kyma#build-cap-nodejs-image
global:
domain: adeb271.kyma.ondemand.com
imagePullSecret:
name: regcred
srv:
bindings: {}
image:
repository: ghcr.io/a-kuller/challenge-srv
tag: latest
resources:
limits:
cpu: 100m
ephemeral-storage: 1G
memory: 500M
requests:
cpu: 100m
ephemeral-storage: 1G
memory: 500M
health_check:
liveness:
path: /
readiness:
path: /
07-16-2022 1:43 PM
I'm on week challenge and have an issue. I am new to Kyma, so I just started with a similar setting with week1.
My GitHub repository is below and "myservice" is the folder that contains my week2 app.
https://github.com/miyasuta/sap-community-code-challenge-cloud-native/tree/week2
Deployment to Kyma was successful as shown below.
However, when I open the API url, I see the following error.
https://my-service.a2985eb.kyma.shoot.live.k8s-hana.ondemand.com/
upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: delayed connect error: 111
In cloud foundry I would see application logs with `cf logs <appname>`. Where should I start looking to troubleshoot with Kyma?
07-17-2022 9:27 PM
The issue has been resolved. There seems to be a problem with the port mapping.
My week2 submission
https://my-service.a2985eb.kyma.shoot.live.k8s-hana.ondemand.com/hello/world
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-service
labels:
app: my-service
spec:
replicas: 1
selector:
matchLabels:
app: my-service
template:
metadata:
labels:
app: my-service
spec:
containers:
- name: my-service
image: ghcr.io/miyasuta/sap-community-code-challenge-cloud-native/my-service:latest
# image: miyasuta/my-service:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
limits:
ephemeral-storage: 256M
memory: 256M
cpu: 100m
requests:
cpu: 100m
ephemeral-storage: 256M
memory: 256M
imagePullSecrets:
- name: regcred
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
selector:
app: my-service
ports:
- port: 8081
targetPort: 8080
protocol: TCP
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: my-service
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: my-service
port: 8081
host: my-service
rules:
- path: /.*
methods: ["GET"]
accessStrategies:
- handler: noop
config: {}
08-02-2022 9:15 AM
Hi @miyasuta ,
I am sorry that I didn't reply, I was out sick. I am glad you could solve the issue!
07-16-2022 8:46 PM
Week:2
https://hello-world.c-415359f.kyma.ondemand.com/say/hello(to='there')
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world
labels:
app: hello-world
spec:
replicas: 1
selector:
matchLabels:
app: hello-world
template:
metadata:
labels: # labels to select/identify the deployment
app: hello-world
spec: # pod spec
containers:
- image: jsunil0101/hello-world:latest # image we pushed
name: hello-world
imagePullPolicy: Always
ports:
- name: http
containerPort: 4004
resources:
limits:
ephemeral-storage: 256M
memory: 256M
cpu: 100m
requests:
cpu: 100m
ephemeral-storage: 256M
memory: 256M
imagePullSecrets:
- name: regcred
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: hello-world
labels:
app: hello-world
spec:
ports:
- name: http
port: 4004
targetPort: 4004
selector:
app: hello-world
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: hello-world
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: hello-world
port: 4004
host: hello-world
rules:
- path: /.*
methods: ["GET"]
accessStrategies:
- handler: noop
config: {}
07-17-2022 6:12 PM
Week2 Challenge Submission:
https://hello-world-week2.a8a8425.kyma.ondemand.com/greeting/Punith
Deployment.yaml file
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world-week2
labels:
app: hello-world-week2
spec:
replicas: 1
selector:
matchLabels:
app: hello-world-week2
template:
metadata:
labels:
app: hello-world-week2
spec:
containers:
- name: hello-world-week2
image: ghcr.io/punithmsit/hello-world:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 5000
resources:
limits:
ephemeral-storage: 256M
memory: 256M
cpu: 100m
requests:
cpu: 100m
ephemeral-storage: 256M
memory: 256M
imagePullSecrets:
- name: hellocred
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: hello-world-week2
spec:
selector:
app: hello-world-week2
ports:
- name: http
port: 8080
targetPort: 5000
protocol: TCP
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: hello-world-week2
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: hello-world-week2
port: 8080
host: hello-world-week2
rules:
- path: /.*
methods: ["GET"]
accessStrategies:
- handler: noop
config: {}
07-18-2022 3:53 PM - edited 07-18-2022 3:53 PM
Week 2:
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: statichtml
labels:
app: statichtml
spec:
replicas: 1
selector:
matchLabels:
app: statichtml
template:
metadata:
labels:
app: statichtml
spec:
containers:
- name: statichtml
image: kanagasabapathib021/statichtml:latest
imagePullPolicy: Always
ports:
- containerPort: 80
name: http
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: statichtml
spec:
selector:
app: statichtml
ports:
- port: 80
name: http
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: statichtml
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: statichtml
port: 80
host: statichtml
rules:
- path: /.*
methods: ["GET"]
accessStrategies:
- handler: noop
config: {}
07-19-2022 4:22 AM
Hi!
Week 2, I made a development CAP in Kyma:
apiVersion: apps/v1
kind: Deployment
metadata:
name: orders
labels:
app: orders
spec:
replicas: 1
selector:
matchLabels:
app: orders
template:
metadata:
labels:
app: orders
spec:
containers:
- name: orders
image: yoshiakitoma/cpapp:latest
imagePullPolicy: Always
ports:
- containerPort: 4004
resources:
limits:
ephemeral-storage: 256M
memory: 256M
cpu: 100m
requests:
cpu: 100m
ephemeral-storage: 256M
memory: 256M
imagePullSecrets:
- name: regcred
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: orders
spec:
selector:
app: orders
ports:
- port: 8080
targetPort: 4004
protocol: TCP
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: orders
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: orders
port: 8080
host: orders
rules:
- path: /.*
methods: ["GET"]
accessStrategies:
- handler: noop
config: {}
07-20-2022 1:34 AM - edited 07-20-2022 1:36 AM
Hello!
Here is my week 2 challenge. I made a CAP in Kyma
https://orders.c-410cfea.kyma.ondemand.com/
apiVersion: apps/v1
kind: Deployment
metadata:
name: orders
labels:
app: orders
spec:
replicas: 1
selector:
matchLabels:
app: orders
template:
metadata:
labels:
app: orders
spec:
containers:
- name: orders
image: phantom230/ordersapp:latest
imagePullPolicy: Always
ports:
- containerPort: 4004
resources:
limits:
ephemeral-storage: 256M
memory: 256M
cpu: 100m
requests:
cpu: 100m
ephemeral-storage: 256M
memory: 256M
imagePullSecrets:
- name: regcred
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: orders
spec:
selector:
app: orders
ports:
- port: 8080
targetPort: 4004
protocol: TCP
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: orders
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: orders
port: 8080
host: orders
rules:
- path: /.*
methods: ["GET"]
accessStrategies:
- handler: noop
config: {}
07-20-2022 2:44 AM
Hi!
I finished week 2 using CAP as service for deployment.
https://agendacap-sample.ef5bceb.kyma.ondemand.com/ - URL Service
https://github.com/Tsuyoushi/agendacap-sample-kyma.git - Git Repository
07-20-2022 12:38 PM
07-20-2022 12:40 PM
I'm late to join the fun but this is my week 1 submission
https://hello-community.c9122d8.kyma.ondemand.com/greeting/Stev
07-20-2022 1:50 PM
Hello
Please find Week 1 submission here.
https://hello-community.c-08e0512.kyma.ondemand.com/greeting/Athira
07-22-2022 9:41 AM
07-22-2022 1:43 PM
07-22-2022 3:53 PM - edited 07-22-2022 3:54 PM
Week 3
Hello all,
I have been looking for the specified buttons for half an hour. Environment: BTP Free Tier with Default idendity provider
Where can I find the item "Go to Applications & Resources Applications and select Create."? (src 1a https://help.sap.com/docs/BTP/65de2977205c403bbc107264b8eccf4b/44bb2d3596554bf4b94ea344e40937dd.html...)
I don't necessarily want to create my own idendity provider.
Thanks a lot
07-23-2022 6:41 PM
Week:3
Seems the Cloud Identity service may not available for use in trial. So will have to skip this week challenge , or wait for an alternate approach from community.
Initial Setup | SAP Help Portal
https://iamtenants.accounts.cloud.sap/ will list your the IAS/IPS.
07-23-2022 10:19 PM - edited 07-23-2022 10:33 PM
Week3
https://my-service.a2985eb.kyma.shoot.live.k8s-hana.ondemand.com
I don't have a Free Tier account nor IAS tenant, so I used an XSUAA service instance in my BTP CF environment. Not sure if this is the right thing to do, but it seems to be working.
I refereed to the following blog post.
https://blogs.sap.com/2022/03/03/security-in-kyma-environment-whats-new-for-sap-btp-kyma-runtime/
My access strategy is configured as below.
accessStrategies:
- handler: jwt
config:
jwks_urls:
- https://9e9ab65etrial.authentication.eu10.hana.ondemand.com/token_keys
I have tested with Postman. If you provide authorization header, the API gets authenticated and you'll see the response.
07-24-2022 12:23 AM
Week 3 . Securing the endpoint , Implemented it using OAuth2.
Updated the API Access Strategy to OAuth2.
OAuth Token endpoint : https://oauth2.c-415359f.kyma.ondemand.com/oauth2/token
You should get a 401 here -> https://hello-world.c-415359f.kyma.ondemand.com/say/hello(to='OAuth')
07-24-2022 5:51 PM
Hello
Please find week 3 submission below.
Used OAuth2 access strategy.
Unauthorized endpoint: https://oauthcheck.c-08e0512.kyma.ondemand.com/
GET call with OAuth token:
07-25-2022 1:57 PM
Thanks Kevin! I've learned so much already and had a lot of fun!
Submission week 2:
apiVersion: v1
kind: Service
metadata:
name: code-challenge-helloworld
labels:
app: code-challenge-helloworld
spec:
ports:
- name: http
port: 3333
selector:
app: code-challenge-helloworld
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hcode-challenge-elloworld
spec:
selector:
matchLabels:
app: code-challenge-helloworld
replicas: 1
template:
metadata:
labels:
app: code-challenge-helloworld
spec:
containers:
- image: noravth/code-challenge-hello-world-python-image
name: code-challenge-helloworld
ports:
- containerPort: 3333
07-25-2022 5:35 PM
Here is my Week 2 Submission.
https://py-flask-kubernetes.c-5ff4ab7.kyma.shoot.live.k8s-hana.ondemand.com/getTime
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: py-flask-kubernetes
labels:
app: py-flask-kubernetes
spec:
selector:
matchLabels:
app: py-flask-kubernetes
replicas: 1
template:
metadata:
labels:
app: py-flask-kubernetes
spec:
containers:
- name: py-flask-kubernetes
image: ghcr.io/sainithesh/py-flask-kubernetes:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
limits:
ephemeral-storage: 256M
memory: 256M
cpu: 100m
requests:
ephemeral-storage: 256M
memory: 256M
cpu: 100m
imagePullSecrets:
- name: py-regcred
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: py-flask-kubernetes
spec:
selector:
app: py-flask-kubernetes
ports:
- protocol: "TCP"
port: 8081
targetPort: 8080
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: py-flask-kubernetes
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: py-flask-kubernetes
port: 8081
host: py-flask-kubernetes
rules:
- path: /.*
methods: ["GET"]
accessStrategies:
- handler: noop
config: {}
Regards,
Sai Nithesh
07-26-2022 12:53 AM
Week 3
updated deployment.yaml, ideally should be in seperate files, doesn't it.
Create xsuaa service
Create xsuaa service binding
Update API rule
################### UPDATED API RULE ###################
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: go-hello
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: go-hello
port: 8080
host: go-hello
rules:
- accessStrategies:
- config:
jwks_urls:
- >-
https://<my-sub-domain>.authentication.eu10.hana.ondemand.com/token_keys
handler: jwt
methods:
- GET
path: /.*
################### XSUAA ###################
---
apiVersion: services.cloud.sap.com/v1
kind: ServiceInstance
metadata:
name: xsuaa-oidc
spec:
serviceOfferingName: xsuaa
servicePlanName: application
################### XSUAA SERVICE BINDING ###################
---
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
name: xsuaa-service-binding
spec:
serviceInstanceName: xsuaa-oidc
secretName: xsuaa-service-binding
P,S. Interestingly to see the recent Kyma upgrade made a lot of tutorials a bit out of date. 😀
07-26-2022 3:06 AM
For Week 3, in case of using IAS as the openid connect provider, the jwks_urls looks like this
https://<your-ias-tenant>.accounts.ondemand.com/oauth2/certs
07-26-2022 7:53 PM
Hi!!
Here is my submission for week 3 --> https://rick-and-morty.e51816a.kyma.ondemand.com
¡Happy Coding!
07-27-2022 5:58 AM
07-27-2022 7:29 AM
07-27-2022 7:15 PM
07-27-2022 8:25 PM
Week 2 challenge
apiVersion: apps/v1
kind: Deployment
metadata:
name: sap-own-service-example
labels:
app: sap-own-service-example
spec:
replicas: 1
selector:
matchLabels:
app: sap-own-service-example
template:
metadata:
labels:
app: sap-own-service-example
spec:
containers:
- name: sap-own-service-example
image: docker.io/naguco/sap-own-service-example:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
limits:
ephemeral-storage: 256M
memory: 256M
cpu: 100m
requests:
cpu: 100m
ephemeral-storage: 256M
memory: 256M
imagePullSecrets:
- name: regcred
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: sap-own-service-example
spec:
selector:
app: sap-own-service-example
ports:
- port: 8080
targetPort: 8080
protocol: TCP
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: sap-own-service-example
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: sap-own-service-example
port: 8080
host: sap-own-service-example
rules:
- path: /.*
methods: ["GET"]
accessStrategies:
- handler: noop
config: {}
07-28-2022 5:55 AM
07-28-2022 9:51 AM
Hi!!
Here is my submission for week 4 --> https://rick-and-morty.e51816a.kyma.ondemand.com/character/1
The command I used is: "kubectl -n dev autoscale deployment <name> --cpu-percent=10--min=1 --max=10" --> doc: link
¡Happy Coding!
07-28-2022 7:22 PM
Week 4 submission, lets see how the UI5 walkthrough stands up to your load test
https://week4.c-65c082c.kyma.ondemand.com/
07-29-2022 12:02 AM
Here is my 2. week submission, a simple user API (only GET Method for now) with github link for the deployment files.
https://github.com/ozgurkadir/go-kyma-user-api.git
Service URL : https://ee.d716b36.kyma.ondemand.com/users
07-29-2022 8:22 AM - edited 07-29-2022 8:25 AM
Hi,
My Week 3 Submission
https://py-flask-kubernetes-sec.c-5ff4ab7.kyma.shoot.live.k8s-hana.ondemand.com/
Regards,
Sai Nithesh
07-29-2022 8:43 AM
Hi..,
Here is my Week 4 submission.
URL : https://py-flask-kubernetes.c-5ff4ab7.kyma.shoot.live.k8s-hana.ondemand.com/getTime
Regards,
Sai Nithesh
07-29-2022 12:52 PM
My week 1 submission:
URL: https://ccc-cloud-native-service.c-24e06bb.kyma.ondemand.com/greeting/ajmaradiaga
07-29-2022 1:42 PM
My week 2 submission:
Deployment file:
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: default
name: check-invoice
annotations:
sidecar.istio.io/inject: "true"
spec:
replicas: 1
selector:
matchLabels:
app: check-invoice
template:
metadata:
labels:
app: check-invoice
version: v1
spec:
containers:
- name: check-invoice
image: registry.mycompany.com/check-invoice:0.3
ports:
- containerPort: 8080
imagePullSecrets:
- name: docker-registry-secret
Calling service
07-29-2022 1:44 PM
My week 3 submission:
URL: https://mlb-roster.c-1e90315.kyma.ondemand.com
401 error screenshot: