Skip to content

Commit

Permalink
Nx Cloud docs (#10690)
Browse files Browse the repository at this point in the history
* docs(nxdev): consume nx cloud documentation & dedicated menu

* docs(nxdev): nx-cloud docs

visually indicated nx-cloud docs in nx.dev

* docs(nxdev): formatting

visually indicated nx-cloud docs in nx.dev

* docs(nxdev): fix config

* docs(nxdev): fix header link

* docs(nxdev): consolidate dte set up guides

Co-authored-by: ben <[email protected]>
  • Loading branch information
isaacplmann and bcabanes authored Jun 11, 2022
1 parent 0fd3281 commit 9721844
Show file tree
Hide file tree
Showing 34 changed files with 573 additions and 401 deletions.
12 changes: 1 addition & 11 deletions docs/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -701,18 +701,8 @@
"itemList": [
{
"name": "What is Nx Cloud?",
"id": "nx-cloud",
"id": "what-is-nx-cloud",
"file": "nx-cloud/intro/nx-cloud"
},
{
"name": "Distributed Caching",
"id": "distributed-caching",
"file": "nx-cloud/intro/distributed-caching"
},
{
"name": "Distributed Task Execution",
"id": "distributed-task-execution",
"file": "nx-cloud/intro/distributed-task-execution"
}
]
},
Expand Down
37 changes: 0 additions & 37 deletions docs/nx-cloud/intro/distributed-caching.md

This file was deleted.

38 changes: 0 additions & 38 deletions docs/nx-cloud/intro/distributed-task-execution.md

This file was deleted.

18 changes: 9 additions & 9 deletions docs/nx-cloud/intro/nx-cloud.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Nx Cloud
# What is Nx Cloud?

## Save Time With Distributed Task Execution & Cache
## Save Time With Distributed Task Execution & Distributed Cache

Nx partitions a command into smaller tasks and runs them in parallel, in the correct order. Nx Cloud takes it one step further and [runs any command across multiple machines](/nx-cloud/intro/distributed-task-execution), while giving you a consolidated view of the command as if it ran locally.
Nx partitions a command into smaller tasks and runs them in parallel, in the correct order. Nx Cloud takes it one step further and [runs any command across multiple machines](/using-nx/dte), while giving you a consolidated view of the command as if it ran locally.

