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
d8500204
Commit
d8500204
authored
Feb 04, 2014
by
e0d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code review comments.
parent
bdee417c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
13 deletions
+33
-13
playbooks/edx-east/elasticsearch.yml
+1
-1
playbooks/roles/elasticsearch/defaults/main.yml
+5
-2
playbooks/roles/elasticsearch/tasks/main.yml
+20
-6
playbooks/roles/elasticsearch/templates/etc/default/elasticsearch.j2
+7
-4
No files found.
playbooks/edx-east/elasticsearch.yml
View file @
d8500204
-
hosts
:
tag_
role_elasticsearch:&tag_environment_stage
-
hosts
:
tag_
play_elasticsearch:&tag_environment_stage:&tag_deployment_edx
sudo
:
True
sudo
:
True
vars_files
:
vars_files
:
-
"
{{
secure_dir
}}/vars/common/common.yml"
-
"
{{
secure_dir
}}/vars/common/common.yml"
...
...
playbooks/roles/elasticsearch/defaults/main.yml
View file @
d8500204
...
@@ -2,13 +2,15 @@
...
@@ -2,13 +2,15 @@
elasticsearch_app_dir
:
"
{{
COMMON_APP_DIR
}}/elasticsearch"
elasticsearch_app_dir
:
"
{{
COMMON_APP_DIR
}}/elasticsearch"
elasticsearch_data_dir
:
"
{{
COMMON_DATA_DIR
}}/elasticsearch"
elasticsearch_data_dir
:
"
{{
COMMON_DATA_DIR
}}/elasticsearch"
elasticsearch_log_dir
:
"
{{
COMMON_LOG_DIR
}}/elasticsearch"
elasticsearch_log_dir
:
"
{{
COMMON_LOG_DIR
}}/elasticsearch"
elasticsearch_cfg_dir
:
"
{{
COMMON_CFG_DIR
}}/elasticsearch"
elasticsearch_version
:
"
0.90.11"
elasticsearch_version
:
"
0.90.11"
elasticsearch_sha
:
"
8e81388d0ba7e427b42514d96e25ba6499024c24"
elasticsearch_sha
:
"
8e81388d0ba7e427b42514d96e25ba6499024c24"
elasticsearch_file
:
"
elasticsearch-{{
elasticsearch_version
}}.deb"
elasticsearch_file
:
"
elasticsearch-{{
elasticsearch_version
}}.deb"
elasticsearch_url
:
"
https://download.elasticsearch.org/elasticsearch/elasticsearch/{{
elasticsearch_file
}}"
elasticsearch_url
:
"
https://download.elasticsearch.org/elasticsearch/elasticsearch/{{
elasticsearch_file
}}"
elasticsearch_aws_stack_name
:
"
stage-edx"
elasticsearch_user
:
"
elasticsearch"
elasticsearch_group
:
"
elasticsearch"
#
#
# Defaults for a single server installation.
# Defaults for a single server installation.
ELASTICSEARCH_CLUSTERED
:
fals
e
ELASTICSEARCH_CLUSTERED
:
tru
e
ELASTICSEARCH_HEAP_SIZE
:
"
512m"
ELASTICSEARCH_HEAP_SIZE
:
"
512m"
\ No newline at end of file
playbooks/roles/elasticsearch/tasks/main.yml
View file @
d8500204
...
@@ -8,16 +8,17 @@
...
@@ -8,16 +8,17 @@
# * oraclejdk
# * oraclejdk
#
#
# Example play:
# Example play:
# This play can be used to do a single server or clustered
#
# This role can be used to do a single-server or clustered
# installation of the elasticsearch service. When a cluster
# installation of the elasticsearch service. When a cluster
# is being installed, there are two important things that
# is being installed, there are two important things that
# you must know.
# you must know.
# The ELASTICSEARCH_CLUSTERED var must b
y
true.
# The ELASTICSEARCH_CLUSTERED var must b
e
true.
# All hosts targeted by your play will be cluster peers.
# All hosts targeted by your play will be cluster peers.
# Elasticsearch will determine who th
at
master should be.
# Elasticsearch will determine who th
e
master should be.
#
# Ansible provides handy set operators for use in the
# Ansible provides handy set operators for use in the
# plays host declaration, as seen in the following example.
# plays host declaration, as seen in the following example.
#
#
...
@@ -27,6 +28,7 @@
...
@@ -27,6 +28,7 @@
# - oraclejdk
# - oraclejdk
# - elasticsearch
# - elasticsearch
#
#
-
name
:
download elasticsearch
-
name
:
download elasticsearch
get_url
:
>
get_url
:
>
url={{ elasticsearch_url }}
url={{ elasticsearch_url }}
...
@@ -37,7 +39,18 @@
...
@@ -37,7 +39,18 @@
shell
:
>
shell
:
>
dpkg -i --force-confold /var/tmp/elasticsearch-{{ elasticsearch_version }}.deb
dpkg -i --force-confold /var/tmp/elasticsearch-{{ elasticsearch_version }}.deb
executable=/bin/bash
executable=/bin/bash
-
name
:
create directories
file
:
>
path="{{ item }}"
state=directory
owner="{{ elasticsearch_user }}"
group="{{ elasticsearch_group }}"
with_items
:
-
"
{{
elasticsearch_data_dir
}}"
-
"
{{
elasticsearch_log_dir
}}"
-
"
{{
elasticsearch_cfg_dir
}}"
-
name
:
update elasticsearch defaults
-
name
:
update elasticsearch defaults
template
:
>
template
:
>
src=etc/default/elasticsearch.j2 dest=/etc/default/elasticsearch
src=etc/default/elasticsearch.j2 dest=/etc/default/elasticsearch
...
@@ -45,7 +58,8 @@
...
@@ -45,7 +58,8 @@
-
name
:
drop the elasticsearch config
-
name
:
drop the elasticsearch config
template
:
>
template
:
>
src=etc/elasticsearch/elasticsearch.yml.j2 dest=/etc/elasticsearch/elasticsearch.yml
src=edx/etc/elasticsearch/elasticsearch.yml.j2 dest={{ elasticsearch_cfg_dir }}/elasticsearch.yml
mode=0744
when
:
ELASTICSEARCH_CLUSTERED
when
:
ELASTICSEARCH_CLUSTERED
-
name
:
Ensure elasticsearch is enabled and started
-
name
:
Ensure elasticsearch is enabled and started
...
...
playbooks/roles/elasticsearch/templates/etc/default/elasticsearch.j2
View file @
d8500204
# {{ ansible_managed }}
# Run ElasticSearch as this user ID and group ID
# Run ElasticSearch as this user ID and group ID
#ES_USER=elasticsearch
#ES_USER=elasticsearch
#ES_GROUP=elasticsearch
#ES_GROUP=elasticsearch
...
@@ -20,19 +23,19 @@ ES_HEAP_SIZE={{ ELASTICSEARCH_HEAP_SIZE }}
...
@@ -20,19 +23,19 @@ ES_HEAP_SIZE={{ ELASTICSEARCH_HEAP_SIZE }}
#MAX_LOCKED_MEMORY=unlimited
#MAX_LOCKED_MEMORY=unlimited
# ElasticSearch log directory
# ElasticSearch log directory
#LOG_DIR=/var/log/elasticsearch
LOG_DIR={{ elasticsearch_log_dir }}
# ElasticSearch data directory
# ElasticSearch data directory
#DATA_DIR=/var/lib/elasticsearch
DATA_DIR={{ COMMON_DATA_DIR }}
# ElasticSearch work directory
# ElasticSearch work directory
#WORK_DIR=/tmp/elasticsearch
#WORK_DIR=/tmp/elasticsearch
# ElasticSearch configuration directory
# ElasticSearch configuration directory
#CONF_DIR=/etc/elasticsearch
CONF_DIR={{ elasticsearch_cfg_dir }}
# ElasticSearch configuration file (elasticsearch.yml)
# ElasticSearch configuration file (elasticsearch.yml)
#CONF_FILE=/etc/elasticsearch/elasticsearch.yml
#
CONF_FILE=/etc/elasticsearch/elasticsearch.yml
# Additional Java OPTS
# Additional Java OPTS
#ES_JAVA_OPTS=
#ES_JAVA_OPTS=
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