Giter Site home page Giter Site logo

arun-gupta / dcos-website Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dcos/dcos-website

0.0 3.0 0.0 79.56 MB

Source for the official DC/OS website

Home Page: http://dcos.io

License: Apache License 2.0

JavaScript 41.42% Shell 1.33% HTML 34.20% Ruby 0.25% CSS 22.79%

dcos-website's Introduction

DC/OS website

Environment URL Build Status
Production https://dcos.io Prod Build Status
Development https://dev.dcos.io Dev Build Status

Issue tracking is moving to the DCOS JIRA (Project: SITE). Issues on GitHub will be disabled soon.

Table of contents:

Contribution Workflow

  1. Create a repo fork in GitHub

  2. Clone the dcos/dcos-website repo

  3. Add repo fork as remote repo:

    git remote add fork https://github.com/<github-user>/dcos-website
    git fetch fork
    
  4. Checkout the develop branch:

    git checkout develop
    
  5. Create a new feature branch:

    git checkout -b feature/<feature-name>
    
  6. Make local changes.

  7. Test your changes locally.

  8. Add and commit changes:

    git add -p .
    git commit
    
  9. Rebase repo fork to include recent dcos/dcos-website:develop changes. Rebasing a repo (instead of merging) will keep your fork commit history clean and move all your changes to the top of the commit log.

    git fetch origin
    git pull --rebase origin develop
    

    Tip: May require resolving conflicts.

  10. Push changes to repo fork feature branch:

    git push -u fork feature/<feature-name>
    
  11. Create a pull request from the repo fork feature branch to dcos/dcos-website:develop.

Once changes are accepted and merged to the develop branch, CI will push the updates to https://dev.dcos.io/.

Testing your updates locally

  1. Update the dcos-docs submodule:

    git submodule update --init --recursive
    
  2. Build a local version of the doc site. The DC/OS website can be built locally using Node or run in an Nginx Docker container.

  • Using Node

    1. Install Node

    2. Install dependencies:

      npm install
      
    3. Launch local dev server:

      npm start
      

      (opens dev server in browser)

    4. Verify changes on localhost server (updates automatically when files are changed).

  • Using an Nginx Docker image

    1. Install Docker Toolkit

    2. Configure your shell:

      eval $(/usr/local/bin/docker-machine env default)
      
    3. Build the website server Docker image:

      ci/docker-build-image.sh
      
    4. Run the website server in Docker:

      SERVER_CID="$(ci/docker-run.sh)"
      
    5. By default, the server runs on port 80. You can find the server IP by running

      docker-machine ip default
      
    6. Stop the website server:

      docker rm -f "${SERVER_CID}"
      

Updating the documentation

Prerequisite:

  1. Check out the develop branch.

    $ git checkout develop
  2. Pull the latest content from the develop branch.

    $ git pull
  3. Create a branch off of develop for your changes. For example:

    $ git checkout -b bump-docs/11-3-16
  4. Run the bump-docs script:

    scripts/bump_docs.sh
  5. Commit and push your branch to dcos-website. For example:

    $ git push origin bump-docs/11-3-16

    Tip: git status will not show local changes.

  6. Submit a PR to merge your branch to develop.

    PR

    You should see something like this: PR

    Important:

    • An automated link checker is run on all merges and PRs to dcos-website. This will take about 10 minutes. You can check the results here. Broken links will not block merging, but should be reviewed.
    • When this PR is merged, the staging server is built: https://dev.dcos.io/docs/.
  7. After the changes have been previewed and accepted on https://dev.dcos.io/, run this script:

    ci/promote.sh
    

    This script rebases develop to master and kicks off a CI build that deploys (ci/deploy.sh), updates redirects (ci/update-redirects.sh), and updates the S3 website config (ci/update-website-conifg.sh).

Promoting site to live

Once changes have been previewed and accepted on https://dev.dcos.io/, the maintainers will rebase develop to master:

$ git checkout develop
$ git pull 
$ ci/promote.sh

Continuous integration will handle deploying updates (ci/deploy.sh), updating redirects (ci/update-redirects.sh), and updating the S3 website config (ci/update-website-conifg.sh).

Managing redirects

There are two types of redirects, stored in two different files:

  • Page Redirects: https://github.com/dcos/dcos-website/redirect-files
  • Prefix Redirects: https://github.com/dcos/dcos-website/redirect-prefixes

That both use following format:

/from/ /to/

Both types of redirects are processed and used in the S3, npm/gulp, and docker/nginx environments.

The "current" version of DC/OS that corresponds to /docs/latest/ is managed in the redirect-prefixes file.

Link checking

Validating links requires building and running a local site.You can run a local site as a standalone process or alternatively as a part of a docs build.

  1. Build the website server Docker image:

    ci/docker-build-image.sh
    
  2. Start the website server in Docker and remember the container ID:

    SERVER_CID="$(PORT=3000 ci/docker-run.sh)"
    
  3. Run link validation in Docker:

    ci/docker-validate-links.sh
    
  4. Stop the website server

    docker rm -f "${SERVER_CID}"
    

Technology

Built using Metalsmith.

License and Authors

Copyright 2016 Mesosphere, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this repository except in compliance with the License.

The contents of this repository are solely licensed under the terms described in the LICENSE file included in this repository.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Authors are listed in AUTHORS.md file.

dcos-website's People

Contributors

joel-hamill avatar timonvs avatar ashenden avatar grampelberg avatar mhausenblas avatar tmw avatar jmanalus avatar davidvanleeuwen avatar ryadav88 avatar sascala avatar judithpatudith avatar daveyheuser avatar philipnrmn avatar leemunroe avatar jchn avatar matapple avatar ssk2 avatar alberts avatar cmaloney avatar artemharutyunyan avatar brndnmtthws avatar jhedev avatar keithchambers avatar adam-mesos avatar amrabdelrazik avatar jgehrcke avatar usultrared avatar sschneid avatar emanic avatar

Watchers

Arun Gupta avatar James Cloos 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.