diff --git a/docs/generated/manifests/menus.json b/docs/generated/manifests/menus.json index 995018b9a6..7017ee5fff 100644 --- a/docs/generated/manifests/menus.json +++ b/docs/generated/manifests/menus.json @@ -3983,6 +3983,14 @@ "id": "powerpack", "isExternal": false, "children": [ + { + "name": "Free Licenses & Trials", + "path": "/nx-enterprise/powerpack/free-licenses-and-trials", + "id": "free-licenses-and-trials", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, { "name": "Run Language-Agnostic Conformance Rules", "path": "/nx-enterprise/powerpack/conformance", @@ -4027,6 +4035,14 @@ "id": "powerpack", "isExternal": false, "children": [ + { + "name": "Free Licenses & Trials", + "path": "/nx-enterprise/powerpack/free-licenses-and-trials", + "id": "free-licenses-and-trials", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, { "name": "Run Language-Agnostic Conformance Rules", "path": "/nx-enterprise/powerpack/conformance", @@ -4054,6 +4070,14 @@ ], "disableCollapsible": false }, + { + "name": "Free Licenses & Trials", + "path": "/nx-enterprise/powerpack/free-licenses-and-trials", + "id": "free-licenses-and-trials", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, { "name": "Run Language-Agnostic Conformance Rules", "path": "/nx-enterprise/powerpack/conformance", @@ -4883,6 +4907,14 @@ "children": [], "disableCollapsible": false }, + { + "name": "Custom Tasks Runner", + "path": "/deprecated/custom-tasks-runner", + "id": "custom-tasks-runner", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, { "name": "Workspace Executors", "path": "/deprecated/workspace-executors", @@ -5006,6 +5038,14 @@ "children": [], "disableCollapsible": false }, + { + "name": "Custom Tasks Runner", + "path": "/deprecated/custom-tasks-runner", + "id": "custom-tasks-runner", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, { "name": "Workspace Executors", "path": "/deprecated/workspace-executors", diff --git a/docs/generated/manifests/nx.json b/docs/generated/manifests/nx.json index 7d406fdd56..455d6c1758 100644 --- a/docs/generated/manifests/nx.json +++ b/docs/generated/manifests/nx.json @@ -5457,6 +5457,17 @@ "mediaImage": "", "file": "shared/features/powerpack/index", "itemList": [ + { + "id": "free-licenses-and-trials", + "name": "Free Licenses & Trials", + "description": "", + "mediaImage": "", + "file": "shared/features/powerpack/free-licenses-and-trials", + "itemList": [], + "isExternal": false, + "path": "/nx-enterprise/powerpack/free-licenses-and-trials", + "tags": [] + }, { "id": "conformance", "name": "Run Language-Agnostic Conformance Rules", @@ -5518,6 +5529,17 @@ "mediaImage": "", "file": "shared/features/powerpack/index", "itemList": [ + { + "id": "free-licenses-and-trials", + "name": "Free Licenses & Trials", + "description": "", + "mediaImage": "", + "file": "shared/features/powerpack/free-licenses-and-trials", + "itemList": [], + "isExternal": false, + "path": "/nx-enterprise/powerpack/free-licenses-and-trials", + "tags": [] + }, { "id": "conformance", "name": "Run Language-Agnostic Conformance Rules", @@ -5556,6 +5578,17 @@ "path": "/nx-enterprise/powerpack", "tags": [] }, + "/nx-enterprise/powerpack/free-licenses-and-trials": { + "id": "free-licenses-and-trials", + "name": "Free Licenses & Trials", + "description": "", + "mediaImage": "", + "file": "shared/features/powerpack/free-licenses-and-trials", + "itemList": [], + "isExternal": false, + "path": "/nx-enterprise/powerpack/free-licenses-and-trials", + "tags": [] + }, "/nx-enterprise/powerpack/conformance": { "id": "conformance", "name": "Run Language-Agnostic Conformance Rules", @@ -6692,6 +6725,17 @@ "path": "/deprecated/legacy-cache", "tags": [] }, + { + "id": "custom-tasks-runner", + "name": "Custom Tasks Runner", + "description": "", + "mediaImage": "", + "file": "shared/deprecated/custom-tasks-runner", + "itemList": [], + "isExternal": false, + "path": "/deprecated/custom-tasks-runner", + "tags": [] + }, { "id": "workspace-executors", "name": "Workspace Executors", @@ -6862,6 +6906,17 @@ "path": "/deprecated/legacy-cache", "tags": [] }, + "/deprecated/custom-tasks-runner": { + "id": "custom-tasks-runner", + "name": "Custom Tasks Runner", + "description": "", + "mediaImage": "", + "file": "shared/deprecated/custom-tasks-runner", + "itemList": [], + "isExternal": false, + "path": "/deprecated/custom-tasks-runner", + "tags": [] + }, "/deprecated/workspace-executors": { "id": "workspace-executors", "name": "Workspace Executors", diff --git a/docs/map.json b/docs/map.json index f5d0e9bf75..5629818fdc 100644 --- a/docs/map.json +++ b/docs/map.json @@ -1124,6 +1124,11 @@ "description": "Nx Powerpack is a suite of paid extensions for the Nx CLI specifically designed for enterprises.", "file": "shared/features/powerpack/index", "itemList": [ + { + "name": "Free Licenses & Trials", + "id": "free-licenses-and-trials", + "file": "shared/features/powerpack/free-licenses-and-trials" + }, { "name": "Run Language-Agnostic Conformance Rules", "description": "Write and apply rules for your Nx workspace", @@ -1416,6 +1421,11 @@ "id": "legacy-cache", "file": "shared/deprecated/legacy-cache" }, + { + "name": "Custom Tasks Runner", + "id": "custom-tasks-runner", + "file": "shared/deprecated/custom-tasks-runner" + }, { "name": "Workspace Executors", "id": "workspace-executors", diff --git a/docs/shared/deprecated/custom-tasks-runner.md b/docs/shared/deprecated/custom-tasks-runner.md new file mode 100644 index 0000000000..43cc748682 --- /dev/null +++ b/docs/shared/deprecated/custom-tasks-runner.md @@ -0,0 +1,238 @@ +# Deprecating Custom Tasks Runner + +The Nx core has been migrated to Rust. However, the Custom Tasks Runner API is not compatible with this rewrite because it allows modifications to the lifecycle of the Nx command execution, which could break important invariants that Nx depends on. + +The custom task runners API was created many years ago and has not been supported for several years. It was developed before we introduced a formal method for extending Nx through plugins. The new API leverages the plugins API for better performance and functionality. + +## The preTasksExecution and postTasksExecution hooks + +### Custom Tasks Runner Version + +Let’s imagine that you have implemented a custom task runner as follows: + +```typescript +function serializeTasksResults(taskResults: { [taskId: string]: TaskResult }) { + // ... +} + +function validateEnv() { + // ... +} + +export default async function customTasksRunner(tasks, options, context) { + if (process.env.QA_ENV) { + process.env.NX_SKIP_NX_CACHE = 'true'; + } + if (!validateEnv()) { + throw new Error('Env is not set up correctly'); + } + const allTaskResults = {}; + const lifeCyle = { + endTasks(taskResults) { + taskResults.forEach((tr) => { + allTaskResults[tr.task.id] = tr; + }); + }, + }; + const ret = await defaultTasksRunner( + tasks, + { ...options, lifeCyle }, + context + ); + if (options.reportAnalytics) { + await fetch(process.env.DATACAT_API, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: serializeTasksResults(allTaskResults), + }); + } + return ret; +} +``` + +And let's imagine you configured it in `nx.json` as follows: + +```json +{ + "tasksRunnerOptions": { + "default": { + "runner": "npm-package-with-custom-tasks-runner", + "options": { + "reportAnalytics": true + } + } + } +} +``` + +### New API + +The new API includes `preTasksExecution` and `postTasksExecution` hooks that plugins can register. These hooks do not affect task execution and cannot violate any invariants. + +The custom task runner above can be implemented as follows: + +```typescript +function serializeTasksResults(taskResults: { [taskId: string]: TaskResult }) { + // task results contain timings and status information useful for gathering analytics +} + +function validateEnv() { + // ... +} + +// context contains workspaceRoot and nx.json configuration +export async function preTasksExecution(options: any, context) { + if (process.env.QA_ENV) { + process.env.NX_SKIP_NX_CACHE = 'true'; + } + if (!validateEnv()) { + throw new Error('Env is not set up correctly'); + } +} + +// context contains workspaceRoot, nx.json configuration, and task results +export async function postTasksExecution(options: any, context) { + if (options.reportAnalytics) { + await fetch(process.env.DATACAT_API, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: serializeTasksResults(context.taskResults), + }); + } +} +``` + +Because it's a regular plugin, it can be configured as follows in `nx.json`: + +```json +{ + "plugins": [ + { + "plugin": "npm-package-with-the-plugin", + "options": { + "reportAnalytics": true + } + } + ] +} +``` + +As with all plugin hooks, the `preTasksExecution` and `postTasksExecution` hooks must be exported so that they load properly when the "npm-package-with-the-plugin" is initialized. + +### Multiple Tasks Runners + +You can implement multiple tasks runners using the new hooks. + +Imagine you have the following `nx.json`: + +```json +{ + "tasksRunnerOptions": { + "a": { + "runner": "package-a" + }, + "b": { + "runner": "package-b" + } + } +} +``` + +You can replace it with two plugins: + +```json +{ + "plugins": [ + { + "plugin": "package-a" + }, + { + "plugin": "package-b" + } + ] +} +``` + +Simple add a condition to your hooks as follows: + +```typescript +export async function preTasksExecution() { + if (process.env.RUNNER != 'a') return; +} + +export async function postTasksExecution(options, tasksResults) { + if (process.env.RUNNER != 'a') return; +} +``` + +You can then choose which hooks ot use by setting the RUNNER env variable. + +### Passing Options + +You can no longer augment options passed in to the default tasks runner, so instead you need to set env variables in the `preTasksExecution` hook. + +### Composing Plugins + +Implementing hooks in plugins offers several advantages. It allows multiple plugins to be loaded simultaneously, enabling a clean separation of concerns. + +### Keeping State Across Command Invocations + +By default, every plugin initiates a long-running process, allowing you to maintain state across command invocations, which can be very useful for advanced analytics. + +## Self-Hosted Remote Cache + +The `preTasksExecution` and `postTasksExecution` hooks cannot modify the execution of tasks, making it impossible to use them for implementing a remote cache. Instead, you should [install and activate one of the Nx Powerpack packages](/nx-enterprise/activate-powerpack). Nx Powerpack does not make requests to external APIs, nor does it collect or send any data. **Additionally, it offers more security and prevents cache poisoning, unlike DIY solutions.** + +We recognize that many organizations have been using DIY remote cache solutions. Therefore, we have made the migration to Nx Powerpack as streamlined as possible. + +{% call-to-action title="Get a License and Activate Powerpack" icon="nx" description="Unlock all the features of the Nx CLI" url="/nx-enterprise/activate-powerpack" /%} + +### Example Configuration Change + +Enabling a Nx Powerpack plugin will configure it in `nx.json`. The specific modification depends on your repository’s configuration. The following is one example, where a custom tasks runner configuration in `nx.json` will be removed: + +```json +{ + "tasksRunnerOptions": { + "default": { + "runner": "@nx-aws-plugin/nx-aws-cache", + "options": { + "awsAccessKeyId": "key", + "awsSecretAccessKey": "secret", + "awsForcePathStyle": true, + "awsEndpoint": "http://custom", + "awsBucket": "my-bucket", + "awsRegion": "eu-central-1", + "encryptionFileKey": "key" + } + } + } +} +``` + +And replaced with: + +```json +{ + "s3": { + "accessKeyId": "key", + "secretAccessKey": "secret", + "forcePathStyle": true, + "endpoint": "http://custom", + "bucket": "my-bucket", + "region": "eu-central-1", + "encryptionFileKey": "key", + "localMode": "read-write" + } +} +``` + +The API documentation for each plugin describes the available options. + +## Unhandled Custom Tasks Runner Use Cases? + +If you have a use case that the new API doesn't handle, please [open an issue](http://github.com/nrwl/nx). diff --git a/docs/shared/deprecated/legacy-cache.md b/docs/shared/deprecated/legacy-cache.md index 5655fb4f57..0f3ddc77a8 100644 --- a/docs/shared/deprecated/legacy-cache.md +++ b/docs/shared/deprecated/legacy-cache.md @@ -13,11 +13,13 @@ If you are currently using a custom task runner or the `NX_REJECT_UNKNOWN_LOCAL_ As of Nx 20, the `tasksRunnerOptions` property in `nx.json` is deprecated. This property was used to register custom task runners. `tasksRunnerOptions` and custom task runners will not work with the new database cache. -If you are using `tasksRunnerOptions`, you have a few options moving forward: +If you are using a custom tasks runner to customize your cache, you have the following options: -1. Use [Nx Cloud](/nx-cloud) for your remote cache. This is the safest, lowest-maintenance, most recommended option -2. If you cannot use Nx Cloud, consider an [Nx Powerpack](/powerpack) plugin for caching: [Amazon S3](/nx-api/powerpack-s3-cache), [Google Cloud](/nx-api/powerpack-gcs-cache), [Azure](/nx-api/powerpack-azure-cache) or a [shared network drive](/nx-api/powerpack-shared-fs-cache) -3. If there is no Powerpack plugin that supports the service where you want to store the remote cache, [file an issue](https://github.com/nrwl/nx/issues/new) +Use [Nx Cloud](/nx-cloud) for your remote cache. This is the safest, lowest-maintenance, most recommended option. + +If you cannot use Nx Cloud, consider an [Nx Powerpack](/powerpack) plugin for caching: [Amazon S3](/nx-api/powerpack-s3-cache), [Google Cloud](/nx-api/powerpack-gcs-cache), [Azure](/nx-api/powerpack-azure-cache) or a [shared network drive](/nx-api/powerpack-shared-fs-cache). If there is no Powerpack plugin that supports the service where you want to store the remote cache, [file an issue](https://github.com/nrwl/nx/issues/new). + +**To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner).** ## NX_REJECT_UNKNOWN_LOCAL_CACHE diff --git a/docs/shared/features/powerpack/NxPowerpack-Trial-v1.1.pdf b/docs/shared/features/powerpack/NxPowerpack-Trial-v1.1.pdf new file mode 100644 index 0000000000..b1b896c31c Binary files /dev/null and b/docs/shared/features/powerpack/NxPowerpack-Trial-v1.1.pdf differ diff --git a/docs/shared/features/powerpack/conformance.md b/docs/shared/features/powerpack/conformance.md index 5b2b6feb09..05e3868395 100644 --- a/docs/shared/features/powerpack/conformance.md +++ b/docs/shared/features/powerpack/conformance.md @@ -15,7 +15,7 @@ The plugin also provides the following pre-written rules: The `@nx/powerpack-conformance` plugin requires an Nx Powerpack license to function. [Activating Powerpack](/nx-enterprise/activate-powerpack) is a simple process. -{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of Nx" url="https://cloud.nx.app/powerpack/purchase" /%} +{% call-to-action title="Get a License and Activate Powerpack" icon="nx" description="Unlock all the features of the Nx CLI" url="/nx-enterprise/activate-powerpack" /%} Then, add the Conformance plugin to your workspace. diff --git a/docs/shared/features/powerpack/custom-caching.md b/docs/shared/features/powerpack/custom-caching.md index 8b194a90bf..1c194edf40 100644 --- a/docs/shared/features/powerpack/custom-caching.md +++ b/docs/shared/features/powerpack/custom-caching.md @@ -12,11 +12,17 @@ The recommended way to enable the [remote cache](/ci/features/remote-cache) is t The options range from fully opting in to Nx's management of the remote cache to fully managing the configuration and security of your own remote cache. +## Migrating from Custom Tasks Runners + +Many people who are interested in Nx Powerpack have previously used custom task runners. Nx offers a new and simpler extension API designed to meet the same use cases as the now-deprecated custom task runners. + +To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner). + ## Setup All the self-hosted cache storage plugins require an Nx Powerpack license to function. [Activating Powerpack](/nx-enterprise/activate-powerpack) is a simple process. -{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of the Nx CLI" url="https://cloud.nx.app/powerpack/purchase" /%} +{% call-to-action title="Get a License and Activate Powerpack" icon="nx" description="Unlock all the features of the Nx CLI" url="/nx-enterprise/activate-powerpack" /%} Then, choose the appropriate cache plugin for your situation. diff --git a/docs/shared/features/powerpack/free-licenses-and-trials.md b/docs/shared/features/powerpack/free-licenses-and-trials.md new file mode 100644 index 0000000000..d97e3fe0c1 --- /dev/null +++ b/docs/shared/features/powerpack/free-licenses-and-trials.md @@ -0,0 +1,27 @@ +# Powerpack Free Licenses and Trials + +## Free Licenses Enabling Self-Hosted Remote Cache + +We value small teams using Nx. That's why we provide a free, remote cache-only license to any company with fewer than 30 engineers using Nx. + +All licenses are perpetual, so you can use the latest version of Nx available to you while your license remains active, even after it expires. + +[Get Your Free License Immediately](https://cloud.nx.app/powerpack/request/free) + +We understand that some organizations may not neatly fit this definition (e.g., a larger organization with a small number of engineers using an Nx workspace). We'd like to unblock you. [Please reach out.](powerpack-support@nrwl.io) + +## OSS License + +We offer free, full-featured, Nx Powerpack licences to open source projects. [Apply for a free OSS license](https://docs.google.com/forms/d/e/1FAIpQLSczHgY1NuT1k8paVNO3TcR9cjTfpm6dg1zbG3Ji6zaLURYfcg/viewform). + +## Free Trial Licenses + +You can get a free, 30-day license immediately if you want to try Nx Powerpack. We're here to support you—whether that means extending your trial or helping with the installation. [Learn more about Nx Powerpack trials.](/assets/powerpack/NxPowerpack-Trial-v1.1.pdf) + +[Get Your Trial License Immediately](https://cloud.nx.app/powerpack/request/trial) + +If you're having trouble, [reach out for help.](powerpack-support@nrwl.io) + +## Extended Trial Periods + +Nx Powerpack does not make any requests to external APIs, and activating Powerpack can be completed in just a few minutes. However, we understand that in many large organizations approval processes can take a long time. We're here to help you. Need a trial extension or help with your business case? [Reach out and we'll help.](powerpack-support@nrwl.io) diff --git a/docs/shared/features/powerpack/owners.md b/docs/shared/features/powerpack/owners.md index 71b26342d6..d8dd386014 100644 --- a/docs/shared/features/powerpack/owners.md +++ b/docs/shared/features/powerpack/owners.md @@ -10,7 +10,7 @@ The atomic unit of code in an Nx workspace is a project. Tasks, module boundarie The `@nx/powerpack-owners` plugin requires an Nx Powerpack license to function. [Activating Powerpack](/nx-enterprise/activate-powerpack) is a simple process. -{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of Nx" url="https://cloud.nx.app/powerpack/purchase" /%} +{% call-to-action title="Get a License and Activate Powerpack" icon="nx" description="Unlock all the features of the Nx CLI" url="/nx-enterprise/activate-powerpack" /%} Then, add the Owners plugin to your workspace. diff --git a/docs/shared/packages/powerpack-azure-cache/powerpack-azure-cache-plugin.md b/docs/shared/packages/powerpack-azure-cache/powerpack-azure-cache-plugin.md index 69531baf02..749ba431c7 100644 --- a/docs/shared/packages/powerpack-azure-cache/powerpack-azure-cache-plugin.md +++ b/docs/shared/packages/powerpack-azure-cache/powerpack-azure-cache-plugin.md @@ -7,10 +7,6 @@ The `@nx/powerpack-azure-cache` plugin enables you to use [Azure Storage](https: This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead. -{% callout type="warning" title="Potential Cache Poisoning" %} -Using your own Azure Storage account to host the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache). -{% /callout %} - {% callout title="This plugin requires an active Nx Powerpack license" %} In order to use `@nx/powerpack-azure-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache. {% /callout %} @@ -19,7 +15,7 @@ In order to use `@nx/powerpack-azure-cache`, you need to have an active Powerpac ### 1. Install the Package -1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already +1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already. It only takes a minute. 2. Install the package ```shell @@ -82,6 +78,12 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `contain | **container** | The name of the container to use | | **accountName** | The name of blob storage account | +### Migrating from Custom Tasks Runners + +Many people who are interested in Nx Powerpack have previously used custom task runners. Nx offers a new and simpler extension API designed to meet the same use cases as the now-deprecated custom task runners. + +To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner). + # Cache Modes By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache. diff --git a/docs/shared/packages/powerpack-gcs-cache/powerpack-gcs-cache-plugin.md b/docs/shared/packages/powerpack-gcs-cache/powerpack-gcs-cache-plugin.md index 86fe8dc775..01a00d522e 100644 --- a/docs/shared/packages/powerpack-gcs-cache/powerpack-gcs-cache-plugin.md +++ b/docs/shared/packages/powerpack-gcs-cache/powerpack-gcs-cache-plugin.md @@ -7,10 +7,6 @@ The `@nx/powerpack-gcs-cache` plugin enables you to use [Google Cloud Storage](h This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead. -{% callout type="warning" title="Potential Cache Poisoning" %} -Using your own Google Cloud Storage account to host the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache). -{% /callout %} - {% callout title="This plugin requires an active Nx Powerpack license" %} In order to use `@nx/powerpack-gcs-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache. {% /callout %} @@ -19,7 +15,7 @@ In order to use `@nx/powerpack-gcs-cache`, you need to have an active Powerpack ### 1. Install the Package -1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already +1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already. It only takes a minute. 2. Install the package ```shell @@ -81,6 +77,12 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `bucket` | ------------ | ----------------------------- | | **bucket** | The name of the bucket to use | +### Migrating from Custom Tasks Runners + +Many people who are interested in Nx Powerpack have previously used custom task runners. Nx offers a new and simpler extension API designed to meet the same use cases as the now-deprecated custom task runners. + +To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner). + # Cache Modes By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache. diff --git a/docs/shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin.md b/docs/shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin.md index 29395a60ff..1363da077d 100644 --- a/docs/shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin.md +++ b/docs/shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin.md @@ -7,8 +7,8 @@ The `@nx/powerpack-s3-cache` plugin enables you to use an [Amazon S3](https://aw This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead. -{% callout type="warning" title="Potential Cache Poisoning" %} -Using your own Amazon S3 bucket to host the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache). +{% callout title="No Cache Poisoning" %} +`@nx/powerpack-s3-cache` implements content integrity checks to prevent cache poisoning, making it a more secure solution than previous DIY approaches. {% /callout %} {% callout title="This plugin requires an active Nx Powerpack license" %} @@ -19,7 +19,7 @@ In order to use `@nx/powerpack-s3-cache`, you need to have an active Powerpack l ### 1. Install the Package -1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already +1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already. It only takes a minute. 2. Install the package ```shell @@ -180,3 +180,9 @@ The cache mode in CI can also be configured by setting `ciMode` to `read-only` o } } ``` + +### Migrating from Custom Tasks Runners + +Many people who are interested in Nx Powerpack have previously used custom task runners. Nx offers a new and simpler extension API designed to meet the same use cases as the now-deprecated custom task runners. + +To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner). diff --git a/docs/shared/packages/powerpack-shared-fs-cache/powerpack-shared-fs-cache-plugin.md b/docs/shared/packages/powerpack-shared-fs-cache/powerpack-shared-fs-cache-plugin.md index 643bf1c831..afe1b940fb 100644 --- a/docs/shared/packages/powerpack-shared-fs-cache/powerpack-shared-fs-cache-plugin.md +++ b/docs/shared/packages/powerpack-shared-fs-cache/powerpack-shared-fs-cache-plugin.md @@ -19,7 +19,7 @@ In order to use `@nx/powerpack-shared-fs-cache`, you need to have an active Powe ### 1. Install the Package -1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already +1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already. It only takes a minute. 2. Install the package ```shell diff --git a/docs/shared/recipes/installation/activate-powerpack.md b/docs/shared/recipes/installation/activate-powerpack.md index e3844de964..db5a4cf7bf 100644 --- a/docs/shared/recipes/installation/activate-powerpack.md +++ b/docs/shared/recipes/installation/activate-powerpack.md @@ -4,19 +4,20 @@ Nx Powerpack unlocks features of Nx that are particularly useful for larger orga - [Run language-agnostic conformance rules](/nx-enterprise/powerpack/conformance) - [Define code ownership at the project level](/nx-enterprise/powerpack/owners) -- [Change the remote cache storage location](/nx-enterprise/powerpack/custom-caching) +- [Self-hosted remote cache storage](/nx-enterprise/powerpack/custom-caching) -Activating Powerpack is a two step process. +Activating Powerpack is a two-step process. -## 1. Purchase a License +## Get a License Key -You'll need to [purchase a license](https://cloud.nx.app/powerpack/purchase) online. The license is a seat-based license. If you are a small team, the purchase form has an option to apply for a free license. If you have an open-source repository, you can [register for a free OSS license](https://forms.gle/mWjQo6Vrv5Kt6WYh9) as well. +1. Small teams can [immediately get a free Nx Powerpack license for remote cache](https://cloud.nx.app/powerpack/request/free). _[Read more about who qualifies.](/nx-enterprise/powerpack/free-licenses-and-trials)_ +2. Open-source projects can [register for a free OSS license](https://forms.gle/mWjQo6Vrv5Kt6WYh9) as well. +3. Larger teams can immediately [get a free trial license](https://cloud.nx.app/powerpack/request/trial). _[Read more about how trials work](/nx-enterprise/powerpack/free-licenses-and-trials)._ +4. You can also [purchase a license](https://cloud.nx.app/powerpack/purchase) online. -{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of Nx" url="https://cloud.nx.app/powerpack/purchase" /%} +**If you are unsure how to proceed, starting with a trial process is recommended, and we will accommodate your organization's needs.** -Once you've completed the purchase, you will receive a license key. - -## 2. Register the License Key +## Register the License Key {% tabs %} {% tab label="Closed Source Repository" %} @@ -27,7 +28,15 @@ To register the license key in your repository, run the `nx activate-powerpack` nx activate-powerpack YOUR_LICENSE_KEY ``` -The license will be saved in your repository and should be committed so that every developer has access to the Powerpack features. +The license will be saved in your repository and should be committed so that every developer has access to the Powerpack features. **Only one developer needs to run this. The rest of the team will gain access to Nx Powerpack features once they pull the changes including the checked-in file.** + +Another option is to register the license key as an environment variable in CI. + +```{% fileName=".env" %} +NX_POWERPACK_LICENSE=YOUR_LICENSE_KEY +``` + +**Whether you use the `active-powerpack` command or set the environment variable, Nx Powerpack does not make any requests to external APIs. No data is collected or sent anywhere.** {% /tab %} {% tab label="Open Source Repository" %} @@ -40,3 +49,7 @@ NX_POWERPACK_LICENSE=YOUR_LICENSE_KEY {% /tab %} {% /tabs %} + +### Buying and Registering Nx Powerpack When Using Nx Cloud + +Nx Cloud users can buy Nx Powerpack on the organization settings page. The license will be available automatically. diff --git a/docs/shared/reference/sitemap.md b/docs/shared/reference/sitemap.md index f2ce845ea5..1dce8be497 100644 --- a/docs/shared/reference/sitemap.md +++ b/docs/shared/reference/sitemap.md @@ -178,6 +178,7 @@ - [Enterprise](/nx-enterprise) - [Activate Powerpack](/nx-enterprise/activate-powerpack) - [Powerpack Features](/nx-enterprise/powerpack) + - [Free Licenses & Trials](/nx-enterprise/powerpack/free-licenses-and-trials) - [Run Language-Agnostic Conformance Rules](/nx-enterprise/powerpack/conformance) - [Define Code Ownership at the Project Level](/nx-enterprise/powerpack/owners) - [Self-Host the Remote Cache](/nx-enterprise/powerpack/custom-caching) @@ -226,6 +227,7 @@ - [As Provided vs. Derived](/deprecated/as-provided-vs-derived) - [Workspace Generators](/deprecated/workspace-generators) - [Legacy Cache](/deprecated/legacy-cache) + - [Custom Tasks Runner](/deprecated/custom-tasks-runner) - [Workspace Executors](/deprecated/workspace-executors) - [runtimeCacheInputs](/deprecated/runtime-cache-inputs) - [cacheableOperations](/deprecated/cacheable-operations) diff --git a/nx-dev/nx-dev/app/powerpack/page.tsx b/nx-dev/nx-dev/app/powerpack/page.tsx index 1b03b6cfe5..4f811d207d 100644 --- a/nx-dev/nx-dev/app/powerpack/page.tsx +++ b/nx-dev/nx-dev/app/powerpack/page.tsx @@ -1,6 +1,7 @@ import { ButtonLinkProps, DefaultLayout } from '@nx/nx-dev/ui-common'; import { CallToAction, + Faq, GetStarted, Hero, PowerpackFeatures, @@ -55,6 +56,10 @@ export default function NxPowerPackPage(): ReactElement { +
+ +
+
diff --git a/nx-dev/nx-dev/public/assets/powerpack/NxPowerpack-Trial-v1.1.pdf b/nx-dev/nx-dev/public/assets/powerpack/NxPowerpack-Trial-v1.1.pdf new file mode 100644 index 0000000000..b1b896c31c Binary files /dev/null and b/nx-dev/nx-dev/public/assets/powerpack/NxPowerpack-Trial-v1.1.pdf differ diff --git a/nx-dev/ui-markdoc/src/lib/nodes/link.component.tsx b/nx-dev/ui-markdoc/src/lib/nodes/link.component.tsx index e3d2fe479b..d2f03b3a45 100644 --- a/nx-dev/ui-markdoc/src/lib/nodes/link.component.tsx +++ b/nx-dev/ui-markdoc/src/lib/nodes/link.component.tsx @@ -3,7 +3,10 @@ import { cx } from '@nx/nx-dev/ui-primitives'; export function CustomLink(props: any) { const target = - props.target || (props.href.startsWith('http') ? '_blank' : undefined); + props.target || + (props.href.startsWith('http') || props.href.indexOf('.pdf') > -1 + ? '_blank' + : undefined); return ( +
+
+
+ + Have questions? + + + Check out our most commonly asked questions. + + +

+ + Can’t find the answer you’re looking for? + +

+
+ ({ + questionName: faq.question, + acceptedAnswerText: faq.answer, + }))} + /> +
+
+ {faqs.map((faq) => ( + + {({ open }) => ( + <> +
+ + + {faq.question} + + + + +
+ + +

+ {faq.answer} +

+
+
+ + )} +
+ ))} +
+
+
+
+ + ); +} diff --git a/nx-dev/ui-powerpack/src/lib/hero.tsx b/nx-dev/ui-powerpack/src/lib/hero.tsx index bcc98da55f..35ac8298cb 100644 --- a/nx-dev/ui-powerpack/src/lib/hero.tsx +++ b/nx-dev/ui-powerpack/src/lib/hero.tsx @@ -41,12 +41,11 @@ export function Hero(): ReactElement {
- Buy Powerpack + Get Powerpack License

- Use Amazon S3 or a{' '} + Use Amazon S3, MinIO,{' '} + GCP, Azure or a{' '} shared network drive as your remote cache storage, offering a flexible, self-managed solution for faster builds. Nx Powerpack self-hosted cache storage is{' '} free for small teams diff --git a/nx-dev/ui-pricing/src/lib/faq.tsx b/nx-dev/ui-pricing/src/lib/faq.tsx index 71fd635ccd..9b20675d84 100644 --- a/nx-dev/ui-pricing/src/lib/faq.tsx +++ b/nx-dev/ui-pricing/src/lib/faq.tsx @@ -104,7 +104,7 @@ export function Faq(): ReactElement { 'We have a helpful comparison above. If you have additional questions, or these plans don’t fit your needs please reach out to https://nx.dev/contact/sales and we will do our best to help.', }, { - question: 'What if I need more than 70 active contributors?', + question: 'What if I need more than 30 active contributors?', answer: 'Please reach out to https://nx.dev/contact/sales', }, {