Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Community Code Challenge - Let's set sail for Cloud Native Island!

KRiedelsheimer
Community Manager
Community Manager
20,972
We have a new code challenge for you as part of the Community Spotlight for the month of July. This time it's about setting sail for Cloud Native Island, where you will explore the treasures of Kubernetes, Containerization and the SAP BTP, Kyma runtime.
 
This thread is the place to share your experience with the challenge and your progress for the challenge. Feel free to ask any questions (technical or non-technical) and leave your comments.

 

We are very much looking forward to your ideas and contributions! 😃
105 REPLIES 105

VishnAndr
Active Contributor
11,112

Hi Kevin,

Great to see Kyma in Community Code Challenge! Thanks!

The issue I'm having is that the image with the service seems to be missing in ghcr.io.

And the link to the Service Package in the Week 1 challenge leads to 404 page. This one:  https://github.com/SAP-samples/sap-community-code-challenge-cloud-native/pkgs/container/sap-communit...

VishnAndr_0-1657080818797.png

And the submission. The URL to some Coffee Corner thread in the Challenge Week 1 description leads to non-existing space :

11,096

Hi @Former Member ,

Thank you for letting me know. The link should be corrected and the package is public now (I forgot to change the visibility 🙈). Please let me know if there are still issues. 

Best,
KM

11,048

Hi Kevin,

Super interesting this challenge.

I pass the screenshots and url of the uploaded application (I didn't know that GitHub had a docker registry hehe)

sgonzmot95_0-1657139053899.png

url: https://hello-community.e51816a.kyma.ondemand.com/greeting/r00k13d3v

Pd. If anyone wants more content in the SAP Developers list there are a few more (link) 😉

Best regards and thanks for the work Kevin!

VishnAndr
Active Contributor

KRiedelsheimer
Community Manager
Community Manager
10,994

It is great to see the first submissions flying in! I am really excited 😍

Mattias
Active Participant
10,932

Mattias_1-1657227618959.png

 

https://hello-community.c-65c082c.kyma.ondemand.com

The hardest part was, as always, to remember the OSX shortcut for screenshots

SUNIL_JOHN
Explorer
10,909

k8s..

suniljohn_0-1657247711724.png

cheers 🙂

10,877

marhol
Product and Topic Expert
Product and Topic Expert
10,873

✔ My submission for Week 1:

marhol_0-1657280790189.png

https://hello-community.c-243e290.kyma.ondemand.com

Happy Friday!

thomas_jung
Developer Advocate
Developer Advocate

Vignesh
Explorer
10,851

Hi Experts,

To participate in this challenge, is it required to have SAP BTP Free tier subscription enabled?

Just BTP trial version is enough to work on the challenges? When I tried to subscribe for Free tier plan as an individual, it states for "India" free tier plan for individual is not permitted currently.

Thanks,

Vignesh.

jmoors
Active Contributor
10,839

Hi,

Trial is sufficient.

Thanks,

Jason

jmoors
Active Contributor
10,842

 

Completed Week 1

jmoors_4-1657306942247.png

 

Many thanks,

Jason

 

 

PunithKumar
Explorer
10,558

Week1 Challenge Submission:

https://hello-community.a8a8425.kyma.ondemand.com/greeting/Punith

PunithKumar_0-1657448486411.png

Thanks,

Punith Kumar

hghi
Newcomer
10,539

My Week 1 submission:

hghi_0-1657495145720.png

Thanks,
Han



kevin_hu
Active Participant
10,519

Week 1

Service deployed

Kevin_Hu_Sydney_0-1657511155281.png

Service URL

https://hello-community.fb42648.kyma.ondemand.com/

Kevin_Hu_Sydney_1-1657511264061.png

Looks like all developers love dark theme. 😃

mauriciolauffer
Product and Topic Expert
Product and Topic Expert

kadir_ozgur
Explorer

Ashok459
Participant

qmacro
Developer Advocate
Developer Advocate
10,392

🚨 Hey folks, for those of you waiting for week 2's challenge, it's arrived! Head on over to the detail on GitHub to find out more. Happy hacking! https://github.com/SAP-samples/sap-community-code-challenge-cloud-native/blob/main/Challenges.md#wee... 

9,490

Week2 submission

sunilchandra007_0-1658286468323.png

Deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: kyma-test
  labels:
    app: kyma-test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kyma-test
  template:
    metadata:
      labels:
        app: kyma-test
    spec:
      containers:
      - name: kyma-test
        image: ghcr.io/sunilchandra007/sap-community-code-challenge-cloud-native:main
        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: kyma-test
spec:
  selector:
    app: kyma-test
  ports:
  - port: 8080
    targetPort: 8080
    protocol: TCP

---

apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
  name: kyma-test
spec:
  gateway: kyma-gateway.kyma-system.svc.cluster.local
  service:
    name: kyma-test
    port: 8080
    host: kyma-test
  rules:
    - path: /.*
      methods: ["GET"]
      accessStrategies:
        - handler: noop
          config: {}

Regards,

Sunil Chandra

Mattias
Active Participant
9,071

Back from vacation with week 2's challenge

https://hello-world.c-65c082c.kyma.ondemand.com/week2.png

apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-world
  labels:
    app: hello-world
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hello-world
  template:
    metadata:
      labels:
        app: hello-world
    spec:
      containers:
      - name: hello-world
        image: docker.io/matt1as/sap-community-week1:v30
        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: hello-world
spec:
  selector:
    app: hello-world
  ports:
  - port: 8080
    targetPort: 8080
    protocol: TCP

---

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: 8080
    host: hello-world
  rules:
    - path: /.*
      methods: ["GET"]
      accessStrategies:
        - handler: noop
          config: {}

 

SaiNithesh_Gajula
Active Participant
10,322

Finally, Here is my Week 1 Submission.

sainithesh_0-1657648045022.png

Service URL: https://hello-community.c-5ff4ab7.kyma.shoot.live.k8s-hana.ondemand.com/greeting/Sai%20Nithesh 

Regards,

Sai Nithesh

MioYasutake
Active Contributor

YoshiakiToma
Explorer
10,266

Hi!

Follow below my deployment and URL link, so I just finish the challenge week 1.

YoshiakiToma_0-1657677391485.png

URL: https://hello-community.eacec52.kyma.ondemand.com/

Tsuyoushi
Discoverer
10,273

Hi!

I'm sending below the image about Week 1 Challenge.

Tsuyoushi_0-1657681095344.png

URL: https://hello-community.ef5bceb.kyma.ondemand.com/

kevin_hu
Active Participant
10,116

Week 2 

"go-hello" deployed using golang to display a chuck norris joke

Kevin_Hu_Sydney_1-1657758481723.png

Kevin_Hu_Sydney_0-1657758334642.png

deployment.yaml

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: go-hello
spec:
  replicas: 1
  selector:
    matchLabels:
      name: go-hello
  template:
    metadata:
      labels:
        name: go-hello
    spec:
      containers:
      - name: application
        image: docker.io/whocann/go-hello
        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

---
apiVersion: v1
kind: Service
metadata:
  name: go-hello
spec:
  ports:
  - name: http
    port: 8080
    targetPort: 8080
  selector:
    name: go-hello

---
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:
    - path: /.*
      methods: ["GET"]
      accessStrategies:
        - handler: noop
          config: {}    

btw, one question: how to get the api rule URL from command line?

qmacro
Developer Advocate
Developer Advocate
9,878

Hey there - this docu resource should help https://kyma-project.io/docs/kyma/latest/05-technical-reference/00-custom-resources/apix-01-apirule#... 

example:

kubectl get crd apirules.gateway.kyma-project.io -o yaml

kevin_hu
Active Participant
9,638

Hi DJ, thanks for the reply.

I tried the command but does not seem to return what I want.

Currently I can only see the url of the deployed service from dashboard. I wonder if I can get it using command line.

Kevin_Hu_Sydney_0-1658104555751.png

 

qmacro
Developer Advocate
Developer Advocate
9,603

One way you could find this out is by looking at the virtualservices based on the deployment name and namespace, as follows (in this example, I'm assuming the namespace is default):

$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
hello-community 1/1 1 1 19m

This confirms that the deployment name is hello-community

Then you could use this (in conjunction with the namespace) to filter the virtualservices on the apirules label, and get the host this way:

$ kubectl get virtualservices -l "apirule.gateway.kyma-project.io/v1alpha1=hello-community.default" -o=jsonpath='{.items[0].spec.hosts[0]}'
hello-community.c-3d84dyx.kyma.ondemand.com

Hope that this will set you on the right path. 

Cheers

 

 

 

 

 

 

 

kevin_hu
Active Participant
9,437

That's cool, DJ. Cheers!

LucasPires230
Explorer
10,116

Hello Kevin!

Here is my submission for Week 1.

LucasPires230_1-1657765180612.png

 

url: https://hello-community.c-410cfea.kyma.ondemand.com/

Thank you!

sunilchandra007
Active Contributor

Rsridhar
Advisor
Advisor

gphadnis2000
Participant
10,066

Hi,

My week 1 challenge.

https://hello-community.c-52d46b5.kyma.ondemand.com/greeting/gaurav

 

Thanks and Regards,

Gaurav Phadnis

 

 

gphadnis2000
Participant
9,967

gphadnis2000_0-1657853755796.png