NAME
Rexfile - Rex task configuration for CPANTesters Schema
SYNOPSIS
# Deploy the latest schema
rex deploy
DESCRIPTION
This file defines all the Rex tasks used to deploy this application.
You must have already configured a user using the cpantesters-deploy repository, or been given an SSH key to use this Rexfile.
SEE ALSO
TASKS
deploy
rex deploy
rex -E vm deploy
Deploy the CPAN Testers schema from CPAN and upgrade the database schema if necessary. Do this task after releasing a version of CPAN::Testers::Schema to CPAN.
deploy_dev
rex -E vm deploy_dev
Deploy a pre-release, development version of the schema. Use this to install to your dev VM to test things. Will run `dzil build` locally to build the tarball, then sync that tarball to the remote and install using `cpanm`.
upgrade_database
Upgrade the database running on the given server. This task is called automatically by deploy
and deploy_dev
.
This task also restarts all running services, since the code version and the database version must match.
install_database
Install the database on the server. This task should be called once to initialize the database. It can be safely run on an already-existing database.
restart
Restart all the services on the machine. This is run automatically by the deploy processes after upgrading the database.
The code version and the database version must be in-sync, and any running processes must get the new code by restarting.
SUBROUTINES
ensure_sudo_password
Ensure a sudo
password is set. Use this at the start of any task that requires sudo
.