apollon 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/.gemspec +35 -0
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +87 -0
- data/LICENSE +21 -0
- data/README.md +100 -0
- data/Rakefile +20 -0
- data/TODO.md +22 -0
- data/Vagrantfile +92 -0
- data/WHATS_IN.md +55 -0
- data/artifacts/.gitkeepme +1 -0
- data/clean.sh +3 -0
- data/lib/apollon/app/app.rb +1 -0
- data/lib/apollon/core/core.rb +8 -0
- data/lib/apollon/helpers/helpers.rb +28 -0
- data/lib/{lib.rb → apollon/lib.rb} +0 -0
- data/lib/apollon/provisions/provisions.rb +8 -0
- data/lib/apollon/provisions/puppet.rb +1 -0
- data/lib/apollon/version.rb +5 -0
- data/lib/apollon.rb +1 -0
- data/packs/README.md +15 -0
- data/packs/core/README.md +3 -0
- data/packs/core/pack-digitalocean.sh +8 -0
- data/packs/core/pack-vagrant.sh +16 -0
- data/packs/core/packer.json +82 -0
- data/packs/core/provision.sh +9 -0
- data/packs/core/scripts/provision-digitalocean.sh +11 -0
- data/packs/examples/aws/pack.sh +6 -0
- data/packs/examples/aws/packer.json +18 -0
- data/packs/examples/digitalocean/data/images.json +344 -0
- data/packs/examples/digitalocean/data/regions.json +22 -0
- data/packs/examples/digitalocean/data/sizes.json +92 -0
- data/packs/examples/digitalocean/pack.sh +4 -0
- data/packs/examples/digitalocean/packer.json +18 -0
- data/packs/examples/virtualbox-iso/pack.sh +15 -0
- data/packs/examples/virtualbox-iso/packer.json +49 -0
- data/packs/examples/virtualbox-iso/provision.sh +3 -0
- data/puppet/environment.conf +7 -0
- data/puppet/manifests/all.pp +10 -0
- data/puppet/manifests/core.pp +3 -0
- data/puppet/manifests/db.pp +3 -0
- data/puppet/manifests/default.pp +3 -0
- data/puppet/manifests/dev.pp +3 -0
- data/puppet/manifests/ops.pp +3 -0
- data/puppet/manifests/sites/apollocrawler.com.pp +5 -0
- data/puppet/manifests/web.pp +5 -0
- data/puppet/modules/apache2/files/apache2.conf +221 -0
- data/puppet/modules/apache2/files/envvars +47 -0
- data/puppet/modules/apache2/files/magic +935 -0
- data/puppet/modules/apache2/files/ports.conf +15 -0
- data/puppet/modules/apache2/manifests/init.pp +46 -0
- data/puppet/modules/clang/manifests/init.pp +11 -0
- data/puppet/modules/cmake/manifests/init.pp +11 -0
- data/puppet/modules/core/files/sources.list +62 -0
- data/puppet/modules/core/manifests/init.pp +63 -0
- data/puppet/modules/couchdb/files/local.ini +98 -0
- data/puppet/modules/couchdb/manifests/init.pp +25 -0
- data/puppet/modules/db/manifests/init.pp +13 -0
- data/puppet/modules/dev/manifests/init.pp +20 -0
- data/puppet/modules/elasticsearch/files/elasticsearch.yml +377 -0
- data/puppet/modules/elasticsearch/files/logging.yml +56 -0
- data/puppet/modules/elasticsearch/manifests/init.pp +45 -0
- data/puppet/modules/erlang/manifests/init.pp +11 -0
- data/puppet/modules/ghc/manifests/init.pp +11 -0
- data/puppet/modules/git/manifests/init.pp +11 -0
- data/puppet/modules/golang/manifests/init.pp +11 -0
- data/puppet/modules/htop/manifests/init.pp +11 -0
- data/puppet/modules/java/files/accept-java-license.sh +4 -0
- data/puppet/modules/java/files/install-java7.sh +7 -0
- data/puppet/modules/java/files/install-java8.sh +7 -0
- data/puppet/modules/java/manifests/init.pp +86 -0
- data/puppet/modules/links/manifests/init.pp +11 -0
- data/puppet/modules/llvm/manifests/init.pp +11 -0
- data/puppet/modules/lynx/manifests/init.pp +11 -0
- data/puppet/modules/mc/manifests/init.pp +11 -0
- data/puppet/modules/memcache/files/memcached.conf +47 -0
- data/puppet/modules/memcache/manifests/init.pp +24 -0
- data/puppet/modules/mongodb/files/mongodb.conf +102 -0
- data/puppet/modules/mongodb/manifests/init.pp +24 -0
- data/puppet/modules/mosh/manifests/init.pp +11 -0
- data/puppet/modules/mysql/files/conf.d/mysqld_safe_syslog.cnf +2 -0
- data/puppet/modules/mysql/files/debian.cnf +12 -0
- data/puppet/modules/mysql/files/my.cnf +127 -0
- data/puppet/modules/mysql/manifests/init.pp +45 -0
- data/puppet/modules/nginx/manifests/init.pp +16 -0
- data/puppet/modules/nodejs/manifests/init.pp +41 -0
- data/puppet/modules/octave/manifests/init.pp +11 -0
- data/puppet/modules/ops/manifests/init.pp +12 -0
- data/puppet/modules/php5/manifests/init.pp +11 -0
- data/puppet/modules/postgresql/files/9.3/main/environment +7 -0
- data/puppet/modules/postgresql/files/9.3/main/pg_ctl.conf +5 -0
- data/puppet/modules/postgresql/files/9.3/main/pg_hba.conf +99 -0
- data/puppet/modules/postgresql/files/9.3/main/pg_ident.conf +42 -0
- data/puppet/modules/postgresql/files/9.3/main/postgresql.conf +598 -0
- data/puppet/modules/postgresql/files/9.3/main/start.conf +9 -0
- data/puppet/modules/postgresql/files/create-postgresql-user.sh +4 -0
- data/puppet/modules/postgresql/files/sql/bootstrap.sh +1 -0
- data/puppet/modules/postgresql/files/sql/create-extension-adminpack.sql +1 -0
- data/puppet/modules/postgresql/files/sql/create-extension-postgis.sql +11 -0
- data/puppet/modules/postgresql/manifests/init.pp +145 -0
- data/puppet/modules/python/manifests/init.pp +11 -0
- data/puppet/modules/r/manifests/init.pp +11 -0
- data/puppet/modules/rabbitmq/files/enable-user-management.sh +3 -0
- data/puppet/modules/rabbitmq/manifests/init.pp +36 -0
- data/puppet/modules/redis/files/memcached.conf +47 -0
- data/puppet/modules/redis/manifests/init.pp +19 -0
- data/puppet/modules/ruby/manifests/init.pp +11 -0
- data/puppet/modules/rvm/manifests/init.pp +33 -0
- data/puppet/modules/science/manifests/init.pp +8 -0
- data/puppet/modules/squid/manifests/init.pp +16 -0
- data/puppet/modules/svn/manifests/init.pp +11 -0
- data/puppet/modules/tomcat7/files/tomcat-users.xml +6 -0
- data/puppet/modules/tomcat7/manifests/init.pp +24 -0
- data/puppet/modules/varnish/manifests/init.pp +11 -0
- data/puppet/modules/web/manifests/init.pp +10 -0
- data/puppet/modules/zookeeper/files/conf/configuration.xsl +24 -0
- data/puppet/modules/zookeeper/files/conf/environment +20 -0
- data/puppet/modules/zookeeper/files/conf/log4j.properties +51 -0
- data/puppet/modules/zookeeper/files/conf/zoo.cfg +51 -0
- data/puppet/modules/zookeeper/manifests/init.pp +27 -0
- data/tmp/.gitkeepme +1 -0
- data/vagrant/profiles/default.json +53 -0
- metadata +156 -35
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bade97999dd2e42347ce97c159457533b9a19042
|
|
4
|
+
data.tar.gz: c02d3789acdfca7e208245d1a29acc52f444fcb8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7452280fd78247841fc5424570c538127ab6ea58274949d8f811e644aca3d59d21e137045a156a3fba4475f2ece72bf68f8a4ad78697c22a9cf87d29789d9df5
|
|
7
|
+
data.tar.gz: a82c64b792a4d759a6f1d22c62d2cfd291016ffc39fc9e7c6abb84f278f1bffccd4dca9ea86f8548c501ae41c4143a99bd1562588bfa52894aa3c4e0f93180c5
|
data/.gemspec
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require 'rubygems'
|
|
4
|
+
|
|
5
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
6
|
+
|
|
7
|
+
require 'apollon/version.rb'
|
|
8
|
+
|
|
9
|
+
Gem::Specification.new do |s|
|
|
10
|
+
s.name = 'apollon'
|
|
11
|
+
s.version = Apollon::VERSION
|
|
12
|
+
# s.platform = Gem::Platform::RUBY
|
|
13
|
+
s.summary = 'Apollo Fat Box'
|
|
14
|
+
s.description = 'CLI for Apollo Fat Box'
|
|
15
|
+
s.authors = [
|
|
16
|
+
'Tomas Korcak'
|
|
17
|
+
]
|
|
18
|
+
s.email = 'korczis@gmail.com'
|
|
19
|
+
|
|
20
|
+
s.homepage = 'https://github.com/korczis/apollon'
|
|
21
|
+
s.license = 'MIT'
|
|
22
|
+
s.require_paths = ['lib']
|
|
23
|
+
|
|
24
|
+
s.files = `git ls-files`.split("\n")
|
|
25
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
|
26
|
+
|
|
27
|
+
s.add_dependency 'aws-sdk-core', '~> 2.0.0.rc7'
|
|
28
|
+
s.add_dependency 'digitalocean', '~> 1.1', '>= 1.1.0'
|
|
29
|
+
s.add_dependency 'json_pure', '~> 1.8', '>= 1.8.1'
|
|
30
|
+
s.add_dependency 'librarian-puppet', '~> 1.1', '>= 1.1.2'
|
|
31
|
+
s.add_dependency 'multi_json', '~> 1.10', '>= 1.10.1'
|
|
32
|
+
s.add_dependency 'prettyprint', '~> 0.0', '>= 0.0.1'
|
|
33
|
+
s.add_dependency 'puppet', '~> 3.6', '>= 3.6.2'
|
|
34
|
+
s.add_dependency 'rake', '~> 10.3', '>= 10.3.2'
|
|
35
|
+
end
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
apollon (0.0.2)
|
|
5
|
+
aws-sdk-core (~> 2.0.0.rc7)
|
|
6
|
+
digitalocean (~> 1.1, >= 1.1.0)
|
|
7
|
+
json_pure (~> 1.8, >= 1.8.1)
|
|
8
|
+
librarian-puppet (~> 1.1, >= 1.1.2)
|
|
9
|
+
multi_json (~> 1.10, >= 1.10.1)
|
|
10
|
+
prettyprint (~> 0.0, >= 0.0.1)
|
|
11
|
+
puppet (~> 3.6, >= 3.6.2)
|
|
12
|
+
rake (~> 10.3, >= 10.3.2)
|
|
13
|
+
|
|
14
|
+
GEM
|
|
15
|
+
remote: https://rubygems.org/
|
|
16
|
+
specs:
|
|
17
|
+
CFPropertyList (2.2.8)
|
|
18
|
+
activemodel (4.1.2)
|
|
19
|
+
activesupport (= 4.1.2)
|
|
20
|
+
builder (~> 3.1)
|
|
21
|
+
activesupport (4.1.2)
|
|
22
|
+
i18n (~> 0.6, >= 0.6.9)
|
|
23
|
+
json (~> 1.7, >= 1.7.7)
|
|
24
|
+
minitest (~> 5.1)
|
|
25
|
+
thread_safe (~> 0.1)
|
|
26
|
+
tzinfo (~> 1.1)
|
|
27
|
+
aws-sdk-core (2.0.0.rc9)
|
|
28
|
+
builder (~> 3.0)
|
|
29
|
+
jamespath
|
|
30
|
+
multi_json (~> 1.0)
|
|
31
|
+
multi_xml (~> 0.5)
|
|
32
|
+
builder (3.2.2)
|
|
33
|
+
digitalocean (1.1.0)
|
|
34
|
+
faraday (~> 0.8.9)
|
|
35
|
+
faraday_middleware (~> 0.9.0)
|
|
36
|
+
recursive-open-struct (~> 0.4.5)
|
|
37
|
+
facter (2.1.0)
|
|
38
|
+
CFPropertyList (~> 2.2.6)
|
|
39
|
+
faraday (0.8.9)
|
|
40
|
+
multipart-post (~> 1.2.0)
|
|
41
|
+
faraday_middleware (0.9.1)
|
|
42
|
+
faraday (>= 0.7.4, < 0.10)
|
|
43
|
+
her (0.7.2)
|
|
44
|
+
activemodel (>= 3.0.0, < 4.2)
|
|
45
|
+
activesupport (>= 3.0.0, < 4.2)
|
|
46
|
+
faraday (>= 0.8, < 1.0)
|
|
47
|
+
multi_json (~> 1.7)
|
|
48
|
+
hiera (1.3.4)
|
|
49
|
+
json_pure
|
|
50
|
+
highline (1.6.21)
|
|
51
|
+
i18n (0.6.9)
|
|
52
|
+
jamespath (0.5.0)
|
|
53
|
+
json (1.8.1)
|
|
54
|
+
json_pure (1.8.1)
|
|
55
|
+
librarian (0.1.2)
|
|
56
|
+
highline
|
|
57
|
+
thor (~> 0.15)
|
|
58
|
+
librarian-puppet (1.1.2)
|
|
59
|
+
json
|
|
60
|
+
librarian (>= 0.1.2)
|
|
61
|
+
puppet_forge
|
|
62
|
+
minitest (5.3.5)
|
|
63
|
+
multi_json (1.10.1)
|
|
64
|
+
multi_xml (0.5.5)
|
|
65
|
+
multipart-post (1.2.0)
|
|
66
|
+
prettyprint (0.0.1)
|
|
67
|
+
thor
|
|
68
|
+
puppet (3.6.2)
|
|
69
|
+
facter (> 1.6, < 3)
|
|
70
|
+
hiera (~> 1.0)
|
|
71
|
+
json_pure
|
|
72
|
+
rgen (~> 0.6.5)
|
|
73
|
+
puppet_forge (1.0.3)
|
|
74
|
+
her (~> 0.6)
|
|
75
|
+
rake (10.3.2)
|
|
76
|
+
recursive-open-struct (0.4.5)
|
|
77
|
+
rgen (0.6.6)
|
|
78
|
+
thor (0.19.1)
|
|
79
|
+
thread_safe (0.3.4)
|
|
80
|
+
tzinfo (1.2.1)
|
|
81
|
+
thread_safe (~> 0.1)
|
|
82
|
+
|
|
83
|
+
PLATFORMS
|
|
84
|
+
ruby
|
|
85
|
+
|
|
86
|
+
DEPENDENCIES
|
|
87
|
+
apollon!
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014 Tomas Korcak
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# apollo-fat-box
|
|
2
|
+
|
|
3
|
+
Vagrant box containing lot of tools and libs for data science
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
[](https://codeclimate.com/github/korczis/apollo-fat-box)
|
|
8
|
+
|
|
9
|
+
## About
|
|
10
|
+
|
|
11
|
+
What is this heavy-weight box for? For super-quick prototyping.
|
|
12
|
+
|
|
13
|
+
Yes. You know what.
|
|
14
|
+
|
|
15
|
+
1. You got an idea. You want to immediately start working on it.
|
|
16
|
+
2. You realize you need to setup development environment with all the tools and stuff.
|
|
17
|
+
|
|
18
|
+
That is what this fat boy is here for.
|
|
19
|
+
It can be made up and running with [few commands](https://github.com/korczis/apollo-fat-box#getting-started).
|
|
20
|
+
|
|
21
|
+
## What is included
|
|
22
|
+
|
|
23
|
+
Lot of useful stuff, for full list see [WHATS_IN.md](https://github.com/korczis/apollo-fat-box/blob/master/WHATS_IN.md)
|
|
24
|
+
|
|
25
|
+
- Databases - couchdb, memcached, mongodb, postgresql, redis, ...
|
|
26
|
+
- Programming Languages - c, c++, clojure, node.js, ruby/rvm, scala, ...
|
|
27
|
+
- Tools - mocha, ...
|
|
28
|
+
|
|
29
|
+
Again, for full list see [WHATS_IN.md](https://github.com/korczis/apollo-fat-box/blob/master/WHATS_IN.md)
|
|
30
|
+
|
|
31
|
+
## Automagically forwarded services
|
|
32
|
+
|
|
33
|
+
This lists services which are automatically forwarded from running fat box to localhost.
|
|
34
|
+
|
|
35
|
+
That means that you can access them using [http://localhost:{HostPortNumer}](http://localhost:{HostPortNumer}) from table below.
|
|
36
|
+
|
|
37
|
+
| Service | Guest | Host | Username | Password |
|
|
38
|
+
| --------------|:------:|:-------------------------------:|:--------:|:--------:|
|
|
39
|
+
| SSH | 22 | [2222](ssh://localhost:2222) | vagrant | vagrant |
|
|
40
|
+
| Nginx | 80 | [81](http://localhost:81) | n/a | n/a |
|
|
41
|
+
| Zookeeper | 2181 | 2182 | n/a | n/a |
|
|
42
|
+
| PostgreSQL | 5432 | 5433 | vagrant | vagrant |
|
|
43
|
+
| CouchDB | 5984 | [5985](http://localhost:5985) | n/a | n/a |
|
|
44
|
+
| Redis | 6379 | 6380 | n/a | n/a |
|
|
45
|
+
| Tomcat7 | 8080 | [8081](http://localhost:8081) | vagrant | vagrant |
|
|
46
|
+
| ElasticSearch | 9200 | [9201](http://localhost:9201) | n/a | n/a |
|
|
47
|
+
| Memcached | 11211 | 11212 | n/a | n/a |
|
|
48
|
+
| RabbitMQ | 15672 | [15673](http://localhost:15673) | guest | guest |
|
|
49
|
+
| MongoDB | 27017 | [27018](http://localhost:27018) | n/a | n/a |
|
|
50
|
+
| MongoDB Rest | 28017 | [28018](http://localhost:28018) | n/a | n/a |
|
|
51
|
+
|
|
52
|
+
## Getting Started
|
|
53
|
+
|
|
54
|
+
### Prerequisites
|
|
55
|
+
|
|
56
|
+
- [Ruby](https://www.ruby-lang.org/en/)
|
|
57
|
+
- [Ruby gems](https://rubygems.org/pages/download)
|
|
58
|
+
- [Bundler](http://bundler.io/)
|
|
59
|
+
- [Vagrant](https://www.vagrantup.com/downloads.html)
|
|
60
|
+
- [Virtualbox](https://www.virtualbox.org/wiki/Downloads)
|
|
61
|
+
|
|
62
|
+
### Installation
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
# Clone this repo containging Vagrantfile with vagrant settings
|
|
66
|
+
git clone https://github.com/korczis/apollo-fat-box.git
|
|
67
|
+
|
|
68
|
+
# Enter the folder with Vagrantfile, be aware of trailing box folder in path!
|
|
69
|
+
cd apollo-fat-box
|
|
70
|
+
|
|
71
|
+
# Kick off the vagrant up process
|
|
72
|
+
vagrant up
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Example output of succesful launch can be found [here](https://gist.github.com/korczis/4789d566361b095f2e73).
|
|
76
|
+
|
|
77
|
+
## Logging in
|
|
78
|
+
|
|
79
|
+
For loggining-in use vagrant ssh.
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
vagrant ssh
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Destroying instance
|
|
86
|
+
|
|
87
|
+
Destroy instance using vagrant destroy.
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
vagrant destroy
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## TODO
|
|
94
|
+
|
|
95
|
+
For list of TODO stuff see [TODO.md](https://github.com/korczis/apollo-fat-box/blob/master/TODO.md)
|
|
96
|
+
|
|
97
|
+
## Credits
|
|
98
|
+
|
|
99
|
+
- [@pavelbinar](https://github.com/pavelbinar) for QA and not just that.
|
|
100
|
+
- [@thnkr](https://github.com/thnkr/) for ideas, encouragement and other.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
desc 'Get all tasks'
|
|
2
|
+
task :tasklist do
|
|
3
|
+
puts Rake.application.tasks
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
task :usage do
|
|
7
|
+
puts "No rake task specified so listing them ..."
|
|
8
|
+
Rake.application['tasklist'].invoke
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
desc 'Prepare required vagrant dependencies on local machine'
|
|
12
|
+
task :prepare do
|
|
13
|
+
exec 'vagrant plugin install vagrant-digitalocean'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# task :default => [:usage]
|
|
17
|
+
|
|
18
|
+
if $0 == __FILE__
|
|
19
|
+
Rake.application['usage'].invoke
|
|
20
|
+
end
|
data/TODO.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# To Do
|
|
2
|
+
|
|
3
|
+
List of stuff which needs to be be done.
|
|
4
|
+
|
|
5
|
+
## High Priority
|
|
6
|
+
|
|
7
|
+
- Install Apache Tika
|
|
8
|
+
- Install Apache Hadoop + Pig/Hive
|
|
9
|
+
- Install Apache HBase
|
|
10
|
+
- Install Apache Storm as Service (Apache Storm already installed in /opt/apache-storm-0.9.1)
|
|
11
|
+
- Install Kafka
|
|
12
|
+
- Install TitanDB
|
|
13
|
+
- Optionally Install Emscripten
|
|
14
|
+
|
|
15
|
+
## Medium Priority
|
|
16
|
+
|
|
17
|
+
- Change password for all services to vagrant/vagrant
|
|
18
|
+
|
|
19
|
+
## Low Priority
|
|
20
|
+
|
|
21
|
+
- Better message of the day with some stats
|
|
22
|
+
|
data/Vagrantfile
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require 'pp'
|
|
4
|
+
require 'multi_json'
|
|
5
|
+
|
|
6
|
+
require_relative 'lib/lib'
|
|
7
|
+
|
|
8
|
+
# Make sure that the box we need is locally available
|
|
9
|
+
BOX_PATH = File.join(File.dirname(__FILE__), 'artifacts', 'vagrant.box')
|
|
10
|
+
CORE_PACKER_FOLDER = File.join(File.dirname(__FILE__), 'packs', 'core', 'pack.sh')
|
|
11
|
+
|
|
12
|
+
if File.exists?(BOX_PATH) == false
|
|
13
|
+
puts "Locally built vagrant.box does not exists. Creating ..."
|
|
14
|
+
|
|
15
|
+
Dir.chdir(File.dirname(CORE_PACKER_FOLDER)) {
|
|
16
|
+
system CORE_PACKER_FOLDER
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
puts "Done."
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Construct path to default apollo-fat-box profile
|
|
24
|
+
BASE_DIR = File.expand_path(File.dirname(__FILE__))
|
|
25
|
+
|
|
26
|
+
VAGRANT_DIR = File.join(BASE_DIR, 'vagrant')
|
|
27
|
+
|
|
28
|
+
PROFILES_DIR = File.join(VAGRANT_DIR, 'profiles')
|
|
29
|
+
|
|
30
|
+
DEFAULT_PROFILE_FILE = 'default.json'
|
|
31
|
+
|
|
32
|
+
DEFAULT_PROFILE_PATH = File.join(PROFILES_DIR, DEFAULT_PROFILE_FILE)
|
|
33
|
+
|
|
34
|
+
# Load default profile
|
|
35
|
+
nodes = MultiJson::load(File.new(DEFAULT_PROFILE_PATH))
|
|
36
|
+
|
|
37
|
+
# Iterate all configurations form loaded file
|
|
38
|
+
Vagrant.configure("2") do |config|
|
|
39
|
+
nodes.each do |node_def|
|
|
40
|
+
node_name = node_def['hostname'] || 'apollo-fat-node'
|
|
41
|
+
|
|
42
|
+
config.vm.define node_name do |node|
|
|
43
|
+
node.vm.box = node_def['box']
|
|
44
|
+
node.vm.box_url = node_def['box_url']
|
|
45
|
+
|
|
46
|
+
node.vm.boot_timeout = 1800
|
|
47
|
+
|
|
48
|
+
node.ssh.username = 'vagrant'
|
|
49
|
+
node.ssh.password = 'vagrant'
|
|
50
|
+
|
|
51
|
+
ports = node_def['network']['ports'] || []
|
|
52
|
+
ports.each do |port|
|
|
53
|
+
guest_port = port['guest']
|
|
54
|
+
host_port = port['host']
|
|
55
|
+
node.vm.network 'forwarded_port', guest: guest_port, host: host_port, auto_correct: true
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Specify and customize virtualization provider
|
|
59
|
+
node.vm.provider 'virtualbox' do |provider|
|
|
60
|
+
provider.customize ['modifyvm', :id, '--memory', 2048]
|
|
61
|
+
provider.customize ['modifyvm', :id, '--cpuexecutioncap', '85']
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# config.vm.provider :digital_ocean do |provider, override|
|
|
65
|
+
# override.ssh.private_key_path = '~/.ssh/id_rsa'
|
|
66
|
+
# override.vm.box = 'digital_ocean'
|
|
67
|
+
#
|
|
68
|
+
# provider.client_id = ''
|
|
69
|
+
# provider.api_key = ''
|
|
70
|
+
# end
|
|
71
|
+
|
|
72
|
+
provisions = node_def['provisions'] || []
|
|
73
|
+
provisions.each do |provision|
|
|
74
|
+
if provision['name'] === 'puppet'
|
|
75
|
+
node.vm.provision :puppet do |puppet|
|
|
76
|
+
# Path to manifests folder
|
|
77
|
+
val = provision['manifests_path']
|
|
78
|
+
puppet.manifests_path = val if val
|
|
79
|
+
|
|
80
|
+
# Name of manifest used
|
|
81
|
+
val = provision['manifest_file']
|
|
82
|
+
puppet.manifest_file = val if val
|
|
83
|
+
|
|
84
|
+
# Folder where are puppet modules stored
|
|
85
|
+
val = provision['module_path']
|
|
86
|
+
puppet.module_path = val if val
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
data/WHATS_IN.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Installed
|
|
2
|
+
|
|
3
|
+
## Databases
|
|
4
|
+
|
|
5
|
+
- MongoDB - from 10gen dist - http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
|
|
6
|
+
- CouchdDB 1.5.0 - from official source
|
|
7
|
+
- PostgreSQL 9.3 - from official source
|
|
8
|
+
|
|
9
|
+
## Libraries
|
|
10
|
+
|
|
11
|
+
- build-essantials, linux-headers-$(uname -r) - from official source
|
|
12
|
+
- DKMS - from official source
|
|
13
|
+
- libzmq3, libzmq3-dev - from official source
|
|
14
|
+
|
|
15
|
+
## Programming Languages
|
|
16
|
+
|
|
17
|
+
- clang 3.2 - from official source
|
|
18
|
+
- clojure 1.2 - from official source
|
|
19
|
+
- clojure 1.4 - from official source
|
|
20
|
+
- haskell - using official source
|
|
21
|
+
- jdk-7u55-linux-x64 - http://www.enqlu.com/2014/03/how-to-install-oracle-java-78-jdk-and.html
|
|
22
|
+
- jdk-8u5-linux-x64 - http://www.enqlu.com/2014/03/how-to-install-oracle-java-78-jdk-and.html
|
|
23
|
+
- llvm 3.2 - from official source
|
|
24
|
+
- nodejs 0.10.25 - from official source
|
|
25
|
+
- python 3.4 - from official source
|
|
26
|
+
- rvm - from http://rvm.io/
|
|
27
|
+
- ruby 1.9.3 - using rvm
|
|
28
|
+
- scala 2.9.2 - from official source
|
|
29
|
+
|
|
30
|
+
## Servers
|
|
31
|
+
|
|
32
|
+
- Apache Solr 4.8.0 - http://lucene.apache.org/solr/
|
|
33
|
+
- Apache Zookeper 3.4.5 - official source
|
|
34
|
+
- ElasticSearch 1.1.1 - http://www.elasticsearch.org/overview/elkdownloads/
|
|
35
|
+
- Memcached 1.4.14 - from official source
|
|
36
|
+
- Nginx - from official source
|
|
37
|
+
- Redis 2.6.13 - from official source
|
|
38
|
+
- RabbitMQ 3.1.3 - from official source
|
|
39
|
+
- Tomcat7 - from official source
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Tools
|
|
43
|
+
|
|
44
|
+
- htop - from official source
|
|
45
|
+
- leiningen 1.7.1 - from official source
|
|
46
|
+
- links - from official source
|
|
47
|
+
- lynx - from official source
|
|
48
|
+
- maven 3.0.5 - from official source
|
|
49
|
+
- mc 4.8.11 - from official sourc
|
|
50
|
+
- mosh - from official source
|
|
51
|
+
- puppet - from official source
|
|
52
|
+
- puppet-master - from official source
|
|
53
|
+
- Vagrant - from official source
|
|
54
|
+
- VirtualBox Guest Additions - from host
|
|
55
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Keep this file to keep me this folder
|
data/clean.sh
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'net/http'
|
|
2
|
+
require 'json'
|
|
3
|
+
|
|
4
|
+
uri = URI("https://api.github.com/gists")
|
|
5
|
+
|
|
6
|
+
payload = {
|
|
7
|
+
'description' => "My test gist",
|
|
8
|
+
'public' => true,
|
|
9
|
+
'files' => {
|
|
10
|
+
'test.txt' => {
|
|
11
|
+
'content' => "This is a test!\n\nI am making a public gist."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
req = Net::HTTP::Post.new(uri.path)
|
|
17
|
+
req.body = payload.to_json
|
|
18
|
+
|
|
19
|
+
puts req.inspect
|
|
20
|
+
puts req.body.inspect
|
|
21
|
+
|
|
22
|
+
# GitHub API is strictly via HTTPS, so SSL is mandatory
|
|
23
|
+
res = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => true) do |http|
|
|
24
|
+
http.request(req)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
puts res.inspect
|
|
28
|
+
puts res.body.inspect
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# encoding: UTF-8
|
data/lib/apollon.rb
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'apollon/lib'
|
data/packs/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#! /usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
ARCH='i386'
|
|
4
|
+
ISO_CHECKSUM='08d25bf879e353686a974b7b14ae7d81'
|
|
5
|
+
|
|
6
|
+
MACHINE_TYPE=`uname -m`
|
|
7
|
+
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
|
8
|
+
ARCH="amd64"
|
|
9
|
+
ISO_CHECKSUM="01545fa976c8367b4f0d59169ac4866c"
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
packer build \
|
|
13
|
+
-only=virtualbox-iso \
|
|
14
|
+
-var "arch=$ARCH" \
|
|
15
|
+
-var "iso_checksum=$ISO_CHECKSUM" \
|
|
16
|
+
packer.json
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"variables": {
|
|
3
|
+
"arch": "amd64",
|
|
4
|
+
"iso_checksum": "01545fa976c8367b4f0d59169ac4866c",
|
|
5
|
+
|
|
6
|
+
"ssh_username": "vagrant",
|
|
7
|
+
"ssh_password": "vagrant",
|
|
8
|
+
|
|
9
|
+
"digitalocean_id": "",
|
|
10
|
+
"digitalocean_api_key": "",
|
|
11
|
+
|
|
12
|
+
"puppet_manifest_dir": "../../puppet/manifests",
|
|
13
|
+
"puppet_manifest_file": "../../puppet/manifests/web.pp",
|
|
14
|
+
"puppet_module_paths": "../../puppet/modules",
|
|
15
|
+
|
|
16
|
+
"vagrant_output": "../../artifacts/vagrant.box"
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
"builders": [
|
|
20
|
+
{
|
|
21
|
+
"type": "virtualbox-iso",
|
|
22
|
+
"guest_os_type": "Ubuntu_64",
|
|
23
|
+
"iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04-server-{{user `arch`}}.iso",
|
|
24
|
+
"iso_checksum": "{{user `iso_checksum`}}",
|
|
25
|
+
"iso_checksum_type": "md5",
|
|
26
|
+
"ssh_username": "{{user `ssh_username`}}",
|
|
27
|
+
"ssh_password": "{{user `ssh_password`}}",
|
|
28
|
+
"ssh_wait_timeout": "60m",
|
|
29
|
+
"boot_command": [
|
|
30
|
+
"<esc><esc><enter><wait>",
|
|
31
|
+
"/install/vmlinuz noapic preseed/url=http://dl.dropboxusercontent.com/s/6teatka2gwz26n6/preseed.pkg?dl=1&token_hash=AAG33VL21u-_yHt5qTpQHjGvig1l7CLNlMY5PsHlwrfP1Q&expiry=1400794765 <wait>",
|
|
32
|
+
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us <wait>",
|
|
33
|
+
"hostname={{ .Name }} <wait>",
|
|
34
|
+
"fb=false debconf/frontend=noninteractive <wait>",
|
|
35
|
+
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false <wait>",
|
|
36
|
+
"initrd=/install/initrd.gz -- <enter><wait>"
|
|
37
|
+
],
|
|
38
|
+
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "digitalocean",
|
|
42
|
+
"client_id": "{{user `digitalocean_id`}}",
|
|
43
|
+
"api_key": "{{user `digitalocean_api_key`}}",
|
|
44
|
+
"region": "sfo1",
|
|
45
|
+
"image": "ubuntu-14-04-x64",
|
|
46
|
+
"size": "2gb",
|
|
47
|
+
"droplet_name": "apollo-fat-box-{{timestamp}}",
|
|
48
|
+
"snapshot_name": "apollo-fat-box-{{timestamp}}",
|
|
49
|
+
"ssh_port": 22,
|
|
50
|
+
"ssh_timeout": "5m",
|
|
51
|
+
"ssh_username": "root",
|
|
52
|
+
"private_networking": false
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
|
|
56
|
+
"provisioners": [
|
|
57
|
+
{
|
|
58
|
+
"type": "shell",
|
|
59
|
+
"script": "provision.sh"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "shell",
|
|
63
|
+
"script": "scripts/provision-digitalocean.sh",
|
|
64
|
+
"only": ["digitalocean"]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "puppet-masterless",
|
|
68
|
+
"only": ["digitalocean"],
|
|
69
|
+
"manifest_dir": "{{user `puppet_manifest_dir`}}",
|
|
70
|
+
"manifest_file": "{{user `puppet_manifest_file`}}",
|
|
71
|
+
"module_paths": "{{user `puppet_module_paths`}}"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
|
|
75
|
+
"post-processors": [
|
|
76
|
+
{
|
|
77
|
+
"type": "vagrant",
|
|
78
|
+
"only": ["virtualbox-iso"],
|
|
79
|
+
"output": "{{user `vagrant_output`}}"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|