Deployer

Introduction to deploying with deployer

Deploys code. Into folders. From artifacts. Like Crazy. So much wow.

Deployer is a service to deploy static or php websites.

Features

  • Supports different target sites
  • Sites can have a different setup
  • Sites can optionally include a separate configuration tarball
  • Installation into sibling folder and moving in place for atomic updates via symlink rename (simple blue/green)

Limitations

  • Currently only supports deployments of artifacts from fs
  • Currently only supports .tar.gz artifacts
  • Sites for deployment must be predefined by an admin

Endpoint

The API endpoint is at https://apps.moinz.de/deployer/deploy.php. A valid bearer authorization header is required.

Usage

After installing, have your deployment script publish your artifact as a tarball to fs and then perform a POST request to deploy.php with a site and desired_version parameter.

curl -XPOST https://apps.moinz.de/deployer/deploy.php \
    -d site=help.moinz.de \
    -d desired_version=master-12314556789123

Inside the fs storage, the following path will now be deployed: /artifacts/help.moinz.de/master-12314556789123/help.moinz.de.tar.gz.

Site Configuration

{
  "name": "Moinz.de Blog (production)",
  "path": "/home/zeisss/www/moinz.de/htdocs/blog",
  "artifact": {
    "artifact": "moinz-de-blog-production",
    "artifactBundle": "moinz-de-blog.tar.gz"
  },
  "config": {
    "name": "artifact-name",
    "revision": 42
  }
}
KeyComment
nameName of the site
pathTarget site where active app files should be linked to
artifact.artifactName of the artifact - will be used to find artifacts
artifact.artifactBundleName of the artifact bundle that should be deployed
config.nameName of the config bundle to unpack ontop of the artifact bundle
config.revisionRevision of the config bundle to unpack