The idea at the moment is that the scripts and yaml file are reusable. A deployment would consist of adding a new .war file into the artifcat folder. All the files would then be zipped up and uploaded to S3. A deployment would then be triggered.
Last active
March 3, 2017 20:31
-
-
Save haskins-io/249940f5289e088b28632f13f372cb28 to your computer and use it in GitHub Desktop.
a method of deployment a .war to an EC2 using AWS CodeDepoy <- I'm working on this it may not work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.0 | |
os: linux | |
files: | |
- source: artifact/root.war | |
destination: /var/lib/tomacat6/webapps | |
hooks: | |
BeforeInstall: | |
- location: scripts/deploy_application.sh | |
timeout: 300 | |
runas: root | |
ApplicationStart: | |
- location: scripts/start_tomcat.sh | |
timeout: 300 | |
runas: root | |
ApplicationStop: | |
- location: scripts/stop_tomcat.sh | |
timeout: 300 | |
runas: root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DATE=$(date +"%Y%m%d%H%M") | |
mv /usr/lib/tomcat6/webapps/root.war /home/ubuntu/backups/root-$DATE.war |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
service tomcat6 start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
isExistApp=`pgrep tomcat6` | |
if [[ -n $isExistApp ]]; then | |
service tomcat6 stop | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment