Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
fa684743
Commit
fa684743
authored
Oct 30, 2013
by
Feanil Patel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #383 from edx/feanil/mongo_rs
Feanil/mongo rs
parents
dc073224
48a45aa1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
10 deletions
+55
-10
playbooks/edx-east/edx_feanilsandbox.yml
+14
-5
playbooks/roles/mongo/defaults/main.yml
+7
-1
playbooks/roles/mongo/templates/mongodb.conf.j2
+7
-1
playbooks/roles/mongo/templates/repset_init.j2
+23
-2
playbooks/roles/rabbitmq/templates/rabbitmq.config.j2
+4
-1
No files found.
playbooks/edx-east/edx_feanilsandbox.yml
View file @
fa684743
---
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
group
_edxapp
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
role
_edxapp
sudo
:
True
vars_files
:
-
"
{{
secure_dir
}}/vars/dev/feanilsandbox.yml"
...
...
@@ -18,7 +18,7 @@
edxapp_lms_env
:
'
lms.envs.load_test'
edx_platform_commit
:
'
release'
-
splunkforwarder
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
group
_worker
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
role
_worker
sudo
:
True
vars_files
:
-
"
{{
secure_dir
}}/vars/dev/feanilsandbox.yml"
...
...
@@ -38,7 +38,7 @@
celery_worker
:
True
edx_platform_commit
:
'
release'
-
splunkforwarder
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
group
_xserver
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
role
_xserver
sudo
:
True
vars_files
:
-
"
{{
secure_dir
}}/vars/dev/feanilsandbox.yml"
...
...
@@ -51,7 +51,7 @@
-
xserver
-
xserver
-
splunkforwarder
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
group
_rabbitmq
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
role
_rabbitmq
serial
:
1
sudo
:
True
vars_files
:
...
...
@@ -62,7 +62,7 @@
-
supervisor
-
rabbitmq
-
splunkforwarder
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
group
_xqueue
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_
role
_xqueue
sudo
:
True
vars_files
:
-
"
{{
secure_dir
}}/vars/dev/feanilsandbox.yml"
...
...
@@ -75,3 +75,12 @@
-
xqueue
-
xqueue
-
splunkforwarder
-
hosts
:
tag_aws_cloudformation_stack-name_feanilsandbox:&tag_role_mongo
sudo
:
True
vars_files
:
-
"
{{
secure_dir
}}/vars/dev/feanilsandbox.yml"
-
"
{{
secure_dir
}}/vars/users.yml"
roles
:
-
common
-
role
:
'
mongo'
mongo_clustered
:
true
playbooks/roles/mongo/defaults/main.yml
View file @
fa684743
mongo_logappend
:
true
mongo_version
:
2.4.7
mongo_bind_ip
:
127.0.0.1
mongo_port
:
"
27017"
mongo_extra_conf
:
'
'
mongo_key_file
:
'
/etc/mongodb_key'
mongo_repl_set
:
rs0
mongo_cluster_members
:
mongo_cluster_members
:
[]
mongo_data_dir
:
"
{{
COMMON_DATA_DIR
}}/mongo"
mongo_log_dir
:
"
{{
COMMON_LOG_DIR
}}/mongo"
...
...
@@ -19,3 +20,8 @@ MONGO_USERS:
mongo_logpath
:
"
{{
mongo_log_dir
}}/mongodb.log"
mongo_dbpath
:
"
{{
mongo_data_dir
}}/mongodb"
# If the system is running out of an Amazon Web Services
# cloudformation stack, this group name can used to pull out
# the name of the stack the mongo server resides in.
mongo_aws_stack_name
:
"
tag_aws_cloudformation_stack-name_"
playbooks/roles/mongo/templates/mongodb.conf.j2
View file @
fa684743
...
...
@@ -9,8 +9,14 @@ logpath={{ mongo_logpath }}
logappend={{ mongo_logappend }}
{# Bind to all ips(default) if in clustered mode,
otherwise only to the specified local ip.
#}
{% if mongo_clustered is not defined %}
bind_ip = {{ mongo_bind_ip }}
#port = 27017
{% endif %}
port = {{ mongo_port }}
# Enable journaling, http://www.mongodb.org/display/DOCS/Journaling
journal=true
...
...
playbooks/roles/mongo/templates/repset_init.j2
View file @
fa684743
{# Generate a list of hosts if no cluster members are give. Otherwise use the
hosts provided in the variable.
#}
{%- if mongo_cluster_members|length == 0 -%}
{%- set hosts = [] -%}
{%- set all_mongo_hosts = [] -%}
{%- do all_mongo_hosts.extend(groups.tag_role_mongo) -%}
{%- do all_mongo_hosts.extend(groups.tag_group_mongo) -%}
{%- for name in group_names -%}
{%- if name.startswith(mongo_aws_stack_name) -%}
{%- for host in all_mongo_hosts -%}
{%- if host in groups[name] -%}
{% do hosts.append("ip-" + host.replace('.','-') + ":" + mongo_port) %}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
{%- else -%}
{%- set hosts = mongo_cluster_members -%}
{%- endif -%}
config = {_id: '{{ mongo_repl_set }}', members: [
{%
for host in mongo_cluster_members
%}
{%
- for host in hosts -
%}
{_id: {{ loop.index }}, host: '{{ host }}'}{% if not loop.last %},{% endif %}
{%
endfor
%}
{%
- endfor -
%}
]};
rs.initiate(config)
...
...
playbooks/roles/rabbitmq/templates/rabbitmq.config.j2
View file @
fa684743
...
...
@@ -4,9 +4,12 @@
{%- if rabbitmq_clustered_hosts|length == 0 -%}
{%- set hosts= [] -%}
{%- set all_rabbit_hosts = [] -%}
{%- do all_rabbit_hosts.extend(groups.tag_role_rabbitmq) -%}
{%- do all_rabbit_hosts.extend(groups.tag_group_rabbitmq) -%}
{%- for name in group_names -%}
{%- if name.startswith(rabbitmq_aws_stack_name) -%}
{%- for host in
groups.tag_group_rabbitmq
-%}
{%- for host in
all_rabbit_hosts
-%}
{%- if host in groups[name] -%}
{% do hosts.append("rabbit@ip-" + host.replace('.','-')) %}
{%- endif -%}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment