Operate¶
This page covers the commands you’ll reach for once nextPYP is up and running. Upgrades and rollback have their own page, Upgrade. If you mistype a command, nextpyp names it and suggests the nearest one: nextpyp upgarde says Did you mean: nextpyp upgrade.
On an administrator install use sudo nextpyp .... On a regular-account install run ./nextpyp from the install folder.
Tip
Not sure where to start? nextpyp status shows the whole picture on one screen, and nextpyp doctor tells you if something needs attention.
Start, stop, and status¶
nextpyp start
nextpyp stop
nextpyp restart
nextpyp status
nextpyp version
nextpyp latest
nextpyp status prints one screen: the version and release, what manages the website and whether it runs and answers, its address, maintenance, the compute container and a download of it that is under way, free space, a pending configuration, .new copies of files you edited, and an upgrade that did not finish. Add --json if you want the same facts as JSON.
nextpyp version prints the version recorded in installed.toml. nextpyp latest prints the newest version number published in https://nextpyp.app/files/pyp/version-info.js. The word latest in that file is the name of a directory, so the command prints the last version number in the list.
nextpyp restart runs nextpyp check first. If that check fails, the website is left running, so a failed check won’t take the site down.
Note
Where systemd manages the website, nextpyp start, stop and restart ask the unit to do it (sudo systemctl ...), so the unit’s state and reality never drift apart. Elsewhere the website runs as the account that starts it: root becomes the service account first, and another account is told who to run it as. That account owns the sockets and the log files.
Note
nextpyp stop prints WARN: nextPYP is not running. when the website instance and its processors are already stopped. That warning is not an error, and nextpyp restart does not print it.
Check the install¶
nextpyp check
nextpyp doctor
nextpyp doctor -v
nextpyp doctor --smoke
nextpyp check confirms the installation folders and the shared-data folder, and prints their paths. It’s a quick way to see which folders the install is really using.
nextpyp doctor prints doctor: ok or doctor: problems found on its first line.
Checks that fail the verdict are printed as PROBLEM: lines (always visible), each with the command that fixes it.
The doctor only looks: it never repairs, undoes or completes anything, so it is safe to run at any time, including while an upgrade is in progress.
Add -v for the full check list: the installed version and release, kept containers, free space, database size, the user switch, the service, and a configuration summary from the website itself (listen address, authentication, and storage folders; no passwords or the mail command).
--smoke goes a step further and also runs the website container (java -version) and the compute container (pyp --version under --pwd /tmp, so a bare --no-home start does not keep cwd at /). When this machine has nvidia-smi, the smoke test runs that inside the compute container.
Tip
Run nextpyp doctor --smoke after anything that touches containers or the system. It’s the fastest way to learn that a container won’t start before a job finds out for you.
Logs and a support bundle¶
nextpyp logs
nextpyp logs -f
nextpyp support-bundle
nextpyp logs prints the last 200 lines of local/logs/micromon. Add init, superd, hostprocessor, or slurm to read that file instead (init is logs/init.log). -f follows the file as it grows. When you run it as root, it also prints the last 20 lines of the nextPYP systemd journal.
If you need to ask for help, nextpyp support-bundle writes support-<timestamp>.tar.gz in the install directory and does not upload it. Passwords, mail settings, and proxy credentials are replaced with (redacted). Database backups are named in the archive and are not included. Only the three newest install transcripts are packed. Website logs under local/logs are still included, each cut to its last 2000 lines. How the archive is assembled is on Security.
Warning
Open the archive and review it before you send it to anyone. The bundle is built to leave secrets out, but you are the last check.
Jobs, maintenance, and the database¶
nextpyp activejobs
nextpyp maintenance on "planned downtime"
nextpyp maintenance off
nextpyp prune --when-idle
nextpyp backup-db
nextpyp activejobs lists the jobs the database has not finished, and the container each one is pinned to, when the website can answer. The first line is the count and how many jobs are in each status. Each row shows the status changes and when they were recorded. When none are recent it prints No nextPYP jobs are running.
Note
activejobs does not ask SLURM, so a job stays recorded until the website writes an end for it. Only the last 30 days are listed as running. Older unfinished records are counted in one line and are not listed.
Before planned downtime, use maintenance on to pause new jobs. It records who set it, when, and why, and the website shows that text until you run maintenance off.
prune --when-idle deletes every container in containers/ except the one pyp.sif points at, an unfinished download in containers/.staging, and releases older than the one a rollback returns to, but only when no job is running, so it’s safe to run any time. prune alone lists what it would delete. backup-db copies local/db without stopping the website; see Backup and restore for when to stop it first.
Configuration¶
nextpyp config show
nextpyp config get web.auth
nextpyp config set web.auth login
nextpyp config add pyp.binds /data/raw
nextpyp config remove pyp.binds /data/raw
nextpyp config unset web.webhost
nextpyp config diff
nextpyp config validate
nextpyp config edit
nextpyp config apply
nextpyp configure
You can change the live configuration without hand-editing the file. set keeps your comments and other lines, and an invalid value leaves the file unchanged. validate warns on an unknown key.
Changes you want to review first go through the pending file. diff compares the live configuration with local/pending/config.toml; a changed secret is named and its value is hidden. apply prints who saved the pending file and when, then applies it. nextpyp configure asks the data-folder, network and login questions again and writes the pending file; it does not reinstall, and nothing changes until nextpyp config apply.
Note
A secret such as web.sendmail is set from the shell, not from the Setup tab.
web.sendmail is required for the email channel under Your Account → Alarms
(see Alarms).
The Setup tab is the first tab under Administration on your account page, and it stays there after installation. It lists the items that are still manual, including a newer release when one is published, and a form for the common settings. Saving the form writes the pending file.
Tip
If you see a banner on the projects page about data folders, no data folders are configured yet. Dismiss hides that banner in this browser only.
Note
Authentication none disables the Setup forms.
Compute container download¶
A fresh install can start the website before the compute container has finished downloading.
Warning
Jobs submitted before pyp.sif is verified are refused with container not ready. If you see that message, check the download rather than the job.
nextpyp fetch-status
nextpyp fetch-status --watch
nextpyp fetch-containers
fetch-status prints the state recorded in containers/fetch-status.json (downloading, verifying, verified, or failed). --watch repeats that line until the download finishes. If the download stopped, fetch-containers resumes it. When that file is absent, fetch-status says no download is recorded. Jobs are refused only while no compute container is installed: while the next version’s container downloads beside a working one, the website shows the download and jobs keep running with the installed container.
Linked users¶
These three commands run as root. The full procedure is on Run jobs as each OS user.
sudo nextpyp user-add <username>
sudo nextpyp user-remove <username>
sudo nextpyp upgrade-users
user-add refuses when that person cannot open the shared data folder. With per-user setuid helpers it also refuses when shared/user-processors is mounted nosuid: a setuid helper there would not switch users, so it’s better to hear about it now than when their first job fails. After creating a helper it runs it once and checks which user it became.
nextpyp upgrade and nextpyp rollback refresh the per-user setuid helpers after the program files are in place. One account that cannot be refreshed is reported and does not undo the upgrade. sudo nextpyp upgrade-users does the same by hand and names each person. With web.userSwitch = "sudo" there are no per-user copies.
Uninstall¶
sudo /opt/nextpyp/uninstall # a system install
~/nextpyp/uninstall # a user-mode install
sudo /opt/nextpyp/uninstall --purge # also delete the data
./uninstall (it runs nextpyp uninstall) removes the program: the releases, the nextpyp command, the systemd unit, the helper and its sudo rule, and the /opt/nextpyp link. It stops the service first, and refuses while a website started by hand is still running.
Everything your site made is left in place: the database and the shared data (local/, shared/), config.toml, workflows/, templates/ and the logs. Running ./install in the same directory later adopts them again, with no --replace.
--purge deletes those as well. It lists them and asks you to type purge at a terminal; without a terminal it refuses. The service account and the nextpyp-users group are never removed; the last lines of the output name them.
Details¶
Who can run a command
Upgrade, rollback, maintenance, prune, backup-db, and support-bundle run as the install owner, as root, or as a member of the admin group recorded at install time. Start, stop, and restart also allow the service account. A support bundle writes a file in the install directory, so another account is refused before that file is created.
Start after an interrupted upgrade
When an upgrade or rollback was cut short (the machine went down in the middle), nextpyp start refuses to start the website on a half-switched install and tells you to run nextpyp recover, which finishes or undoes it. See Upgrade. On an install from before lib/nextpyp-core, nextpyp start undoes an interrupted upgrade itself, when a swap journal is still present.
Transcripts and log rotation
Install, upgrade, and rollback transcripts are separate files under the install directory, named logs/<command>-<timestamp>.log. Only the 20 newest transcripts are kept. ./uninstall --purge names those files and deletes them after you type purge.
Website logs under local/logs are capped by supervisord (50 MB, five backups) and by MongoDB’s logRotate: reopen. The installer writes nextpyp.logrotate in the install directory for the host logrotate job, and a system install also installs it as /etc/logrotate.d/nextpyp.
nextpyp config migrate
nextpyp config migrate is available alongside the other config subcommands when an older configuration needs bringing forward.