Giter Club home page Giter Club logo

srcd-docs's Introduction

DEPRECATED PROJECT

This project is deprecated; sourced.tech documentation will be served from https://docs.sourced.tech/intro/



Documentation site generator

Docs serves the source{d} documentation sites using our common global service docsrv

To do so, all projects being served by docs need to follow the rules given by _tutorials

Launch it locally with docker

You can launch a docsrv container instance with the prod configuration running:

make develop-run;

And then go to a project site:

http://project-host-name:9090

For development purposes

It can be generated –and served– a landing-like site, containing the documentation for a project located under <sources_path>, running:

cd <sources_path>;

# Env vars that would be defined by docsrv if it would be ran through that service
export HOST_NAME=<hostname>;
export VERSION_NAME=<version>;

# The following will generate and will serve the documentation site under http://<hostname>:8585
SERVE=true make docs;

where:

  • sources_path: absolute path to the project which documentation will be generated
  • hostname: hostname under the docs will be served. It must match the project.hostname as defined in data/categories.yml
  • version: version of the project as being in sources_path

example:

To serve the go-git documentation you need to have:

  • the go-git repo downloaded under $GOSRC/gopkg.in/src-d/go-git.v4,
  • an entry in the /etc/hosts like the following:
    127.0.0.1 go-git.sourced.tech
cd $GOSRC/gopkg.in/src-d/go-git.v4;

export HOST_NAME=go-git.sourced.tech;
export VERSION_NAME=v.4;

SERVE=true make docs-site-serve;

and go to http://go-git.sourced.tech:8585

Build and deploy

The project is not integrated with our CI/CD system, so it must be built and deployed manually:

Build

The image can be built with the following commands:

login=<your_docker_registry_login>
repo_host=quay.io
repo_url=${repo_host}/srcd/docs
tag=`git rev-parse --short HEAD`
repo_url_tag=${repo_url}:${tag}
repo_url_latest=${repo_url}:latest

make build &&
docker build -t ${repo_url_tag} . &&
docker tag ${repo_url_tag} ${repo_url_latest} &&
docker login ${repo_host} --username ${login} &&
docker push ${repo_url_tag} &&
docker push ${repo_url_latest}

Deploy

The project can be deployed with the following commands:

tag=<docker_image_tag> # it can be obtained on the previous build step, or from https://quay.io/repository/srcd/docs?tab=tags
docs_repo=https://github.com/src-d/docs.git
repo_name=docs
hosts='{engine.sourced.tech,enry.sourced.tech,siva.sourced.tech,bblf.sh}'
global_ip_mame=docsrv-production

git clone ${docs_repo} ${repo_name}
cd ${repo_name}/helm-charts/docs
helm upgrade docs . --install --set \
ingress.hosts="${hosts}",\
ingress.globalStaticIpName=${global_ip_mame},\
image.tag="${tag}"

srcd-docs's People

Contributors

campoy avatar dpordomingo avatar smeruelo avatar

Watchers

 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.