lobot 0.9.7 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. data/.rspec +2 -0
  2. data/.rvmrc +1 -1
  3. data/Gemfile +1 -4
  4. data/LICENSE.txt +1 -1
  5. data/README.md +45 -21
  6. data/Rakefile +11 -0
  7. data/docs/ci_yml.md +4 -9
  8. data/features/ci.feature +9 -8
  9. data/features/config/secrets.yml.example +4 -6
  10. data/features/step_definitions/ci_steps.rb +42 -31
  11. data/features/support/env.rb +10 -1
  12. data/lib/generators/lobot/config_generator.rb +161 -0
  13. data/lib/generators/lobot/install_generator.rb +14 -5
  14. data/lib/generators/lobot/templates/Capfile +2 -2
  15. data/lib/generators/lobot/templates/bootstrap_server.sh +6 -5
  16. data/lib/generators/lobot/templates/capistrano-ci.rb +11 -5
  17. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_ci/attributes/nginx.rb +1 -1
  18. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_ci/libraries/ci_config.rb +1 -1
  19. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_ci/recipes/default.rb +1 -1
  20. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_ci/recipes/git_config.rb +1 -1
  21. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_ci/recipes/id_rsa.rb +2 -2
  22. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_ci/recipes/jenkins.rb +1 -1
  23. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_ci/recipes/xvfb.rb +1 -1
  24. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_ci/templates/default/jenkins-job-config.xml.erb +1 -1
  25. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/files/default/cacert.pem +1 -1
  26. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/libraries/marker.rb +10 -10
  27. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/recipes/ca_cert.rb +1 -1
  28. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/recipes/daemontools.rb +1 -1
  29. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/recipes/libxml_prereqs.rb +1 -1
  30. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/recipes/mysql_5_1.rb +6 -6
  31. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/recipes/mysql_5_5.rb +4 -4
  32. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/recipes/node_js.rb +3 -3
  33. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/recipes/postgres.rb +6 -6
  34. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/recipes/sqlite.rb +1 -1
  35. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/recipes/swap.rb +1 -1
  36. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/templates/default/nginx-conf.erb +5 -5
  37. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/templates/default/nginx-htaccess.erb +1 -1
  38. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/templates/default/nginx-run-script.erb +1 -1
  39. data/lib/generators/lobot/templates/chef/cookbooks/pivotal_server/templates/default/postgres-run-script.erb +1 -1
  40. data/lib/generators/lobot/templates/ci.yml +6 -8
  41. data/lib/generators/lobot/templates/ci_build.sh +4 -1
  42. data/lib/generators/lobot/templates/deploy-ci.rb +4 -2
  43. data/lib/generators/lobot/templates/dot-gitignore +1 -0
  44. data/lib/generators/lobot/templates/soloistrc +1 -1
  45. data/lib/lobot.rb +1 -1
  46. data/lib/lobot/railtie.rb +1 -1
  47. data/lib/lobot/tasks/ci.rake +50 -17
  48. data/lib/lobot/version.rb +1 -1
  49. data/lobot.gemspec +11 -4
  50. data/spec/install_spec.rb +21 -12
  51. data/spec/spec_helper.rb +1 -1
  52. metadata +207 -104
@@ -1,9 +1,10 @@
1
1
  module Lobot
2
2
  class InstallGenerator < Rails::Generators::Base
3
3
  source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
4
-
4
+
5
5
  def create_ci_files
6
6
  template 'ci.yml', 'config/ci.yml'
7
+ template 'ci.yml', 'config/ci.yml.example'
7
8
  template 'bootstrap_server.sh', 'script/bootstrap_server.sh'
8
9
  template 'deploy-ci.rb', 'config/deploy/ci.rb'
9
10
  template 'capistrano-ci.rb', 'config/capistrano/ci.rb'
@@ -11,15 +12,23 @@ module Lobot
11
12
  template 'ci_build.sh', 'script/ci_build.sh'
12
13
  system "chmod a+x #{destination_root}/script/ci_build.sh"
13
14
  end
14
-
15
+
15
16
  def add_load_path_to_capfile
16
17
  template 'Capfile', 'Capfile' unless File.exists?("#{destination_root}/Capfile")
17
18
  prepend_to_file 'Capfile', "load 'config/capistrano/ci'\n"
18
19
  end
19
-
20
+
21
+ def add_ci_yml_to_gitignore
22
+ if File.exists?("#{destination_root}/.gitignore")
23
+ append_to_file '.gitignore', "config/ci.yml\n"
24
+ else
25
+ template 'dot-gitignore', '.gitignore'
26
+ end
27
+ end
28
+
20
29
  def create_chef_cookbooks
21
30
  directory 'chef', 'chef'
22
31
  end
23
-
32
+
24
33
  end
25
- end
34
+ end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # load 'deploy' if respond_to?(:namespace) # cap2 differentiator
4
4
  # Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
5
- #
6
- # load 'config/deploy' # remove this line to skip loading any of the default tasks
5
+ #
6
+ # load 'config/deploy' # remove this line to skip loading any of the default tasks
@@ -1,4 +1,5 @@
1
1
  #!/bin/bash -e
2
+ RVM_0_12_3_SHA=d6b4de7cfec42f7ce33198f0bd82544af51e8aa5
2
3
 
3
4
  env | grep -q "APP_USER=" || echo "Please set APP_USER environment variable"
4
5
 
@@ -17,7 +18,7 @@ grep -sq "$authorized_keys_string" /home/$APP_USER/.ssh/authorized_keys || cat /
17
18
 
18
19
 
19
20
  ## enable ssh password auth
20
- perl -p -i -e 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
21
+ perl -p -i -e 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
21
22
  /etc/init.d/sshd reload
22
23
 
23
24
  # install epel
@@ -37,9 +38,9 @@ cat <<'BOOTSTRAP_AS_USER' > /home/$APP_USER/bootstrap_as_user.sh
37
38
  set -e
38
39
 
39
40
  export APP_USER=$1
40
-
41
+ export RVM_0_12_3_SHA=$2
41
42
  mkdir -p /home/$APP_USER/rvm/src
42
- curl -Lskf http://github.com/wayneeseguin/rvm/tarball/0f7135af8f0b6139716637d242a82442dd7fef09 | tar xvz -C/home/$APP_USER/rvm/src --strip 1
43
+ curl -Lskf http://github.com/wayneeseguin/rvm/tarball/$RVM_0_12_3_SHA | tar xvz -C/home/$APP_USER/rvm/src --strip 1
43
44
  cd "/home/$APP_USER/rvm/src" && ./install
44
45
 
45
46
  rvm_include_string='[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"'
@@ -53,5 +54,5 @@ RVMRC_CONTENTS
53
54
  BOOTSTRAP_AS_USER
54
55
 
55
56
  chmod a+x /home/$APP_USER/bootstrap_as_user.sh
56
- su - $APP_USER /home/$APP_USER/bootstrap_as_user.sh $APP_USER
57
- rm /home/$APP_USER/bootstrap_as_user.sh
57
+ su - $APP_USER /home/$APP_USER/bootstrap_as_user.sh $APP_USER $RVM_0_12_3_SHA
58
+ rm /home/$APP_USER/bootstrap_as_user.sh
@@ -1,13 +1,15 @@
1
1
  require 'capistrano/ext/multistage'
2
- require "rvm/capistrano" # Use the gem, don't unshift RVM onto the load path, that's crazy.
3
2
 
4
3
  task :ci_setup do
5
4
  ci_conf_location ||= File.expand_path('../../../config/ci.yml', __FILE__)
6
5
  ci_conf ||= YAML.load_file(ci_conf_location)
7
-
8
- raise "rvm_ruby_string not set - are you using RVM" unless ENV['rvm_ruby_string']
9
- set :rvm_ruby_string, ENV['rvm_ruby_string']
10
- set :rvm_type, :user
6
+
7
+ if ENV["rvm_path"]
8
+ require "bundler/capistrano"
9
+ require "rvm/capistrano" # Use the gem, don't unshift RVM onto the load path, that's crazy.
10
+ set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"")
11
+ set :rvm_type, :user
12
+ end
11
13
  set :app_name, ci_conf['app_name']
12
14
  set(:app_dir) { "/var/#{stage}/#{app_name}" }
13
15
  set :user, ci_conf['app_user']
@@ -58,6 +60,10 @@ task :upload_cookbooks do
58
60
  run "rm -rf #{app_dir}/chef"
59
61
  upload("soloistrc", "#{app_dir}/soloistrc")
60
62
  upload("config/ci.yml", "#{app_dir}/ci.yml")
63
+ ci_config = YAML.load_file("config/ci.yml")
64
+ if ci_config.has_key?("github_private_ssh_key_path")
65
+ upload(File.expand_path(ci_config["github_private_ssh_key_path"]), "/home/#{user}/.ssh/id_rsa", {:mode => "0600"})
66
+ end
61
67
  upload("chef/", "#{app_dir}/chef/", :via => :scp, :recursive => true)
62
68
  end
63
69
 
@@ -1,2 +1,2 @@
1
1
  node["nginx_settings"] ||= {}
2
- node["nginx_settings"]["basic_auth_users"] = CI_CONFIG['basic_auth']
2
+ node["nginx_settings"]["basic_auth_users"] = CI_CONFIG['basic_auth']
@@ -1,2 +1,2 @@
1
1
  ci_conf_location = File.expand_path('../../../../../ci.yml', __FILE__)
2
- ::CI_CONFIG = YAML.load_file(ci_conf_location)
2
+ ::CI_CONFIG = YAML.load_file(ci_conf_location)
@@ -7,4 +7,4 @@ include_recipe "pivotal_server::curl_devel"
7
7
  include_recipe "pivotal_server::ca_cert"
8
8
  include_recipe "pivotal_server::node_js"
9
9
  include_recipe "pivotal_ci::id_rsa"
10
- include_recipe "pivotal_ci::jenkins"
10
+ include_recipe "pivotal_ci::jenkins"
@@ -8,4 +8,4 @@ end
8
8
  execute "set git user" do
9
9
  command "git config --global user.name 'Jenkins CI Server'"
10
10
  user username
11
- end
11
+ end
@@ -8,7 +8,7 @@ file "/home/#{username}/.ssh/id_rsa" do
8
8
  end
9
9
 
10
10
  execute "add github to known hosts if necessary" do
11
- github_string = 'github.com,207.97.227.239 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
11
+ github_string = 'github.com,207.97.227.239 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
12
12
  command "echo '#{github_string}' >> /home/#{username}/.ssh/known_hosts"
13
13
  not_if "grep '#{github_string}' /home/#{username}/.ssh/known_hosts"
14
- end
14
+ end
@@ -42,4 +42,4 @@ end
42
42
 
43
43
  execute "make run script executable" do
44
44
  command "chmod 755 /service/#{service_name}/run"
45
- end
45
+ end
@@ -4,4 +4,4 @@ end
4
4
 
5
5
  execute "install firefox" do
6
6
  command "yum -y install firefox"
7
- end
7
+ end
@@ -55,4 +55,4 @@
55
55
  </builders>
56
56
  <publishers/>
57
57
  <buildWrappers/>
58
- </project>
58
+ </project>
@@ -3718,4 +3718,4 @@ mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW
3718
3718
  QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY
3719
3719
  T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
3720
3720
  Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
3721
- -----END CERTIFICATE-----
3721
+ -----END CERTIFICATE-----
@@ -1,10 +1,10 @@
1
1
  class Chef::Recipe
2
-
2
+
3
3
  MARKER_DIR = "#{ENV['HOME']}/.install_markers"
4
-
4
+
5
5
  #Regarding marker files:
6
6
  #
7
- #The idea here is you have a simple "signal" on disk that tells you when you've
7
+ #The idea here is you have a simple "signal" on disk that tells you when you've
8
8
  #successfully run something, and you don't want to run it again if you don't have to.
9
9
  #
10
10
  #Also, the decision to rerun a unit of work becomes explicit - and owned by you.
@@ -15,28 +15,28 @@ class Chef::Recipe
15
15
  #i.e. what markers are there and what are their timestamps?
16
16
  #
17
17
  #And reinstalls are easy - just rm the relevant marker file.
18
-
18
+
19
19
  def run_unless_marker_file_exists(marker_file_name)
20
20
 
21
21
  directory MARKER_DIR do
22
22
  # owner WS_USER
23
23
  recursive true
24
24
  end
25
-
25
+
26
26
  marker_path = File.join(MARKER_DIR, marker_file_name)
27
27
  if File.exists?(marker_path)
28
28
  log "skipping #{marker_file_name}: marker file found (#{marker_path}), detail: #{`ls -la #{marker_path}`.strip}"
29
29
  else
30
-
30
+
31
31
  log "no marker file found for #{marker_file_name} in #{MARKER_DIR}, running"
32
-
32
+
33
33
  yield
34
-
34
+
35
35
  execute "touching marker file #{marker_path} after successful run" do
36
36
  # user WS_USER
37
37
  command "touch #{marker_path}"
38
38
  end
39
-
39
+
40
40
  end
41
41
  end
42
- end
42
+ end
@@ -1,4 +1,4 @@
1
1
  cookbook_file "/etc/pki/tls/certs/ca-bundle.crt" do
2
2
  source "cacert.pem"
3
3
  mode "0444"
4
- end
4
+ end
@@ -12,4 +12,4 @@ end
12
12
 
13
13
  execute "make sure daemontools is installed" do
14
14
  command "ls /command/svscanboot"
15
- end
15
+ end
@@ -9,4 +9,4 @@
9
9
  # arch arch_string
10
10
  end
11
11
  end
12
- end
12
+ end
@@ -22,26 +22,26 @@ run_unless_marker_file_exists("mysql_5_1_with_innodb") do
22
22
  execute "download mysql src" do
23
23
  command "mkdir -p #{src_dir} && curl -Lsf http://mysql.he.net/Downloads/MySQL-5.1/mysql-5.1.57.tar.gz | tar xvz -C#{src_dir} --strip 1"
24
24
  end
25
-
25
+
26
26
  execute "configure" do
27
27
  command "./configure --prefix=/usr/local/mysql --with-plugins=innobase,myisam"
28
28
  cwd src_dir
29
29
  end
30
-
30
+
31
31
  execute "make" do
32
32
  command "make"
33
33
  cwd src_dir
34
34
  end
35
-
35
+
36
36
  execute "make install" do
37
37
  command "make install"
38
38
  cwd src_dir
39
39
  end
40
-
40
+
41
41
  execute "mysql owns #{install_dir}" do
42
42
  command "chown -R mysql #{install_dir}"
43
43
  end
44
-
44
+
45
45
  execute "install db" do
46
46
  command "#{install_dir}/bin/mysql_install_db --user=mysql"
47
47
  cwd install_dir
@@ -93,7 +93,7 @@ end
93
93
  execute "create app_user user" do
94
94
  command "#{install_dir}/bin/mysql -u root -p#{mysql_root_password} -D mysql -r -B -N -e \"CREATE USER '#{mysql_user_name}'@'localhost'\""
95
95
  not_if "#{install_dir}/bin/mysql -u root -p#{mysql_root_password} -D mysql -r -B -N -e \"SELECT * FROM user where User='#{mysql_user_name}' and Host = 'localhost'\" | grep -q #{mysql_user_name}"
96
- end
96
+ end
97
97
 
98
98
  execute "set password for app_user" do
99
99
  command "#{install_dir}/bin/mysql -u root -p#{mysql_root_password} -D mysql -r -B -N -e \"SET PASSWORD FOR '#{mysql_user_name}'@'localhost' = PASSWORD('#{mysql_user_password}')\""
@@ -21,7 +21,7 @@ user "mysql"
21
21
 
22
22
  run_unless_marker_file_exists("mysql_5_5_11") do
23
23
  execute "download mysql src" do
24
- command "mkdir -p #{src_dir} && curl -Lsf http://mysql.he.net/Downloads/MySQL-5.5/mysql-5.5.14.tar.gz | tar xvz -C#{src_dir} --strip 1"
24
+ command "mkdir -p #{src_dir} && curl -Lsf http://mysql.he.net/Downloads/MySQL-5.5/mysql-5.5.20.tar.gz | tar xvz -C#{src_dir} --strip 1"
25
25
  end
26
26
 
27
27
  execute "cmake" do
@@ -33,7 +33,7 @@ run_unless_marker_file_exists("mysql_5_5_11") do
33
33
  command "make install"
34
34
  cwd src_dir
35
35
  end
36
-
36
+
37
37
  execute "mysql owns #{install_dir}/data" do
38
38
  command "chown -R mysql #{install_dir}/data"
39
39
  end
@@ -75,7 +75,7 @@ end
75
75
  execute "create app_user user" do
76
76
  command "#{install_dir}/bin/mysql -u root -p#{mysql_root_password} -D mysql -r -B -N -e \"CREATE USER '#{mysql_user_name}'@'localhost'\""
77
77
  not_if "#{install_dir}/bin/mysql -u root -p#{mysql_root_password} -D mysql -r -B -N -e \"SELECT * FROM user where User='#{mysql_user_name}' and Host = 'localhost'\" | grep -q #{mysql_user_name}"
78
- end
78
+ end
79
79
 
80
80
  execute "set password for app_user" do
81
81
  command "#{install_dir}/bin/mysql -u root -p#{mysql_root_password} -D mysql -r -B -N -e \"SET PASSWORD FOR '#{mysql_user_name}'@'localhost' = PASSWORD('#{mysql_user_password}')\""
@@ -83,4 +83,4 @@ end
83
83
 
84
84
  execute "grant user all rights (this maybe isn't a great idea)" do
85
85
  command "#{install_dir}/bin/mysql -u root -p#{mysql_root_password} -D mysql -r -B -N -e \"GRANT ALL on *.* to '#{mysql_user_name}'@'localhost'\""
86
- end
86
+ end
@@ -10,6 +10,6 @@ script "compile & install node" do
10
10
  code "./configure && make install"
11
11
  not_if "which node"
12
12
  end
13
-
14
-
15
-
13
+
14
+
15
+
@@ -25,26 +25,26 @@ run_unless_marker_file_exists("postgres_9_0_4") do
25
25
  execute "download postgres src" do
26
26
  command "mkdir -p #{src_dir} && curl -Lsf http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.bz2 | tar xvj -C#{src_dir} --strip 1"
27
27
  end
28
-
28
+
29
29
  execute "config" do
30
30
  command "./configure --disable-debug --enable-thread-safety --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxslt --with-perl --bindir=/usr/local/bin"
31
31
  cwd src_dir
32
32
  end
33
-
33
+
34
34
  execute "make" do
35
35
  command "make"
36
36
  cwd src_dir
37
37
  end
38
-
38
+
39
39
  execute "make install" do
40
40
  command "make install"
41
41
  cwd src_dir
42
42
  end
43
-
43
+
44
44
  directory "#{install_dir}/data/" do
45
45
  owner "postgres"
46
46
  end
47
-
47
+
48
48
  execute "init db" do
49
49
  command "initdb -E UTF8 #{install_dir}/data/"
50
50
  user "postgres"
@@ -77,4 +77,4 @@ ruby_block "wait for postgres to come up" do
77
77
  end
78
78
  end
79
79
  end
80
- end
80
+ end
@@ -17,4 +17,4 @@ run_unless_marker_file_exists("sqlite_0") do
17
17
  execute "install sqlite" do
18
18
  command "cd #{src_dir} && make install"
19
19
  end
20
- end
20
+ end
@@ -14,4 +14,4 @@ end
14
14
  execute "swapon" do
15
15
  command "swapon #{swapfile_location}"
16
16
  not_if "cat /proc/swaps | grep -q '/swapfile'"
17
- end
17
+ end
@@ -16,16 +16,16 @@ http {
16
16
  sendfile on;
17
17
  keepalive_timeout 65;
18
18
  tcp_nodelay on;
19
-
19
+
20
20
  upstream app_server {
21
21
  server 127.0.0.1:8080;
22
22
  }
23
-
23
+
24
24
  server {
25
25
  root /usr/local/nginx/html/;
26
-
26
+
27
27
  try_files $uri @app_server;
28
-
28
+
29
29
  location @app_server {
30
30
  proxy_set_header X-Real-IP $remote_addr;
31
31
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -39,4 +39,4 @@ http {
39
39
  root html;
40
40
  }
41
41
  }
42
- }
42
+ }
@@ -1,3 +1,3 @@
1
1
  <% node["nginx_settings"]["basic_auth_users"].each do |user| %>
2
2
  <%= "#{user["username"]}:#{user["password"].crypt("AA")}" %>
3
- <% end %>
3
+ <% end %>
@@ -1,2 +1,2 @@
1
1
  #!/bin/sh
2
- exec /usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf
2
+ exec /usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf
@@ -1,2 +1,2 @@
1
1
  #!/bin/sh
2
- /command/setuidgid postgres postgres -D /usr/local/pgsql/data
2
+ /command/setuidgid postgres postgres -D /usr/local/pgsql/data
@@ -1,24 +1,22 @@
1
- ---
1
+ ---
2
2
  app_name: SHORT_APPLICATION_NAME
3
3
  app_user: APPLICATION_USER
4
4
  git_location: GIT CLONE URL
5
- basic_auth:
5
+ basic_auth:
6
6
  - username: BASIC_AUTH_LOGIN_NAME
7
7
  password: BASIC_AUTH_PASSWORD
8
- credentials:
8
+ credentials:
9
9
  aws_access_key_id: AWS_ACCESS_KEY #https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key
10
10
  aws_secret_access_key: AWS_SECRET
11
11
  provider: AWS # leave this one
12
- server:
12
+ server:
13
13
  flavor_id: m1.large
14
14
  security_group: ci_servers
15
15
  name: # run 'rake ci:server_start to populate'
16
16
  instance_id: # run 'rake ci:server_start to populate'
17
+ ssh_port: # default to 22, but override here
17
18
  build_command: ./script/ci_build.sh
18
19
  ec2_server_access:
19
20
  key_pair_name: NAME_OF_YOUR_KEY_PAIR # like myapp_ci
20
21
  id_rsa_path: ~/.ssh/id_rsa
21
- id_rsa_for_github_access: |-
22
- -----BEGIN RSA PRIVATE KEY-----
23
- SSH KEY WITH ACCESS TO GITHUB GOES HERE
24
- -----END RSA PRIVATE KEY-----
22
+ github_private_ssh_key_path: ~/.ssh/id_rsa