You wouldn’t make an app change without testing it.
erichelgeson@gmail.com
@nulleric
Online software for Pre-Schools and Day Cares.
https://sproutary.com
$ ps aux | grep grails-app
vs.
describe service('grails-app') do
it { should be_running }
end
Tons of options, use tools you’re comfortable with and get value from.
describe service('nginx') do
it { should be_enabled }
it { should be_running }
end
describe port(80) do
it { should be_listening }
end
describe command("/usr/bin/nginx -t") do
it "nginx syntax ok" do
expect(subject.exit_status).to eq 0
end
end
describe file('/opt/grailsapp/config.groovy') do
it { should be_file }
it { should be_owned_by 'grailsapp' }
end
log.error
and exceptions w/ requestgrails-sentry
plugin Continuously Build (Push code, it builds)
Continuously Deploy (master == prod
)
Infrastructure improvements are something:
./gradlew assemble
java -jar myapp.jar
.groovy
file from Config Managementenvironments {
production {
dataSource {
dbCreate = "none"
driverClassName = "org.postgresql.Driver"
dialect = "org.hibernate.dialect.PostgreSQL9Dialect"
url = "jdbc:postgresql://${System.getenv('DB_HOST')}:${System.getenv('DB_PORT')}/${System.getenv('DB_NAME')}"
username = "${System.getenv('DB_USER')}"
password = “${System.getenv(‘DB_PASS')}"
...
}
}
}
spring-session
Cookie Session
Zero Downtime Deployment much easier
session/springsession
Allow changes to config to be picked up
scan('30 seconds')
Details: https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html
Remove old
Utilize GORM getter/setters
String getPhoneNumber() {
phoneNumbers.first()
}
db/dbm
db/flyway
SaaS - papertrail
/commands
for on stats0
Exceptions in productiong3summit/admin-script
psql
, etcThings to review
Good ./gradlew test integrationTest jaco assemble
Better ./gradlew assemble
Best ./build.sh
- Builds change - allow devs to change build steps on their branch.
Grails can build an fully executable jar
$ ln -s /var/myapp/myapp.jar /etc/init.d/myapp
$ service myapp status
logging/logapi
Lets setup an artifactory server.
info/info
Vagrant