Skip to content

Commit

Permalink
[docs] Upgrade documentation to hugo, update quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Chinchilla authored and robskillington committed Oct 20, 2020
1 parent d05741f commit 64c6dea
Show file tree
Hide file tree
Showing 192 changed files with 2,362 additions and 24,311 deletions.
1 change: 1 addition & 0 deletions .buildkite/docs-build-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
steps:
# We add a wait step here so that docker images and docs won't get built
# unless rest of CI passes.
# Currently only exists for operator docs
- wait
- name: "Docs build and push :books:"
command: ".buildkite/scripts/docs_push.sh"
Expand Down
26 changes: 0 additions & 26 deletions .buildkite/scripts/docs_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,6 @@ ssh-keyscan github.com >> "$HOME/.ssh/known_hosts"
git config --local user.email "[email protected]"
git config --local user.name "M3 Buildkite Bot"

rm -rf site
# NB(schallert): if updating this build step or the one below be sure to update
# the docs-build make target (see note there as to why we can't share code
# between the two).
mkdocs build -t material
mkdocs gh-deploy --force --dirty

# We do two builds to ensure any behavior of gh-deploy doesn't impact the second
# build.
rm -rf site
mkdocs build -t material

git checkout -t origin/docs
# Trying to commit 0 changes would fail, so let's check if there's any changes
# between docs branch and our changes.
if diff -qr site m3db.io; then
echo "no docs changes"
else
rm -rf m3db.io/*
cp -r site/* m3db.io/

git add m3db.io
git commit -m "Docs update $(date)"
git push
fi

# Also build & push the operator's docs.
git clean -dffx
git checkout -t origin/operator
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ coverage/
# Release directory
dist/

# Docs directory
site/

# Node
node_modules/
Expand All @@ -60,3 +58,6 @@ m3db.io/openapi
# Vagrant
.vagrant

#docs ignores
site/public
tmp
3 changes: 3 additions & 0 deletions .netlify/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"siteId": "b5392a2b-3bc8-44d0-b237-50e5f9b2553e"
}
36 changes: 10 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ TOOLS := \
verify_data_files \
verify_index_files \
carbon_load \
docs_test \
m3ctl \

.PHONY: setup
Expand Down Expand Up @@ -190,6 +189,7 @@ install-tools:
GOBIN=$(tools_bin_path) go install github.com/robskillington/gorename
GOBIN=$(tools_bin_path) go install github.com/rakyll/statik
GOBIN=$(tools_bin_path) go install github.com/garethr/kubeval
GOBIN=$(tools_bin_path) go install github.com/wjdp/htmltest

.PHONY: install-gometalinter
install-gometalinter:
Expand All @@ -214,37 +214,21 @@ release-snapshot: check-for-goreleaser-github-token
@echo Creating snapshot release
make release GO_RELEASER_RELEASE_ARGS="--snapshot --rm-dist"

.PHONY: docs-container
docs-container:
docker run --rm hello-world >/dev/null
docker build -t m3db-docs docs

# NB(schallert): if updating this target, be sure to update the commands used in
# the .buildkite/docs_push.sh. We can't share the make targets because our
# Makefile assumes its running under bash and the container is alpine (ash
# shell).
.PHONY: docs-build
docs-build: docs-container
docker run -v $(PWD):/m3db --rm m3db-docs "mkdocs build -t material"

.PHONY: docs-serve
docs-serve: docs-container
docker run -v $(PWD):/m3db -p 8000:8000 -it --rm m3db-docs "mkdocs serve -t material -a 0.0.0.0:8000"

.PHONY: docs-deploy
docs-deploy: docs-container
docker run -v $(PWD):/m3db --rm -v $(HOME)/.ssh/id_rsa:/root/.ssh/id_rsa:ro -it m3db-docs "mkdocs build -t material && mkdocs gh-deploy --force --dirty"

.PHONY: docs-validate
docs-validate: docs_test
./bin/docs_test

.PHONY: docs-test
docs-test:
@echo "--- Documentation validate test"
make docs-validate
@echo "--- Documentation build test"
make docs-build
docs-test: setup install-tools
docker run --rm -it -v $(PWD)/site:/src klakegg/hugo:ext-alpine
cp site/.htmltest.yml $(BUILD)/.htmltest.yml
ifneq ($(DOCSTEST_AUTH_USER),)
ifneq ($(DOCSTEST_AUTH_TOKEN),)
@echo 'HTTPHeaders: {"Authorization":"Basic $(shell echo -n "$$DOCSTEST_AUTH_USER:$$DOCSTEST_AUTH_TOKEN" | base64 | xargs echo -n)"}' >> $(BUILD)/.htmltest.yml
endif
endif
$(tools_bin_path)/htmltest -c $(BUILD)/.htmltest.yml

.PHONY: docker-integration-test
docker-integration-test:
Expand Down
16 changes: 0 additions & 16 deletions docs/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions docs/common/headers_optional_read_write_all.md

This file was deleted.

43 changes: 0 additions & 43 deletions docs/glossary/index.md

This file was deleted.

38 changes: 0 additions & 38 deletions docs/index.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/m3coordinator/index.md

This file was deleted.

38 changes: 0 additions & 38 deletions docs/m3db/architecture/consistencylevels.md

This file was deleted.

Loading

0 comments on commit 64c6dea

Please sign in to comment.