Skip to content

Instantly share code, notes, and snippets.

@bltuckerdevblog
Last active January 30, 2018 02:02
Show Gist options
  • Save bltuckerdevblog/cfdb90c12ff8c1a27c51fbbed9cf5bb3 to your computer and use it in GitHub Desktop.
Save bltuckerdevblog/cfdb90c12ff8c1a27c51fbbed9cf5bb3 to your computer and use it in GitHub Desktop.
Pre and Post boot scripts
#Test that our connection to cloud sql is good
ping-connection-pool --user admin --passwordfile /tmp/password.txt jdbc/cloudsql-pool
#deploy the app
deploy /opt/application.war
#Change admin user password to something safer than empty string
change-admin-password admin --passwordfile /tmp/changepassword.txt
#Add our google cloud sql resource
add-resources --user admin --passwordfile /tmp/password.txt /opt/resource.xml
#enabled secure admin
enable-secure-admin --interactive=false --user admin --passwordfile /tmp/password.txt
#!/usr/bin/env bash
/opt/payara41/bin/asadmin --user admin --passwordfile /tmp/changepassword.txt start-domain --verbose --postbootcommandfile /opt/postboot-script.txt --prebootcommandfile /opt/preboot-script.txt payaradomain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment