Giter VIP home page Giter VIP logo

integrated's Introduction

Deconst, Integrated

docker-compose configuration that instantiates a single "pod" of Deconst services, with all of the debug settings cranked up to full. It's useful for:

  • Integration testing of Deconst components, before you commit to master and :shipit:
  • Previewing local content or control repository changes when the deconst client is busted

Prerequisites

  • Install a recent version of Docker for your platform.
  • Install docker-compose. In addition to the curl command they list, you can also install it from homebrew or pip.

Make sure that docker-machine is create and running first.

docker-machine create --driver virtualbox dev

Run eval $(docker-machine env default) in each shell you'll use to interact with Docker.

Getting Started

Clone this repository and cd into the directory where you cloned the repo. Then:

  1. Customize your credentials and other settings. The env settings require knowing your Rackspace Cloud account info and also where you intend to clone the control repo, for example.
cp env.example env
${EDITOR} env
  1. Launch the services.
    script/up

script/up accepts any parameters that docker-compose up does. Notably, you can use script/up -d to launch services in the background.

Manual Alternative

If you prefer, you can manually run each docker container with:

# generate an admin API key for the content service
APIKEY=$(hexdump -v -e '1/1 "%.2x"' -n 128 /dev/random)
echo "Content Service Admin API Key:" $APIKEY

# start content service dependencies
docker run -d --name elasticsearch elasticsearch:1.7
docker run -d --name mongo mongo:2.6

# build and deploy the content service
cd ${CODE_ROOT}/content-service
docker build --tag content-service:dev .
docker run -d -p 9000:8080 \
  -e NODE_ENV=development \
  -e STORAGE=memory \
  -e MONGODB_URL=mongodb://mongo:27017/content \
  -e ELASTICSEARCH_HOST=http://elasticsearch:9200/ \
  -e ADMIN_APIKEY=${APIKEY} \
  --link mongo:mongo \
  --link elasticsearch:elasticsearch \
  --name content \
  content-service:dev script/inside/dev

# build and deploy the presenter service
cd ${CODE_ROOT}/presenter
docker build --tag presenter:dev .
docker run -d -p 80:8080 \
  -e NODE_ENV=development \
  -e CONTROL_REPO_PATH=/var/control-repo \
  -e CONTROL_REPO_URL=... \
  -e CONTROL_REPO_BRANCH=... \
  -e CONTENT_SERVICE_URL=http://content:8080 \
  -e PRESENTED_URL_PROTO=http \
  -e PRESENTED_URL_DOMAIN=support.rackspace.com \
  --link content \
  --name presenter \
  presenter:dev script/dev

Submitting Content

Now the site is running, but you don't have any content submitted, yet. To add some, run the appropriate script/add-* script with the path to your clone of a local content repository.

script/add-sphinx ~/writing/drc/docs-quickstart

script/add-jekyll ~/writing/drc/docs-developer-blog

Updating content or mappings

If you make changes to the control repo—including content mapping, template routing, redirects, or asset/template content—you will need to restart the presenter so it can pick up these changes. Just run script/refresh to restart the presenter.

integrated's People

Contributors

smashwilson avatar annegentle avatar etoews avatar chesshacker 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.