Commit Graph

15 Commits (master)

Author SHA1 Message Date
Jason Stirnaman 73e25245af chore(oss): Update install instructions, mostly for Linux
- Updates Linux install instructions to reflect updates in the Downloads page.
- Uses curl, instead of wget, for examples.
- Reorg of download verification: moves expandable details before instructions, to encourage using verification.
  Includes verification in instructions.
- All tests pass if not explicitly skipped (for Docker and different architectures).
- Run `docker compose build` to update the Go version and other dependencies used by the
  test image.
2024-08-30 16:21:23 -05:00
Jason Stirnaman df39d7cd86 chore(telegraf): Update and improve Telegraf install instructions
- Updates Telegraf install instructions, adds more info to promote verifying downloads.
- Adds setup for tests.
- Makes tests pass in install and configuration docs.
- Adds Vale.sh exception to allow duration values inside code blocks.
- Adds Dockerfiles for convenience to test install procedures in CentOS and Ubuntu.
- Clarifies and fixes config file handling and specifying input and output plugins.
2024-08-26 16:32:16 -05:00
Jason Stirnaman 26105f05e4 fix(ci): set CONTENT_PATH env variable for each product 2024-08-07 13:55:26 -05:00
Jason Stirnaman 8ab4d4491c chore(ci): Add remark-lint to project
- Add remark-lint to compose.yaml
- Add base config for remark-lint
2024-07-30 10:07:46 -05:00
Jason Stirnaman b573c23e80 feat(v2): Use Docker Compose with secrets and `_FILE` env variables:
- Add guide for installing v2 using Compose, secrets, and InfluxDB `_FILE` env variables.
- Add project compose.yaml configuration for the same.
- Content looks good in Hugo, but I'm getting an error from pytest that I haven't identified yet.
2024-07-30 10:00:14 -05:00
Jason Stirnaman 37a7a7c6e7 chore(ci): Improve pre-commit hook, test harness, and linter
- Pre-commit hook:
       - Redo test harness so commands can run in parallel
       - Cleanup Vale command args
       - Replace lint-staged and husky with Lefthook.
    - Pre-push hook:
       - Scan for package vulnerabilities
    - Tests
      - Run tests on demand, in parallel, or debugged using docker compose up, run, exec, etc.
      - Each test container (service) runs the prepare-content script before running tests.
      - Return to using Python instead of Docker to provide environment variables so they don't get exposed in Docker inspect.
      - Bind mount influxctl config.toml and .env.test files
      - Bind mount scripts for faster builds while iterating on test scripts.
    - Vale:
      - Override Acronyms style def--ignore acronym if it's linked.
2024-07-23 15:08:28 -05:00
Jason Stirnaman 922e48182a chore(ci): Improve Vale style linting:
- Run Vale in a Docker container by running ./.ci/vale/vale.sh <args>
- Define vale lint scripts in package.json. Lint added and changed files for products.
- Define error-level vale linting in the lint-staged configuration for staged files.
- Improve product-specific nomenclature checks (e.g. database vs bucket)
- Simplify vocab terms and allowed words lists.
- Fixes content errors revealed by vale.
2024-06-26 08:52:21 -05:00
Jason Stirnaman 5c74f013a1 chore(ci): Improve CI lint and test runners
- Reconfigures prettier linting.
- Adds .editorconfig to help with consistent editor settings
- Refactors test runs:
  - Removes test configuration from compose.yaml (not suited for this use case).
  - Splits test runner into test content setup and pytest that can be run separately or together (and with other test runners in the future).
  - Configuration is in Dockerfiles and command line (`.lintstagedrc.mjs`)
- Updates CONTRIBUTING.md
- Updates client library write examples in cloud-dedicated and clustered.
2024-06-21 18:41:07 -05:00
Jason Stirnaman 12b1583b68 chore: add test data and improve test runner:
- Pulls python client lib and CLI from Github repo instead of package repo so we can test the latest release. Specifies the last release tag.
- Adds CSV and JSON home sensor data samples to /static/downloads.
- Test image build bind mounts /static/downloads into /usr/src/app/test/tmp/data. Allows code samples to reference sample data as `./data/[file]`.
- Moves run-tests.sh to setup directory.
- Dockerfile cleanup. Add jq for inspection/troubleshooting.
2024-05-29 13:31:31 -05:00
wayne 86f832f06c
docs: Add docker compose workflow for running docs locally (#5400)
* docs: Add docker compose workflow for running docs locally

* chore: Fixup compose.yaml for local build:

- Added comments
- Use the verbose mount syntax
- Wrap /Users/ja/Documents/GitHub/docs-v2 in quotes for cross-platform compat.

* docs: fixup readme style

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

* docs: fixup readme style

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

* docs: fixup readme style

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

---------

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2024-04-01 12:17:07 -05:00
Jason Stirnaman 5c74bf4ff6
5156 Writes: add v1 to Serverless get-started (#5233)
* chore(ci): Install Telegraf to test container

* chore(v3): test telegraf config and startup:

- creates the config file for the test run. TODO: remove the duplication and use the content for test setup.
- fix placeholder name

* fix(v3): make test pass for curl API example

* chore(ci): make tests pass for write. Add dependencies to Dockerfile.

* chore(tests): update test build

- Compose metadata: Add profile to test service. We can decouple services later and apply the profile to each. Rename. Pass the image name to the container.
- Fetch the parse_yaml.sh script during docker build, so we only fetch when necessary. Track the script in git. This is still a little janky, but better.
- test.sh: Use `HEAD` for diff (duh). Go back to using docker compose up so we're rebuilding only as needed and reusing the container - much faster, but the output isn't as pretty as `run`.
- pytest.ini, requirements.txt: Use pytest-dotenv to load env.products variables.

* fix(write): update JS instructions and pass tests.

* chore(ci): Install influx v2 CLI into the Docker test container.

* chore(ci): move .env file loading to pytest and run product tests separately with the proper .env file:

- Moves .env configs to be loaded by the test runner instead of by Docker. I'd prefer to ignore any product divergence and have them run interchangeably, but the pros outweigh the cons for now.
- Add example for passing custom commands in the compose file.

* fix(v3): replace curl example with v1 and v2, simplify JS example, pass tests.

feat(v3): add v1 write, test, update text:

- adds Serverless v1 /write example with note about autogen behavior
- adds link from v1 examples to Migrate guide
- adds description of autogen behavior to v1-compat guide
- updates "powered by..." text
- adapts examples to make them more testable, asserts `/write` status code
- replace "shared" examples (only used once) with inline to make them testable

fix(v3): promote migrate link

* Update content/influxdb/cloud-dedicated/get-started/write.md

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

* chore(v3): Write: fix wording for curl success  (#5156)

---------

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
2023-11-15 14:41:29 -06:00
Scott Anderson b823be2f63
fix inadvertantly reverted changes (#5219) 2023-11-06 16:55:00 -07:00
Scott Anderson 636f5ada45
V2 nav reorg (#5213)
* nest reference docs menu in v2 and cloud

* move migrate data into write data

* nest notebooks under tools

* nest templates under tools

* nest telegraf configs under tools

* cleanup weights and titles of tools sections

* reorg org and bucket management under admin

* add backup/restore to admin, clean up related links

* restructure security sections under admin

* Apply suggestions from code review

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

* updated serverless cli docs to address pr feedback

* Update content/influxdb/cloud/admin/organizations/delete-org.md

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

* port v2 install changes to new structure

* address pr feedback and ported missing content to serverless

---------

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2023-11-06 15:53:12 -07:00
Jason Stirnaman 6067315a58
5204 v2 update downloads and install instructions (#5214)
* chore(ci): Docker install gpg and wget for test image.

* chore(ci): add a config (temporary) for v2 tests.

* chore(ci): tests: replace latest-patch tag with environment variable.

* chore(ci): test runner

- test.sh diffs against origin/master
- test.sh builds the image for each run and then removes the container after the run.
- tesh.sh adds examples for running and debugging to remind myself.
- compose.yaml adds a bind mount to copy docs-v2/data into docs-v2/test.
- Dockerfile: simplify path use
- run-tests.sh: make default run less verbose, add support for a verbose option (and future options).
- run-tests.sh: generates a .env.products file from data/products.yml and sources the file variables as environment variables to use in test runs.
- run-tests.sh: adds some misc. test setup.
- requirements.txt: return to using the influxdb3-python release

* chore(v2): Update and test v2 OSS and CLI install instructions:

- Update download URLs and paths for all distributions.
- Update and fix install instructions, make consistent between browser downloading and shell
- Make testable.

* chore(v2): Ignore parse_yaml.sh download.
2023-11-06 09:48:01 -06:00
Jason Stirnaman 237b01877b
chore(qol): Test python and shell code samples. WIP - use for local testing only, not ready for CI. (#5154)
- Adds a Docker image, scripts, and configuration that install and run pytest-codeblocks on Python and shell code samples in Markdown.
- Copied from https://github.com/jstirnaman/docs-codeblocks/
- TODO: The script copies files into a tmp directory configured as a bind mount for the Docker container. We might want to replace this with the experimental `watch` feature.
- TODO: Use a secret to configure the token. As is, values subbed from the dotenv file are exposed in your Docker container history.
2023-09-26 14:56:21 -05:00