Giter Club home page Giter Club logo

presenter's Introduction

presenter

A Deconst component that assembles and returns completed HTML documents to end users.

Build Status Docker Repository on Quay.io

Installation

To develop locally, you'll need to install:

Then, you should copy env.example and save it as env. Open the file in your favorite text editor, and follow the included instructions to add values to each environment variable. They're all required.

Once you've filled in all the environment variables, use source to add them to your current Bash environment:

source ./env

And now you're ready to actually run the app! Just build the images and start the stack:

docker-compose build && docker-compose up -d

The app will run in the background until you run docker-compose stop. You can also run docker-compose logs to see what the app is doing.

The presenter portion of the app runs under nodemon, so the presenter will be restarted automatically every time you save a file that's part of its source code. Certain changes (like adding a dependency to package.json) will require you to rebuild and restart the container.

Deconst Dev Env in Kubernetes with Minikube

These instructions will create the resources necessary to run the deconst presenter service in a dev env in Kubernetes with Minikube.

  1. If necessary, deploy the content service

  2. Open a new shell

  3. Customize your environment settings

    cp env.example env
    ${EDITOR} env

    Edit the following environment variables.

    • DOCKER_IMAGE=kube-registry.kube-system.svc.cluster.local:31000/presenter:dev
      • If you want to use the production image instead, keep the default value and skip the next step
    • CONTENT_SERVICE_URL=http://content.deconst.svc.cluster.local:9000/
    • CONTROL_REPO_PATH=/tmp/control-repo
    • CONTROL_REPO_URL=https://github.com/deconst/deconst-docs-control.git
    • PRESENTED_URL_DOMAIN=deconst.horse
    source ./env
  4. Build a development Docker image

    eval $(minikube docker-env)
    docker build --tag kube-registry.kube-system.svc.cluster.local:31000/presenter:dev .
    docker push kube-registry.kube-system.svc.cluster.local:31000/presenter:dev
  5. Create resources

    script/template kubernetes/deployment.yaml | kubectl apply -f -
  6. Watch and wait for resources

    watch kubectl get pods --namespace deconst
  7. Test that the presenter and staging presenter services are nominally working

    curl $(minikube service --url --namespace deconst presenter)/version/
    curl $(minikube service --url --namespace deconst staging-presenter)/version/
  8. Deploy the deconst docs

  9. Delete resources

    kubectl delete deploy/presenter svc/presenter --namespace deconst
    kubectl delete deploy/staging-presenter svc/staging-presenter  --namespace deconst

presenter's People

Contributors

smashwilson avatar jrperritt avatar ktbartholomew avatar kenperkins avatar

Watchers

Laura Santamaria 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.