[X] Release early, [ ] Release often
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
# Must set a default path for file uploadspath_prefix: /var/apps# Must specify a default environment.environments:
default:
hosts: [test.example.com]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# 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-SNAPSHOTpath_prefix: /var/appsstatic:
/var/log/foo:
- app.logstatic:
- file.txt
- folder//usr/lib/foo:
# Globbing support
- src/*{[!.git/]*}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 startenvironments:
test: &testhosts: [test.example.com]user: testuserproduction: &productionhosts: [production.example.com]user: www-datadefault:
<<: *testbump lib/pushwagner/version.rb
gem build pushwagner.gemspec
gem push pushwagner-x.x.x.x.gem
