Skip to content

Commit 0fa3aec

Browse files
committed
numerous changes including new cdcourse bucket
1 parent 8bd0737 commit 0fa3aec

File tree

2 files changed

+40
-63
lines changed

2 files changed

+40
-63
lines changed

software/infrastructure/account_bucket_policies.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"S3Bucket" : {
88
"Description" : "Public S3 bucket for storing artifacts",
99
"Type" : "String",
10-
"Default" : "sea2shore",
10+
"Default" : "cdcourse",
1111
"ConstraintDescription" : "Must be a valid S3 Bucket"
1212
}
1313
},

software/infrastructure/brewery_jenkins.template

Lines changed: 39 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"KeyName" : {
99
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
1010
"Type" : "String",
11-
"Default" : "manatee_dev",
11+
"Default" : "cd30",
1212
"MinLength": "1",
1313
"MaxLength": "64",
1414
"AllowedPattern" : "[-_ a-zA-Z0-9]*",
@@ -31,24 +31,11 @@
3131
"Type" : "String",
3232
"Default" : "oneclickdeployment.com"
3333
},
34-
35-
"SvnID" : {
36-
"Description" : "Sea2Shore Svn Username",
37-
"Type" : "String",
38-
"Default" : "paul.duvall"
39-
},
40-
41-
"SvnPassword" : {
42-
"Description" : "Sea2Shore Svn User Password",
43-
"Type" : "String",
44-
"NoEcho" : "TRUE",
45-
"Default" : "G6bIGZS4gNFp"
46-
},
4734

4835
"S3Bucket" : {
4936
"Description" : "Artifact Bucket",
5037
"Type" : "String",
51-
"Default" : "sea2shore"
38+
"Default" : "cdcourse"
5239
}
5340
},
5441

@@ -130,13 +117,13 @@
130117
},
131118

132119
"sources" : {
133-
"/opt/aws/apitools/" : "https://s3.amazonaws.com/sea2shore/resources/binaries/CloudFormation-CLI.zip",
134-
"/usr/share/tomcat6/scripts/" : "https://s3.amazonaws.com/sea2shore/jenkins_utilities.tar.gz"
120+
"/opt/aws/apitools/" : "https://s3.amazonaws.com/cdcourse/repo/CloudFormation-CLI.zip",
121+
"/usr/share/tomcat6/scripts/" : "https://s3.amazonaws.com/cdcourse/repo/jenkins_utilities.tar.gz"
135122
},
136123

137124
"files" : {
138125
"/usr/bin/aws" : {
139-
"source" : "https://s3.amazonaws.com/sea2shore/resources/aws_tools/aws",
126+
"source" : "https://raw.github.com/stelligent/continuous_integration_example/master/software/repo/aws",
140127
"mode" : "000777",
141128
"owner" : "tomcat",
142129
"group" : "tomcat",
@@ -164,7 +151,7 @@
164151
"authentication" : "S3AccessCreds"
165152
},
166153
"/usr/share/tomcat6/manatee_dev.pem" : {
167-
"source" : "https://s3.amazonaws.com/sea2shore/private/manatee_dev.pem",
154+
"source" : "https://s3.amazonaws.com/cd00creds/cd00.pem",
168155
"mode" : "000600",
169156
"owner" : "tomcat",
170157
"group" : "tomcat",
@@ -192,42 +179,40 @@
192179
},
193180
"/etc/cron.hourly/jenkins_backup.sh" : {
194181
"content" : { "Fn::Join" : ["", [
195-
"#!/bin/bash -v\n",
182+
"#!/bin/bash -v\n",
183+
"# Change into your jenkins home.\n",
184+
185+
"cd /usr/share/tomcat6/.jenkins\n",
196186

197-
"# Edit these values for your subversion repository\n",
198-
"svn_user=",{ "Ref" : "SvnID" },"\n",
199-
"svn_password=", { "Ref" : "SvnPassword" },"\n",
200-
201-
"cd /usr/share/tomcat6/.jenkins\n",
202-
203-
"svn add -q --parents *.xml jobs/*/config.xml users/*/config.xml userContent/\n",
204-
205-
"# Ignore things we don't care about.\n",
206-
"cat > jobsignores <<EOF\n",
207-
"log\n",
208-
"*.log\n",
209-
"*.tmp\n",
210-
"*.old\n",
211-
"*.bak\n",
212-
"*.jar\n",
213-
".*\n",
214-
"plugins/\n",
215-
"updates/\n",
216-
"jobs/*/builds\n",
217-
"jobs/*/last*\n",
218-
"jobs/*/next*\n",
219-
"jobs/*/*.csv\n",
220-
"jobs/*/*.txt\n",
221-
"jobs/*/*.log\n",
222-
"jobs/*/workspace\n",
223-
"EOF\n",
187+
"# Add any new conf files, jobs, users, and content.\n",
188+
"git add -f *.xml jobs/*/config.xml .gitignore\n",
224189

225-
"svn propset svn:ignore -F jobsignores && rm jobsignores\n",
190+
"# Ignore things we don't care about\n",
191+
"cat > .gitignore <<EOF\n",
192+
"log\n",
193+
"*.log\n",
194+
"*.tmp\n",
195+
"*.old\n",
196+
"*.bak\n",
197+
"*.jar\n",
198+
".*\n",
199+
"plugins/\n",
200+
"updates/\n",
201+
"jobs/*/builds\n",
202+
"jobs/*/last*\n",
203+
"jobs/*/next*\n",
204+
"jobs/*/*.csv\n",
205+
"jobs/*/*.txt\n",
206+
"jobs/*/*.log\n",
207+
"jobs/*/workspace\n",
208+
"EOF\n",
226209

227-
"# Remove config that no longer exists\n",
228-
"svn status | grep '^!' | awk '{print $2;}' | xargs -r svn rm\n",
229-
230-
"svn ci --non-interactive --username $svn_user --password $svn_password -m 'automated commit of Jenkins configuration'"
210+
"# Remove anything from git that no longer exists in jenkins.\n",
211+
"git status --porcelain | grep '^ D ' | awk '{print $2;}' | xargs -r git rm\n",
212+
213+
"# And finally, commit and push\n",
214+
"git commit -m 'Automated commit of jenkins configuration' -a\n",
215+
"git push\n"
231216
]]},
232217
"mode" : "000500",
233218
"owner" : "root",
@@ -273,7 +258,7 @@
273258
" --region ", { "Ref" : "AWS::Region" }, " || error_exit 'Failed to run cfn-init'\n",
274259

275260
"# Installing Ruby 1.9.3 from RPM\n",
276-
"wget -P /home/ec2-user/ https://s3.amazonaws.com/sea2shore/resources/rpm/ruby-1.9.3p0-2.amzn1.x86_64.rpm\n",
261+
"wget -P /home/ec2-user/ https://s3.amazonaws.com/cdcourse/repo/ruby-1.9.3p0-2.amzn1.x86_64.rpm\n",
277262
"rpm -Uvh /home/ec2-user/ruby-1.9.3p0-2.amzn1.x86_64.rpm\n",
278263

279264
"# Install Bundler\n",
@@ -284,7 +269,7 @@
284269
"gem install capistrano --no-rdoc --no-ri\n",
285270

286271
"rm -rf /usr/share/tomcat6/.jenkins\n",
287-
"svn co http://subversion.assembla.com/svn/manatees/trunk/src/jenkins_config /usr/share/tomcat6/.jenkins --username ", { "Ref" : "SvnID" }, " --password ", { "Ref" : "SvnPassword" }, " --non-interactive\n",
272+
"git clone git@github.com:stelligent/continuous_integration_example.git /usr/share/tomcat6/.jenkins\n",
288273

289274
"# Pull down Jenkins Plugins\n",
290275
"wget -P /usr/share/tomcat6/.jenkins/plugins/ http://updates.jenkins-ci.org/download/plugins/s3/0.2.0/s3.hpi\n",
@@ -301,14 +286,6 @@
301286
"wget -P /usr/share/tomcat6/.jenkins/plugins/ http://updates.jenkins-ci.org/download/plugins/ssh-slaves/0.21/ssh-slaves.hpi\n",
302287
"wget -P /usr/share/tomcat6/.jenkins/plugins/ http://updates.jenkins-ci.org/download/plugins/translation/1.9/translation.hpi\n",
303288

304-
"cd /root\n",
305-
"wget https://s3.amazonaws.com/sea2shore/resources/binaries/grails-1.3.7.zip\n",
306-
"wget https://s3.amazonaws.com/sea2shore/resources/binaries/groovy-binary-1.8.2.zip\n",
307-
"unzip groovy-binary-1.8.2.zip\n",
308-
"unzip grails-1.3.7.zip\n",
309-
"mv groovy-1.8.2/ /usr/bin\n",
310-
"mv grails-1.3.7/ /usr/bin/\n",
311-
312289
"# Update main Jenkins config\n",
313290
"sed -i s@<accesskey>*</accessKey>@<accesskey>", { "Ref" : "HostKeys" }, "</accesskey>@ /usr/share/tomcat/.jenkins/hudson.plugins.s3.S3BucketPublisher.xml\n",
314291
"sed -i s@<secretKey>*</secretKey>@<secretKey>", {"Fn::GetAtt": ["HostKeys", "SecretAccessKey"]}, "</secretKey>@ /usr/share/tomcat/.jenkins/hudson.plugins.s3.S3BucketPublisher.xml\n",

0 commit comments

Comments
 (0)