Skip to content

Commit

Permalink
moving to separate page in misc and referencing from self_host
Browse files Browse the repository at this point in the history
  • Loading branch information
alpetric committed Oct 10, 2024
1 parent 088d54d commit 8b89219
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 120 deletions.
120 changes: 1 addition & 119 deletions docs/advanced/1_self_host/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Self-host Windmill on your own infrastructure.

For small setups, use [Docker](#docker) and Docker Compose on a single instance.
For larger and production use-cases, use our [Helm chart](#helm-chart) to deploy on Kubernetes.
You can also run [Windmill workers on Windows](#windows-native-workers) without Docker.
You can also run [Windmill workers on Windows](/docs/misc/windows_workers) without Docker.

![Self-hosted Windmill](./self_hosted_windmill.png 'Self-hosted Windmill')

Expand Down Expand Up @@ -547,124 +547,6 @@ GRANT USAGE ON SCHEMA public TO windmill_admin;
GRANT USAGE ON SCHEMA public TO windmill_user;
```

## Windows Native Workers

Windows Native Workers are a [Cloud plans and Self-Hosted Enterprise](/pricing) Feature.

You can use the Windows worker natively if you do not want to run Docker or WSL on Windows (e.g., for policy or security reasons).
This feature supports the **Python**, **Bun**, and **PowerShell** executors.

You can connect Windows workers to your existing Dockerized or cloud self-hosted PostgreSQL database and Windmill server.

### Setting up Windmill Worker Executable

1. **Set Up a Working Directory**:
- Create a directory from where you want to run the Windmill worker, e.g., `C:\Users\Alex\windmill`.

2. **Download Windmill Executable**:
- Download the `windmill-ee.exe` file into the newly created directory from the [releases page](https://github.com/windmill-labs/windmill/releases).

3. **Set Basic Environment Variables**:
- Set the following environment variables (replace the placeholders with your specific values):
```powershell
# Replace these variables with your specific configuration
$env:MODE="worker"
$env:DATABASE_URL="postgres://postgres:[email protected]:5432/windmill?sslmode=disable"
$env:SKIP_MIGRATION="true"
```
More environment variables and worker settings can be found [here](https://github.com/windmill-labs/windmill?tab=readme-ov-file#environment-variables).

4. **Run windmill-ee.exe**:
```powershell
PS C:\Users\Alex\windmill> .\windmill-ee.exe
```
We recommend running Windmill as a service on your Windows environment using `sc` or `NSSM` to monitor the Windmill worker, start it at system boot, and manage the restart policy.

After the basic setup, follow these steps for each language your worker should support.

### Python Executor

1. **Install Python**: [Download Python](https://python.org/downloads).
- **Note**: When installing, make sure to check the box to add Python to the `PATH`.

2. **Verify Python Installation**:
- Open a new PowerShell window and type `python`. You should see output similar to the following:
```powershell
PS C:\Users\Alex> python
Python 3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
```

3. **Install `uv`**:
- Run the following command in PowerShell:
```powershell
pip install uv
```

4. **Locate Python Installation**:
- Find where Python is installed by running:
```powershell
where.exe python
```
Example output:
```plaintext
C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe
```

5. **Set Environment Variables**:
- Add the following environment variables (replace the placeholders with your specific values):
```powershell
# Replace these variables with your specific configuration
$env:PYTHON_PATH="C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe"
```

### Bun Executor

1. **Install Bun**: Follow the official [documentation](https://bun.sh/docs/installation) for Windows.
2. **Locate Bun Installation**:
- Find where Bun is installed by running:
```powershell
where.exe bun
```
Example output:
```plaintext
C:\Users\Alex\.bun\bin\bun.exe
```

3. **Set Environment Variables**:
- Add the following environment variables (replace the placeholders with your specific values):
```powershell
# Replace these variables with your specific configuration
$env:BUN_PATH="C:\Users\Alex\.bun\bin\bun.exe"
```

### PowerShell Executor

1. **Install PowerShell 7+ (stable)**: Ensure you have the latest stable release of PowerShell by following the [official documentation](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows).
- Start PowerShell 7 and verify you're running PowerShell 7 by checking `$PSVersionTable`:
```powershell
$PSVersionTable
PSVersion 7.4.5
```

2. **Locate PowerShell 7 Installation**:
- Find where PowerShell 7 is installed by running:
```powershell
where.exe pwsh.exe # Note: previous versions used powershell.exe
```
Example output:
```plaintext
C:\Program Files\PowerShell\7\pwsh.exe
```

3. **Set Environment Variables**:
- Add the following environment variables (replace the placeholders with your specific values):
```powershell
# Replace these variables with your specific configuration
$env:POWERSHELL_PATH="C:\Program Files\PowerShell\7\pwsh.exe"
```

## First time login

Once you have setup your environment for deployment and have access to the instance, you will be able to login with the default credentials `[email protected]` / `changeme` (even if you [setup OAuth](/docs/misc/2_setup_oauth/index.mdx)).
Expand Down
124 changes: 124 additions & 0 deletions docs/misc/17_windows_workers/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
title: Windows-Workers
---

import DocCard from '@site/src/components/DocCard';

# Windows Workers

Windows Native Workers are a [Self-Hosted Enterprise](/pricing) Feature.

You can use the Windows worker natively if you do not want to run Docker or WSL on Windows (e.g., for policy or security reasons).
This feature supports the **Python**, **Bun**, and **PowerShell** executors.

You can connect Windows workers to your existing Dockerized or cloud self-hosted PostgreSQL database and Windmill server.

### Setting up Windmill Worker Executable

1. **Set Up a Working Directory**:
- Create a directory from where you want to run the Windmill worker, e.g., `C:\Users\Alex\windmill`.

2. **Download Windmill Executable**:
- Download the `windmill-ee.exe` file into the newly created directory from the [releases page](https://github.com/windmill-labs/windmill/releases).

3. **Set Basic Environment Variables**:
- Set the following environment variables (replace the placeholders with your specific values):
```powershell
# Replace these variables with your specific configuration
$env:MODE="worker"
$env:DATABASE_URL="postgres://postgres:[email protected]:5432/windmill?sslmode=disable"
$env:SKIP_MIGRATION="true"
```
More environment variables and worker settings can be found [here](https://github.com/windmill-labs/windmill?tab=readme-ov-file#environment-variables).

4. **Run windmill-ee.exe**:
```powershell
PS C:\Users\Alex\windmill> .\windmill-ee.exe
```
We recommend running Windmill as a service on your Windows environment using `sc` or `NSSM` to monitor the Windmill worker, start it at system boot, and manage the restart policy.

After the basic setup, follow these steps for each language your worker should support.

### Python Executor

1. **Install Python**: [Download Python](https://python.org/downloads).
- **Note**: When installing, make sure to check the box to add Python to the `PATH`.

2. **Verify Python Installation**:
- Open a new PowerShell window and type `python`. You should see output similar to the following:
```powershell
PS C:\Users\Alex> python
Python 3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
```

3. **Install `uv`**:
- Run the following command in PowerShell:
```powershell
pip install uv
```

4. **Locate Python Installation**:
- Find where Python is installed by running:
```powershell
where.exe python
```
Example output:
```plaintext
C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe
```

5. **Set Environment Variables**:
- Add the following environment variables (replace the placeholders with your specific values):
```powershell
# Replace these variables with your specific configuration
$env:PYTHON_PATH="C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe"
```

### Bun Executor

1. **Install Bun**: Follow the official [documentation](https://bun.sh/docs/installation) for Windows.
2. **Locate Bun Installation**:
- Find where Bun is installed by running:
```powershell
where.exe bun
```
Example output:
```plaintext
C:\Users\Alex\.bun\bin\bun.exe
```

3. **Set Environment Variables**:
- Add the following environment variables (replace the placeholders with your specific values):
```powershell
# Replace these variables with your specific configuration
$env:BUN_PATH="C:\Users\Alex\.bun\bin\bun.exe"
```

### PowerShell Executor

1. **Install PowerShell 7+ (stable)**: Ensure you have the latest stable release of PowerShell by following the [official documentation](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows).
- Start PowerShell 7 and verify you're running PowerShell 7 by checking `$PSVersionTable`:
```powershell
$PSVersionTable
PSVersion 7.4.5
```

2. **Locate PowerShell 7 Installation**:
- Find where PowerShell 7 is installed by running:
```powershell
where.exe pwsh.exe # Note: previous versions used powershell.exe
```
Example output:
```plaintext
C:\Program Files\PowerShell\7\pwsh.exe
```

3. **Set Environment Variables**:
- Add the following environment variables (replace the placeholders with your specific values):
```powershell
# Replace these variables with your specific configuration
$env:POWERSHELL_PATH="C:\Program Files\PowerShell\7\pwsh.exe"
```

3 changes: 2 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,8 @@ const sidebars = {
'core_concepts/private_hub/index',
'misc/white_labelling/index',
'misc/react_sdk/index',
'misc/partners/index'
'misc/partners/index',
'misc/windows_workers/index'
]
}
]
Expand Down

0 comments on commit 8b89219

Please sign in to comment.