gearship 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4795e4313ba05acb565dc24a6f5615733325301
4
- data.tar.gz: 330df1aa2aa2c4330bdc6543f81f5198948ef755
3
+ metadata.gz: e57848dadb8268f2179fa5f48c0c5d94a120e017
4
+ data.tar.gz: 8586af9d21e36185f135b5df03078c0161081a90
5
5
  SHA512:
6
- metadata.gz: 6a56cbebcf578e116ff33b31c9c8ce64dfd598949ce06f9066521639d6d01ba3adb708588430850af1b813b22708edc48db6d520485821bb5fe3acf73f38511d
7
- data.tar.gz: 2f3b3f76b8cc6de3a5655d491bf364fd2e2004950a7295bb73467f8a0c37684e8e044a516f26860b8e0b505e45d99c063920eb2d7b3b4b99dc588e73f38ea674
6
+ metadata.gz: cd3731134324459501740615317f9dfe1f409e4f72278d367d89d420dd270e1f99b4b7afe05060f269c031788ad58f3dd88afd322bfdecf2706e092a39b4ce76
7
+ data.tar.gz: d983b7d23c1210d4fc53fd9b7e7a64d984c30e666b9d040bff1b79e6ccf6634da5ef983ebae095190b710a5a67cf2345522da4c5d99ba184b96c785295cf9480
data/gearship.gemspec CHANGED
@@ -2,20 +2,21 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'gearship'
5
- spec.version = '0.2.0'
5
+ spec.version = '0.2.1'
6
6
  spec.authors = ['Leonas']
7
7
  spec.email = ['leonas@leonas.io']
8
8
  spec.homepage = 'http://github.com/leonas/gearship'
9
9
  spec.summary = %q{Deploy dockerized projects to virtual machines.}
10
10
  spec.description = %q{Quickly set up a docker host and deploy your app with ease.}
11
11
  spec.license = 'MIT'
12
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.0")
12
13
 
13
14
  spec.files = `git ls-files`.split($/)
14
15
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
17
  spec.require_paths = ['lib']
17
18
 
18
- spec.add_runtime_dependency 'thor'
19
- spec.add_runtime_dependency 'rainbow'
20
- spec.add_runtime_dependency 'net-ssh'
19
+ spec.add_runtime_dependency 'thor', '~> 0.19'
20
+ spec.add_runtime_dependency 'rainbow', '~> 2.2'
21
+ spec.add_runtime_dependency 'net-ssh', '~> 4'
21
22
  end
data/lib/gearship/cli.rb CHANGED
@@ -41,16 +41,16 @@ module Gearship
41
41
 
42
42
  copy_file 'templates/actions/configure_firewall.sh', "#{project}/actions/configure_firewall.sh"
43
43
  copy_file 'templates/actions/install_basics.sh', "#{project}/actions/install_basics.sh"
44
- copy_file 'templates/actions/install_digitalocean_agent.sh', "#{project}/actions/install_digitalocean_agent.sh"
45
44
  copy_file 'templates/actions/install_docker.sh', "#{project}/actions/install_docker.sh"
46
- copy_file 'templates/actions/start_app.sh', "#{project}/actions/start_app.sh"
45
+ copy_file 'templates/actions/pull_latest_image.sh', "#{project}/actions/pull_latest_image.sh"
46
+ copy_file 'templates/actions/remove_container.sh', "#{project}/actions/remove_container.sh"
47
+ copy_file 'templates/actions/start_container.sh', "#{project}/actions/start_container.sh"
47
48
 
48
- copy_file 'templates/missions/install_app.sh', "#{project}/missions/install_app.sh"
49
+ copy_file 'templates/missions/install_container.sh', "#{project}/missions/install_container.sh"
49
50
  copy_file 'templates/missions/setup_host.sh', "#{project}/missions/setup_host.sh"
50
- copy_file 'templates/missions/update_app.sh', "#{project}/missions/update_app.sh"
51
+ copy_file 'templates/missions/update_container.sh', "#{project}/missions/update_container.sh"
51
52
 
52
53
  copy_file 'templates/cargo/sample.conf', "#{project}/cargo/sample.conf"
53
- copy_file 'templates/notes/sample.md', "#{project}/notes/sample.md"
54
54
  end
55
55
 
