Giter VIP home page Giter VIP logo

microsweeper-quarkus's Introduction

Red Hat Microsweeper demo with Quarkus

This demo uses a number of cloud technologies to implement a simple game from the earlier days of computing: Minesweeper!

Screenshot

Technologies include:


# To run quarkus in dev mode (it will automatically use Quarkus' dev services to create a DB)
alias q='quarkus'
q dev

# To access the app, hit http://localhost:8080 

# To deploy and run quarkus application in an OpenShift cluster
# (Required Operators: SeviceBinding, Crunchy Postgres for Kubernetes)
oc project dev
q build --no-tests --clean -Dquarkus.kubernetes.deploy=true

# To clean up
oc delete all --selector=demo.redhat.com/name=microsweeper
oc delete postgresclusters.postgres-operator.crunchydata.com postgresql
oc delete servicebindings.binding.operators.coreos.com microsweeper-appservice-postgresql
  • This repo has PipelineAsCode integrated. Check this gist for details. For already bootstraped PAC, need to create a PAC repo only, like this tkn pac create repo.
# By default, a 'test' namespace/project need to be setup for PAC-based CI/CD
# To create a PAC Repository at test namespace executes the following command
oc apply -f boot/argocd/repository.yaml
  • The Service Binding Operator doc and this github issue provide more details for the RBAC requirements.
    (Bug: Not sure why need to have a clusterrolebinding for the user if it is not in a cluster-admin role)
# Required for end-user deployment (e.g. user1) 
oc adm policy add-cluster-role-to-user clusterworkloadresourcemappings.servicebinding.io-v1alpha3-admin user1

# Required for system deployment (e.g. PipelineAsCode with a service account: pipeline at test project/namespace)
oc adm policy add-cluster-role-to-user clusterworkloadresourcemappings.servicebinding.io-v1alpha3-admin system:serviceaccount:test:pipeline

# Alternatively
oc apply -f boot/argocd/rolebinding.yaml
# The OTLP exporter can be enabled by these configuration properties
# Note: dev mode only for this demo
%dev.quarkus.opentelemetry.enabled = true
%dev.quarkus.opentelemetry.tracer.exporter.otlp.endpoint = http://localhost:4317
# Issues: need to explicitly turn on builtin sampler 
%dev.quarkus.opentelemetry.tracer.sampler=on

# To facilitate the demo, copy these yaml configuation files from
#   https://github.com/rhtevan/quick-quarkus/tree/main/.container
# Start collector and jaeger containers in the same pod
podman play kube .container/otel.yaml

# To check the pod status
podman pod ps --ctr-names --ctr-status 

POD ID        NAME        STATUS      CREATED         INFRA ID      NAMES                                                     STATUS
861d58b636a4  otel        Running     26 seconds ago  4eaddf66e0ea  861d58b636a4-infra,otel-collector,otel-jaeger-all-in-one  running,running,running

# To access the Jaeger UI, hit http://localhost:16686

# OTLP exporter is enabled for Dev mode only, and to shutdown and clean up
podman pod rm --force otel
podman pod ps --ctr-names --ctr-status 

Date: 2023-9-27 15:02

microsweeper-quarkus's People

Contributors

gnunn1 avatar jamesfalkner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.