diff --git a/advocacy_docs/supported-open-source/pgbackrest/03-quick_start.mdx b/advocacy_docs/supported-open-source/pgbackrest/03-quick_start.mdx index 1a9204f5f5f..30fb3d55514 100644 --- a/advocacy_docs/supported-open-source/pgbackrest/03-quick_start.mdx +++ b/advocacy_docs/supported-open-source/pgbackrest/03-quick_start.mdx @@ -25,22 +25,25 @@ For **EDB Postgres Advanced Server**: ```ini [global] -repo1-path=/var/lib/edb/as13/backups +repo1-path=/var/lib/edb/as15/backups [demo] -pg1-path=/var/lib/edb/as13/data +pg1-path=/var/lib/edb/as15/data pg1-user=enterprisedb pg1-port=5444 +pg-version-force=15 ``` +The `pg-version-force` value should be set to the same major version number as the server reports when using `show server_version_num;` in PSQL. Only the first two digits are the major version. For example, 15000 is major version 15. + For **PostgreSQL**: ```ini [global] -repo1-path=/var/lib/pgsql/13/backups +repo1-path=/var/lib/pgsql/15/backups [demo] -pg1-path=/var/lib/pgsql/13/data +pg1-path=/var/lib/pgsql/15/data pg1-user=postgres pg1-port=5432 ``` diff --git a/product_docs/docs/biganimal/release/getting_started/creating_a_cluster/index.mdx b/product_docs/docs/biganimal/release/getting_started/creating_a_cluster/index.mdx index 36f876bf51f..8a47793ec79 100644 --- a/product_docs/docs/biganimal/release/getting_started/creating_a_cluster/index.mdx +++ b/product_docs/docs/biganimal/release/getting_started/creating_a_cluster/index.mdx @@ -96,7 +96,12 @@ The following options aren't available when creating your cluster: !!!tip To maximize your disk size for AWS, select R5b as your instance and then io2 Block Express as your storage to get a maximum disk size of 64 TB and 256,000 IOPS. -1. In the **Storage** section, from the **Volume Type** list, select your volume type. +1. In the **Storage** section: + + By default, the **Database Storage** volume stores the Postgres data and the Write-Ahead (WAL) Logs together. If you want to improve write performance for WAL files, you can allocate separate storage volume for the WAL files. To allocate separate storage volume for WAL files, select the check-box before **Use a separate storage volume for Write-Ahead Logs**. Then select the Volume Type, Size, IOPS, and Disk Throughput separately for **Database Storage** and **Write-Ahead Logs Storage**. If you allocate separate storage volume for the WAL files, you have to pay cloud infrastructure costs for the second volume. Once separate storage volume is allocated for WAL files, it can't be removed from the cluster settings later on. + + From the **Volume Type** list, select your volume type. + - For Azure, in **Volume Type**, select **Premium SSD** or **Ultra Disk**. Compared to Premium SSD volumes, ultra disks offer lower-latency, high-performance options and direct control over your disk's input/output operations per second (IOPS). For BigAnimal, we recommend using ultra disks for workloads that require the most demanding performance. See [Using Azure ultra disks](https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd?tabs=azure-portal) for more information. - For Premium SSD, in **Volume Properties**, select the type and amount of storage needed for your cluster. See [Azure Premium SSD storage types](https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types#premium-ssds) for more information. @@ -118,7 +123,7 @@ The following options aren't available when creating your cluster: In **Volume Properties**, select the disk size for your cluster, and configure the IOPS. - + 2. ##### Network, Logs, & Telemetry section In **Connectivity Type**, specify whether to use private or public networking. Networking is set to **Public** by default. Public means that any client can connect to your cluster’s public IP address over the internet. Optionally, you can limit traffic to your public cluster by specifying an IP allowlist, which allows access only to certain blocks of IP addresses. To limit access, add one or more classless inter-domain routing (CIDR) blocks in the **IP Allowlists** section. CIDR is a method for allocating IP addresses and IP routing to a whole network or subnet. If you have any CIDR block entries, access is limited to those IP addresses. If none are specified, all network traffic is allowed. diff --git a/product_docs/docs/biganimal/release/overview/poolers.mdx b/product_docs/docs/biganimal/release/overview/poolers.mdx index 3c41b903c11..2c93116214b 100644 --- a/product_docs/docs/biganimal/release/overview/poolers.mdx +++ b/product_docs/docs/biganimal/release/overview/poolers.mdx @@ -7,7 +7,7 @@ EDB PgBouncer can manage your connections to Postgres databases and help your wo BigAnimal provisions up to three instances per EDB PgBouncer-enabled cluster to ensure that performance is unaffected, so each availability zone receives its own instance of EDB PgBouncer. !!!Note - Currently, you can't enable EDB PgBouncer when using BigAnimal's cloud account or when creating a distributed high-availability cluster using your cloud account. + Currently, you can't enable EDB PgBouncer when creating a distributed high-availability cluster. If you want to deploy and manage PgBouncer outside of BigAnimal, see the [How to configure EDB PgBouncer with BigAnimal cluster](https://support.biganimal.com/hc/en-us/articles/4848726654745-How-to-configure-PgBouncer-with-BigAnimal-Cluster) knowledge-base article. diff --git a/product_docs/docs/biganimal/release/release_notes/index.mdx b/product_docs/docs/biganimal/release/release_notes/index.mdx index 0c7913986a4..aaadff90b49 100644 --- a/product_docs/docs/biganimal/release/release_notes/index.mdx +++ b/product_docs/docs/biganimal/release/release_notes/index.mdx @@ -2,6 +2,7 @@ title: BigAnimal release notes navTitle: Release notes navigation: +- jan_2024_rel_notes - dec_2023_rel_notes - nov_2023_rel_notes - oct_2023_rel_notes @@ -20,6 +21,7 @@ The BigAnimal documentation describes the latest version of BigAnimal, including | Month | | ------------------------------------ | +| [January 2024](jan_2024_rel_notes) | | [December 2023](dec_2023_rel_notes) | | [November 2023](nov_2023_rel_notes) | | [October 2023](oct_2023_rel_notes) | diff --git a/product_docs/docs/biganimal/release/release_notes/jan_2024_rel_notes.mdx b/product_docs/docs/biganimal/release/release_notes/jan_2024_rel_notes.mdx new file mode 100644 index 00000000000..53d591c813b --- /dev/null +++ b/product_docs/docs/biganimal/release/release_notes/jan_2024_rel_notes.mdx @@ -0,0 +1,16 @@ +--- +title: BigAnimal January 2024 release notes +navTitle: January 2024 +--- + +BigAnimal's January 2024 includes the following enhancements and bugfixes: + +| Type | Description | +|------|-------------| +| Enhancement | BigAnimal has added new integrations with third-party monitoring services. You can now set up monitoring integrations with DataDog and New Relic on your BigAnimal Projects. | +| Enhancement | BigAnimal now supports adding a storage volume to your cluster for the Write-Ahead Log (WAL). Dedicated WAL storage volumes significantly improve write performance for WAL files, boosting the IO of the overall cluster. | +| Enhancement | BigAnimal Terraform provider v0.7.0 is now available. Learn more about what’s new [here](https://github.com/EnterpriseDB/terraform-provider-biganimal/releases/tag/v0.7.0) and download the provider [here](https://registry.terraform.io/providers/EnterpriseDB/biganimal/latest). | +| Enhancement | BigAnimal CLI v3.5.0 is now available. Learn more about what’s new [here](https://cli.biganimal.com/versions/v3.5.0/). | +| Enhancement | BigAnimal now supports pausing and resuming clusters on demand. You can now pause clusters when you aren’t using them without losing your data or configurations, giving you more control over your cluster operations as well as helping you save on compute costs. | + + diff --git a/product_docs/docs/biganimal/release/using_cluster/05_monitoring_and_logging/third_party_integrations/datadog.mdx b/product_docs/docs/biganimal/release/using_cluster/05_monitoring_and_logging/third_party_integrations/datadog.mdx new file mode 100644 index 00000000000..bff30e3b6c2 --- /dev/null +++ b/product_docs/docs/biganimal/release/using_cluster/05_monitoring_and_logging/third_party_integrations/datadog.mdx @@ -0,0 +1,60 @@ +--- +title: "Datadog" +--- + +Datadog integration is based on the OpenTelemetry Collector and the Datadog plugin bundled with the OpenTelemetry collector. Once enabled, BigAnimal automatically configures data planes to send the Telemetry to your Datadog account via Datadog's cloud receive endpoint. + +## Pre-requisites + +A pre-existing Datadog account is required to use this integration. + +## Enabling Datadog + +To enable the **Datadog** integrations: + +1. Select an existing project from the **Projects** page. +2. Go to **Settings** on the left-side navigation. +3. Select **Integrations** from the **Settings** drop down list. +4. Select **Datadog**, a window pops-up to provide the details: + - **Datadog API Key** — Provide an API Key. For more details, see [Datadog API Key](https://docs.datadoghq.com/account_management/api-app-keys/). The API Key is sensitive and can't be retrieved once saved. + - **Datadog Site Name** — Provide the Datadog site name by selecting from the available options in the drop-down list. The telemetry goes to this chosen Datadog site. + - **Datadog Site URL** — The Datadog site URL gets selected automatically based on the Datadog site name you selected. + - **Datadog API Key ID** — Provide the API Key ID, that acts as the name to store an identifier for the key. This identifier is used for future reference to check the configuration details. + + Provide all the details and then select **Save**. + +Once you enable this integration, it sends BigAnimal telemetry to your Datadog account. + +!!! note "Important" +Generate a new API Key in Datadog to enable this integration in BigAnimal. This API key must be specific to this integration and shouldn't be shared. Whenever you disable this integration, revoke the API Key using the Datadog UI. Once revoked, it disables the Datadog ingestion and billable usage from the BigAnimal integration. This doesn't impact the other services using the Datadog API. +!!! + +## Metrics + +BigAnimal sends a subset of the OpenTelemetry Collector's metrics from the hostmetrics and kubeletstats receivers, plus BigAnimal custom metrics for the monitored Postgres instance. + +You can see a list of metrics in the Datadog user interface, along with the tags for each metric. + +To see the list of metrics, go to **Metrics > Summary**. Then select a specific metric to see the tags for that metric. + +The set of metrics delivered to DataDog is subject to change. Metrics with names that begin with `postgres.preview.` or `biganimal.preview.` are likely to be renamed or removed in a future release. Other metrics may also be renamed, added, or removed to better integrate into the DataDog platform. + +## Cost + +After enabling the BigAnimal telemetry integration, check your billable Datadog usage and continue to monitor it over time. + +Be aware of the following cost considerations: + +* *You are responsible for all costs* charged to your Datadog account by telemetry sent by the BigAnimal Datadog integration. Charges are based on usage but they could even result from BigAnimal errors or oversights. If you do not accept this responsibility, do not enable the Datadog integration. +* Datadog bills for each monitored Postgres node (including any replicas) as a "monitored host" in the your Datadog plan. See the [Datadog price list](https://www.datadoghq.com/pricing/list/) for current pricing per monitored host. +* Datadog *may* bill for each Postgres container and monitoring agent container running on each monitored Postgres node. See the [Datadog price list](https://www.datadoghq.com/pricing/list/) for current pricing per monitored container. +* Datadog counts some of the metrics sent by BigAnimal as custom metrics. Datadog plans include a limited number of free unique custom metrics dimensions per host. Additional metrics dimensions above the free limit are billable at a rate set in the Datadog price list. See your [Datadog plan price list](https://www.datadoghq.com/pricing/list/) for details. Although BigAnimal's telemetry integration for Datadog tries to limit custom metrics delivery to minimize additional billable Datadog usage, you should still expect some billable custom metrics usage. + +To disable the Datadog integration for BigAnimal and ensure no further costs are incurred on your Datadog account, you must revoke the API key provided to BigAnimal. Disabling the integration on the BigAnimal Portal is not sufficient. + +Currently, Datadog does not offer any mechanism for configuring a usage limit or billing cap for monitored hosts, monitored containers, or custom metrics. The Datadog [metrics without limits feature](https://docs.datadoghq.com/metrics/metrics-without-limits/) can limit cardinality-based billing for custom metrics, but it enables ingestion-based billing instead, so the overall price may actually be greater. You must actively monitor and be alert to your Datadog usage-based billing using the Datadog-provided [usage metrics](https://docs.datadoghq.com/account_management/billing/usage_metrics/), such as `datadog.estimated_usage.hosts`, `datadog.estimated_usage.containers`, and `datadog.estimated_usage.metrics.custom`. + +For more information, see also: +- [Datadog pricing list](https://www.datadoghq.com/pricing/list/) +- [Custom metrics billing](https://docs.datadoghq.com/account_management/billing/custom_metrics/?tab=countrate#counting-custom-metrics) +- [Usage metrics billing](https://docs.datadoghq.com/account_management/billing/usage_metrics/) \ No newline at end of file diff --git a/product_docs/docs/biganimal/release/using_cluster/05_monitoring_and_logging/third_party_integrations/index.mdx b/product_docs/docs/biganimal/release/using_cluster/05_monitoring_and_logging/third_party_integrations/index.mdx new file mode 100644 index 00000000000..e36bd87a88f --- /dev/null +++ b/product_docs/docs/biganimal/release/using_cluster/05_monitoring_and_logging/third_party_integrations/index.mdx @@ -0,0 +1,16 @@ +--- +title: "Third party monitoring integrations" +--- + +BigAnimal provides support for third-party monitoring integrations for both using your own account and BigAnimal's cloud account. + +Monitoring integrations are configured at project level in BigAnimal. It can't be turned on or off for the individual clusters. An Org admin or a Project owner can set up an integration. Only one integration can be set up per project. + +By default, all the integrations are disabled. Enable it using the **Integrations** tab after creating the project. + +All the metrics collected from all the clusters in the Project are sent to the integrated tool and are displayed in BigAnimal's [**Monitoring and logging** tab using PEMx](../monitoring_using_pemx). The collected logs are exported to the object storage by default. + +The third-party integrations available in BigAnimal are: + +- [Datadog](./datadog) +- [New Relic](./newrelic) diff --git a/product_docs/docs/biganimal/release/using_cluster/05_monitoring_and_logging/third_party_integrations/newrelic.mdx b/product_docs/docs/biganimal/release/using_cluster/05_monitoring_and_logging/third_party_integrations/newrelic.mdx new file mode 100644 index 00000000000..9db753c2e4f --- /dev/null +++ b/product_docs/docs/biganimal/release/using_cluster/05_monitoring_and_logging/third_party_integrations/newrelic.mdx @@ -0,0 +1,57 @@ +--- +title: "New Relic" +--- + +The New Relic integration is based on the OpenTelemetry Collector, shipping the metrics over the standard OLTP protocol to the New Relic cloud endpoint. + +## Pre-requisites + +A pre-existing New Relic account is required to use this integration. + +## Enable New Relic + +To enable the **New Relic** integration: +1. Select an existing project from the **Projects** page. +2. Go to **Settings** on the left-side navigation. +3. Select **Integrations** from the **Settings** drop down list. +4. Select **New Relic**, a window pops up to provide the details: + - **New Relic API key** - Provide an API Key. For more details, see [New Relic API Key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/). The API Key is sensitive and can't be retrieved once saved. + - **New Relic API Key Name** - Provide the API Key name to store an identifier for the key. This identifier is used for future reference to check the configuration details. + - **New Relic Account ID** - Provide the account ID of New Relic. + + Provide all the details and select **Save**. + +Once you enable this integration, it sends BigAnimal telemetry to your New Relic account. + +!!! note "Important" +Generate a new API License Key in New Relic to enable this integration in BigAnimal. This API key must be specific to this integration and shouldn't be shared. Whenever you disable this integration, revoke the API Key using the New Relic UI. Once revoked, it disables the New Relic ingestion and billable usage from the BigAnimal integration. This doesn't impact the other services using the New Relic API. +!!! + +## Metrics + +BigAnimal sends a subset of the OpenTelemetry Collector's metrics from the hostmetrics and kubeletstats receivers, plus BigAnimal custom metrics for the monitored Postgres instance. + +You can see a list of metrics in the New Relic user interface, along with dimensions for each metric. + +To see a list of metrics, go to **Metrics & Events**. Then select a specific metric to see the dimensions sent for that metric. + +The set of metrics delivered to New Relic is subject to change. Metrics with names that begin with `postgres.preview.` or `biganimal.preview.` may be renamed or removed in a future release. Other metrics may also be renamed, added, or removed to better integrate into the New Relic platform. + +## Cost + +After enabling the BigAnimal telemetry integration, check your billable New Relic usage and continue to monitor it over time. + +Be aware of the following important cost considerations: + +* *You are responsible for all costs* charged to your New Relic account by telemetry sent by the BigAnimal New Relic integration. Charges are based on usage but they could even result from BigAnimal errors or oversights. If you do not accept this responsibility, do not enable the New Relic integration. + +* New Relic bills usage by bytes ingested and for data retention. You must monitor and configure alerts on your New Relic data ingestion to reduce the risk of unexpectedly large usage bills. Also check your retention settings. + +New Relic has features to limit usage and ingestion. Customers should review their limits before enabling the BigAnimal integration. In the New Relic user interface, see **Administration > Data management > Limits**. Also refer to the following related topics in the New Relic documentation: + +* [Understand and manage data ingest](https://docs.newrelic.com/docs/data-apis/manage-data/manage-data-coming-new-relic/) +* [Data ingest: Billing and rules](https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-pricing-billing/data-ingest-billing/) +* [Understand New Relic data limits](https://docs.newrelic.com/docs/data-apis/manage-data/view-system-limits/) +* [Get more detail about your data limits](https://docs.newrelic.com/docs/data-apis/manage-data/query-limits/) + +To disable the New Relic integration for BigAnimal and ensure no further costs are incurred on your New Relic account, you must revoke the API key provided to BigAnimal. Disabling the integration on the BigAnimal Portal is not sufficient. diff --git a/product_docs/docs/epas/15/epas_security_guide/04_sslutils.mdx b/product_docs/docs/epas/15/epas_security_guide/04_sslutils.mdx index 095b96135e9..1d07c9d442c 100644 --- a/product_docs/docs/epas/15/epas_security_guide/04_sslutils.mdx +++ b/product_docs/docs/epas/15/epas_security_guide/04_sslutils.mdx @@ -9,7 +9,29 @@ description: "The sslutils Postgres extension provides SSL certificate generatio ## Installing the extension -You install `sslutils` by using the `edb-as-server-sslutils` RPM package, where `` is the EDB Postgres Advanced Server version number. +Install `sslutils` using the following command: + +```shell + sudo -y install edb-as15-server-sslutils + ``` + + Where: + + - ``is the package manager used with your operating system: + + | Package manager | Operating system | + | --------------- | -------------------------------- | + | dnf | RHEL 8/9 and derivatives | + | yum | RHEL 7 and derivatives, CentOS 7 | + | zypper | SLES | + | apt-get | Debian 10/11 and derivatives | + + + For example, to install `sslutils` on a RHEL 9 platform: + + ```shell + sudo dnf -y install edb-as15-server-sslutils + ``` Each parameter in the function’s parameter list is described by `parameter n`, where `n` refers to the `nth` ordinal position (for example, first, second, or third) in the function’s parameter list. diff --git a/product_docs/docs/epas/15/managing_performance/02_index_advisor/index.mdx b/product_docs/docs/epas/15/managing_performance/02_index_advisor/index.mdx index 8f6dca2785e..29adff0892c 100644 --- a/product_docs/docs/epas/15/managing_performance/02_index_advisor/index.mdx +++ b/product_docs/docs/epas/15/managing_performance/02_index_advisor/index.mdx @@ -6,6 +6,7 @@ description: "How to use the Index Advisor utility to help determine the columns navigation: - index_advisor_overview - 05_index_advisor_limitations + - installing_index_advisor - 02_index_advisor_configuration - 03_using_index_advisor - 04_reviewing_the_index_advisor_recommendations diff --git a/product_docs/docs/epas/15/managing_performance/02_index_advisor/installing_index_advisor.mdx b/product_docs/docs/epas/15/managing_performance/02_index_advisor/installing_index_advisor.mdx new file mode 100644 index 00000000000..756d3ed6110 --- /dev/null +++ b/product_docs/docs/epas/15/managing_performance/02_index_advisor/installing_index_advisor.mdx @@ -0,0 +1,29 @@ +--- +title: "Installing Index Advisor" +--- + +Install Index Advisor using the following command: + +```shell + sudo -y install edb-as15-server-indexadvisor + ``` + + Where: + + - ``is the package manager used with your operating system: + + | Package manager | Operating system | + | --------------- | -------------------------------- | + | dnf | RHEL 8/9 and derivatives | + | yum | RHEL 7 and derivatives, CentOS 7 | + | apt-get | Debian 10/11 and derivatives | + + + For example, to install Index Advisor on a RHEL 9 platform: + + ```shell + sudo dnf -y install edb-as15-server-indexadvisor + ``` +!!! Note + Index Advisor is not available on the SLES operating system. + diff --git a/product_docs/docs/pem/9/profiling_workloads/index_advisor.mdx b/product_docs/docs/pem/9/profiling_workloads/index_advisor.mdx index 5008195bccd..90ea9cdbbb6 100644 --- a/product_docs/docs/pem/9/profiling_workloads/index_advisor.mdx +++ b/product_docs/docs/pem/9/profiling_workloads/index_advisor.mdx @@ -7,7 +7,7 @@ redirects: --- !!! Note "Important" -Index Advisor isn't supported for EDB Postgres Advanced Server and PostgreSQL version 11 and later. +Index Advisor isn't supported for EDB Postgres Advanced Server and PostgreSQL version 16 and later. !!! Index Advisor is distributed with EDB Postgres Advanced Server. Index Advisor works with SQL Profiler by examining collected SQL statements and making indexing recommendations for any underlying tables to improve SQL response time. Index Advisor works on all DML (INSERT, UPDATE, DELETE) and SELECT statements that are invoked by a superuser. diff --git a/product_docs/docs/pgd/5/reference/nodes-management-interfaces.mdx b/product_docs/docs/pgd/5/reference/nodes-management-interfaces.mdx index b8b10b343e9..3c85ed0e498 100644 --- a/product_docs/docs/pgd/5/reference/nodes-management-interfaces.mdx +++ b/product_docs/docs/pgd/5/reference/nodes-management-interfaces.mdx @@ -362,7 +362,7 @@ This function joins the local node to an already existing PGD group. bdr.join_node_group ( join_target_dsn text, node_group_name text DEFAULT NULL, - pause_in_standby boolean DEFAULT false, + pause_in_standby boolean DEFAULT NULL, wait_for_completion boolean DEFAULT true, synchronize_structure text DEFAULT 'all' ) @@ -373,22 +373,30 @@ bdr.join_node_group ( - `join_target_dsn` — Specifies the connection string to an existing (source) node in the PGD group you want to add the local node to. - `node_group_name` — Optional name of the PGD group. Defaults to NULL, which - tries to detect the group name from information present on the source - node. -- `pause_in_standby` — Optionally tells the join process to join only as a - logical standby node, which can be later promoted to a full member. + tries to detect the group name from information present on the source + node. - `wait_for_completion` — Wait for the join process to complete before - returning. Defaults to `true`. + returning. Defaults to `true`. - `synchronize_structure` — Set the kind of structure (schema) synchronization - to do during the join. Valid options are `all`, which synchronizes - the complete database structure, and `none`, which doesn't synchronize any - structure. However, it still synchronizes data. + to do during the join. Valid options are `all`, which synchronizes + the complete database structure, and `none`, which doesn't synchronize any + structure. However, it still synchronizes data. +- `pause_in_standby` — Optionally tells the join process to join only as a + logical standby node, which can be later promoted to a full member. + This option is deprecated and will be disabled or removed in future + versions of PGD. -If `wait_for_completion` is specified as `false`, -this is an asynchronous call that returns as soon as the joining procedure starts. -You can see progress of the join in logs and the -`bdr.event_summary` information view or by calling the -`bdr.wait_for_join_completion()` function after `bdr.join_node_group()` returns. +!!! Warning + `pause_in_standby` is deprecated since BDR 5.0. The recommended way to create + a logical standby is to set `node_kind` to `standby` when creating the node + with `[bdr.create_node](#bdrcreate_node)`. + +If `wait_for_completion` is specified as `false`, the function call will return +as soon as the joining procedure starts. Progress of the join can be viewed in +the log files and the `[bdr.event_summary](catalogs-internal.mdx#bdrevent_summary)` +information view. The function `[bdr.wait_for_join_completion()](#bdrwait_for_join_completion)` +can be called after `bdr.join_node_group()` to wait for the join operation to complete, +and can emit progress information if called with `verbose_progress` set to `true`. ### Notes diff --git a/tools/user/import/bareleasenotes/barelease.js b/tools/user/import/bareleasenotes/barelease.js new file mode 100644 index 00000000000..5619accfec9 --- /dev/null +++ b/tools/user/import/bareleasenotes/barelease.js @@ -0,0 +1,147 @@ +import fetch from "node-fetch"; +import fs from "fs"; +import yargs from "yargs"; +import { hideBin } from "yargs/helpers"; + +function getMonthName(monthNumber) { + const monthNames = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + ]; + return monthNames[monthNumber]; +} + +function getShortMonthName(monthNumber) { + const monthNames = [ + "jan", + "feb", + "mar", + "apr", + "may", + "jun", + "jul", + "aug", + "sep", + "oct", + "nov", + "dec", + ]; + return monthNames[monthNumber]; +} + +function printReleaseNotesHeader(currentMonth, currentYear) { + return `--- +title: BigAnimal ${getMonthName(currentMonth)} ${currentYear} release notes +navTitle: ${getMonthName(currentMonth)} ${currentYear} +--- + +BigAnimal's ${getMonthName( + currentMonth, + )} ${currentYear} includes the following enhancements and bugfixes: + +| Type | Description | +|------|-------------|`; +} + +async function fetchAndProcess(directory, currentYear, currentMonth) { + try { + const response = await fetch( + "https://status.biganimal.com/api/maintenance-windows/done/index.json", + ); + const data = await response.json(); + + const filteredData = data.data.filter((item) => { + const itemDate = new Date(item.date); + return ( + item.title !== undefined && + item.title.endsWith("Production release") && + itemDate.getFullYear() === currentYear && + itemDate.getMonth() === currentMonth + ); + }); + + const lines = filteredData.map((item) => { + if (item.description.startsWith("* ")) { + return item.description.split("* "); + } + if (item.description.startsWith("- ")) { + return item.description.split("- "); + } + return item.description; + }); + + // Flatten and clean the array of features + const cleanLines = lines.flat().filter((item) => { + return ( + item !== "" && + !item.startsWith("Improvements and updates for the cloud service") + ); + }); + + const releaseNoteHeader = printReleaseNotesHeader( + currentMonth, + currentYear, + ); + const releaseNotesBody = cleanLines + .map((line) => `| Enhancement | ${line.trim()} |`) + .join("\n"); + const releaseNotesFileName = `${directory}/${getShortMonthName( + currentMonth, + )}_${currentYear}_rel_notes.mdx`; + + const releaseNotesFile = fs.openSync(`${releaseNotesFileName}`, "w"); + + fs.writeSync( + releaseNotesFile, + `${releaseNoteHeader}\n${releaseNotesBody}\n\n\n`, + 0, + ); + + console.log( + `Release notes ${releaseNotesFileName} generated successfully!`, + ); + } catch (error) { + console.log(error); + } +} + +const currentDate = new Date(); +const currentYear = currentDate.getFullYear(); +const currentMonth = currentDate.getMonth() + 1; + +let argv = yargs(hideBin(process.argv)) + .usage("Usage: $0 -d [path] [options]") + .option("year", { + alias: "y", + type: "number", + default: currentYear, + description: "Set year to generate release note for (default current year)", + }) + .option("month", { + alias: "m", + type: "number", + default: currentMonth, + description: + "Set month to generate release note for (default current month)", + }) + .option("dir", { + alias: "d", + type: "string", + required: true, + description: "Set directory for release note to be written to", + }) + .parse(); + +// Get current year and month + +fetchAndProcess(argv.dir, argv.year, argv.month - 1); diff --git a/tools/user/import/bareleasenotes/package-lock.json b/tools/user/import/bareleasenotes/package-lock.json new file mode 100644 index 00000000000..690014f25b1 --- /dev/null +++ b/tools/user/import/bareleasenotes/package-lock.json @@ -0,0 +1,271 @@ +{ + "name": "bareleasenotes", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bareleasenotes", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "minimist": "^1.2.8", + "node-fetch": "^3.3.2", + "yargs": "^17.7.2" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", + "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + } + } +} diff --git a/tools/user/import/bareleasenotes/package.json b/tools/user/import/bareleasenotes/package.json new file mode 100644 index 00000000000..695bcffe33e --- /dev/null +++ b/tools/user/import/bareleasenotes/package.json @@ -0,0 +1,18 @@ +{ + "name": "bareleasenotes", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "minimist": "^1.2.8", + "node-fetch": "^3.3.2", + "yargs": "^17.7.2" + } +}