Code Monkey home page Code Monkey logo

nexus-control's Introduction

Control Repository for developer.rackspace.com

Build Status

Deconst control repository used to host developer.rackspace.com and support.rackspace.com. Changes to this repository take effect several minutes after being merged to master. Check https://developer.rackspace.com/version/ to see the most recent commit that's active in production. Invalid contents (incorrect JSON syntax, malformed templates) cause the repository to simply stop updating.

Local testing

To test changes to templates or assets on your local machine before pushing them to production, follow these instructions. Replace /path/to with whatever root directory you wish.

  1. Install Docker. Either Docker Toolbox or the Docker for Mac or Windows beta will work. Before you continue:
  • You should be able to run docker version on a terminal and see both Client: and Server: in the output before continuing.
  • You should be able to run docker-compose version without seeing "command not found".
  1. Clone deconst/integrated, this repository, and any relevant content repositories. rackerlabs/docs-developer-blog includes the frontpage and is a likely candidate.
git clone https://github.com/rackerlabs/nexus-control.git
git clone https://github.com/deconst/integrated.git
git clone https://github.com/rackerlabs/docs-developer-blog.git
  1. Copy the file integrated-env from the nexus-control clone to env and replace the value of CONTROL_REPO_HOST_PATH with the path to your nexus-control clone.

    cp /path/to/nexus-control/integrated-env /path/to/integrated/env
    
    ${EDITOR} /path/to/integrated/env
    # Change this line:
    #  export CONTROL_REPO_HOST_PATH= ; echo "Please set CONTROL_REPO_HOST_PATH in ${BASH_SOURCE[@]}" && return 1
    # To:
    #  export CONTROL_REPO_HOST_PATH=/path/to/nexus-control
  2. Navigate to your deconst/integrated repository. Source the env file within your shell.

    cd /path/to/integrated
    source ./env
  3. Launch services with docker-compose.

    cd /path/to/integrated
    docker-compose up -d
    
    # Wait for "content-service listening at http://[::]:8080" to appear, then ^C
    docker-compose logs -f content
  4. Perform the initial asset and content load.

    cd /path/to/integrated
    
    script/add-assets /path/to/nexus-control
    
    script/add-jekyll /path/to/docs-developer-blog
    
    # For Sphinx content:
    # script/add-sphinx /path/to/docs-quickstart

Visit port 80 of your Docker host (http://localhost/ for the Docker beta, consult docker-machine ip for Docker Toolbox) and verify that the content and assets you see match those on the live site. ๐ŸŽ‰

For the path to content, see config/content.d/developer.rackspace.com.json. For example: http://localhost/docs/rkaas.

Making changes

deconst/integrated will not live-reload changes that you make locally. After you make changes to the control repository, refresh your instance by running:

cd /path/to/integrated

docker-compose restart presenter

script/add-assets /path/to/nexus-control

If you're unable to connect after doing this, wait several seconds for the presenter to start fully.

Debugging

If the control repository does not load, look for errors in the presenter's output:

cd /path/to/integrated

docker-compose logs presenter

Note that both the presenter and content service take several seconds to launch and begin listening.

Shutting down

To shut the system down completely and remove all local state, to start again from a blank slate:

cd /path/to/integrated

docker-compose stop
docker-compose rm -fv

nexus-control's People

Contributors

annegentle avatar atarola avatar bighappyface avatar carolynvs avatar catlook avatar chri2547 avatar cyrichardson avatar edwardjrp avatar etoews avatar jnoller avatar jonstovall avatar jrperritt avatar kallimachos avatar kenperkins avatar ktbartholomew avatar kylelaffoon avatar mattpennathe3rd avatar meker12 avatar michaelmoussa avatar nimbinatus avatar rackerkate avatar rackerrnorwood avatar reneerendon avatar rgbkrk avatar rnreekez avatar robb-romans avatar smashwilson avatar sterling463 avatar svetkars avatar williamloy 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.