Skip to content
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

Create AWX docsite with RST content #14328

Merged
merged 55 commits into from
Sep 1, 2023
Merged

Create AWX docsite with RST content #14328

merged 55 commits into from
Sep 1, 2023

Conversation

oraNod
Copy link
Collaborator

@oraNod oraNod commented Aug 9, 2023

SUMMARY

This PR adds AWX documentation in RST source migrated from the private ansible/product-docs repository.

This is currently a work in progress. The following items must be completed before final review/merge:

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • Docs
AWX VERSION

N/A

ADDITIONAL INFORMATION

N/A

.gitignore Outdated Show resolved Hide resolved
@AlanCoding
Copy link
Member

looks like the api checks failed with this:

linters: commands[2]> yamllint -s .
./docs/docsite/rst/common/containergroup-sa.yml
  14:1      error    wrong indentation: expected 2 but found 0  (indentation)
  30:1      error    wrong indentation: expected 2 but found 0  (indentation)

Would it be too much to patch that indentation up in the file? If not, it can be added to the yamllint exclude list.

@oraNod
Copy link
Collaborator Author

oraNod commented Aug 24, 2023

looks like the api checks failed with this:

linters: commands[2]> yamllint -s .
./docs/docsite/rst/common/containergroup-sa.yml
  14:1      error    wrong indentation: expected 2 but found 0  (indentation)
  30:1      error    wrong indentation: expected 2 but found 0  (indentation)

Would it be too much to patch that indentation up in the file? If not, it can be added to the yamllint exclude list.

Thanks! Should be fixed now. It's great to have ci tests catching formatting issues with the content etc.

@AlanCoding
Copy link
Member

Ready to take this out of draft status?

@oraNod oraNod marked this pull request as ready for review August 28, 2023 16:19
@oraNod oraNod changed the title [WIP] Create AWX docsite with RST content Create AWX docsite with RST content Aug 28, 2023
@oraNod
Copy link
Collaborator Author

oraNod commented Aug 28, 2023

Ready to take this out of draft status?

@AlanCoding Hello. Sorry for the slight delay here, I've been on PTO. @tvo318 has gone through all the content and added several commits and I think we're ready to go. We're looking at a few last relics in the images but should have that sorted out here shortly. Let the reviews commence! Thanks!

@oraNod
Copy link
Collaborator Author

oraNod commented Aug 29, 2023

@tvo318 Thanks for the awesome work to port the content over! I think we're pretty much ready to go. I added a couple of commits to remove a few relic images that were downstream specific. I also dropped some unused insights images. Please take a look. I guess we could prune more stale images but I'd rather do that in a follow up PR. As long as it's appropriate to hand over to the community it should be fine.

One other thing I think we might want to address are some of the lurking instances of "controller" and "tower".

For example, on these lines you can see controller is mentioned. Should these change to AWX?

administration/ent_auth.rst:6. Create an optional private key for the controller to use as a service provider (SP) and enter it in the **SAML Service Provider Private Key** field.  
administration/ent_auth.rst:7. Provide the IdP with some details about the controller cluster during the SSO process in the **SAML Service Provider Organization Info** field.
administration/ent_auth.rst:   These fields are required in order to properly configure SAML within the controller

Also for the REST API should we s/<controller-host>/<awx-host> in places like this?

rest_api/authentication.rst:	curl -k -c - https://<controller-host>/api/login/

@oraNod
Copy link
Collaborator Author

oraNod commented Aug 29, 2023

@tvo318 One other that I haven't checked yet. Does /etc/tower/conf.d/ change to settings/defaults.py?

@oraNod oraNod requested a review from thedoubl3j August 29, 2023 09:23
@tvo318
Copy link
Member

tvo318 commented Aug 29, 2023

