-
Notifications
You must be signed in to change notification settings - Fork 41
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 54 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
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| 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,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] | ||
| ``` |
| 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.