Coder Social home page Coder Social logo

2021-demo-cluster-setup's Introduction

Deployment for 2021

Requirements

  • OpenShift Cluster 4.6+
  • OpenShift CLI (oc)
  • Knative CLI (kn)
  • Make

Usage

1. Create an Environment File

Copy the .env.example into a file named .env. This will be used by the various scripts to inject variables into their deployments.

The OC_ variables require a token and cluster API URL. This is the target OpenShift cluster that services will be deployed onto.

OC_URL=https://the-cluster.openshiftapps.com:6443
OC_TOKEN=sha256~thisis-atoken-itsrandom # to be used instead of OC_USER and OC_PASSWORD

The cluster name is important for a multi-cluster demo. It will be used to tag outgoing payloads, i.e data sent to an off-cluster Kafka instance will be tagged as being from the "Americas" cluster.

CLUSTER_NAME="Americas"

Variables used to connect to the (possibly external) Kafka service.

KAFKA_SVC_USERNAME=srvc-acct-xxx-yyy-zzz-123
KAFKA_BOOTSTRAP_URL=some-name-abc.kafka.devshift.org:443
KAFKA_SVC_PASSWORD=1pass2goes-here-abcd-1b743

This controls Node.js application behaviours. Specifically, the game WebSocket Server will send game records to S3 (if AWS variables are defined), enable trace logging, and enable player vs. player matches if this is set to "dev"

NODE_ENV="prod"
AWS_ACCESS_KEY_ID=abc123
AWS_SECRET_ACCESS_KEY=123+abc

The admin application is used to control game state, e.g for dramatic pause during a demo. This is protected via basic authentication with a username and password.

ADMIN_USERNAME=admin
ADMIN_PASSWORD=secretsauce

2. Deploy the Services

Make is used to deploy everything. It's important that Data Grid is deployed prior to the backend and frontend components.

make datagrid && \
make serverless && \
make backend && \
make ai && \
make kafka-forwarder \
make frontend

3. Deploy Kafka Streams

This service only needs to be deployed in a single cluster since it aggregates data from all of the clusters.

If using a Kafka instance with self-signed certificates you'll need to copy a trustore containing the certificate to the kafka-streams/ folder.

NOTE: All jks files in the repo are ignored by gitignore.

cp $PATH_TO_A_TRUSTSTORE kafka-streams/truststore.jks

Update the .env with TRUSTSTORE_PASSWORD set to the password for the truststore.jks you copied, then run:

make kafka-streams

2021-demo-cluster-setup's People

Contributors

btison avatar duncandoyle avatar evanshortiss avatar lberk avatar ryanemerson avatar sub-mod avatar utherp0 avatar

Watchers

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