-
Notifications
You must be signed in to change notification settings - Fork 46
feat(deploy): T399695 - Initial Deploy config/setup wizard (Web and CLI) #879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 10 commits
759297c
abc0dfd
fda3fda
c2fb04f
430017d
7181e5c
7ec942e
e219942
7eac8ea
233bc9f
a6a46d2
f567753
ac6fa3a
4c5c964
6c8b5ce
bf3781c
7115d6f
6c3543f
452cada
0b1bb98
5b81a53
0df495e
2610fdd
3f43b78
fda8767
95ebb82
ee73e38
016c8f4
2b0a8e1
3f907c1
861b6e2
14b9cc3
ac53300
44689d2
bc768ef
f4500a1
2d58f6b
3fd8651
26192de
cc46565
4e3aeb4
159b882
628c5d2
5b0a938
a477766
bf3ccd3
02c6567
68f2d7a
075a660
cdfc0bb
4a04c3a
5ab2b11
5de4ae2
ba65f6e
79be817
e4d7e86
3e86f00
0b36707
5e04feb
b58cfdc
83905d6
c13c4e5
0d73c49
ff1ede0
f050f39
dfc1895
de1a857
f01e4c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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)" | ||
|
lorenjohnson marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| 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 | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`. | ||
|
|
||
|
|
@@ -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. | ||
|
|
||
|
|
@@ -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`: | ||
|
|
||
|
|
@@ -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 | ||
|
|
@@ -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: | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| certs | ||
| server.js | ||
| letsencrypt |
| 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"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| Wikibase Suite Deploy Setup Tool | ||
|
|
||
| The Wikibase Suite Deploy Setup Tool is a lightweight, zero-configuration installer for quickly launching a full Wikibase Suite instance on any freshly-created VPS instance. Designed for ease and speed, it combines a one-liner install script with a web-based configuration interface and automatic environment setup. No Docker or manual file editing is required upfront — everything is generated or guided in-browser, resulting in a running Wikibase Suite Deploy instance. | ||
|
|
||
| Features | ||
|
|
||
| - One-liner install via curl | bash or cloud-init script | ||
| - Browser-based setup interface on port 8888 with live logs | ||
| - Optional custom hostnames which otherwise default to <SERVER-IP>.nip.io names | ||
| - Auto-generated secure passwords | ||
| - Optional opt-in to list your instance with the Wikibase community, with a default of true | ||
| - Clean shutdown of setup utility after installation completes (10 min timeout), including removal of passwords from .env | ||
|
|
||
| Steps to Launch a New Wikibase Suite Deploy Instance | ||
|
|
||
| 1. Provision a VPS with the minimum recommended specification or greater | ||
| 2. SSH in to your new VPS instance as root user and copy/paste this command: | ||
|
|
||
| `curl -fsSL https://raw.githubusercontent.com/wmde/wikibase-release-pipeline/refs/heads/deploy-setup-script/deploy/setup/setup.sh | bash` | ||
|
|
||
| 3. Open the setup URL printed in the terminal once prompted | ||
| 4. On the webpage enter your MediaWiki admin email, base host name, and whether to advertise your instance. Advanced options also available, such as manually setting database password, etc. | ||
| 5. Click Save, and wait for services to boot | ||
|
|
||
| --- | ||
|
|
||
| ## Related Feature Stories | ||
|
|
||
| ### Implemented | ||
|
|
||
| - User can easily setup WBS Deploy on a VPS provider of their choice | ||
| - User can configure the initial WBS Deploy setup through a easy to use web based UI with inline documentation | ||
| - User is clearly notified when WBS Deploy is done being configured and up and running | ||
| - User can trust the access information (passwords) for the WBS services are stored in a secure way (not in plain text in a .env file) | ||
| - User can create a WBS Deploy instance without having to register domain names | ||
| - _User can use deploy/docker-compose.yml without modification in Dokploy or similiar Open Source PAAS provider which overlaps traefik configuration_ | ||
|
|
||
| ### In Progress | ||
|
|
||
| - User can configure the initial WBS Deploy setup through a easy to use text based CLI with inline documentation | ||
| - User can setup WBS Deploy to run on localhost without external access and all services work as expected without warnings or errors | ||
|
|
||
| ### Won't be implemented | ||
|
|
||
| - User has a clear indication when a service doesn't boot or is left in an unhealthy status, and is provided instructions for debugging / how to proceed | ||
| - User can press a "Reset" button to stop all services, DESTROY ALL CURRENT DATA, change/re-apply configuration, and re-start services. | ||
| - docker compose down --volumes` | ||
| - rm -rf config | ||
| - git checkout config | ||
| - User can easily and reliably use all WBS Deploy services in a localhost configuration | ||
| - User can monitor docker compose service status in a WBS provided dashboard | ||
| - User can start/stop/reset docker compose service in a WBS provided dashboard |
| 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 |
Uh oh!
There was an error while loading. Please reload this page.