Skip to content

Repository files navigation

Pushwagner Build Status

[X] Release early, [ ] Release often

Document config

Pushwagner searches for a config in: ./deploy.yml, ./.pw.yml, and ./config/deploy.yml.

Pushwagner is currently extremely opinionated to my usual practises.

Some conventions:

  • Prefer ssh key-based deployment (Use reallly strong SSH-keys with your own ssh-agent or not at your own peril)
  • Place most shit in /var/www|lib|keke/, logs in /var/log, cfg in /etc/.
  • Let your app orchestration service or dscm set up access to deployers (I use salt|ansible|puppet for both app orchestration and dscm/infrastructure cfg) f.x.: NOPASSWD sudo service svcname <start|restart|stop>
  • I usually separate application infrastructrure config (in infrastructure/app orchestration) and app config (toggles, etc)
  • I usually thus create service wrappers / systemd / upstart shit with said dscm

Minimal configuration

# Must set a default path for file uploadspath_prefix: /var/apps# Must specify a default environment.environments:
default:
hosts: [test.example.com]

Environments

path_prefix: /var/apps# Must specify a default environment.environments:
test: &testhosts: [test.example.com]user: testuserproduction: &productionhosts: [a1.example.com, a2.example.com]user: productionuserdefault: <<: *production

Maven (M2) repo integration

# requiredpath_prefix: /var/appsmaven:
repositories:
releases: http://repo.example.com/nexus/content/repositories/releasessnapshots: http://repo.example.com/nexus/content/repositories/snapshotsartifacts:
# creates /var/apps/foo/foo-webapp.jar by default (assumes foo-webapp is a jar)# I guess I should read the pom packaging some day... Or you can pull req it.foo:
group_id: com.exampleartifact_id: foo-webappversion: 1.0-SNAPSHOT

Static file uploads

path_prefix: /var/appsstatic:
/var/log/foo:
- app.logstatic:
- file.txt
- folder//usr/lib/foo:
# Globbing support
- src/*{[!.git/]*}

Hooks

before & after, both local & remote.

Sudo support, automatically prompts for passwd, or use: env PUSHWAGNER_SUDO=sudopasswd.

hooks:
local:
before:
- mvn packageafter:
- mvn test -Pintremote:
before:
- /usr/sbin/service foo stopafter:
- /usr/sbin/service foo start

Environments

environments:
test: &testhosts: [test.example.com]user: testuserproduction: &productionhosts: [production.example.com]user: www-datadefault:
<<: *test

Build & deploy:

bump lib/pushwagner/version.rb
gem build pushwagner.gemspec
gem push pushwagner-x.x.x.x.gem

About

pushwagner - is a highly opinionated deployment helper. If you don't like it's conventions, you better write something yourself. This is primarily written for uppercase' work flow & responsible devs, you may have different processes :-)

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages