taperole 1.3.6 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +11 -12
- data/lib/tape/ansible_runner.rb +1 -1
- data/lib/tape/installer.rb +0 -8
- data/lib/tape.rb +2 -2
- data/requirements.yml +5 -5
- data/roles/backend_install_essentials/meta/main.yml +2 -2
- data/roles/frontend_install_essentials/meta/main.yml +1 -1
- data/roles/frontend_install_essentials/tasks/main.yml +6 -2
- data/roles/node/tasks/main.yml +35 -0
- data/roles/node/templates/nvm.sh +5 -0
- data/taperole.gemspec +1 -1
- data/vars/defaults.yml +3 -2
- data/vendor/ANXS.postgresql/.travis.yml +25 -10
- data/vendor/ANXS.postgresql/README.md +29 -5
- data/vendor/ANXS.postgresql/Vagrantfile +14 -6
- data/vendor/ANXS.postgresql/ansible.cfg +2 -0
- data/vendor/ANXS.postgresql/defaults/main.yml +49 -25
- data/vendor/ANXS.postgresql/handlers/main.yml +1 -1
- data/vendor/ANXS.postgresql/meta/.galaxy_install_info +1 -1
- data/vendor/ANXS.postgresql/meta/main.yml +1 -1
- data/vendor/ANXS.postgresql/tasks/configure.yml +76 -10
- data/vendor/ANXS.postgresql/tasks/databases.yml +21 -11
- data/vendor/ANXS.postgresql/tasks/extensions/contrib.yml +9 -1
- data/vendor/ANXS.postgresql/tasks/install.yml +2 -2
- data/vendor/ANXS.postgresql/tasks/install_yum.yml +36 -0
- data/vendor/ANXS.postgresql/tasks/main.yml +11 -0
- data/vendor/ANXS.postgresql/tasks/users.yml +2 -1
- data/vendor/ANXS.postgresql/templates/HOWTO.postgresql.conf +21 -0
- data/vendor/ANXS.postgresql/templates/etc_systemd_system_postgresql.service.d_custom.conf.j2 +11 -0
- data/vendor/ANXS.postgresql/templates/pg_hba.conf.j2 +4 -0
- data/vendor/ANXS.postgresql/templates/postgresql.conf-9.1.j2 +561 -0
- data/vendor/ANXS.postgresql/templates/postgresql.conf-9.2.j2 +578 -0
- data/vendor/ANXS.postgresql/templates/postgresql.conf-9.3.j2 +4 -0
- data/vendor/ANXS.postgresql/templates/postgresql.conf-9.4.j2 +4 -0
- data/vendor/ANXS.postgresql/templates/postgresql.conf-9.5.j2 +622 -0
- data/vendor/ANXS.postgresql/tests/idempotence_check.sh +28 -0
- data/vendor/ANXS.postgresql/tests/playbook.yml +9 -0
- data/vendor/ANXS.postgresql/{vars/test.yml → tests/vars.yml} +10 -1
- data/vendor/ANXS.postgresql/vagrant-inventory +1 -1
- data/vendor/ANXS.postgresql/vars/Debian.yml +4 -0
- data/vendor/ANXS.postgresql/vars/RedHat.yml +14 -0
- data/vendor/ANXS.postgresql/vars/empty.yml +2 -0
- data/vendor/geerlingguy.memcached/.gitignore +1 -0
- data/vendor/geerlingguy.memcached/.travis.yml +34 -0
- data/vendor/geerlingguy.memcached/README.md +53 -0
- data/vendor/geerlingguy.memcached/defaults/main.yml +9 -0
- data/vendor/geerlingguy.memcached/handlers/main.yml +3 -0
- data/vendor/geerlingguy.memcached/meta/.galaxy_install_info +1 -0
- data/vendor/geerlingguy.memcached/meta/main.yml +24 -0
- data/vendor/geerlingguy.memcached/tasks/main.yml +29 -0
- data/vendor/geerlingguy.memcached/tasks/setup-Debian.yml +6 -0
- data/vendor/geerlingguy.memcached/tasks/setup-RedHat.yml +3 -0
- data/vendor/{bennojoy.memcached/templates/memcached_debian.j2 → geerlingguy.memcached/templates/memcached-Debian.conf.j2} +7 -29
- data/vendor/geerlingguy.memcached/templates/memcached-RedHat.conf.j2 +19 -0
- data/vendor/geerlingguy.memcached/tests/inventory +1 -0
- data/vendor/geerlingguy.memcached/tests/test.yml +5 -0
- data/vendor/geerlingguy.memcached/vars/Debian.yml +3 -0
- data/vendor/geerlingguy.memcached/vars/RedHat.yml +3 -0
- data/vendor/jnv.mosh/meta/.galaxy_install_info +1 -1
- data/vendor/jnv.unattended-upgrades/README.md +8 -2
- data/vendor/jnv.unattended-upgrades/meta/.galaxy_install_info +1 -1
- data/vendor/jnv.unattended-upgrades/tasks/main.yml +5 -0
- data/vendor/jnv.unattended-upgrades/tasks/reboot.yml +12 -0
- data/vendor/jnv.unattended-upgrades/vars/Debian.yml +1 -1
- data/vendor/lxhunter.apt/meta/.galaxy_install_info +1 -1
- data/vendor/tersmitten.htop/meta/.galaxy_install_info +1 -1
- data/vendor/zzet.rbenv/README.md +10 -10
- data/vendor/zzet.rbenv/defaults/main.yml +9 -9
- data/vendor/zzet.rbenv/meta/.galaxy_install_info +1 -1
- data/vendor/zzet.rbenv/tasks/main.yml +41 -10
- metadata +35 -46
- data/vendor/ANXS.postgresql/test.yml +0 -8
- data/vendor/bennojoy.memcached/README.md +0 -49
- data/vendor/bennojoy.memcached/defaults/main.yml +0 -8
- data/vendor/bennojoy.memcached/handlers/main.yml +0 -3
- data/vendor/bennojoy.memcached/meta/.galaxy_install_info +0 -1
- data/vendor/bennojoy.memcached/meta/main.yml +0 -26
- data/vendor/bennojoy.memcached/tasks/main.yml +0 -30
- data/vendor/bennojoy.memcached/templates/memcached_redhat.j2 +0 -5
- data/vendor/bennojoy.memcached/vars/main.yml +0 -14
- data/vendor/nodesource.node/Dockerfile +0 -16
- data/vendor/nodesource.node/LICENSE.md +0 -11
- data/vendor/nodesource.node/README.md +0 -46
- data/vendor/nodesource.node/defaults/main.yml +0 -3
- data/vendor/nodesource.node/handlers/main.yml +0 -2
- data/vendor/nodesource.node/meta/.galaxy_install_info +0 -1
- data/vendor/nodesource.node/meta/main.yml +0 -18
- data/vendor/nodesource.node/role.yml +0 -6
- data/vendor/nodesource.node/tasks/main.yml +0 -26
- data/vendor/nodesource.node/templates/etc/apt/preferences.d/deb_nodesource_com_node.pref.2 +0 -5
- data/vendor/nodesource.node/tests/localhosts +0 -2
- data/vendor/nodesource.node/vars/main.yml +0 -2
- data/vendor/williamyeh.nodejs/.gitignore +0 -1
- data/vendor/williamyeh.nodejs/LICENSE +0 -22
- data/vendor/williamyeh.nodejs/README.md +0 -107
- data/vendor/williamyeh.nodejs/Vagrantfile +0 -33
- data/vendor/williamyeh.nodejs/circle.yml +0 -32
- data/vendor/williamyeh.nodejs/defaults/main.yml +0 -17
- data/vendor/williamyeh.nodejs/files/nodesource.gpg.key +0 -52
- data/vendor/williamyeh.nodejs/meta/.galaxy_install_info +0 -1
- data/vendor/williamyeh.nodejs/meta/main.yml +0 -27
- data/vendor/williamyeh.nodejs/tasks/main.yml +0 -19
- data/vendor/williamyeh.nodejs/tasks/set-role-variables.yml +0 -15
- data/vendor/williamyeh.nodejs/tasks/use-apt.yml +0 -88
- data/vendor/williamyeh.nodejs/tasks/use-yum.yml +0 -34
- data/vendor/williamyeh.nodejs/test/Dockerfile-centos6 +0 -29
- data/vendor/williamyeh.nodejs/test/Dockerfile-centos7 +0 -29
- data/vendor/williamyeh.nodejs/test/Dockerfile-debian7 +0 -29
- data/vendor/williamyeh.nodejs/test/Dockerfile-debian8 +0 -29
- data/vendor/williamyeh.nodejs/test/Dockerfile-ubuntu12.04 +0 -29
- data/vendor/williamyeh.nodejs/test/Dockerfile-ubuntu14.04 +0 -29
- data/vendor/williamyeh.nodejs/test.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4a93985dca52ee78fa0fdd9bcc84bea2ce5beb5
|
4
|
+
data.tar.gz: ba390dc0fce3501d57123da645e0534f23ecb565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61ed8c51dedf91f4dcb90cfb4ca9a5653bbf3a3cdcb4fbef5bf4eef71ed1bea67697e4752f38217b427f97556b73a4483e9cf19478c40613ba8612b4ba6f5c8c
|
7
|
+
data.tar.gz: eaa98d35c96e2472ca303a43b52b00feb32356a62503c07e0ff58fa486c5f69151adb92c94da5c2487f8fab176d7767d57a0b4362099a00293fcfdac01c39b6c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -18,11 +18,12 @@
|
|
18
18
|
* Run `tape installer install` in project repo
|
19
19
|
* Update your hosts file with the IP address of your server (this can be found in your Droplet). If you go down to "Multistage", you'll see an excellent example of what your hosts file should look like.
|
20
20
|
* Fill in missing values in `tape_vars.yml`. Should look something like this:
|
21
|
-
```
|
22
|
-
app_name: [app name]
|
23
21
|
|
22
|
+
```yaml
|
23
|
+
app_name: [app name]
|
24
24
|
be_app_repo: [git repo]
|
25
25
|
```
|
26
|
+
|
26
27
|
* Copy all developers public keys into a new directory (dev_keys is a good example for the name of that directory).
|
27
28
|
* `$ tape ansible everything`
|
28
29
|
|
@@ -30,11 +31,18 @@ be_app_repo: [git repo]
|
|
30
31
|
|
31
32
|
**NOTE: Upgrading tape on a machine is only supported for patch versions (ie 1.3.0 to 1.3.1). For minor or major versions, it is advised that you stand up a new box, and start from stratch.
|
32
33
|
|
33
|
-
```
|
34
|
+
```bash
|
34
35
|
bundle update taperole
|
35
36
|
tape installer install
|
36
37
|
```
|
37
38
|
|
39
|
+
### Configuration
|
40
|
+
|
41
|
+
All default configurations found in `vars/defaults.yml` can be overridden in your local `taperole/tape_vars.yml` file
|
42
|
+
|
43
|
+
**Default Node Version**: 4.2.x
|
44
|
+
**Default Ruby Version** 2.3.0
|
45
|
+
|
38
46
|
### Custom roles
|
39
47
|
You can add app specific ansible roles to `<app_root>/roles`.
|
40
48
|
|
@@ -63,15 +71,6 @@ Then use the `-l` option to specify the stage/environment
|
|
63
71
|
tape ansible deploy -l staging
|
64
72
|
```
|
65
73
|
|
66
|
-
### Additional Configs
|
67
|
-
#### Setup Server's Ruby Version
|
68
|
-
*taperole/tapevars.yml*
|
69
|
-
|
70
|
-
```
|
71
|
-
rbenv:
|
72
|
-
ruby_version: 2.3.0
|
73
|
-
```
|
74
|
-
|
75
74
|
## Testing
|
76
75
|
### With vagrant
|
77
76
|
|
data/lib/tape/ansible_runner.rb
CHANGED
@@ -41,7 +41,7 @@ class AnsibleRunner < ExecutionModule
|
|
41
41
|
"Checks out app code, installs dependencies and restarts unicorns for "\
|
42
42
|
"both FE and BE code."
|
43
43
|
action :everything,
|
44
|
-
proc { ansible
|
44
|
+
proc { valid_preconfigs ? ansible : puts("Not a Rails or JS app") },
|
45
45
|
"This does it all."
|
46
46
|
|
47
47
|
def initialize(*args)
|
data/lib/tape/installer.rb
CHANGED
@@ -48,14 +48,6 @@ module TapeBoxer
|
|
48
48
|
copy_example 'templates/base/hosts.example', "#{tapefiles_dir}/hosts"
|
49
49
|
end
|
50
50
|
|
51
|
-
def fe_app?
|
52
|
-
!Dir["#{local_dir}/gulpfile.*"].empty?
|
53
|
-
end
|
54
|
-
|
55
|
-
def rails_app?
|
56
|
-
!Dir["#{local_dir}/config.ru"].empty?
|
57
|
-
end
|
58
|
-
|
59
51
|
def copy_static_app_examples
|
60
52
|
copy_example(
|
61
53
|
'templates/static_html/omnibox.example.yml',
|
data/lib/tape.rb
CHANGED
@@ -23,6 +23,7 @@ module TapeBoxer
|
|
23
23
|
attr_reader :opts
|
24
24
|
def initialize(opts)
|
25
25
|
@opts = opts || {}
|
26
|
+
@observers = []
|
26
27
|
end
|
27
28
|
|
28
29
|
def self.actions
|
@@ -44,7 +45,7 @@ module TapeBoxer
|
|
44
45
|
end
|
45
46
|
|
46
47
|
def fe_app?
|
47
|
-
!Dir["#{local_dir}/
|
48
|
+
!Dir["#{local_dir}/package.json"].empty?
|
48
49
|
end
|
49
50
|
|
50
51
|
def rails_app?
|
@@ -96,7 +97,6 @@ module TapeBoxer
|
|
96
97
|
end
|
97
98
|
|
98
99
|
def add_observer(observer)
|
99
|
-
@observers = [] unless @observers
|
100
100
|
@observers.push(observer)
|
101
101
|
end
|
102
102
|
|
data/requirements.yml
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
---
|
2
2
|
- src: jnv.unattended-upgrades
|
3
|
-
version: v1.
|
3
|
+
version: v1.1.1
|
4
4
|
|
5
5
|
- src: zzet.rbenv
|
6
|
-
version: 2.1.
|
6
|
+
version: 2.1.7
|
7
7
|
|
8
8
|
- src: lxhunter.apt
|
9
9
|
|
10
10
|
- src: https://github.com/ANXS/postgresql
|
11
11
|
name: ANXS.postgresql
|
12
|
+
version: v1.3.0
|
12
13
|
|
13
|
-
- src:
|
14
|
-
|
15
|
-
- src: bennojoy.memcached
|
14
|
+
- src: geerlingguy.memcached
|
15
|
+
version: 1.0.4
|
16
16
|
|
17
17
|
- src: jnv.mosh
|
18
18
|
|
@@ -1,7 +1,11 @@
|
|
1
|
+
- name: Register npm executable
|
2
|
+
command: bash -lc "which npm"
|
3
|
+
register: npm_path
|
4
|
+
|
1
5
|
- name: Ensure gulp is installed
|
2
|
-
npm: name=gulp state=present global=yes
|
6
|
+
npm: name=gulp state=present global=yes executable="{{npm_path.stdout}}"
|
3
7
|
when: fe_app_repo is defined
|
4
8
|
|
5
9
|
- name: Ensure bower is installed
|
6
|
-
npm: name=bower state=present global=yes
|
10
|
+
npm: name=bower state=present global=yes executable="{{npm_path.stdout}}"
|
7
11
|
when: fe_app_repo is defined
|
@@ -0,0 +1,35 @@
|
|
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
|
data/taperole.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "taperole"
|
3
|
-
spec.version = '1.
|
3
|
+
spec.version = '1.4.0'
|
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']
|
data/vars/defaults.yml
CHANGED
@@ -5,6 +5,9 @@ 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
|
+
|
8
11
|
deployer_user:
|
9
12
|
name: deployer
|
10
13
|
groups:
|
@@ -31,6 +34,4 @@ precompile_assets: true
|
|
31
34
|
# Sets server_name in the nginx sites-enabled file
|
32
35
|
app_url: false
|
33
36
|
|
34
|
-
nodejs_version: 4.2
|
35
|
-
|
36
37
|
fe_build_command: gulp build
|
@@ -1,23 +1,38 @@
|
|
1
1
|
---
|
2
|
+
|
2
3
|
language: python
|
3
4
|
python: "2.7"
|
4
|
-
|
5
5
|
env:
|
6
|
-
-
|
7
|
-
-
|
6
|
+
- ROLE_OPTIONS="postgresql_version=9.1 postgresql_shared_buffers=32MB"
|
7
|
+
- ROLE_OPTIONS="postgresql_version=9.2 postgresql_shared_buffers=32MB"
|
8
|
+
- ROLE_OPTIONS="postgresql_version=9.3 postgresql_shared_buffers=32MB"
|
9
|
+
- ROLE_OPTIONS="postgresql_version=9.4 postgresql_shared_buffers=32MB"
|
10
|
+
- ROLE_OPTIONS="postgresql_version=9.5 postgresql_shared_buffers=32MB"
|
8
11
|
|
9
12
|
before_install:
|
13
|
+
# Remove the PostgreSQL installed by Travis
|
14
|
+
- sudo apt-get purge pgdg-keyring '^postgresql.*' -y
|
15
|
+
- sudo apt-get autoremove
|
16
|
+
- sudo rm -rf /etc/postgresql
|
17
|
+
- sudo rm -rf /var/lib/postgresql
|
18
|
+
- sudo rm /etc/apt/sources.list.d/pgdg-source.list
|
19
|
+
# Install some dependencies
|
10
20
|
- sudo apt-get update -qq
|
11
21
|
- sudo apt-get install -qq python-apt python-pycurl locales
|
12
22
|
- echo 'en_US.UTF-8 UTF-8' | sudo tee /var/lib/locales/supported.d/local
|
23
|
+
|
13
24
|
install:
|
14
25
|
- pip install ansible==1.8.4
|
26
|
+
|
15
27
|
script:
|
16
28
|
- echo localhost > inventory
|
17
|
-
|
18
|
-
|
19
|
-
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
29
|
+
|
30
|
+
# Syntax check
|
31
|
+
- ansible-playbook -i inventory tests/playbook.yml --syntax-check
|
32
|
+
|
33
|
+
# Play test
|
34
|
+
- ansible-playbook -i inventory tests/playbook.yml --connection=local --sudo -e "$ROLE_OPTIONS"
|
35
|
+
|
36
|
+
# Idempotence test
|
37
|
+
- ansible-playbook -i inventory tests/playbook.yml --connection=local --sudo -e "$ROLE_OPTIONS" > idempotence_out
|
38
|
+
- ./tests/idempotence_check.sh idempotence_out
|
@@ -1,10 +1,20 @@
|
|
1
|
-
## ANXS - PostgreSQL [![Build Status](https://travis-ci.org/ANXS/postgresql.png)](https://travis-ci.org/ANXS/postgresql)
|
1
|
+
## ANXS - PostgreSQL [![Build Status](https://travis-ci.org/ANXS/postgresql.png?branch=master)](https://travis-ci.org/ANXS/postgresql)
|
2
2
|
|
3
3
|
Ansible role which installs and configures PostgreSQL, extensions, databases and users.
|
4
4
|
|
5
5
|
|
6
|
-
####
|
7
|
-
|
6
|
+
#### Installation
|
7
|
+
|
8
|
+
This has been tested on Ansible 1.8.4 and higher.
|
9
|
+
|
10
|
+
To install:
|
11
|
+
|
12
|
+
```
|
13
|
+
ansible-galaxy install ANXS.postgresql
|
14
|
+
```
|
15
|
+
|
16
|
+
#### Dependencies
|
17
|
+
|
8
18
|
- ANXS.monit ([Galaxy](https://galaxy.ansible.com/list#/roles/502)/[GH](https://github.com/ANXS/monit)) if you want monit protection (in that case, you should set `monit_protection: true`)
|
9
19
|
|
10
20
|
|
@@ -23,12 +33,21 @@ postgresql_cluster_name: "main"
|
|
23
33
|
postgresql_cluster_reset: false
|
24
34
|
|
25
35
|
# List of databases to be created (optional)
|
36
|
+
# Note: for more flexibility with extensions use the postgresql_database_extensions setting.
|
26
37
|
postgresql_databases:
|
27
38
|
- name: foobar
|
39
|
+
owner: baz # optional; specify the owner of the database
|
28
40
|
hstore: yes # flag to install the hstore extension on this database (yes/no)
|
29
41
|
uuid_ossp: yes # flag to install the uuid-ossp extension on this database (yes/no)
|
30
42
|
citext: yes # flag to install the citext extension on this database (yes/no)
|
31
43
|
|
44
|
+
# List of database extensions to be created (optional)
|
45
|
+
postgresql_database_extensions:
|
46
|
+
- db: foobar
|
47
|
+
extensions:
|
48
|
+
- hstore
|
49
|
+
- citext
|
50
|
+
|
32
51
|
# List of users to be created (optional)
|
33
52
|
postgresql_users:
|
34
53
|
- name: baz
|
@@ -47,14 +66,19 @@ There's a lot more knobs and bolts to set, which you can find in the defaults/ma
|
|
47
66
|
|
48
67
|
|
49
68
|
#### Testing
|
50
|
-
This project comes with a
|
69
|
+
This project comes with a Vagrantfile, this is a fast and easy way to test changes to the role, fire it up with `vagrant up`
|
51
70
|
|
52
71
|
See [vagrant docs](https://docs.vagrantup.com/v2/) for getting setup with vagrant
|
53
72
|
|
73
|
+
Once your VM is up, you can reprovision it using either `vagrant provision`, or `ansible-playbook tests/playbook.yml -i vagrant-inventory`
|
74
|
+
|
75
|
+
If you want to toy with the test play, see [tests/playbook.yml](./tests/playbook.yml), and change the variables in [tests/vars.yml](./tests/vars.yml)
|
76
|
+
|
77
|
+
If you are contributing, please first test your changes within the vagrant environment, (using the targeted distribution), and if possible, ensure your change is covered in the tests found in [.travis.yml](./.travis.yml)
|
54
78
|
|
55
79
|
#### License
|
56
80
|
|
57
|
-
Licensed under the MIT License. See the LICENSE file for details.
|
81
|
+
Licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
|
58
82
|
|
59
83
|
|
60
84
|
#### Thanks
|
@@ -2,15 +2,23 @@
|
|
2
2
|
# vi: set ft=ruby :
|
3
3
|
|
4
4
|
Vagrant.configure('2') do |config|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
|
6
|
+
# Ensure we use our vagrant private key
|
7
|
+
config.ssh.insert_key = false
|
8
|
+
config.ssh.private_key_path = '~/.vagrant.d/insecure_private_key'
|
9
|
+
|
10
|
+
config.vm.define 'anxs' do |machine|
|
11
|
+
#machine.vm.box = 'centos/7'
|
12
|
+
machine.vm.box = 'ubuntu/trusty64'
|
13
|
+
machine.vm.network :private_network, ip: '192.168.88.22'
|
14
|
+
machine.vm.hostname = 'anxs.local'
|
15
|
+
machine.vm.provision 'ansible' do |ansible|
|
16
|
+
ansible.playbook = 'tests/playbook.yml'
|
11
17
|
ansible.sudo = true
|
12
18
|
ansible.inventory_path = 'vagrant-inventory'
|
13
19
|
ansible.host_key_checking = false
|
14
20
|
end
|
21
|
+
|
15
22
|
end
|
23
|
+
|
16
24
|
end
|
@@ -3,7 +3,10 @@
|
|
3
3
|
# Basic settings
|
4
4
|
postgresql_version: 9.3
|
5
5
|
postgresql_encoding: 'UTF-8'
|
6
|
-
|
6
|
+
postgresql_locale_parts:
|
7
|
+
- 'en_US' # Locale
|
8
|
+
- 'UTF-8' # Encoding
|
9
|
+
postgresql_locale: "{{ postgresql_locale_parts | join('.') }}"
|
7
10
|
|
8
11
|
postgresql_admin_user: "postgres"
|
9
12
|
postgresql_default_auth_method: "trust"
|
@@ -26,6 +29,9 @@ postgresql_ext_postgis_version: "2.1" # be careful: check whether the postgresql
|
|
26
29
|
# List of databases to be created (optional)
|
27
30
|
postgresql_databases: []
|
28
31
|
|
32
|
+
# List of database extensions to be created (optional)
|
33
|
+
postgresql_database_extensions: []
|
34
|
+
|
29
35
|
# List of users to be created (optional)
|
30
36
|
postgresql_users: []
|
31
37
|
|
@@ -57,9 +63,11 @@ postgresql_hba_file: "{{postgresql_conf_directory}}/pg_hba.conf"
|
|
57
63
|
# Ident configuration file
|
58
64
|
postgresql_ident_file: "{{postgresql_conf_directory}}/pg_ident.conf"
|
59
65
|
# Use data in another directory
|
60
|
-
|
66
|
+
postgresql_varlib_directory_name: "postgresql"
|
67
|
+
postgresql_data_directory: "/var/lib/{{ postgresql_varlib_directory_name }}/{{postgresql_version}}/{{postgresql_cluster_name}}"
|
68
|
+
postgresql_pid_directory: "/var/run/postgresql"
|
61
69
|
# If external_pid_file is not explicitly set, on extra PID file is written
|
62
|
-
postgresql_external_pid_file: "/
|
70
|
+
postgresql_external_pid_file: "{{ postgresql_pid_directory }}/{{postgresql_version}}-{{postgresql_cluster_name}}.pid"
|
63
71
|
|
64
72
|
#------------------------------------------------------------------------------
|
65
73
|
# CONNECTIONS AND AUTHENTICATION
|
@@ -72,8 +80,9 @@ postgresql_port: 5432
|
|
72
80
|
postgresql_max_connections: 100
|
73
81
|
postgresql_superuser_reserved_connections: 3
|
74
82
|
|
75
|
-
|
76
|
-
|
83
|
+
postgresql_unix_socket_directory: '' # (<= 9.2)
|
84
|
+
postgresql_unix_socket_directories: # (>= 9.3)
|
85
|
+
- "{{ postgresql_pid_directory }}"
|
77
86
|
postgresql_unix_socket_group: ''
|
78
87
|
postgresql_unix_socket_permissions: '0777' # begin with 0 to use octal notation
|
79
88
|
|
@@ -98,12 +107,13 @@ postgresql_ssl_ciphers:
|
|
98
107
|
postgresql_ssl_prefer_server_ciphers: on
|
99
108
|
postgresql_ssl_ecdh_curve: 'prime256v1'
|
100
109
|
postgresql_ssl_renegotiation_limit: 512MB # amount of data between renegotiations
|
101
|
-
postgresql_ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
|
102
|
-
postgresql_ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
|
103
|
-
postgresql_ssl_ca_file: ''
|
104
|
-
postgresql_ssl_crl_file: ''
|
110
|
+
postgresql_ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem # (>= 9.2)
|
111
|
+
postgresql_ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key # (>= 9.2)
|
112
|
+
postgresql_ssl_ca_file: '' # (>= 9.2)
|
113
|
+
postgresql_ssl_crl_file: '' # (>= 9.2)
|
105
114
|
postgresql_password_encryption: on
|
106
115
|
postgresql_db_user_namespace: off
|
116
|
+
postgresql_row_security: off # (>= 9.5)
|
107
117
|
|
108
118
|
# Kerberos and GSSAPI
|
109
119
|
postgresql_krb_server_keyfile: ''
|
@@ -147,7 +157,7 @@ postgresql_dynamic_shared_memory_type: posix # the default is the first optio
|
|
147
157
|
|
148
158
|
# - Disk -
|
149
159
|
|
150
|
-
# limits per-session temp file space in kB, or -1 for no limit
|
160
|
+
# limits per-session temp file space in kB, or -1 for no limit (>= 9.2)
|
151
161
|
postgresql_temp_file_limit: -1
|
152
162
|
|
153
163
|
|
@@ -205,6 +215,7 @@ postgresql_wal_sync_method: fsync
|
|
205
215
|
|
206
216
|
# recover from partial page writes
|
207
217
|
postgresql_full_page_writes: on
|
218
|
+
postgresql_wal_compression: off # (>= 9.5)
|
208
219
|
postgresql_wal_log_hints: off # also do full page writes of non-critical updates
|
209
220
|
|
210
221
|
postgresql_wal_buffers: -1 # min 32kB, -1 sets based on shared_buffers
|
@@ -215,7 +226,9 @@ postgresql_commit_siblings: 5 # range 1-1000
|
|
215
226
|
|
216
227
|
# - Checkpoints -
|
217
228
|
|
218
|
-
postgresql_checkpoint_segments: 3 # in logfile segments, min 1, 16MB each
|
229
|
+
postgresql_checkpoint_segments: 3 # (<= 9.4) in logfile segments, min 1, 16MB each
|
230
|
+
postgresql_max_wal_size: 1GB # (>= 9.5)
|
231
|
+
postgresql_min_wal_size: 80MB # (>= 9.5)
|
219
232
|
postgresql_checkpoint_timeout: 5min # range 30s-1h
|
220
233
|
postgresql_checkpoint_completion_target: 0.5 # checkpoint target duration, 0.0 - 1.0
|
221
234
|
postgresql_checkpoint_warning: 30s # 0 disables
|
@@ -246,11 +259,14 @@ postgresql_archive_timeout: 0
|
|
246
259
|
|
247
260
|
# max number of walsender processes
|
248
261
|
postgresql_max_wal_senders: 0
|
262
|
+
postgresql_wal_sender_delay: 1s # walsender cycle time, 1-10000 milliseconds (<= 9.1)
|
249
263
|
|
250
264
|
postgresql_wal_keep_segments: 0 # in logfile segments, 16MB each; 0 disables
|
251
|
-
|
265
|
+
postgresql_replication_timeout: 60s # in milliseconds; 0 disables (<= 9.2)
|
266
|
+
postgresql_wal_sender_timeout: 60s # in milliseconds; 0 disables (>= 9.3)
|
252
267
|
postgresql_max_replication_slots: 0 # max number of replication slots
|
253
268
|
|
269
|
+
postgresql_track_commit_timestamp: off # (>= 9.5)
|
254
270
|
|
255
271
|
# - Master Server -
|
256
272
|
|
@@ -278,7 +294,8 @@ postgresql_wal_receiver_status_interval: 10s # 0 disables
|
|
278
294
|
postgresql_hot_standby_feedback: off
|
279
295
|
#time that receiver waits for communication from master in milliseconds
|
280
296
|
postgresql_wal_receiver_timeout: 60s
|
281
|
-
|
297
|
+
# time to wait before retrying to retrieve WAL after a failed attempt
|
298
|
+
postgresql_wal_retrieve_retry_interval: 5s # (>= 9.5)
|
282
299
|
|
283
300
|
#------------------------------------------------------------------------------
|
284
301
|
# QUERY TUNING
|
@@ -363,7 +380,7 @@ postgresql_log_rotation_size: 10MB
|
|
363
380
|
# These are relevant when logging to syslog:
|
364
381
|
postgresql_syslog_facility: LOCAL0
|
365
382
|
postgresql_syslog_ident: postgres
|
366
|
-
# This is only relevant when logging to eventlog (win32):
|
383
|
+
# This is only relevant when logging to eventlog (win32) (>= 9.2):
|
367
384
|
postgresql_event_source: PostgreSQL
|
368
385
|
|
369
386
|
|
@@ -466,7 +483,7 @@ postgresql_log_timezone: UTC
|
|
466
483
|
|
467
484
|
postgresql_track_activities: on
|
468
485
|
postgresql_track_counts: on
|
469
|
-
postgresql_track_io_timing: off
|
486
|
+
postgresql_track_io_timing: off # (>= 9.2)
|
470
487
|
postgresql_track_functions: none # none, pl, all
|
471
488
|
postgresql_track_activity_query_size: 1024
|
472
489
|
postgresql_update_process_title: on
|
@@ -504,7 +521,7 @@ postgresql_autovacuum_vacuum_scale_factor: 0.2
|
|
504
521
|
postgresql_autovacuum_analyze_scale_factor: 0.1
|
505
522
|
# maximum XID age before forced vacuum
|
506
523
|
postgresql_autovacuum_freeze_max_age: 200000000
|
507
|
-
# maximum Multixact age before forced vacuum
|
524
|
+
# maximum Multixact age before forced vacuum (>= 9.3)
|
508
525
|
postgresql_autovacuum_multixact_freeze_max_age: 400000000
|
509
526
|
# default vacuum cost delay for autovacuum, in milliseconds
|
510
527
|
postgresql_autovacuum_vacuum_cost_delay: 20ms
|
@@ -531,15 +548,16 @@ postgresql_default_transaction_deferrable: off
|
|
531
548
|
postgresql_session_replication_role: origin
|
532
549
|
|
533
550
|
postgresql_statement_timeout: 0 # in milliseconds, 0 is disabled
|
534
|
-
postgresql_lock_timeout: 0 # in milliseconds, 0 is disabled
|
551
|
+
postgresql_lock_timeout: 0 # in milliseconds, 0 is disabled (>= 9.3)
|
535
552
|
postgresql_vacuum_freeze_min_age: 50000000
|
536
553
|
postgresql_vacuum_freeze_table_age: 150000000
|
537
|
-
postgresql_vacuum_multixact_freeze_min_age: 5000000
|
538
|
-
postgresql_vacuum_multixact_freeze_table_age: 150000000
|
554
|
+
postgresql_vacuum_multixact_freeze_min_age: 5000000 # (>= 9.3)
|
555
|
+
postgresql_vacuum_multixact_freeze_table_age: 150000000 # (>= 9.3)
|
539
556
|
|
540
557
|
postgresql_bytea_output: hex # hex, escape
|
541
558
|
postgresql_xmlbinary: base64
|
542
559
|
postgresql_xmloption: content
|
560
|
+
postgresql_gin_fuzzy_search_limit: 0 # (<= 9.2)
|
543
561
|
|
544
562
|
|
545
563
|
# - Locale and Formatting -
|
@@ -558,18 +576,19 @@ postgresql_timezone: UTC
|
|
558
576
|
postgresql_timezone_abbreviations: Default
|
559
577
|
|
560
578
|
postgresql_extra_float_digits: 0 # min -15, max 3
|
561
|
-
postgresql_client_encoding:
|
579
|
+
postgresql_client_encoding: False # actually defaults to database encoding
|
580
|
+
# 'sql_ascii', 'UTF8', ...
|
562
581
|
|
563
582
|
# These settings are initialized by initdb, but they can be changed.
|
564
583
|
|
565
584
|
# locale for system error message
|
566
|
-
postgresql_lc_messages:
|
585
|
+
postgresql_lc_messages: "{{ postgresql_locale }}"
|
567
586
|
# locale for monetary formatting
|
568
|
-
postgresql_lc_monetary:
|
587
|
+
postgresql_lc_monetary: "{{ postgresql_locale }}"
|
569
588
|
# locale for number formatting
|
570
|
-
postgresql_lc_numeric:
|
589
|
+
postgresql_lc_numeric: "{{ postgresql_locale }}"
|
571
590
|
# locale for time formatting
|
572
|
-
postgresql_lc_time:
|
591
|
+
postgresql_lc_time: "{{ postgresql_locale }}"
|
573
592
|
|
574
593
|
postgresql_default_text_search_config: pg_catalog.english
|
575
594
|
|
@@ -645,6 +664,11 @@ postgresql_env:
|
|
645
664
|
# APT settings
|
646
665
|
postgresql_apt_key_id: ACCC4CF8
|
647
666
|
postgresql_apt_key_url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc"
|
648
|
-
postgresql_apt_repository: 'deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main'
|
667
|
+
postgresql_apt_repository: 'deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main {{postgresql_version}}'
|
649
668
|
# Pin-Priority of PGDG repository
|
650
669
|
postgresql_apt_pin_priority: 500
|
670
|
+
|
671
|
+
# Yum settings
|
672
|
+
postgresql_version_terse: "{{ postgresql_version | replace('.', '') }}"
|
673
|
+
postgresql_yum_repository_base_url: "http://yum.postgresql.org"
|
674
|
+
postgresql_yum_repository_url: "{{ postgresql_yum_repository_base_url }}/{{ postgresql_version }}/{{ ansible_os_family | lower }}/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}/pgdg-{{ ansible_distribution | lower }}{{ postgresql_version_terse }}-{{ postgresql_version }}-2.noarch.rpm"
|
@@ -1 +1 @@
|
|
1
|
-
{install_date: '
|
1
|
+
{install_date: 'Wed Jan 20 20:33:52 2016', version: v1.3.0}
|