-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With stable/0.8.x and qa/0.9.x options. Add default ES config versions in AtoM playbooks.
- Loading branch information
Showing
12 changed files
with
521 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/roles | ||
/.vagrant | ||
/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# AtoM Playbook | ||
|
||
The provided playbook installs AtoM on a local Vagrant virtual machine. | ||
|
||
## Requirements | ||
|
||
- Vagrant 1.8.0 or newer | ||
- Ansible 2.0.0 or newer | ||
|
||
## How to use | ||
|
||
Dowload the Ansible roles | ||
|
||
$ ansible-galaxy install -f -p roles/ -r requirements.yml | ||
|
||
Create the virtual machine and provision it: | ||
|
||
$ vagrant up | ||
|
||
To ssh to the VM, run: | ||
|
||
$ vagrant ssh | ||
|
||
If you want to forward your SSH agent too, run: | ||
|
||
$ vagrant ssh -- -A | ||
|
||
To (re-)provision the VM, using Vagrant: | ||
|
||
$ vagrant provision | ||
|
||
To (re-)provision the VM, using Ansible commands directly: | ||
|
||
$ ansible-playbook singlenode.yml | ||
--inventory-file=".vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory" \ | ||
--user="vagrant" \ | ||
--private-key=".vagrant/machines/atom-local/virtualbox/private_key" \ | ||
--extra-vars="atom_dir=/vagrant/src atom_environment_type=development" \ | ||
--verbose | ||
|
||
To (re-)provision the VM, passing your own arguments to `Ansible`: | ||
|
||
$ ANSIBLE_ARGS="--tags=elasticsearch,percona,percona-client,memcached,gearman,nginx" vagrant provision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | ||
VAGRANTFILE_API_VERSION = "2" | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
|
||
config.vm.box = ENV.fetch("VAGRANT_BOX", "ubuntu/trusty64") | ||
|
||
{ | ||
"binder-local" => { | ||
"ip" => "192.168.168.195", | ||
"memory" => "2048", | ||
"cpus" => "2", | ||
}, | ||
}.each do |short_name, properties| | ||
|
||
# Define guest | ||
config.vm.define short_name do |host| | ||
host.vm.network "private_network", ip: properties.fetch("ip") | ||
host.vm.hostname = "#{short_name}.myapp.dev" | ||
end | ||
|
||
# Set the amount of RAM and virtual CPUs for the virtual machine | ||
config.vm.provider :virtualbox do |vb| | ||
vb.customize ["modifyvm", :id, "--memory", properties.fetch("memory")] | ||
vb.customize ["modifyvm", :id, "--cpus", properties.fetch("cpus")] | ||
end | ||
|
||
end | ||
|
||
config.vm.synced_folder "src/atom", "/usr/share/nginx/atom", create: true | ||
|
||
# Ansible provisioning | ||
config.vm.provision :ansible do |ansible| | ||
ansible.playbook = "./singlenode-qa.yml" | ||
ansible.host_key_checking = false | ||
ansible.extra_vars = { | ||
"atom_user" => "vagrant", | ||
"atom_group" => "vagrant", | ||
"atom_environment_type" => "development", | ||
"atom_flush_data" => "yes", | ||
"elasticsearch_network_bind_host" => "0.0.0.0" | ||
} | ||
ansible.verbose = 'v' | ||
ansible.raw_arguments = ENV['ANSIBLE_ARGS'] | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[defaults] | ||
nocows=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-elasticsearch" | ||
version: "master" | ||
name: "artefactual.elasticsearch" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-percona" | ||
version: "master" | ||
name: "artefactual.percona" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-percona-client" | ||
version: "master" | ||
name: "artefactual.percona-client" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-memcached" | ||
version: "master" | ||
name: "artefactual.memcached" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-gearman" | ||
version: "master" | ||
name: "artefactual.gearman" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-nginx" | ||
version: "master" | ||
name: "artefactual.nginx" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-atom" | ||
version: "dev/binder-stable-qa" | ||
name: "artefactual.atom" | ||
path: "roles/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
- src: "https://github.com/geerlingguy/ansible-role-java" | ||
version: "master" | ||
name: "geerlingguy.java" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/elastic/ansible-elasticsearch" | ||
version: "master" | ||
name: "elastic.elasticsearch" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-percona" | ||
version: "master" | ||
name: "artefactual.percona" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-percona-client" | ||
version: "master" | ||
name: "artefactual.percona-client" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-memcached" | ||
version: "master" | ||
name: "artefactual.memcached" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-gearman" | ||
version: "master" | ||
name: "artefactual.gearman" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-nginx" | ||
version: "master" | ||
name: "artefactual.nginx" | ||
path: "roles/" | ||
|
||
- src: "https://github.com/artefactual-labs/ansible-atom" | ||
version: "dev/binder-stable-qa" | ||
name: "artefactual.atom" | ||
path: "roles/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
- hosts: "binder-local" | ||
|
||
pre_tasks: | ||
|
||
- include_vars: "vars-singlenode-0.8.yml" | ||
tags: | ||
- "always" | ||
|
||
roles: | ||
|
||
- role: "artefactual.elasticsearch" | ||
become: "yes" | ||
tags: | ||
- "elasticsearch" | ||
|
||
- role: "artefactual.percona" | ||
become: "yes" | ||
tags: | ||
- "percona" | ||
|
||
- role: "artefactual.percona-client" | ||
become: "yes" | ||
tags: | ||
- "percona-client" | ||
|
||
- role: "artefactual.memcached" | ||
become: "yes" | ||
tags: | ||
- "memcached" | ||
|
||
- role: "artefactual.gearman" | ||
become: "yes" | ||
tags: | ||
- "gearman" | ||
|
||
- role: "artefactual.nginx" | ||
become: "yes" | ||
tags: | ||
- "nginx" | ||
|
||
- role: "artefactual.atom" | ||
become: "yes" | ||
tags: | ||
- "atom" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
- hosts: "binder-local" | ||
|
||
pre_tasks: | ||
|
||
- include_vars: "vars-singlenode-qa.yml" | ||
tags: | ||
- "always" | ||
|
||
- name: "Installing PPA for Java 8" | ||
apt_repository: "repo='ppa:openjdk-r/ppa'" | ||
become: "yes" | ||
tags: | ||
- "always" | ||
|
||
roles: | ||
|
||
- role: "geerlingguy.java" | ||
become: "yes" | ||
tags: | ||
- "java" | ||
|
||
- role: "elastic.elasticsearch" | ||
become: "yes" | ||
tags: | ||
- "elasticsearch" | ||
|
||
- role: "artefactual.percona" | ||
become: "yes" | ||
tags: | ||
- "percona" | ||
|
||
- role: "artefactual.percona-client" | ||
become: "yes" | ||
tags: | ||
- "percona-client" | ||
|
||
- role: "artefactual.memcached" | ||
become: "yes" | ||
tags: | ||
- "memcached" | ||
|
||
- role: "artefactual.gearman" | ||
become: "yes" | ||
tags: | ||
- "gearman" | ||
|
||
- role: "artefactual.nginx" | ||
become: "yes" | ||
tags: | ||
- "nginx" | ||
|
||
- role: "artefactual.atom" | ||
become: "yes" | ||
tags: | ||
- "atom" |
Oops, something went wrong.