Skip to content

Commit

Permalink
Added AWS CodePipeline Sample
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittthomas committed Jul 9, 2015
1 parent 1a488b0 commit e4ad1aa
Show file tree
Hide file tree
Showing 6 changed files with 267 additions and 202 deletions.
403 changes: 201 additions & 202 deletions LICENSE

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 0.0
os: linux
files:
- source: /index.html
destination: /var/www/html/
hooks:
BeforeInstall:
- location: scripts/install_dependencies
timeout: 300
runas: root
- location: scripts/start_server
timeout: 300
runas: root
ApplicationStop:
- location: scripts/stop_server
timeout: 300
runas: root

36 changes: 36 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sample Deployment</title>
<style>
body {
color: #ffffff;
background-color: #007f3f;
font-family: Arial, sans-serif;
font-size: 14px;
}

h1 {
font-size: 500%;
font-weight: normal;
margin-bottom: 0;
}

h2 {
font-size: 200%;
font-weight: normal;
margin-bottom: 0;
}
</style>
</head>
<body>
<div align="center">
<h1>Congratulations!</h1>
<h2>You have successfully created a pipeline that retrieved this source application from an Amazon S3 bucket and deployed it
to three Amazon EC2 instances using AWS CodeDeploy.</h2>
<p>For next steps, read the AWS CodePipeline Documentation.</p>
</div>
</body>
</html>

3 changes: 3 additions & 0 deletions scripts/install_dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
yum install -y httpd

3 changes: 3 additions & 0 deletions scripts/start_server
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
service httpd start

6 changes: 6 additions & 0 deletions scripts/stop_server
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
isExistApp = `pgrep httpd`
if [[ -n $isExistApp ]]; then
service httpd stop
fi

0 comments on commit e4ad1aa

Please sign in to comment.