Skip to content
Open
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
759297c
chore: fix linting issues and update config
lorenjohnson Jul 22, 2025
abc0dfd
feat(deploy): T399695 - Deploy Web-based initial setup
lorenjohnson Jul 22, 2025
fda3fda
fix(deploy): Proper setup cloud-init flag
lorenjohnson Jul 22, 2025
c2fb04f
chore(deploy): Better dev mode for setup script
lorenjohnson Jul 23, 2025
430017d
chore(deploy): Better organize setup scripts
lorenjohnson Jul 23, 2025
7181e5c
feat(deploy): Add basic CLI setup option which is now default. Better…
lorenjohnson Jul 23, 2025
7ec942e
feat(deploy): Make setup script work with interactive CLI option
lorenjohnson Jul 23, 2025
e219942
fix
lorenjohnson Jul 23, 2025
7eac8ea
update
lorenjohnson Jul 23, 2025
233bc9f
enable launch in cli mode
lorenjohnson Jul 23, 2025
a6a46d2
update
lorenjohnson Jul 23, 2025
f567753
fix
lorenjohnson Jul 23, 2025
ac6fa3a
fix
lorenjohnson Jul 23, 2025
4c5c964
fix
lorenjohnson Jul 23, 2025
6c8b5ce
better cli entry/defaults
lorenjohnson Jul 23, 2025
bf3781c
test
lorenjohnson Jul 23, 2025
7115d6f
switch back to bash
lorenjohnson Jul 23, 2025
6c3543f
wrap v0.1 CLI setup
lorenjohnson Jul 23, 2025
452cada
updates
lorenjohnson Jul 23, 2025
0b1bb98
update host name validators
lorenjohnson Jul 24, 2025
5b81a53
update log display
lorenjohnson Jul 24, 2025
0df495e
allow localhost hostname
lorenjohnson Jul 24, 2025
2610fdd
lint
lorenjohnson Jul 24, 2025
3f43b78
update formatting
lorenjohnson Jul 24, 2025
fda8767
formatting
lorenjohnson Jul 24, 2025
95ebb82
linting
lorenjohnson Jul 24, 2025
ee73e38
Merge branch 'main' into deploy-setup-script
lorenjohnson Jul 24, 2025
016c8f4
Merge branch 'main' into deploy-setup-script
lorenjohnson Jul 25, 2025
2b0a8e1
Merge branch 'main' into deploy-setup-script
lorenjohnson Aug 5, 2025
3f907c1
chore(deploy/setup): Improved Web UI field validation (no includes ho…
lorenjohnson Aug 13, 2025
861b6e2
linting
lorenjohnson Aug 13, 2025
14b9cc3
fix readme
lorenjohnson Aug 14, 2025
ac53300
update readme
lorenjohnson Aug 14, 2025
44689d2
udpate readme
lorenjohnson Aug 14, 2025
bc768ef
fix for subdomain SETUP_SUBDOMAIN generation that doesn't cause pipefail
lorenjohnson Aug 14, 2025
f4500a1
Refinements in prep for next code review
lorenjohnson Aug 14, 2025
2d58f6b
Fixes the git and docker install across all supported distros, improv…
lorenjohnson Aug 14, 2025
3fd8651
Update text
lorenjohnson Aug 14, 2025
26192de
Brings back minimal LOCALHOST support, adds dev notes, recognizes if …
lorenjohnson Aug 15, 2025
cc46565
Move current DEV status back into PR
lorenjohnson Aug 15, 2025
4e3aeb4
Fix setup script local run condition
lorenjohnson Aug 15, 2025
159b882
Improved cert warning feedback and support
lorenjohnson Aug 15, 2025
628c5d2
Fix pipe vs normal run detection issue for setup script
lorenjohnson Aug 17, 2025
5b0a938
Updates backend SSE story using better-sse library, cleans-up front e…
lorenjohnson Aug 17, 2025
a477766
fixes logging quotes, handles run logging better, fixes default WDQS_…
lorenjohnson Aug 17, 2025
bf3ccd3
fix initial log load
lorenjohnson Aug 17, 2025
02c6567
fixes
lorenjohnson Aug 17, 2025
68f2d7a
fix certbot image version
lorenjohnson Aug 17, 2025
075a660
certbot fallback fix
lorenjohnson Aug 17, 2025
cdfc0bb
fixes
lorenjohnson Aug 17, 2025
4a04c3a
fix bug
lorenjohnson Aug 17, 2025
5ab2b11
fix download config bug
lorenjohnson Aug 17, 2025
5de4ae2
fix log formatting in web
lorenjohnson Aug 17, 2025
ba65f6e
Updates from review
lorenjohnson Aug 19, 2025
79be817
change from review
lorenjohnson Aug 19, 2025
e4d7e86
remove sudo from script as per pr review
lorenjohnson Aug 19, 2025
3e86f00
adds getConfig abstraction to web server, clears-up --dev cli option …
lorenjohnson Aug 19, 2025
0b36707
Re-organization of file structure
lorenjohnson Aug 19, 2025
5e04feb
fix
lorenjohnson Aug 19, 2025
b58cfdc
fixes web form init/final state updating from server, removes any exi…
lorenjohnson Aug 19, 2025
83905d6
feat(deploy): Ignores docker-compose.local.env for use in localhost/d…
lorenjohnson Aug 19, 2025
c13c4e5
cleans-up and normalizes webserver helpers, makes wikibase.test and q…
lorenjohnson Aug 19, 2025
0d73c49
adds --reset option with cli prompts, cleans-up and normalizes env va…
lorenjohnson Aug 19, 2025
ff1ede0
better RESET status
lorenjohnson Aug 19, 2025
f050f39
--dev is equal to --local --skip-deps
lorenjohnson Aug 19, 2025
dfc1895
moves web into its own directory, elaborates logstream, fixes some ui…
lorenjohnson Aug 20, 2025
de1a857
moves reset functionality out of start.sh into setup.sh, renames lauc…
lorenjohnson Aug 20, 2025
f01e4c5
Merge branch 'main' into deploy-setup-script
lorenjohnson Sep 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"**/results/result.json",
"!.github/**/**",
"deploy/config/extensions",
"deploy/setup/letsencrypt",
"deploy/setup/certs",
"cloud-init.yml",
"package-lock.json",
"pnpm/**/**",
Expand Down
31 changes: 26 additions & 5 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,30 @@ You need two DNS records that resolve to your machine's IP address:
- Wikibase, e.g., "wikibase.example"
- QueryService, e.g., "query.wikibase.example"

## Setup
## Installation

### Option 1: Web-based Setup (Recommended for New Users)

If you're setting up a new instance on a fresh VPS, you can use our web-based installer to simplify the process. This method installs all required dependencies, configures your environment, and launches the full Wikibase Suite via a browser-based setup wizard.

1. **Log in to your VPS as root.**
2. **Run the following one-liner:**

```sh
bash -c "$(curl -fsSL https://raw.githubusercontent.com/wmde/wikibase-release-pipeline/refs/heads/deploy-setup-script/deploy/setup/setup.sh)"
```

3. **Follow the on-screen instructions.** The setup script will guide you through the rest of the process and provide a link to open the web-based installer in your browser.

Once setup is complete, the installer shuts down automatically and your Wikibase Suite instance will be up and running.

> 💡 This method takes care of installing Docker, Docker Compose, Git, and configuring everything correctly, making it ideal for first-time deployments.

> 💡 If you want to run a quick test on a machine that has no public IP address (such as your local machine), check our [FAQ entry](#can-i-host-wbs-deploy-locally) below.

### Download WBS Deploy
### Option 2: Manually Setup

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can move the software requirements section in here, because it is automatic for those using the web based setup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well currently the setup scripts (web or cli) attempt to install dependencies but don't do any real pre-checking on the machine specs or dist+version to confirm compatibility. In my mind the Requirements section here is all about the user provisioning the correct VPS instance which is decidedly a step not in scope or otherwise handled by the Deploy Setup product. All to say, I like Requirements where it is, but we maybe could/should enrich it at some point to include notes or links about selecting a VPS provider and provisioning one for Deploy use.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was just doing the process now several times today following the documentation and I found it confusing that the requirements section is talking about software requirements (such as docker) which are installed afterwards automatically. I found this was just noise if I was to use the web installer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I appreciate the antidotal report. Even if we're not perfectly representative of our users, conversations based on our own experience I think are easier to navigate than principles sometimes. So I gotcha. Would it be less confusing if the requirements section simply marked the items which were handled by the optional install script?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I personally really prefer the reordering as initially suggested.

#### Download WBS Deploy

Check out the files from Github, move to the subdirectory `deploy`.

Expand All @@ -55,7 +74,7 @@ git clone https://github.com/wmde/wikibase-release-pipeline
cd wikibase-release-pipeline/deploy
```

### Initial configuration
#### Configuration

Make a copy of the [configuration template](./template.env) in the `wikibase-release-pipeline/deploy` directory.

Expand All @@ -65,7 +84,7 @@ cp template.env .env

Follow the instructions in the comments in your newly created `.env` file to set domain names, usernames and passwords.

### Starting
#### Starting

Run the following command from within `wikibase-release-pipeline/deploy`:

Expand All @@ -79,6 +98,8 @@ The first start can take a couple of minutes. You can check the status of the st

> 💡 If anything goes wrong, you can run `docker logs <CONTAINER_NAME>` to see some helpful error messages.

## Operating Deploy

### Stopping

To stop, use
Expand All @@ -89,7 +110,7 @@ docker compose stop

### Resetting the configuration

Most values set in `.env` are written into the respective containers after you run `docker compose up` for the first time.
Most values set in `.env` are written into the respective containers after you run `docker compose up` for the first time, but will not reflect changes in the containers afterwards without resetting your configuration.

If you want to reset the configuration while retaining your existing data:

Expand Down
3 changes: 3 additions & 0 deletions deploy/setup/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
certs
server.js
letsencrypt
13 changes: 13 additions & 0 deletions deploy/setup/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:20-alpine

WORKDIR /app

COPY package.json package-lock.json tsconfig.json ./
COPY public ./public
COPY views ./views
COPY server.ts ./server.ts

RUN apk add --no-cache bash
RUN npm ci && npx tsc

CMD ["node", "server.js"]
60 changes: 60 additions & 0 deletions deploy/setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Wikibase Suite Deploy – Setup Script

This script bootstraps a Wikibase Suite Deploy installation handling or guiding you through all of the following steps:

1. **Check for Git** – Installs Git if it is not already available on the system.
2. **Clone the repository** – Downloads the Wikibase Suite Deploy code from the official repository.
3. **Check for Docker** – Installs Docker if it is not already available on the system.
4. **Prompt for configuration** – Collects all required setup values interactively through a web interface.
5. **Launch deployment** – Starts the deployment process once configuration is complete and notifies you once your new Suite instance is available.

## Installation

1. Setup on a new VPS instance that meets the following criteria:

- Meets minimum hardware requirements (see https://github.com/wmde/wikibase-release-pipeline/tree/main/deploy#requirements)
- Is running one of these officially supported Linux distributions: Ubuntu (22, 24), Debian (11, 12), Fedora, and CentOS
- You have root level SSH access to the instance

2. SSH as root into your new VPS instance and enter the following, following instructions from there:

```bash
curl -fsSL https://raw.githubusercontent.com/wmde/wikibase-release-pipeline/refs/heads/deploy-setup-script/deploy/setup/setup.sh | bash
```

Alternatively, if you already have cloned the repository you can run do start setup running the following commands:

```bash
cd deploy/setup
./setup.sh --skip-clone
```

## CLI Options

`setup.sh` also has some CLI options available for special cases, debugging, and development:

| Option | Description |
|------------------|-------------|
| `--debug` | Enable verbose/debug logging for troubleshooting. |
| `--skip-clone` | Skip cloning the repository (use an existing checkout). |
| `--skip-deps` | Skip dependency installation (assumes Git & Docker are already installed). |
| `--skip-launch` | Do not launch services after configuration completes. |

### Dev-only

| Option | Description |
|------------------|-------------|
| `--dev` | Development mode: skips clone, dependency installs, and launch; uses a relative repo path for local development. |
| `--local` | Mark this run as local which launches setup on localhost:8888 and runs the interactive instead of as a background process. Useful only for dev/testing at this stage.|

These options can be applied using the following command formats:

```bash
curl -fsSL https://raw.githubusercontent.com/wmde/wikibase-release-pipeline/refs/heads/deploy-setup-script/deploy/setup/setup.sh | bash -s -- [OPTIONS]
```

Or, from within the deploy/setup directory of an already cloned repository:

```bash
./setup [OPTIONS]
```
10 changes: 10 additions & 0 deletions deploy/setup/cloud-init.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#cloud-config

package_update: true
package_upgrade: true

packages:
- git

runcmd:
- bash -c "$(curl -fsSL https://raw.githubusercontent.com/wmde/wikibase-release-pipeline/refs/heads/deploy-setup-script/deploy/setup/setup.sh)" -- --cloud-init --verbose
Loading
Loading