I also have a few things I saw that maybe we need to still address:

  • docs/docsite/_themes/version_dropdown.html (should we remove this since we are just supporting 'latest")?
  • docs/docsite/_themes/srtd/layout.html (still has references to AUTOMATION and CONTROLLER)
  • docs/docsite/conf.py (pointers to translated versions still have controller in them)
    I was told these are the supported AWX versions (but you probably already know that)
    image

@AlanCoding
Copy link
Member

I tried to build this with tox -e docs and I got this result:

docs: install_deps> python -I -m pip install -r /home/alancoding/repos/awx/docs/docsite/requirements.txt
.pkg: install_requires> python -I -m pip install 'setuptools>=45' 'setuptools_scm[toml]>=6.2'
.pkg: _optional_hooks> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: prepare_metadata_for_build_wheel> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
docs: install_package> python -I -m pip install --force-reinstall --no-deps /home/alancoding/repos/awx/.tox/.tmp/package/1/awx-22.7.1.dev69+g878ce41083.tar.gz
docs: commands[0]> sphinx-build -T -E -W -n --keep-going --color -j auto -c docs/docsite -d docs/docsite/build/doctrees -b html docs/docsite/rst docs/docsite/build/html
Running Sphinx v5.1.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 109 source files that are out of date
updating environment: [new config] 109 added, 0 changed, 0 removed
reading sources... [100%] userguide/project-sign .. userguide/workflows                                       
/home/alancoding/repos/awx/docs/docsite/rst/rest_api/authentication.rst:169: ERROR: Unknown target name: "api_start".
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] userguide/organizations .. userguide/workflows                                       
generating indices... genindex done
writing additional pages... search done
copying images... [100%] common/images/workflow-diagram.png                                                   
copying downloadable files... [100%] ../../common/containergroup-sa.yml                                       
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build finished with problems, 1 warning.
docs: exit 1 (6.36 seconds) /home/alancoding/repos/awx> sphinx-build -T -E -W -n --keep-going --color -j auto -c docs/docsite -d docs/docsite/build/doctrees -b html docs/docsite/rst docs/docsite/build/html pid=475519
.pkg: _exit> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  docs: FAIL code 1 (76.18=setup[69.82]+cmd[6.36] seconds)
  evaluation failed :( (76.32 seconds)

I wanted to ask if you could help me figure out that error. It looks like it's at the "api_start" point.

@oraNod
Copy link
Collaborator Author

oraNod commented Aug 31, 2023

I tried to build this with tox -e docs and I got this result:

docs: install_deps> python -I -m pip install -r /home/alancoding/repos/awx/docs/docsite/requirements.txt
.pkg: install_requires> python -I -m pip install 'setuptools>=45' 'setuptools_scm[toml]>=6.2'
.pkg: _optional_hooks> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: prepare_metadata_for_build_wheel> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
docs: install_package> python -I -m pip install --force-reinstall --no-deps /home/alancoding/repos/awx/.tox/.tmp/package/1/awx-22.7.1.dev69+g878ce41083.tar.gz
docs: commands[0]> sphinx-build -T -E -W -n --keep-going --color -j auto -c docs/docsite -d docs/docsite/build/doctrees -b html docs/docsite/rst docs/docsite/build/html
Running Sphinx v5.1.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 109 source files that are out of date
updating environment: [new config] 109 added, 0 changed, 0 removed
reading sources... [100%] userguide/project-sign .. userguide/workflows                                       
/home/alancoding/repos/awx/docs/docsite/rst/rest_api/authentication.rst:169: ERROR: Unknown target name: "api_start".
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] userguide/organizations .. userguide/workflows                                       
generating indices... genindex done
writing additional pages... search done
copying images... [100%] common/images/workflow-diagram.png                                                   
copying downloadable files... [100%] ../../common/containergroup-sa.yml                                       
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build finished with problems, 1 warning.
docs: exit 1 (6.36 seconds) /home/alancoding/repos/awx> sphinx-build -T -E -W -n --keep-going --color -j auto -c docs/docsite -d docs/docsite/build/doctrees -b html docs/docsite/rst docs/docsite/build/html pid=475519
.pkg: _exit> python /home/alancoding/repos/awx/env/lib64/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  docs: FAIL code 1 (76.18=setup[69.82]+cmd[6.36] seconds)
  evaluation failed :( (76.32 seconds)

I wanted to ask if you could help me figure out that error. It looks like it's at the "api_start" point.

hey @AlanCoding yes it looks like there's a problem with a Sphinx ref from this commit: ea46505#diff-2a3bdf96e33ef2c6f65306a401b9874e7b7a1acdd7af9ea124deee3b040a26afR170

The fix is to modify that to use the ref: role. I'll push a commit.

Thanks for catching this. After we get this merged I'd like to add a step to CI to verify the docs build so we can get PR checks for this stuff too.

@oraNod
Copy link
Collaborator Author

oraNod commented Aug 31, 2023

I also have a few things I saw that maybe we need to still address:

* docs/docsite/_themes/version_dropdown.html (should we remove this since we are just supporting 'latest")?

* docs/docsite/_themes/srtd/layout.html (still has references to AUTOMATION and CONTROLLER)

* docs/docsite/conf.py (pointers to translated versions still have controller in them)
  I was told these are the supported AWX versions (but you probably already know that)
  ![image](https://user-images.githubusercontent.com/7514801/264088293-5217b1f5-8fcf-4da0-b0d0-77de9cf6ef15.png)

Nice one @tvo318 I've removed the old theme and static content. They're no longer needed with the Ansible community theme! I guess we still need to figure out translations but we can do that when we set things up on Read The Docs. We don't need those translation strings in the conf.py anyway as they were pulled in by the old layout.

Copy link
Member

@AlanCoding AlanCoding left a comment

Choose a reason for hiding this comment

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

We understand that there's still some things to iterate on, but everyone is excited about getting this content and the build system in.

@tvo318
Copy link
Member

tvo318 commented Aug 31, 2023

Remaining tower references to keep or revisit later (unsure of AWX equivalent):

  • rst/userguide/projects.rst: (points to example `helloworld.yml`` file available at: https://github.com/ansible/tower-example.git)
  • rst/userguide/inventory_plugins_templates.rst: (refers to plugin: awx.awx.tower for RHAAP inventory source)
  • rst/userguide/overview.rst: (refers to plugin: awx.awx.tower inventory plugin)
  • rst/userguide/ee_reference.rst: (refers to plugin: awx.awx.tower inventory plugin)
  • rst/userguide/instance_groups.rst: (xrefs a public blog)
  • rst/administration/ent_auth.rst: (refers to variable name)
  • rst/administration/logging.rst: (refers to variable name)
  • rst/administration/troubleshooting.rst: (references a file directory)
  • rst/rest_api/api_ref.rst: (in the stylesheet line 51)

@oraNod
Copy link
Collaborator Author

oraNod commented Aug 31, 2023

Thanks @tvo318 I forgot that the api reference (api_ref.rst) was pulling in some assets from the static folder but we can restore them - and make sure they're all good for the community docs - when we add in the swagger generation step.

@tvo318 tvo318 self-requested a review August 31, 2023 19:29
@tvo318
Copy link
Member

tvo318 commented Aug 31, 2023

Remaining controller references to keep or revisit later (unsure of AWX equivalent):

  • rst/userguide/best_practices.rst: (references controllercli guide since not sure what new CLI guide link is)
  • rst/userguide/inventories.rst: (contained in a URL and a reference to the )
  • rst/userguide/job_templates.rst: (contained in a URL)
  • rst/administration/ent_auth.rst: (contained in abbreviation for TACACS+)
  • rst/administration/tipsandtricks.rst: (references the CLI guide)

@tvo318 tvo318 merged commit dc81aa4 into ansible:devel Sep 1, 2023
djyasin pushed a commit to djyasin/awx that referenced this pull request Sep 16, 2024
Co-authored-by: Thanhnguyet Vo <tvo@ansible.com>
Co-authored-by: TVo <thavo@redhat.com>
djyasin pushed a commit to djyasin/awx that referenced this pull request Nov 11, 2024
Co-authored-by: Thanhnguyet Vo <tvo@ansible.com>
Co-authored-by: TVo <thavo@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants