-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting it to work #1
Changes from all commits
7a4e74b
984a0de
1a78225
56fb051
a77920f
f6706ef
994da4c
4f8aaa4
98971e7
9abf419
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# -*- 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.require_version ">= 1.7.0" | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
config.vm.box = "ubuntu/trusty64" | ||
cchq_proxy_port = ENV.fetch("VAGRANT_CCHQ_PROXY_PORT", 8080) | ||
config.ssh.insert_key = false | ||
|
||
config.vm.define "app1" do |app1| | ||
app1.vm.hostname = "app1" | ||
app1.vm.network "private_network", ip: "192.168.33.15" | ||
app1.vm.provider "virtualbox" do |v| | ||
v.memory = 768 | ||
v.cpus = 1 | ||
end | ||
app1.vm.provision "shell", path: "provisioning/nodes.sh" | ||
end | ||
|
||
# config.vm.define "app2" do |app1| | ||
# app1.vm.hostname = "app2" | ||
# app1.vm.network "private_network", ip: "192.168.33.18" | ||
# app1.vm.provision "shell", path: "provisioning/nodes.sh" | ||
# db1.vm.provider "virtualbox" do |v| | ||
# v.memory = 768 | ||
# v.cpus = 1 | ||
# end | ||
# end | ||
|
||
config.vm.define "db1" do |db1| | ||
db1.vm.hostname = "db1" | ||
db1.vm.network "private_network", ip: "192.168.33.16" | ||
db1.vm.provider "virtualbox" do |v| | ||
v.memory = 768 | ||
v.cpus = 1 | ||
end | ||
db1.vm.provision "shell", path: "provisioning/nodes.sh" | ||
end | ||
|
||
config.vm.define "proxy1" do |proxy1| | ||
proxy1.vm.hostname = "proxy1" | ||
proxy1.vm.network "private_network", ip: "192.168.33.17" | ||
proxy1.vm.provision "shell", path: "provisioning/nodes.sh" | ||
proxy1.vm.network "forwarded_port", guest: 80, host: cchq_proxy_port | ||
end | ||
|
||
config.vm.define "control" do |control| | ||
control.vm.hostname = "control" | ||
control.vm.network "private_network", ip: "192.168.33.14" | ||
control.vm.provider "virtualbox" do |v| | ||
v.memory = 768 | ||
v.cpus = 1 | ||
end | ||
control.vm.provision "shell", path: "provisioning/control.sh" | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,52 @@ | ||
[webworkers] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[postgresql] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[couchdb] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[couchdb2] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[redis] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[touchforms] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[formplayer] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[celery] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[elasticsearch] | ||
192.168.33.21 elasticsearch_node_name=es0 | ||
165.227.172.214 elasticsearch_node_name=es0 | ||
|
||
[proxy] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[rabbitmq] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[zookeeper] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[kafka] | ||
192.168.33.21 kafka_broker_id=0 | ||
165.227.172.214 kafka_broker_id=0 | ||
|
||
[pillowtop] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[shared_dir_host] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[riakcs] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[stanchion] | ||
192.168.33.21 | ||
165.227.172.214 | ||
|
||
[pg_standby] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
--- | ||
- name: set couchdb username and password | ||
uri: | ||
url: "http{% if couchdb_secure %}s{% endif %}://{{ inventory_hostname|ipaddr }}:{{ couchdb_port }}/_node/couchdb@{{ inventory_hostname|ipaddr }}/_config/admins/{{ couchdb2.username }}" | ||
# root@commcare-testing:~# curl -X PUT -H "Content-Type: text/plain" -d '"commcarehq"' http://commcarehq:commcarehq@188.226.180.143:5984/_config/admins/commcarehq | ||
url: "http{% if couchdb_secure %}s{% endif %}://{{ couchdb2.username }}:{{ couchdb2.password }}@{{ inventory_hostname|ipaddr }}:{{ couchdb_port }}/_node/couchdb@{{ inventory_hostname|ipaddr }}/_config/admins/{{ couchdb2.username }}" | ||
method: PUT | ||
status_code: 200, 401 # 401 means this is already set up | ||
body: '"{{ couchdb2.password }}"' | ||
|
@@ -96,6 +97,17 @@ | |
notify: reload monit | ||
tags: monit | ||
|
||
# TODO: consider starting the monit daemon before calling this. Currently, it fails with: | ||
# TASK [couchdb2 : monit] ******************************************************** | ||
# fatal: [165.227.172.214]: FAILED! => {"changed": false, "failed": true, "msg": "couchdb2 process not presently configured with monit", "name": "couchdb2", "state": "monitored"} | ||
# | ||
# RUNNING HANDLER [monit : reload monit] ***************************************** | ||
# to retry, use: --limit @/vagrant/ansible/deploy_stack.retry | ||
# | ||
# PLAY RECAP ********************************************************************* | ||
# 165.227.172.214 : ok=36 changed=20 unreachable=0 failed=1 | ||
# I get it to run after ssh-ing in and running `monit` as root, awakening the monit daemon. | ||
# I love awakening daemons... | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We've recently made some improvements to this role: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the quick reply Just to be clear, do you mean There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry , I mean |
||
- monit: | ||
name: couchdb2 | ||
state: monitored | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to consider using couchdb2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @snopoke , even on your current ansible master branch, it looks like you guys use both couchdb and couchdb2. Am I reading this right? Sorry for being thick—just not sure I understand what you mean here.
From line 42 of
deploy_db.yml
on master at commcarehq-ansible: