meroku 2.0.22 → 2.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/.travis.yml +0 -10
  4. data/Guardfile +43 -0
  5. data/LICENSE.txt +1 -1
  6. data/README.md +29 -89
  7. data/bin/meroku +5 -3
  8. data/{frontend → data}/etc_nginx_sites-enabled_template +0 -0
  9. data/guard +25 -0
  10. data/lib/meroku.rb +17 -20
  11. data/lib/meroku/api.rb +15 -3
  12. data/lib/meroku/aws.rb +69 -6
  13. data/lib/meroku/cli.rb +23 -91
  14. data/lib/meroku/error.rb +11 -0
  15. data/lib/meroku/node.rb +70 -70
  16. data/lib/meroku/options.rb +79 -0
  17. data/lib/meroku/secrets.rb +38 -0
  18. data/lib/meroku/shared.rb +23 -0
  19. data/lib/meroku/user.rb +25 -0
  20. data/lib/meroku/version.rb +3 -1
  21. data/meroku.gemspec +10 -19
  22. metadata +20 -319
  23. data/circle.yml +0 -23
  24. data/frontend/.gitignore +0 -23
  25. data/frontend/.ruby-version +0 -2
  26. data/frontend/Gemfile +0 -61
  27. data/frontend/Gemfile.lock +0 -236
  28. data/frontend/README.md +0 -24
  29. data/frontend/Rakefile +0 -6
  30. data/frontend/app/assets/config/manifest.js +0 -3
  31. data/frontend/app/assets/images/.keep +0 -0
  32. data/frontend/app/assets/javascripts/application.js +0 -15
  33. data/frontend/app/assets/javascripts/apps.coffee +0 -3
  34. data/frontend/app/assets/javascripts/cable.js +0 -13
  35. data/frontend/app/assets/javascripts/channels/.keep +0 -0
  36. data/frontend/app/assets/javascripts/pages.coffee +0 -3
  37. data/frontend/app/assets/javascripts/publickeys.coffee +0 -3
  38. data/frontend/app/assets/stylesheets/application.css +0 -15
  39. data/frontend/app/assets/stylesheets/apps.scss +0 -3
  40. data/frontend/app/assets/stylesheets/pages.scss +0 -3
  41. data/frontend/app/assets/stylesheets/publickeys.scss +0 -3
  42. data/frontend/app/assets/stylesheets/scaffolds.scss +0 -84
  43. data/frontend/app/channels/application_cable/channel.rb +0 -4
  44. data/frontend/app/channels/application_cable/connection.rb +0 -4
  45. data/frontend/app/controllers/application_controller.rb +0 -4
  46. data/frontend/app/controllers/apps_controller.rb +0 -83
  47. data/frontend/app/controllers/concerns/.keep +0 -0
  48. data/frontend/app/controllers/publickeys_controller.rb +0 -82
  49. data/frontend/app/controllers/users/confirmations_controller.rb +0 -28
  50. data/frontend/app/controllers/users/omniauth_callbacks_controller.rb +0 -28
  51. data/frontend/app/controllers/users/passwords_controller.rb +0 -32
  52. data/frontend/app/controllers/users/registrations_controller.rb +0 -74
  53. data/frontend/app/controllers/users/sessions_controller.rb +0 -34
  54. data/frontend/app/controllers/users/unlocks_controller.rb +0 -28
  55. data/frontend/app/helpers/application_helper.rb +0 -2
  56. data/frontend/app/helpers/apps_helper.rb +0 -2
  57. data/frontend/app/helpers/pages_helper.rb +0 -2
  58. data/frontend/app/helpers/publickeys_helper.rb +0 -2
  59. data/frontend/app/jobs/application_job.rb +0 -2
  60. data/frontend/app/lib/cmd.rb +0 -11
  61. data/frontend/app/mailers/application_mailer.rb +0 -4
  62. data/frontend/app/models/app.rb +0 -37
  63. data/frontend/app/models/application_record.rb +0 -3
  64. data/frontend/app/models/concerns/.keep +0 -0
  65. data/frontend/app/models/publickey.rb +0 -15
  66. data/frontend/app/models/user.rb +0 -22
  67. data/frontend/app/policies/application_policy.rb +0 -53
  68. data/frontend/app/policies/publickey_policy.rb +0 -7
  69. data/frontend/app/serializable/serializable_app.rb +0 -6
  70. data/frontend/app/serializable/serializable_publickey.rb +0 -7
  71. data/frontend/app/serializable/serializable_user.rb +0 -8
  72. data/frontend/app/serializers/app_serializer.rb +0 -3
  73. data/frontend/app/serializers/publickey_serializer.rb +0 -4
  74. data/frontend/app/views/apps/_app.json.jbuilder +0 -2
  75. data/frontend/app/views/apps/_form.html.erb +0 -22
  76. data/frontend/app/views/apps/edit.html.erb +0 -6
  77. data/frontend/app/views/apps/index.html.erb +0 -27
  78. data/frontend/app/views/apps/index.json.jbuilder +0 -1
  79. data/frontend/app/views/apps/new.html.erb +0 -5
  80. data/frontend/app/views/apps/show.html.erb +0 -9
  81. data/frontend/app/views/apps/show.json.jbuilder +0 -1
  82. data/frontend/app/views/devise/confirmations/new.html.erb +0 -16
  83. data/frontend/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
  84. data/frontend/app/views/devise/mailer/email_changed.html.erb +0 -7
  85. data/frontend/app/views/devise/mailer/password_change.html.erb +0 -3
  86. data/frontend/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
  87. data/frontend/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
  88. data/frontend/app/views/devise/passwords/edit.html.erb +0 -25
  89. data/frontend/app/views/devise/passwords/new.html.erb +0 -16
  90. data/frontend/app/views/devise/registrations/edit.html.erb +0 -43
  91. data/frontend/app/views/devise/registrations/new.html.erb +0 -29
  92. data/frontend/app/views/devise/sessions/new.html.erb +0 -26
  93. data/frontend/app/views/devise/shared/_links.html.erb +0 -25
  94. data/frontend/app/views/devise/unlocks/new.html.erb +0 -16
  95. data/frontend/app/views/layouts/application.html.erb +0 -16
  96. data/frontend/app/views/layouts/mailer.html.erb +0 -13
  97. data/frontend/app/views/layouts/mailer.text.erb +0 -1
  98. data/frontend/app/views/publickeys/_form.html.erb +0 -32
  99. data/frontend/app/views/publickeys/_publickey.json.jbuilder +0 -2
  100. data/frontend/app/views/publickeys/edit.html.erb +0 -6
  101. data/frontend/app/views/publickeys/index.html.erb +0 -31
  102. data/frontend/app/views/publickeys/index.json.jbuilder +0 -1
  103. data/frontend/app/views/publickeys/new.html.erb +0 -5
  104. data/frontend/app/views/publickeys/show.html.erb +0 -19
  105. data/frontend/app/views/publickeys/show.json.jbuilder +0 -1
  106. data/frontend/bin/bundle +0 -3
  107. data/frontend/bin/rails +0 -9
  108. data/frontend/bin/rake +0 -9
  109. data/frontend/bin/setup +0 -38
  110. data/frontend/bin/spring +0 -17
  111. data/frontend/bin/update +0 -29
  112. data/frontend/bin/yarn +0 -11
  113. data/frontend/config.ru +0 -5
  114. data/frontend/config/application.rb +0 -18
  115. data/frontend/config/boot.rb +0 -3
  116. data/frontend/config/cable.yml +0 -10
  117. data/frontend/config/database.yml +0 -87
  118. data/frontend/config/environment.rb +0 -5
  119. data/frontend/config/environments/development.rb +0 -56
  120. data/frontend/config/environments/production.rb +0 -97
  121. data/frontend/config/environments/test.rb +0 -42
  122. data/frontend/config/initializers/ams.rb +0 -3
  123. data/frontend/config/initializers/application_controller_renderer.rb +0 -8
  124. data/frontend/config/initializers/assets.rb +0 -14
  125. data/frontend/config/initializers/backtrace_silencers.rb +0 -7
  126. data/frontend/config/initializers/cookies_serializer.rb +0 -5
  127. data/frontend/config/initializers/devise.rb +0 -277
  128. data/frontend/config/initializers/filter_parameter_logging.rb +0 -4
  129. data/frontend/config/initializers/inflections.rb +0 -16
  130. data/frontend/config/initializers/mime_types.rb +0 -4
  131. data/frontend/config/initializers/wrap_parameters.rb +0 -14
  132. data/frontend/config/locales/devise.en.yml +0 -64
  133. data/frontend/config/locales/en.yml +0 -33
  134. data/frontend/config/puma.rb +0 -66
  135. data/frontend/config/routes.rb +0 -11
  136. data/frontend/config/secrets.yml +0 -32
  137. data/frontend/config/spring.rb +0 -6
  138. data/frontend/db/migrate/20171023223732_devise_create_users.rb +0 -42
  139. data/frontend/db/migrate/20171025203706_create_apps.rb +0 -9
  140. data/frontend/db/migrate/20171025223804_add_user_to_apps.rb +0 -5
  141. data/frontend/db/migrate/20171026071440_create_publickeys.rb +0 -11
  142. data/frontend/db/migrate/20171028150506_add_apisecret_to_users.rb +0 -6
  143. data/frontend/db/schema.rb +0 -32
  144. data/frontend/db/seeds.rb +0 -7
  145. data/frontend/etc_nginx_sites-enabled_default +0 -29
  146. data/frontend/lib/assets/.keep +0 -0
  147. data/frontend/lib/tasks/.keep +0 -0
  148. data/frontend/log/.keep +0 -0
  149. data/frontend/package.json +0 -5
  150. data/frontend/public/404.html +0 -67
  151. data/frontend/public/422.html +0 -67
  152. data/frontend/public/500.html +0 -66
  153. data/frontend/public/Meroku.html +0 -140
  154. data/frontend/public/Meroku/Api.html +0 -129
  155. data/frontend/public/Meroku/Api/Request.html +0 -221
  156. data/frontend/public/Meroku/Aws/Ec2.html +0 -477
  157. data/frontend/public/Meroku/CLI.html +0 -796
  158. data/frontend/public/Meroku/CLI/Help.html +0 -224
  159. data/frontend/public/Meroku/CLI/Secrets.html +0 -191
  160. data/frontend/public/Meroku/CLI/Session.html +0 -456
  161. data/frontend/public/Meroku/Extensions.html +0 -405
  162. data/frontend/public/Meroku/Infrastructure.html +0 -279
  163. data/frontend/public/Meroku/Infrastructure/Server.html +0 -373
  164. data/frontend/public/Meroku/Node.html +0 -845
  165. data/frontend/public/Meroku/Tunnelable.html +0 -247
  166. data/frontend/public/_index.html +0 -273
  167. data/frontend/public/apple-touch-icon-precomposed.png +0 -0
  168. data/frontend/public/apple-touch-icon.png +0 -0
  169. data/frontend/public/class_list.html +0 -51
  170. data/frontend/public/css/common.css +0 -1
  171. data/frontend/public/css/full_list.css +0 -58
  172. data/frontend/public/css/style.css +0 -492
  173. data/frontend/public/favicon.ico +0 -0
  174. data/frontend/public/file.README.html +0 -179
  175. data/frontend/public/file_list.html +0 -56
  176. data/frontend/public/frames.html +0 -17
  177. data/frontend/public/index.html +0 -179
  178. data/frontend/public/js/app.js +0 -248
  179. data/frontend/public/js/full_list.js +0 -216
  180. data/frontend/public/js/jquery.js +0 -4
  181. data/frontend/public/method_list.html +0 -395
  182. data/frontend/public/robots.txt +0 -2
  183. data/frontend/public/top-level-namespace.html +0 -110
  184. data/frontend/test/application_system_test_case.rb +0 -5
  185. data/frontend/test/controllers/.keep +0 -0
  186. data/frontend/test/controllers/apps_controller_test.rb +0 -48
  187. data/frontend/test/controllers/pages_controller_test.rb +0 -9
  188. data/frontend/test/controllers/publickeys_controller_test.rb +0 -48
  189. data/frontend/test/fixtures/.keep +0 -0
  190. data/frontend/test/fixtures/apps.yml +0 -7
  191. data/frontend/test/fixtures/files/.keep +0 -0
  192. data/frontend/test/fixtures/publickeys.yml +0 -11
  193. data/frontend/test/fixtures/users.yml +0 -11
  194. data/frontend/test/helpers/.keep +0 -0
  195. data/frontend/test/integration/.keep +0 -0
  196. data/frontend/test/mailers/.keep +0 -0
  197. data/frontend/test/models/.keep +0 -0
  198. data/frontend/test/models/app_test.rb +0 -7
  199. data/frontend/test/models/publickey_test.rb +0 -7
  200. data/frontend/test/models/user_test.rb +0 -7
  201. data/frontend/test/policies/publickey_policy_test.rb +0 -19
  202. data/frontend/test/system/.keep +0 -0
  203. data/frontend/test/system/apps_test.rb +0 -9
  204. data/frontend/test/system/publickeys_test.rb +0 -9
  205. data/frontend/test/test_helper.rb +0 -9
  206. data/frontend/tmp/.keep +0 -0
  207. data/frontend/vendor/.keep +0 -0
  208. data/lib/meroku/api/request.rb +0 -17
  209. data/lib/meroku/aws/ec2.rb +0 -59
  210. data/lib/meroku/cli/help.rb +0 -27
  211. data/lib/meroku/cli/secrets.rb +0 -23
  212. data/lib/meroku/cli/session.rb +0 -46
  213. data/lib/meroku/extensions.rb +0 -32
  214. data/lib/meroku/infrastructure.rb +0 -23
  215. data/lib/meroku/infrastructure/server.rb +0 -20
  216. data/lib/meroku/tunnelable.rb +0 -35
  217. data/modified-cedar-14.sh +0 -171
@@ -1,27 +0,0 @@
1
- module Meroku
2
- module CLI
3
- # The help thats printed when a command is unspecified or unrecognized
4
- module Help
5
- def help
6
- <<~HEREDOC
7
- Usage:
8
- meroku command subcommand
9
-
10
- Examples:
11
- meroku signup # if you havent done already
12
-
13
- meroku login
14
-
15
- meroku logout
16
-
17
- meroku create
18
-
19
- meroku keys:add
20
-
21
- meroku infrastrucuture spawn # Spawns server
22
-
23
- HEREDOC
24
- end
25
- end
26
- end
27
- end
@@ -1,23 +0,0 @@
1
- module Meroku
2
- module CLI
3
- # Logic related to apiusername, apipassword and the env file
4
- module Secrets
5
- def self.load(admin: false)
6
- return unless admin
7
- env_file = Dir.home + '/.meroku/meroku.env'
8
- pem_file = Dir.home + '/.meroku/meroku.id_rsa'
9
- attempt_download unless File.exist?(env_file)
10
- attempt_download unless File.exist?(pem_file)
11
- Dotenv.load(env_file)
12
- end
13
-
14
- def self.attempt_download
15
- abort 'ENV["SECRET"] not found' unless ENV['SECRET']
16
- FileUtils.mkdir_p "#{Dir.home}/.meroku"
17
- `curl -so ~/.meroku/meroku.env https://s3.amazonaws.com/#{ENV['SECRET']}/meroku.env`
18
- `curl -so ~/.meroku/meroku.id_rsa https://s3.amazonaws.com/#{ENV['SECRET']}/meroku.id_rsa`
19
- FileUtils.chmod 0400, "#{Dir.home}/.meroku/meroku.id_rsa"
20
- end
21
- end
22
- end
23
- end
@@ -1,46 +0,0 @@
1
- module Meroku
2
- module CLI
3
- # A session is what is created when user executes the meroku command
4
- class Session
5
- include Meroku::CLI
6
- include Meroku::CLI::Help
7
-
8
- def initialize(args)
9
- processed = process_user_login_command(args.join(' ')) ||
10
- process_user_other_command(args.join(' ')) ||
11
- process_admin_command(args.join(' '))
12
- puts "Unknown command #{args.join(' ')}\n\n#{help}" unless processed
13
- exit 1 unless processed
14
- end
15
-
16
- def process_user_login_command(arguments)
17
- case arguments
18
- when /\Asignup/
19
- signup
20
- when 'logout'
21
- logout
22
- when 'login'
23
- login
24
- end
25
- end
26
-
27
- def process_user_other_command(arguments)
28
- case arguments
29
- when 'create'
30
- create
31
- when 'keys:add'
32
- keys_add
33
- end
34
- end
35
-
36
- def process_admin_command(arguments)
37
- case arguments
38
- when 'infrastructure spawn'
39
- spawn
40
- when 'infrastructure despawn'
41
- despawn
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,32 +0,0 @@
1
- module Meroku
2
- # Has methods that are similar to but extended versions
3
- # of core ruby methods
4
- module Extensions
5
- # Get multipe inputs from user
6
- # Masks passwords if detected
7
- # Bypasses prompt when ENV variables present
8
- def self.mgets(names)
9
- names.map do |name|
10
- sgets(name)
11
- end
12
- end
13
-
14
- # single gets
15
- def self.sgets(name)
16
- print "#{name.to_s.capitalize}: "
17
- return env_sgets(name) if ENV['MEROKU_' + name.to_s.upcase]
18
- return secure_sgets if name.match?(/password/)
19
- STDIN.gets.chomp
20
- end
21
-
22
- # get from env variable
23
- def self.env_sgets(name)
24
- ENV['MEROKU_' + name.to_s.upcase]
25
- end
26
-
27
- # secure gets from stdin
28
- def self.secure_sgets
29
- STDIN.noecho(&:gets).chomp
30
- end
31
- end
32
- end
@@ -1,23 +0,0 @@
1
- require 'meroku/infrastructure/server'
2
-
3
- module Meroku
4
- # Logic related to the infratructure that powers meroku
5
- module Infrastructure
6
- extend Meroku::Aws::Ec2
7
-
8
- def self.servers
9
- ec2_client.describe_instances(
10
- filters: [
11
- { name: 'tag:Name', values: ['node'] },
12
- { name: 'instance-state-name', values: %w[running pending] }
13
- ]
14
- ).reservations.map do |xx|
15
- Meroku::Infrastructure::Server.new(xx.instances.first.instance_id)
16
- end
17
- end
18
-
19
- def self.each_server
20
- servers.each { |s| yield s }
21
- end
22
- end
23
- end
@@ -1,20 +0,0 @@
1
- module Meroku
2
- module Infrastructure
3
- # A server hosts the api (called during signup, login, etc)
4
- # and atm also hosts end users applications
5
- class Server
6
- include Meroku::Aws::Ec2
7
-
8
- attr_reader :instance_id
9
-
10
- def initialize(instance_id)
11
- @instance_id = instance_id
12
- end
13
-
14
- def shutdown
15
- puts "Will terminate #{@instance_id}"
16
- ec2_client.terminate_instances(instance_ids: [@instance_id])
17
- end
18
- end
19
- end
20
- end
@@ -1,35 +0,0 @@
1
- module Meroku
2
- # Gives object the ability to execute bash commands on itself via ssh
3
- module Tunnelable
4
- # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
5
- def tunnel_run(cmd)
6
- retries = 0
7
- begin
8
- code = nil
9
- #puts "DB8 tunnel_ip #{@tunnel_ip}"
10
- #puts "DB8 @tunnel_username #{@tunnel_username}"
11
- #puts "DB8 @tunnel_key_name #{@tunnel_key_name}"
12
- #puts "DB8 #{`ls -la ~/.meroku/`}"
13
- Net::SSH.start(@tunnel_ip,
14
- @tunnel_username,
15
- keys: [ @tunnel_key_name ],
16
- verify_host_key: false) do |ssh|
17
- ssh.open_channel do |channel|
18
- puts cmd
19
- channel.exec cmd do |ch, success|
20
- raise "could not execute command" unless success
21
- ch.on_data { |_c, data| print data }
22
- ch.on_extended_data { |_c, _type, data| print data }
23
- ch.on_request("exit-status") { |_ch, data| code = data.read_long }
24
- end
25
- end.wait
26
- end
27
- abort "#{cmd} returned #{code} !!" if code != 0
28
- rescue Net::SSH::ConnectionTimeout
29
- puts "Net::SSH::ConnectionTimeout" && retry if (retries += 1) < 3
30
- rescue Errno::ECONNREFUSED
31
- puts "Net::SSH::ConnectionTimeout" && retry if (retries += 1) < 3
32
- end
33
- end
34
- end
35
- end
data/modified-cedar-14.sh DELETED
@@ -1,171 +0,0 @@
1
- #!/bin/bash
2
-
3
- exec 2>&1
4
- set -e
5
- set -x
6
-
7
- cat > /etc/apt/sources.list <<EOF
8
- deb http://archive.ubuntu.com/ubuntu/ trusty main universe
9
- deb http://archive.ubuntu.com/ubuntu/ trusty-security main universe
10
- deb http://archive.ubuntu.com/ubuntu/ trusty-updates main universe
11
-
12
- deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
13
- EOF
14
-
15
- apt-key add - <<'PGDG_ACCC4CF8'
16
- -----BEGIN PGP PUBLIC KEY BLOCK-----
17
- Version: GnuPG v1
18
-
19
- mQINBE6XR8IBEACVdDKT2HEH1IyHzXkb4nIWAY7echjRxo7MTcj4vbXAyBKOfjja
20
- UrBEJWHN6fjKJXOYWXHLIYg0hOGeW9qcSiaa1/rYIbOzjfGfhE4x0Y+NJHS1db0V
21
- G6GUj3qXaeyqIJGS2z7m0Thy4Lgr/LpZlZ78Nf1fliSzBlMo1sV7PpP/7zUO+aA4
22
- bKa8Rio3weMXQOZgclzgeSdqtwKnyKTQdXY5MkH1QXyFIk1nTfWwyqpJjHlgtwMi
23
- c2cxjqG5nnV9rIYlTTjYG6RBglq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N2FzGzhpXfZFfUsuphjY3FKL+4hX
71
- H+R8ucNwIz3yrkfc17MMn8yFNWFzm4omU9/JeeaafwUoLxlULL2zY7H3+QmxCl0u
72
- 6t8VvlszdEFhemLHzVYRY0Ro/ISrR78CnANNsMIy3i11U5uvdeWVCoWV1BXNLzOD
73
- 4+BIDbMB/Do8PQCWiliSGZi8lvmj/sKbumMFQonMQWOfQswTtqTyQ3yhUM1LaxK5
74
- PYq13rggi3rA8oq8SYb/KNCQL5pzACji4TRVK0kNpvtxJxe84X8+9IB1vhBvF/Ji
75
- /xDd/3VDNPY+k1a47cON0S8Qc8DA3mq4hRfcgvuWy7ZxoMY7AfSJOhleb9+PzRBB
76
- n9agYgMxZg1RUWZazQ5KuoJqbxpwOYVFja/stItNS4xsmi0lh2I4MNlBEDqnFLUx
77
- SvTDc22c3uJlWhzBM/f2jH19uUeqm4jaggob3iJvJmK+Q7Ns3WcfhuWwCnc1+58d
78
- iFAMRUCRBPeFS0qd56QGk1r97B6+3UfLUslCfaaA8IMOFvQSHJwDO87xWGyxeRTY
79
- IIP9up4xwgje9LB7fMxsSkCDTHOk
80
- =s3DI
81
- -----END PGP PUBLIC KEY BLOCK-----
82
- PGDG_ACCC4CF8
83
-
84
- apt-get update
85
- apt-get upgrade -y --force-yes
86
- apt-get install -y --force-yes \
87
- autoconf \
88
- bind9-host \
89
- bison \
90
- build-essential \
91
- coreutils \
92
- curl \
93
- daemontools \
94
- dnsutils \
95
- ed \
96
- git \
97
- imagemagick \
98
- iputils-tracepath \
99
- language-pack-en \
100
- libbz2-dev \
101
- libcurl4-openssl-dev \
102
- libev-dev \
103
- libevent-dev \
104
- libglib2.0-dev \
105
- libjpeg-dev \
106
- libmagickwand-dev \
107
- libmysqlclient-dev \
108
- libncurses5-dev \
109
- librdkafka-dev \
110
- libreadline6-dev \
111
- libssl-dev \
112
- libuv-dev \
113
- libxml2-dev \
114
- libxslt-dev \
115
- netcat-openbsd \
116
- openjdk-7-jdk \
117
- openjdk-7-jre-headless \
118
- openssh-client \
119
- openssh-server \
120
- python \
121
- python-dev \
122
- socat \
123
- stunnel \
124
- syslinux \
125
- tar \
126
- telnet \
127
- zip \
128
- zlib1g-dev \
129
- #
130
-
131
- ## locales
132
- #apt-cache search language-pack \
133
- # | cut -d ' ' -f 1 \
134
- # | grep -v '^language\-pack\-\(gnome\|kde\)\-' \
135
- # | grep -v '\-base$' \
136
- # | xargs apt-get install -y --force-yes --no-install-recommends
137
-
138
- cd /
139
- rm -rf /var/cache/apt/archives/*.deb
140
- rm -rf /root/*
141
- rm -rf /tmp/*
142
-
143
- ## remove SUID and SGID flags from all binaries
144
- #function pruned_find() {
145
- # find / -type d \( -name dev -o -name proc \) -prune -o $@ -print
146
- #}
147
- #
148
- #pruned_find -perm /u+s | xargs -r chmod u-s
149
- #pruned_find -perm /g+s | xargs -r chmod g-s
150
- #
151
- ## remove non-root ownership of files
152
- #chown root:root /var/lib/libuuid
153
- #
154
- ## display build summary
155
- #set +x
156
- #echo -e "\nRemaining suspicious security bits:"
157
- #(
158
- # pruned_find ! -user root
159
- # pruned_find -perm /u+s
160
- # pruned_find -perm /g+s
161
- # pruned_find -perm /+t
162
- #) | sed -u "s/^/ /"
163
-
164
- echo -e "\nInstalled versions:"
165
- (
166
- git --version
167
- python -V
168
- ) 2>&1 | sed -u "s/^/ /"
169
-
170
- echo -e "\nSuccess!"
171
- exit 0