Skip to content

717 - Update config files for k8s #863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
May 20, 2019
Merged

Conversation

alaudazzi
Copy link
Contributor

@alaudazzi alaudazzi commented May 5, 2019

Needed for #717
Blocked by #32248

Description

  1. Added the k8s alias to the docs/doc_build_aliases.sh
  2. Added the K8s book to the yaml. file

Documentation

  • User-facing Documentation
  • Internal Documentation

@pebrc

@alaudazzi alaudazzi added docs DO NOT USE for *contents* of our docs. Only use for documentation *about* this repo. WIP labels May 5, 2019
@alaudazzi alaudazzi self-assigned this May 5, 2019
Copy link

@nrichers nrichers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR and it reminds me of the early days of me trying to get the ECE docs to build properly as part of our doc builds. 😁 This needs to build at least one branch that exists in the K8s repo though, so I'll mark this as Request changes for now. Also, does the new build alias work locally?

@nik9000
Copy link
Member

nik9000 commented May 6, 2019

You should be able to test the conf.yaml change locally with:

./build_docs --all --target_repo [email protected]:elastic/build-docs.git --open

It will take a long, long time. First it has to git fetch about 4GB worth of repos, then it rebuilds all of the books that have changed since the last time they were built by CI. That is usually a few books. Eventually it'll get to your book.... I'm sorry this process is so slow!

@nik9000
Copy link
Member

nik9000 commented May 6, 2019

Oh! You'll probably want to use your local checkout of cloud:

./build_docs --all --target_repo [email protected]:elastic/build-docs.git --open --sub_dir cloud:master:../cloud

conf.yaml Outdated
subject: k8s
current: 2.2
branches: [ ]
index: docs/k8s/index.asciidoc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this PR intends to build the quick start out of the K8s repo, but https://github.com/elastic/cloud/pull/32248 targets the Cloud repo. (https://github.com/elastic/cloud/pull/32248 needs to be replaced by a new PR that targets the K8s repo.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with #781.

branches: [ master ]
index: docs/index.asciidoc
chunk: 1
public: 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you build it with Asciidoctor with asciidoctor: true? I figure we should try and get all the new things on Asciidoctor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where exactly do I need to add asciidoctor: true?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you replace this line with asciidoctor: true then it'll build with asciidoctor. public: 1 doesn't look like it does anything.

@@ -67,6 +67,8 @@ alias docbldec='$GIT_HOME/docs/build_docs --doc $GIT_HOME/cloud/docs/saas/index.

alias docbldece='$GIT_HOME/docs/build_docs --doc $GIT_HOME/cloud/docs/cloud-enterprise/index.asciidoc --resource=$GIT_HOME/cloud/docs/shared --chunk 1'

alias docbldk8s='$GIT_HOME/docs/build_docs --doc $GIT_HOME/cloud-on-k8s/docs/index.asciidoc --resource $GIT_HOME/cloud/docs/shared --chunk 1'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add --asciidoctor to build it with asciidoctor? I figure we should build all of the new things with Asciidoctor. If it doesn't work I'd be happy to help to get it working.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do I need to add --asciidoctor?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add it right after build_docs then it'll line up with the other lines in this file. But anywhere in the line is actually fine.

@alaudazzi
Copy link
Contributor Author

I tried to build locally by running this command:
./build_docs --all --target_repo [email protected]:elastic/build-docs.git --open --sub_dir cloud-on-k8s:website-docs:../docs

But it doesn't seem to work:

Ariannas-MacBook-Pro:docs|k8s-book$ ./build_docs --all --target_repo [email protected]:elastic/build-docs.git --open --sub_dir cloud-on-k8s:website-docs:../docs
INFO:docker build:Building the docker image that will build the docs. Expect this to take somewhere between a hundred milliseconds and five minutes.
INFO:build_docs:Waiting for ssh auth to be forwarded to cee56d0ecfaa
INFO:ssh setup:Getting public key to forward to container
INFO:ssh setup:Setting up ssh on container
INFO:ssh setup:Starting OpenBSD Secure Shell server: sshd.
INFO:ssh setup:Forwarding auth socket. IMPORTANT - If this process takes more than a few seconds it has hung and should be manually aborted. I'm very sorry.
INFO:ssh setup:Linux cee56d0ecfaa 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64
INFO:ssh setup:
INFO:ssh setup:The programs included with the Debian GNU/Linux system are free software;
INFO:ssh setup:the exact distribution terms for each program are described in the
INFO:ssh setup:individual files in /usr/share/doc/*/copyright.
INFO:ssh setup:
INFO:ssh setup:Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
INFO:ssh setup:permitted by applicable law.
INFO:ssh setup:Done! SSH should work in the container now
INFO:build_docs:Found ssh auth
INFO:build_docs:Updating repositories
INFO:build_docs: - target_repo: Cloning from <[email protected]:elastic/build-docs.git>
INFO:build_docs:Error updating repo <target_repo>: Error executing: git clone --bare [email protected]:elastic/build-docs.git /docs_build/.repos/target_repo.git in GIT_DIR /docs_build/.repos/target_repo.git
INFO:build_docs:
INFO:build_docs:---
INFO:build_docs:Cloning into bare repository '/docs_build/.repos/target_repo.git'...
INFO:build_docs:ERROR: Repository not found.
INFO:build_docs:fatal: Could not read from remote repository.
INFO:build_docs:
INFO:build_docs:Please make sure you have the correct access rights
INFO:build_docs:and the repository exists.
Ariannas-MacBook-Pro:docs|k8s-book$

@alaudazzi
Copy link
Contributor Author

Question for @nrichers and @nik9000:

From which branch do I have to run the command?
I am currently working from two branches:
https://github.com/alaudazzi/cloud-on-k8s/tree/website-docs
and
https://github.com/alaudazzi/docs/tree/k8s-book

@lcawl
Copy link
Contributor

lcawl commented May 8, 2019

@alaudazzi and I chatted and the command in the aliases file works now.
I am also running the command to build all books ($GIT_HOME/docs/build_docs --all --target_repo [email protected]:elastic/built-docs.git --open) and it's in progress (so far so good).

@lcawl
Copy link
Contributor

lcawl commented May 8, 2019

FYI When I build ALL the docs, it returns the following broken links:
INFO:build_docs:Bad cross-document links:
INFO:build_docs: /tmp/docsbuild/target_repo/html/en/k8s/current/k8s-deploy_the_elasticsearch_cluster.html:
INFO:build_docs: - en/elasticsearch/reference/7.0getting-started.html
INFO:build_docs: /tmp/docsbuild/target_repo/html/en/k8s/current/k8s-deploy_the_kibana_instance.html:
INFO:build_docs: - en/kibana/7.0introduction.html
INFO:build_docs: /tmp/docsbuild/target_repo/html/en/k8s/master/k8s-deploy_the_elasticsearch_cluster.html:
INFO:build_docs: - en/elasticsearch/reference/7.0getting-started.html
INFO:build_docs: /tmp/docsbuild/target_repo/html/en/k8s/master/k8s-deploy_the_kibana_instance.html:
INFO:build_docs: - en/kibana/7.0introduction.html

I've created a PR to fix those broken links.

@lcawl lcawl self-requested a review May 8, 2019 17:44
Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and builds successfully. Broken links are all resolved now.

@alaudazzi
Copy link
Contributor Author

A big THANK YOU to all of you for the great support you provided!

conf.yaml Outdated
@@ -525,6 +526,21 @@ contents:
path: docs/shared
exclude_branches: [ 1.0 ]

-
title: Elastic Cloud on Kubernetes
prefix: en/k8s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this prefix match the repo name? cloud-on-k8s

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

alaudazzi added 2 commits May 20, 2019 07:33
Changed the prefix from k8s to cloud-on-kubernetes as per pbrc request
changed the prefix into "cloud-on-k8s"
@alaudazzi alaudazzi merged commit 000d3da into elastic:master May 20, 2019
przemekwitek pushed a commit to przemekwitek/docs that referenced this pull request May 21, 2019
* 717 - Update config files for k8s

* Integrate nrichers comments

* Update doc build script

* Rectified path to index.asciidoc

* Adds URL for cloud-on-k8s

* Update config files to get one single page

* Update conf.yaml

* Update conf.yaml

* Update conf.yaml

* Update conf.yaml

* Update conf.yaml

Changed the prefix from k8s to cloud-on-kubernetes as per pbrc request

* Update conf.yaml

changed the prefix into "cloud-on-k8s"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs DO NOT USE for *contents* of our docs. Only use for documentation *about* this repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants