Skip to content

Commit ab5423b

Browse files
committed
build book
Signed-off-by: jichenjc <[email protected]>
1 parent d631a3f commit ab5423b

24 files changed

+1462
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@ previous cluster managers such as [kops][kops] and
3737

3838
This provider's versions are compatible with the following versions of Cluster API:
3939

40-
| | Cluster API v1alpha1 (v0.1) | Cluster API v1alpha2 (v0.2) | Cluster API v1alpha3 (v0.3) | Cluster API v1alpha4 (v0.4) |
40+
| | Cluster API v1alpha1 (v0.1) | Cluster API v1alpha2 (v0.2) | Cluster API v1alpha3 (v0.3) |
4141
|-------------------------------------------------|---|---|---|---|
4242
| OpenStack Provider v1alpha1 (release-0.1 branch)|| | | |
4343
| OpenStack Provider v1alpha2 (v0.2) | || | |
4444
| OpenStack Provider v1alpha3 (v0.3) | | || |
45-
| OpenStack Provider v1alpha4 (v0.4) | | | ||
4645

4746
This provider's versions are able to install and manage the following versions of Kubernetes:
4847

@@ -83,7 +82,7 @@ Reference images can be found in [kubernetes-sigs/image-builder](https://github.
8382

8483
## Documentation
8584

86-
Documentation can be found in the `/docs` directory
85+
Documentation can be found in the `/docs/src` directory
8786

8887
## Getting involved and contributing
8988

docs/Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2018 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# If you update this file, please follow
16+
# https://suva.sh/posts/well-documented-makefiles
17+
18+
ROOT_DIR_RELATIVE := ..
19+
include $(ROOT_DIR_RELATIVE)/common.mk
20+
21+
DIAGRAM_SRCS := $(call rwildcard,.,*.md,*.plantuml)
22+
23+
diagrams: $(TOOLS_BIN_DIR)/plantuml-sentinal ## Generate plantuml diagrams
24+
-docker run -u $(UID):$(GID) -v $(abspath .):/docs$(DOCKER_VOL_OPTS) plantuml-builder -tsvg /docs/**/*.md
25+
-docker run -u $(UID):$(GID) -v $(abspath .):/docs$(DOCKER_VOL_OPTS) plantuml-builder -tsvg /docs/**/*.plantuml

docs/book/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# book file
2+
book

docs/book/Makefile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright 2020 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
ROOT_DIR_RELATIVE := ../..
16+
include $(ROOT_DIR_RELATIVE)/common.mk
17+
18+
# Directories.
19+
MDBOOK := $(TOOLS_BIN_DIR)/mdbook
20+
MDBOOK_EMBED := $(TOOLS_BIN_DIR)/mdbook-embed
21+
MDBOOK_RELEASELINK := $(TOOLS_BIN_DIR)/mdbook-releaselink
22+
MDBOOK_TABULATE := $(TOOLS_BIN_DIR)/mdbook-tabulate
23+
BOOK_SRCS := $(call rwildcard,.,*.*)
24+
25+
OS := $(shell go env GOOS)
26+
ARCH := $(shell go env GOARCH)
27+
PATH := $(abspath $(TOOLS_BIN_DIR)):$(PATH)
28+
export PATH
29+
30+
.PHONY: generate
31+
generate: ## Generate any dependent files outside of a build
32+
$(MAKE) -C ../ diagrams
33+
34+
verify: generate ## Verify that dependent artifacts are up to date
35+
@if !(git diff --quiet HEAD); then \
36+
git diff; \
37+
echo "generated files are out of date, run make generate"; exit 1; \
38+
fi
39+
40+
.PHONY: build
41+
build: $(BOOK_SRCS) $(MDBOOK) $(MDBOOK_EMBED) $(MDBOOK_RELEASELINK) $(MDBOOK_TABULATE) ## Build the book
42+
$(MDBOOK) build
43+
44+
.PHONY: serve
45+
serve: $(MDBOOK) $(MDBOOK_EMBED) $(MDBOOK_RELEASELINK) $(MDBOOK_TABULATE) ## Run a local webserver with the compiled book
46+
$(MDBOOK) serve
47+
48+
.PHONY: clean
49+
clean:
50+
rm -rf book

docs/book/book.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[book]
2+
authors = ["The Cluster API Provider OpenStack Maintainers"]
3+
language = "en"
4+
multilingual = false
5+
src = "src"
6+
title = "Kubernetes Cluster API Provider OpenStack"
7+
8+
[output.html]
9+
curly-quotes = true
10+
git-repository-url = "https://sigs.k8s.io/cluster-api-provider-openstack"
11+
12+
[preprocessor.tabulate]
13+
command = "mdbook-tabulate"
14+
15+
[preprocessor.embed]
16+
command = "mdbook-embed"
17+
18+
[preprocessor.releaselink]
19+
command = "mdbook-releaselink"

docs/book/src/SUMMARY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Summary
2+
3+
- [Introduction](./introduction.md)
4+
- [Getting Started](getting-started.md)
5+
- [Configuration](clusteropenstack/configuration.md)
6+
- [Topics](./topics/index.md)
7+
- [external cloud provider](./topics/external-cloud-provider.md)
8+
- [move from bootstrap](./topics/mover.md)
9+
- [trouble shooting](./topics/troubleshooting.md)

0 commit comments

Comments
 (0)