Giter Site home page Giter Site logo

rht-summit-2023-sample-application's Introduction

Red Hat Summit 2023 GitOps Sample Application

This repository contains a simple Node.js application that renders a web page containing a randomly chosen meme.

alt text

Overview

The k8s directory contains a set of Kubernetes/OpenShift resources that can be used to deploy the Node.js application on an OpenShift cluster.

The memes displayed by the application are chosen at random from the application/images.json file. It's possible to use a different file by setting the IMAGES_JSON_FILEPATH environment variable to point to a different file. When deployed on OpenShift using the resources in the k8s/ folder, the application mounts a ConfigMap containing the memes that should be used.

GitHub Actions is used for CI (Continuous Integration). Modifying the code in the application/ directory will trigger an Action to build and push a new container image to https://quay.io/evanshortiss/random-meme. Similarly, changes to the k8s/config-map.yaml will trigger an Action that verifies that the image URLs in the ConfigMap actually resolve to images.

Local Development

Requires Node.js v18. The following commands will start a local development server that automatically detects file changes and restarts the Node.js server:

cd application
npm ci
npm run dev

Contributing Memes

The basic process for adding a meme is:

  1. Sign into your GitHub Account.
  2. Open the k8s/config-map.yaml in your browser, and click on the edit (pencil) icon.
  3. Add the URL to your meme to the images.json array.
  4. Save the change and click on the Create pull request button that appears.
  5. Wait for the repository owner to merge your pull request.

rht-summit-2023-sample-application's People

Contributors

davidstacy 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.