taperole 1.4.0 → 1.4.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: c4a93985dca52ee78fa0fdd9bcc84bea2ce5beb5
4
- data.tar.gz: ba390dc0fce3501d57123da645e0534f23ecb565
3
+ metadata.gz: c0e0bcf6668d7e661536285b40436befdde49a38
4
+ data.tar.gz: 2071e81ab01d82f0dd5e023cccfac59a926df8f5
5
5
  SHA512:
6
- metadata.gz: 61ed8c51dedf91f4dcb90cfb4ca9a5653bbf3a3cdcb4fbef5bf4eef71ed1bea67697e4752f38217b427f97556b73a4483e9cf19478c40613ba8612b4ba6f5c8c
7
- data.tar.gz: eaa98d35c96e2472ca303a43b52b00feb32356a62503c07e0ff58fa486c5f69151adb92c94da5c2487f8fab176d7767d57a0b4362099a00293fcfdac01c39b6c
6
+ metadata.gz: b4b569c4e75be0afcf66558442f566131ea3e3487c7d231fec75c2508030781b5597cf0dd5f314bafb96dfd8b261f04166799cf6c154992f2460f546a4eec5cc
7
+ data.tar.gz: 3197d3051733f7ddcf9e3deca61c8948bb0c25bcfdf23b6a56f94d30f261393de4573235a7ebc3bcea55414a138603240125be63517a56116fa9ac5884354728
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 1.4.1
2
+ * Blocks all ports on your server except 22, 80, 443
3
+ * Installs node via nodesource
4
+
1
5
  ### 1.4.0
2
6
  * Install nvm which installed node
3
7
  * Update postgres role
data/lib/tape/info.rb ADDED
@@ -0,0 +1,9 @@
1
+ module TapeBoxer
2
+ class Version < ExecutionModule
3
+ TapeBoxer.register_module :version, self
4
+
5
+ action :number,
6
+ proc { STDOUT.puts Gem::Specification::load("taperole.gemspec").version },
7
+ "Tape Version Number"
8
+ end
9
+ end
data/requirements.yml CHANGED
@@ -17,3 +17,5 @@
17
17
  - src: jnv.mosh
18
18
 
19
19
  - src: tersmitten.htop
20
+
21
+ - src: nodesource.node
@@ -2,4 +2,4 @@
2
2
  dependencies:
3
3
  - role: geerlingguy.memcached
4
4
  - role: zzet.rbenv
5
- - role: node
5
+ - role: nodesource.node
@@ -8,18 +8,32 @@
8
8
  force=yes
9
9
  tags: [fe_deploy]
10
10
 
11
+ - name: Detect package.json
12
+ command: chdir={{ fe_app_path }}
13
+ bash -lc 'test -e package.json'
14
+ register: npm_result
15
+ ignore_errors: true
16
+ tags: [fe_deploy]
17
+
11
18
  - name: NPM install
12
- when: fe_app_repo is defined
19
+ when: fe_app_repo is defined and npm_result|success
13
20
  remote_user: "{{ deployer_user.name }}"
14
21
  command: chdir={{ fe_app_path }}
15
- bash -lc 'test -e package.json && npm install ; return 0'
22
+ bash -lc 'npm install'
23
+ tags: [fe_deploy]
24
+
25
+ - name: Detect bower.json
26
+ command: chdir={{ fe_app_path }}
27
+ bash -lc 'test -e bower.json'
28
+ register: bower_result
29
+ ignore_errors: true
16
30
  tags: [fe_deploy]
17
31
 
18
32
  - name: Bower install
19
- when: fe_app_repo is defined
33
+ when: fe_app_repo is defined and bower_result|success
20
34
  remote_user: "{{ deployer_user.name }}"
21
- command: chdir={{ fe_app_path }}
22
- bash -lc 'test -e bower.json && bower install'
35
+ command: chdir={{ fe_app_path }}
36
+ bash -lc 'bower install'
23
37
  tags: [fe_deploy]
24
38
 
25
39
  - name: Build FE
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  dependencies:
3
- - role: node
3
+ - role: nodesource.node
@@ -0,0 +1,12 @@
1
+ - name: Install ufw
2
+ apt: name=ufw
3
+
4
+ - name: Allow ssh through firewall
5
+ ufw: proto=tcp port=22 rule=allow
6
+
7
+ - name: Set ufw policy
8
+ ufw: state=enabled direction=incoming policy=deny
9
+
10
+ - name: Allow ports
11
+ ufw: proto=tcp port={{ item }} rule=allow
12
+ with_items: "{{ allowed_ports }}"
data/taperole.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "taperole"
3
- spec.version = '1.4.0'
3
+ spec.version = '1.4.1'
4
4
  spec.authors = ['Jack Forrest', 'Smashing Boxes', 'Brandon Mathis']
5
5
  spec.description = "General purpose server provisioning and application deployment toolkit"
6
6
  spec.email = ['jack@smashingboxes.com', 'brandon@sbox.es']
@@ -8,6 +8,7 @@
8
8
 
9
9
  roles:
10
10
  - general
11
+ - ufw
11
12
  - deployer_user
12
13
  - monit_install
13
14
  - postgres
@@ -8,6 +8,7 @@
8
8
 
9
9
  roles:
10
10
  - general
11
+ - ufw
11
12
  - deployer_user
12
13
  - frontend_install_essentials
13
14
  - monit_install
data/vars/defaults.yml CHANGED
@@ -5,9 +5,6 @@ fe_app_path: "/home/{{ deployer_user.name }}/{{ fe_app_name }}"
5
5
 
6
6
  tapefiles_dir: "./taperole"
7
7
 
8
- rbenv:
9
- ruby_version: 2.3.0
10
-
11
8
  deployer_user:
12
9
  name: deployer
13
10
  groups:
@@ -35,3 +32,8 @@ precompile_assets: true
35
32
  app_url: false
36
33
 
37
34
  fe_build_command: gulp build
35
+ node_version: 4.2
36
+
37
+ allowed_ports:
38
+ - 80
39
+ - 443
@@ -0,0 +1,17 @@
1
+ FROM ubuntu:trusty
2
+ MAINTAINER Mark Wolfe <mark@wolfe.id.au>
3
+
4
+ # http://docs.ansible.com/ansible/intro_installation.html#latest-releases-via-apt-ubuntu
5
+ RUN apt-get install software-properties-common -y --force-yes
6
+ RUN apt-add-repository ppa:ansible/ansible
7
+ RUN apt-get update
8
+ RUN apt-get install ansible -y --force-yes
9
+
10
+
11
+ ENV WORKDIR /build/ansible-nodejs
12
+ ADD . /build/ansible-nodejs
13
+ ADD . /etc/ansible/roles/ansible-nodejs-role
14
+ ADD ./tests/localhosts /etc/ansible/hosts
15
+
16
+ RUN ansible-playbook $WORKDIR/role.yml -c local
17
+ RUN node -v
@@ -0,0 +1,11 @@
1
+ The MIT License (MIT)
2
+ =====================
3
+
4
+ Copyright (c) 2014 NodeSource and Mark Wolfe
5
+ --------------------------------------------
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,44 @@
1
+ # ansible-nodejs-role
2
+
3
+ This is an Ansible role which adds the the NodeSource APT repository and installs Node.js.
4
+
5
+ Currently this role supports the following operating systems and releases.
6
+
7
+ * **Ubuntu 12.04 LTS** (Precise Pangolin)
8
+ * **Ubuntu 14.04 LTS** (Trusty Tahr)
9
+
10
+ ## Usage
11
+
12
+ Install the playbook via Ansible Galaxy:
13
+
14
+ ```text
15
+ $ ansible-galaxy install nodesource.node
16
+ ```
17
+
18
+ Then configure it as follows:
19
+
20
+ ```yaml
21
+ - hosts: servers
22
+ roles:
23
+ - nodesource.node
24
+ ```
25
+
26
+ ## Role Variables
27
+
28
+ - `nodejs_nodesource_pin_priority`: Pin-Priority of the NodeSource repository (default: `500`).
29
+
30
+ ## Testing
31
+
32
+ To test this role using Docker:
33
+
34
+ ```
35
+ $ docker build .
36
+ ```
37
+
38
+ ## Author
39
+
40
+ Mark Wolfe <mark@wolfe.id.au>
41
+
42
+ ## License
43
+
44
+ This code is Copyright (c) 2014 NodeSource and Mark Wolfe and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
@@ -0,0 +1,6 @@
1
+ ---
2
+ # Pin-Priority of NodeSource repository
3
+ nodejs_nodesource_pin_priority: 500
4
+
5
+ # 0.10 or 0.12 or 4.x
6
+ nodejs_version: "4.2"
@@ -0,0 +1,2 @@
1
+ ---
2
+ # handlers file for nodejs
@@ -0,0 +1 @@
1
+ {install_date: 'Thu Jan 28 19:12:58 2016', version: master}
@@ -0,0 +1,18 @@
1
+ ---
2
+ galaxy_info:
3
+ author: Mark Wolfe
4
+ description: Installs the NodeSource Node.js binary packages
5
+ company: NodeSource
6
+ license: MIT
7
+ min_ansible_version: 1.2
8
+ platforms:
9
+ - name: Ubuntu
10
+ versions:
11
+ - precise
12
+ - trusty
13
+ categories:
14
+ - development
15
+ - networking
16
+ - packaging
17
+ - web
18
+ dependencies: []
@@ -0,0 +1,6 @@
1
+ ---
2
+ - name: Test the Node.js role
3
+ hosts: all
4
+ sudo: yes
5
+ roles:
6
+ - role: "ansible-nodejs-role"
@@ -0,0 +1,39 @@
1
+ # Install Node.js using packages crafted by NodeSource
2
+ ---
3
+ - name: Ensure the system can use the HTTPS transport for APT
4
+ stat:
5
+ path: /usr/lib/apt/methods/https
6
+ register: apt_https_transport
7
+
8
+ - name: Install HTTPS transport for APT
9
+ apt:
10
+ pkg: apt-transport-https
11
+ state: installed
12
+ when: not apt_https_transport.stat.exists
13
+
14
+ - name: Import the NodeSource GPG key into apt
15
+ apt_key:
16
+ url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
17
+ state: present
18
+
19
+ - name: Add NodeSource deb repository
20
+ apt_repository:
21
+ repo: 'deb https://deb.nodesource.com/node_{{ debian_repo_version }} {{ ansible_distribution_release }} main'
22
+ state: present
23
+
24
+ - name: Add NodeSource deb-src repository
25
+ apt_repository:
26
+ repo: 'deb-src https://deb.nodesource.com/node_{{ debian_repo_version }} {{ ansible_distribution_release }} main'
27
+ state: present
28
+
29
+ - name: Add NodeSource repository preferences
30
+ template:
31
+ src: etc/apt/preferences.d/deb_nodesource_com_node.pref.2
32
+ dest: /etc/apt/preferences.d/deb_nodesource_com_node.pref
33
+
34
+ - name: Install Node.js
35
+ apt:
36
+ pkg:
37
+ - nodejs={{ nodejs_version }}*
38
+ state: installed
39
+ update_cache: yes
@@ -0,0 +1,5 @@
1
+ # {{ ansible_managed }}
2
+
3
+ Package: *
4
+ Pin: release o=Node Source
5
+ Pin-Priority: {{ nodejs_nodesource_pin_priority }}
@@ -0,0 +1,2 @@
1
+ [local]
2
+ localhost
@@ -0,0 +1,3 @@
1
+ ---
2
+ # vars file for nodejs
3
+ debian_repo_version: "{{ nodejs_version if '4' not in nodejs_version else '4.x' }}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taperole
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Forrest
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-01-20 00:00:00.000000000 Z
13
+ date: 2016-01-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: slack-notifier
@@ -48,6 +48,7 @@ files:
48
48
  - id_rsa_sb_basebox
49
49
  - lib/tape.rb
50
50
  - lib/tape/ansible_runner.rb
51
+ - lib/tape/info.rb
51
52
  - lib/tape/installer.rb
52
53
  - lib/tape/notifiers/slack.rb
53
54
  - lib/tape/qemu_provisioner.rb
@@ -86,8 +87,6 @@ files:
86
87
  - roles/nginx/tasks/main.yml
87
88
  - roles/nginx/templates/nginx_monit.j2
88
89
  - roles/nginx/templates/nginx_unicorn.j2
89
- - roles/node/tasks/main.yml
90
- - roles/node/templates/nvm.sh
91
90
  - roles/postgres/meta/main.yml
92
91
  - roles/redis/tasks/main.yml
93
92
  - roles/redis/templates/redis.j2
@@ -95,6 +94,7 @@ files:
95
94
  - roles/sidekiq/meta/main.yml
96
95
  - roles/sidekiq/tasks/main.yml
97
96
  - roles/sidekiq/templates/sidekiq.j2
97
+ - roles/ufw/tasks/main.yml
98
98
  - roles/unicorn_activate/defaults/main.yml
99
99
  - roles/unicorn_activate/tasks/main.yml
100
100
  - roles/unicorn_install/tasks/main.yml
@@ -198,6 +198,18 @@ files:
198
198
  - vendor/lxhunter.apt/test.yml
199
199
  - vendor/lxhunter.apt/test/integration/default/bats/simple.bats
200
200
  - vendor/lxhunter.apt/test/integration/default/default.yml
201
+ - vendor/nodesource.node/Dockerfile
202
+ - vendor/nodesource.node/LICENSE.md
203
+ - vendor/nodesource.node/README.md
204
+ - vendor/nodesource.node/defaults/main.yml
205
+ - vendor/nodesource.node/handlers/main.yml
206
+ - vendor/nodesource.node/meta/.galaxy_install_info
207
+ - vendor/nodesource.node/meta/main.yml
208
+ - vendor/nodesource.node/role.yml
209
+ - vendor/nodesource.node/tasks/main.yml
210
+ - vendor/nodesource.node/templates/etc/apt/preferences.d/deb_nodesource_com_node.pref.2
211
+ - vendor/nodesource.node/tests/localhosts
212
+ - vendor/nodesource.node/vars/main.yml
201
213
  - vendor/tersmitten.htop/.gitignore
202
214
  - vendor/tersmitten.htop/.travis.yml
203
215
  - vendor/tersmitten.htop/LICENSE.txt
@@ -1,35 +0,0 @@
1
- ---
2
- - name: Install dependencies
3
- sudo: yes
4
- apt: pkg={{ item }} update_cache=yes cache_valid_time=3600
5
- with_items:
6
- - git
7
- - curl
8
- - build-essential
9
- - libssl-dev
10
-
11
- - name: Detect nvm
12
- command: bash -lc "nvm --version"
13
- register: nvm_version
14
- ignore_errors: yes
15
-
16
- - name: Clone NVM
17
- git: repo=https://github.com/creationix/nvm.git dest=/opt/nvm
18
- when: nvm_version|failed
19
-
20
- - name: Create node dir for all users
21
- file:
22
- dest=/usr/local/node
23
- state=directory
24
-
25
- - name: Enable nvm for all users
26
- template: src=nvm.sh dest=/etc/profile.d/nvm.sh mode=755
27
-
28
- - name: Detect node
29
- command: bash -lc "node -v"
30
- register: node_version
31
- ignore_errors: yes
32
-
33
- - name: Install node 4.2 LTS and make it default node
34
- command: bash -lc "nvm install 4.2 && nvm alias default 4.2"
35
- when: node_version|failed
@@ -1,5 +0,0 @@
1
- export NVM_DIR=/usr/local/nvm
2
- source /opt/nvm/nvm.sh
3
-
4
- export NPM_CONFIG_PREFIX=/usr/local/node
5
- export PATH="/usr/local/node/bin:$PATH"