56
56
  def do_go(*args)
@@ -3,17 +3,7 @@ if gearship.install "ufw"; then
3
3
  apt-get -y install ufw
4
4
  fi
5
5
 
6
- # configure ufw
7
- if ufw status | grep -q 'Status: active'; then
8
- echo "ufw already configured, skipping."
9
- else
10
-
11
- # make sure ssh connection is not dropped
12
- ufw allow ssh
13
-
14
- # enable firewall
15
- ufw --force enable
16
- ufw allow ssh
17
- ufw allow http
18
- ufw allow https
19
- fi
6
+ ufw --force enable
7
+ ufw allow ssh
8
+ ufw allow http
9
+ ufw allow https
@@ -4,3 +4,6 @@ gearship.mute "apt-get -y upgrade"
4
4
 
5
5
  # install most important packages
6
6
  apt-get -y install git ntp curl
7
+
8
+ # Server performance monitoring for digitalocean
9
+ curl -sSL https://agent.digitalocean.com/install.sh | sh
@@ -0,0 +1,2 @@
1
+ docker login -u="<%= @attributes.docker_username %>" -p="<%= @attributes.docker_password %>"
2
+ docker pull <%= @attributes.app_repo %>
@@ -1,3 +1,2 @@
1
1
  docker stop <%= @attributes.app_name %>
2
2
  docker rm <%= @attributes.app_name %>
3
- source actions/start_app.sh
@@ -1,5 +1,3 @@
1
- docker login -u="<%= @attributes.docker_username %>" -p="<%= @attributes.docker_password %>"
2
- docker pull <%= @attributes.app_repo %>
3
1
  docker run --name=<%= @attributes.app_name %> \
4
2
  --publish=<%= @attributes.app_port_map %> \
5
3
  --restart=always \
@@ -0,0 +1,2 @@
1
+ source actions/pull_latest_image.sh
2
+ source actions/start_container.sh
@@ -1,7 +1,5 @@
1
1
  #!/bin/bash
2
2
 
3
-
4
-
5
3
  source actions/install_basics.sh
6
4
  source actions/install_docker.sh
7
5
  source actions/configure_firewall.sh
@@ -0,0 +1,3 @@
1
+ source actions/remove_container.sh
2
+ source actions/pull_latest_image.sh
3
+ source actions/start_container.sh
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gearship
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-10 00:00:00.000000000 Z
11
+ date: 2017-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.19'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '0.19'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rainbow
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '2.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '2.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: net-ssh
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '4'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '4'
55
55
  description: Quickly set up a docker host and deploy your app with ease.
56
56
  email:
57
57
  - leonas@leonas.io
@@ -75,16 +75,16 @@ files:
75
75
  - lib/templates/.gitignore
76
76
  - lib/templates/actions/configure_firewall.sh
77
77
  - lib/templates/actions/install_basics.sh
78
- - lib/templates/actions/install_digitalocean_agent.sh
79
78
  - lib/templates/actions/install_docker.sh
80
- - lib/templates/actions/start_app.sh
79
+ - lib/templates/actions/pull_latest_image.sh
80
+ - lib/templates/actions/remove_container.sh
81
+ - lib/templates/actions/start_container.sh
81
82
  - lib/templates/cargo/sample.conf
82
83
  - lib/templates/gearship.sh
83
84
  - lib/templates/gearship.yml
84
- - lib/templates/missions/install_app.sh
85
+ - lib/templates/missions/install_container.sh
85
86
  - lib/templates/missions/setup_host.sh
86
- - lib/templates/missions/update_app.sh
87
- - lib/templates/notes/sample.md
87
+ - lib/templates/missions/update_container.sh
88
88
  homepage: http://github.com/leonas/gearship
89
89
  licenses:
90
90
  - MIT
@@ -97,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
- version: '0'
100
+ version: '2.0'
101
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - ">="
@@ -1 +0,0 @@
1
- curl -sSL https://agent.digitalocean.com/install.sh | sh
@@ -1 +0,0 @@
1
- source actions/start_app.sh
@@ -1,5 +0,0 @@
1
- Notes folder:
2
- - unfinished action and mission scripts here so they don't cause errors when compiling.
3
- - ideas and to do's for what to automate next using gearship
4
-
5
- Feel free to delete this file and/or folder.