dcos/dcos-website

Name: dcos-website

Owner: DC/OS

Description: Source for the official DC/OS website

Created: 2016-03-14 20:59:59.0

Updated: 2018-05-23 23:55:28.0

Pushed: 2018-05-24 20:10:24.0

Homepage: http://dcos.io

Size: 321833

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

DC/OS website

| Environment | URL | Build Status | |————-|—–|————–| | Production | https://dcos.io | Prod Build Status | | Development | https://dev.dcos.io | Dev Build Status |

Issue tracking

Please report issues in the DCOS JIRA instance (Project: DCOS_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:

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

    checkout develop
    
  5. Create a new feature branch:

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

  7. Test your changes locally.

  8. Add and commit changes:

    add -p .
    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.

    fetch origin
    pull --rebase origin develop
    

    Tip: May require resolving conflicts.

  10. Push changes to repo fork feature branch:

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

  2. Using Easy Mode

    1. Install Docker Toolkit

    2. Run dev server

      
      
    3. Go to running server

  3. Using Node

    1. Install Node

    2. Install dependencies:

      install
      
    3. Launch local dev server:

      start
      

      (opens dev server in browser)

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

  4. Using an Nginx Docker image

    1. Install Docker Toolkit

    2. Configure your shell:

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

      ocker-build-image.sh
      
    4. Run the website server in Docker:

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

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

      er rm -f "${SERVER_CID}"
      
Promoting site to live

To promote the dev site to live, rebase develop to master:

t checkout develop
t pull
/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:

That both use following format:

m/ /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.

Versioning
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:

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

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

    ocker-validate-links.sh
    
  4. Stop the website server

    er rm -f "${SERVER_CID}"
    
Technology

Built using Metalsmith.

License and Authors

Copyright 2017 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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.