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

[DX-1652] Plugin Bundle CLI Improvements #5401

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[DX-1652] Plugin Bundle CLI Improvements #5401

wants to merge 1 commit into from

Conversation

dcs3spp
Copy link
Contributor

@dcs3spp dcs3spp commented Sep 12, 2024

User description

For internal users - Please add a Jira DX PR ticket to the subject!

DX-1652


Preview Link

preview

Description

Improve bundle CLI content to give required prerequisites following previous review

Screenshots (if appropriate)


Checklist

  • I have added a preview link to the PR description.
  • I have reviewed the suggestions made by our AI (PR Agent) and updated them accordingly (spelling errors, rephrasing, etc.)
  • I have reviewed the guidelines for contributing to this repository.
  • I have read the technical guidelines for contributing to this repository.
  • Make sure you have started your change off our latest master.
  • I labeled the PR

PR Type

documentation


Description

  • Added a new section on prerequisites for creating plugin bundles, detailing necessary files like manifest.json, plugin source code files, and optional certificate keys.
  • Provided a suggested directory structure for organizing plugin bundles in Golang, Javascript, and Python.
  • Included a Docker example for creating plugin bundles for Tyk Gateway versions earlier than 5.5, detailing the command and its purpose.
  • Enhanced the documentation with additional command options and notes for creating plugin bundles, improving clarity and usability.

Changes walkthrough 📝

Relevant files
Documentation
bundle-cli.md
Enhance Plugin Bundle CLI Documentation with Prerequisites and Docker
Example

tyk-docs/content/product-stack/tyk-gateway/advanced-configurations/plugins/bundles/bundle-cli.md

  • Added prerequisites section detailing required files and
    configurations for plugin bundles.
  • Introduced a directory structure guide for Golang, Javascript, and
    Python bundles.
  • Added a Docker example for creating plugin bundles for Gateway
    versions < 5.5.
  • Enhanced documentation with command options and additional notes for
    bundle creation.
  • +86/-5   

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Documentation Clarity
    The documentation under "Prerequisites" and "Directory Structure" could benefit from additional clarity or simplification to ensure it is easily understandable by users. Consider revising the language or structure for better readability.

    Code Example Consistency
    The Docker example provided uses a specific version of the Tyk Gateway (v5.4.0), which may lead to confusion if the documentation is meant to cover multiple or newer versions. Consider updating or generalizing the example to be applicable to more versions or clarify the version-specific nature of the example.

    Copy link
    Contributor

    github-actions bot commented Sep 12, 2024

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Copy link

    netlify bot commented Sep 12, 2024

    PS. Pls add /docs/nightly to the end of url

    Name Link
    🔨 Latest commit cb42498
    🔍 Latest deploy log https://app.netlify.com/sites/tyk-docs/deploys/66f668d2ac55740008096dd0
    😎 Deploy Preview https://deploy-preview-5401--tyk-docs.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    - **Plugin source code files**: The plugin source code files should be contained relative to the directory in which the *manifest.json* file is located. The *manifest.json* should contain relative path references to source code files. Please note that source code files are not required when creating a plugin bundle for gRPC plugins since the plugin source code is located at the gRPC server.
    - **Certificate key**: Plugin bundles can optionally be signed with an RSA private key. The corresponding public key should be located in the file configured in environmental variable `TYK_GW_PUBLICKEYPATH` or the `public_key_path` parameter in `tyk.conf`:

    ```bash
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    Suggested change
    ```bash
    ```json


    In this case, the `manifest.json` will reference the Python files located in the plugins subdirectory, ensuring the Python plugin source files are organized relative to the manifest. The Tyk Gateway will load and execute these Python plugins based on the paths defined in the `manifest.json` file.

    {{< tabs_start >}}
    Copy link
    Collaborator

    @letzya letzya Sep 27, 2024

    Choose a reason for hiding this comment

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

    We should not add tabs to the docs as they cause bad ux when you search for the content with ctrl+f (it shows as found but you can't see it). We change it to collapse/expand or maybe you have another idea @sharadregoti. Regardless, in this case, it's very short content so I'll just keep it visible

    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.

    2 participants