Nx caches the output of any previously run command such as testing and building, so it can replay the cached results instead of rerunning it. Nx Cloud allows you to [share the computation cache](/nx-cloud/intro/distributed-caching) across everyone in your team and CI.
Nx caches the output of any previously run command such as testing and building, so it can replay the cached results instead of rerunning it. Nx Cloud allows you to [share the computation cache](/using-nx/caching#distributed-computation-caching) across everyone in your team and CI.

No configuration needed.
And it takes five minutes to set up.

## Clean User Interface

Most developers will benefit from Nx Cloud without ever changing any of their workflow. Commands will just execute faster. For those developers that are tasked with making the most of Nx Cloud or those that want to get more insight into the different commands executed in the repository, Nx Cloud has a clean, informative user interface.

The top level organization page displays recent runs and a helpful dashboard of information about commands run in the repository.
The [top level organization page](https://nx.app/orgs/5e38af6de037b5000598b2d6/workspaces/5edaf12087863a0005781f17) displays recent runs and a helpful dashboard of information about commands run in the repository.

<iframe src="https://nx.app/orgs/5e38af6de037b5000598b2d6/workspaces/5edaf12087863a0005781f17">
<iframe src="https://nx.app/orgs/5e38af6de037b5000598b2d6/workspaces/5edaf12087863a0005781f17?hideHeader=true"></iframe>

Each branch in the repository has its own dedicated page where you can view agent utilization and a waterfall task execution graph for the most recent runs against that branch.
Each branch in the repository has its own [dedicated page](https://nx.app/branch?workspaceId=5edaf12087863a0005781f17&branchName=master) where you can view agent utilization and a waterfall task execution graph for the most recent runs against that branch.

<iframe src="https://nx.app/branch?workspaceId=5edaf12087863a0005781f17&branchName=master">
<iframe src="https://nx.app/branch?workspaceId=5edaf12087863a0005781f17&branchName=master&hideHeader=true"></iframe>
4 changes: 2 additions & 2 deletions docs/nx-cloud/private/auth-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ And then generate a new client secret, and save it somewhere secure (we'll use i

## Connect your private cloud instance to your OAuth App

[When setting up your private cloud](https://nx.app/docs/get-started-with-private-cloud-community), you can pass these two environment variables to it:
[When setting up your private cloud](/nx-cloud/private-cloud/get-started), you can pass these two environment variables to it:

```bash
GITHUB_AUTH_CLIENT_ID=...
Expand All @@ -53,4 +53,4 @@ If you are running an on-premise version of GitHub (Enterprise Server), you will

This will point all auth endpoints to your GitHub server (rather the public one).

Note: the above environment variable, also helps with setting up the GitHub app integration, so you can have NxCloud build stats directly on your pull request. See full set-up instructions [here](https://nx.app/docs/private-cloud-github-integration).
Note: the above environment variable, also helps with setting up the GitHub app integration, so you can have NxCloud build stats directly on your pull request. See full set-up instructions [here](/nx-cloud/private-cloud/github).
2 changes: 1 addition & 1 deletion docs/nx-cloud/private/auth-gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Once you create, keep a note of the Client ID and the Secret:

## Connect your private cloud instance to your new app

[When setting up your private cloud](https://nx.app/docs/get-started-with-private-cloud-community), you can pass these two environment variables to it:
[When setting up your private cloud](/nx-cloud/private-cloud/get-started), you can pass these two environment variables to it:

```bash
GITLAB_APP_ID=...
Expand Down
14 changes: 7 additions & 7 deletions docs/nx-cloud/private/auth-single-admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
There are a few methods of authenticating users in Nx Private Cloud:

- single-admin user
- [GitHub OAuth2](https://nx.app/docs/private-cloud-github-auth)
- [GitLab OAuth2](https://nx.app/docs/private-cloud-gitlab-auth)
- [GitHub OAuth2](/nx-cloud/private-cloud/auth-github)
- [GitLab OAuth2](/nx-cloud/private-cloud/auth-gitlab)

## Why do users need access

While just adding an NxCloud access token to your monorepo give you distributed caching, the NxCloud web app gives you analytics about tasks running in your workspace, allows devs to easily inspect terminal output, and works seamlessly with our GitHub integration for your Pull Requests. Here is a [video walkthrough of this](https://youtu.be/GT7XIwG1i5A?t=409).

By default, when you connect your token to a workspace on your NxCloud web app, all links and runs are private to only members of your organisation. This means that you'll either need to explicitly add members, or make your organisation public (which means anyone with access to your Private NxCloud instance will be able to see your runs). [More details here.](https://nx.app/docs/manage-access#accessing-nx-cloud)
By default, when you connect your token to a workspace on your NxCloud web app, all links and runs are private to only members of your organisation. This means that you'll either need to explicitly add members, or make your organisation public (which means anyone with access to your Private NxCloud instance will be able to see your runs). [More details here.](/nx-cloud/account/users#managing-members)

## Setting up a single admin user

If you just want to try out private cloud and set-up full membership management later, then the simplest option is to just set-up a single admin user. This option might also work for you if you are okay with [making your organisation public](https://nx.app/docs/manage-access#accessing-nx-cloud) to anyone that has access to your private cloud NxCloud instance.
If you just want to try out private cloud and set-up full membership management later, then the simplest option is to just set-up a single admin user. This option might also work for you if you are okay with [making your organisation public](/nx-cloud/account/users#public-organizations) to anyone that has access to your private cloud NxCloud instance.

[While setting up your container](https://nx.app/docs/get-started-with-private-cloud-community) you can pass it the `ADMIN_PASSWORD` environment variable. This will set-up a default admin user for you, which you can use to manage your workspace on the NxCloud web app.
[While setting up your container](/nx-cloud/private-cloud/get-started) you can pass it the `ADMIN_PASSWORD` environment variable. This will set-up a default admin user for you, which you can use to manage your workspace on the NxCloud web app.

Note: Even if you can make your organisation public, we still recommend setting up GitHub authentication and inviting more than 1 admin to your workspace, to reduce the chance of losing access to it.

## Setting up third-party auth providers

For instructions on how to set-up third-party auth providers please refer to these guides:

- [GitHub Auth](https://nx.app/docs/private-cloud-github-auth)
- [GitLab Auth](https://nx.app/docs/private-cloud-gitlab-auth)
- [GitHub Auth](/nx-cloud/private-cloud/auth-github)
- [GitLab Auth](/nx-cloud/private-cloud/auth-gitlab)

## Inviting users

Expand Down
12 changes: 6 additions & 6 deletions docs/nx-cloud/private/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Nx Private Cloud is a docker image that can be deployed to your cloud. This version keeps all data on your cloud, except for billing and utilization data that's sent to the Nx Cloud API to enable an integrated billing experience.

For companies who need complete control of data, with no external API calls, the [Nx Enterprise](https://nx.app/docs/get-started-with-private-cloud-enterprise) is for you.
For companies who need complete control of data, with no external API calls, the [Nx Enterprise](/nx-cloud/private-cloud/get-started) is for you.

**Nx Cloud consists of 3 parts:**

Expand All @@ -16,7 +16,7 @@ When running everything together, you won't be able to run more than one instanc

The instructions will go through running everything together first, and then, at the end, will talk about running the database and the file server separately.

The instructions will use Docker commands, but you can also deploy Nx Cloud to a Kubernetes cluster (see [here](https://nx.app/docs/kubernetes) for more information).
The instructions will use Docker commands, but you can also deploy Nx Cloud to a Kubernetes cluster (see [here](/nx-cloud/private-cloud/deploy-kubernetes) for more information).

## Running Nx Private Cloud

Expand Down Expand Up @@ -83,7 +83,7 @@ Depending on how your infrastructure is set up, you can either run Nx Private Cl
- `443:8081` maps the internal port 8081 to 443, so it can be accessed in the browser without specifying the port. 80:8081 works the same way when you use HTTP instead of HTTPS.
- `CERT_KEY` and `CERT` contain the values of private key and cert. The file extensions of the cert and key files can be different, but as long as they are in the PEM format (which is the case if you use, for instance, OpenSSL), the command will work.
- `NX_CLOUD_APP_URL` is the URL the cloud can be accessed by (e.g., `https://nxcloud.privateurl.com`). **Important: Unless you are experimenting, it won't be localhost. It has to be the URL that your CI and your developer machine can reach. Also note, there is no trailing slash in the URL.**
- `ADMIN_PASSWORD` contains the password of the admin user. The admin user is created the first time you run cloud, you can remove this env variable after that. Instead of an admin password, you can also follow [the instructions here](https://nx.app/docs/private-cloud-github-auth) to set-up GitHub auth.
- `ADMIN_PASSWORD` contains the password of the admin user. The admin user is created the first time you run cloud, you can remove this env variable after that. Instead of an admin password, you can also follow [the instructions here](/nx-cloud/private-cloud/auth-github) to set-up GitHub auth.
- `-v /data/private-cloud:/data` sets up the volume where the data is stored. `/data/private-cloud` refers to a folder on your machine, `/data` is the shareable folder from the Docker image.

### Step 3: Run the Container
Expand Down Expand Up @@ -112,11 +112,11 @@ As stated above, Nx Private Cloud will store all your artifacts and the informat

### Optional step 6: Set-up GitHub auth

Follow the [instructions here](https://nx.app/docs/private-cloud-github-auth) to set-up GitHub OAuth authentication so you can invite other members in your team to the workspace.
Follow the [instructions here](/nx-cloud/private-cloud/auth-github) to set-up GitHub OAuth authentication so you can invite other members in your team to the workspace.

### Optional step 7: Set-up GitHub Pull Request integration

You can [optionally configure private cloud](https://nx.app/docs/private-cloud-github-integration) to post build stats directly on your GitHub pull requests.
You can [optionally configure private cloud](/nx-cloud/private-cloud/github) to post build stats directly on your GitHub pull requests.

### Optional step 8: Setting Up Proxy

Expand All @@ -138,7 +138,7 @@ By default, Nx Cloud requires Mongo 4.2+. If you are using an older version of M

### Using MongoDB Kubernetes Operator

The MongoDB team maintains the open source [MongoDB Kubernetes Operator](https://github.com/mongodb/mongodb-kubernetes-operator). You can use it to set up your own deployment of MongoDB. See [the Nx Cloud and Kubernetes page](https://nx.app/docs/kubernetes) for more information.
The MongoDB team maintains the open source [MongoDB Kubernetes Operator](https://github.com/mongodb/mongodb-kubernetes-operator). You can use it to set up your own deployment of MongoDB. See [the Nx Cloud and Kubernetes page](/nx-cloud/private-cloud/deploy-kubernetes) for more information.

### Using CosmosDB

Expand Down
10 changes: 5 additions & 5 deletions docs/nx-cloud/private/github.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Private Cloud GitHub Integration
# Private Cloud GitHub PR Integration

## Set Up a Webhook

Expand All @@ -7,12 +7,12 @@
- Content type: `application/json`
- Add a "Secret" (can be anything). Remember it, as we'll need to pass it to our Docker container.

![Add webhook to github](/nx-cloud/private/private-cloud-github-integration-add-webhook.png)
![Add webhook to github](/nx-cloud/private/images/private-cloud-github-integration-add-webhook.png)

- Enable "Check Suites", "Check runs" and "Pull Requests" as the events that trigger the webhook.

![Enable check suites and check runs](/nx-cloud/private/webhook-trigger-events.png)
![Enable pull requests](/nx-cloud/private/webhook-trigger-pull-requests.png)
![Enable check suites and check runs](/nx-cloud/private/images/webhook-trigger-events.png)
![Enable pull requests](/nx-cloud/private/images/webhook-trigger-pull-requests.png)

## Generate Access token

Expand All @@ -21,7 +21,7 @@
- Make sure you select "repo" as a scope
- After you generate the token, make sure to copy and store it. We'll add it to Private Cloud in a bit.

![Generate personal access token](/nx-cloud/private/private-cloud-github-integration-generate-tokens.png)
![Generate personal access token](/nx-cloud/private/images/private-cloud-github-integration-generate-token.png)

## Optional - Configure Self-Hosted GitHub Instances

Expand Down
2 changes: 1 addition & 1 deletion docs/nx-cloud/reference/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 13.3.1

- Feat: Store output for non-Nx commands in Nx Cloud. Check out https://nx.app/docs/record-non-nx-commands for more information.
- Feat: Store output for non-Nx commands in Nx Cloud. Check out https://nx.dev/nx-cloud/set-up/record-commands for more information.

## 13.2.1

Expand Down
2 changes: 1 addition & 1 deletion docs/nx-cloud/reference/server-api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Nx API Spec
# Nx Cloud Server API Reference

## OpenAPI 3.0.3

Expand Down
Loading

1 comment on commit 9721844

@vercel
Copy link

@vercel vercel bot commented on 9721844 Jun 11, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-five.vercel.app
nx-dev-nrwl.vercel.app

Please sign in to comment.