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
b3d7a40c
Commit
b3d7a40c
authored
9 years ago
by
Fred Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
elasticsearch 1.5 - install from apt repo
parent
b4f9738f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
16 deletions
+50
-16
playbooks/roles/elasticsearch/defaults/main.yml
+6
-5
playbooks/roles/elasticsearch/tasks/main.yml
+44
-11
No files found.
playbooks/roles/elasticsearch/defaults/main.yml
View file @
b3d7a40c
...
@@ -3,14 +3,15 @@ elasticsearch_app_dir: "{{ COMMON_APP_DIR }}/elasticsearch"
...
@@ -3,14 +3,15 @@ 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_cfg_dir
:
"
{{
COMMON_CFG_DIR
}}/elasticsearch"
elasticsearch_
version
:
"
0.90.11
"
elasticsearch_
apt_key
:
"
46095ACC8548582C1A2699A9D27D666CD88E42B4
"
elasticsearch_
sha
:
"
8e81388d0ba7e427b42514d96e25ba6499024c24
"
elasticsearch_
apt_keyserver
:
"
ha.pool.sks-keyservers.net
"
elasticsearch_
file
:
"
elasticsearch-{{
elasticsearch_version
}}.deb
"
elasticsearch_
repo
:
"
deb
http://packages.elasticsearch.org/elasticsearch/1.5/debian
stable
main
"
elasticsearch_
url
:
"
https://download.elasticsearch.org/elasticsearch/elasticsearch/{{
elasticsearch_file
}}
"
elasticsearch_
package_name
:
"
elasticsearch
"
elasticsearch_user
:
"
elasticsearch"
elasticsearch_user
:
"
elasticsearch"
elasticsearch_group
:
"
elasticsearch"
elasticsearch_group
:
"
elasticsearch"
#
#
# Defaults for a single server installation.
# Defaults for a single server installation.
ELASTICSEARCH_CLUSTER
ED
:
false
ELASTICSEARCH_CLUSTER
_MEMBERS
:
[]
ELASTICSEARCH_HEAP_SIZE
:
"
512m"
ELASTICSEARCH_HEAP_SIZE
:
"
512m"
ELASTICSEARCH_VERSION
:
"
1.5.2"
This diff is collapsed.
Click to expand it.
playbooks/roles/elasticsearch/tasks/main.yml
View file @
b3d7a40c
...
@@ -29,18 +29,32 @@
...
@@ -29,18 +29,32 @@
# - elasticsearch
# - elasticsearch
#
#
-
name
:
download elasticsearch
-
name
:
Install Elasticsearch repo key
get_url
:
>
apt_key
:
>
url={{ elasticsearch_url }}
id={{ elasticsearch_apt_key }}
dest=/var/tmp/{{ elasticsearch_file }}
keyserver={{ elasticsearch_apt_keyserver }}
force=no
state=present
register
:
elasticsearch_reinstall
tags
:
-
install
-
install:base
-
name
:
install elasticsearch from local package
-
name
:
Add Elasticsearch Repo
shell
:
>
apt_repository
:
>
dpkg -i --force-confold /var/tmp/elasticsearch-{{ elasticsearch_version }}.deb
repo='{{ elasticsearch_repo }}'
executable=/bin/bash
state=present
when
:
elasticsearch_reinstall.changed
tags
:
-
install
-
install:base
-
name
:
install elasticsearch
apt
:
>
pkg={{ elasticsearch_package_name }}={{ ELASTICSEARCH_VERSION }}
state=present install_recommends=yes
force=yes update_cache=yes
tags
:
-
install
-
install:base
register
:
elasticsearch_reinstall
-
name
:
create directories
-
name
:
create directories
file
:
>
file
:
>
...
@@ -52,24 +66,43 @@
...
@@ -52,24 +66,43 @@
-
"
{{
elasticsearch_data_dir
}}"
-
"
{{
elasticsearch_data_dir
}}"
-
"
{{
elasticsearch_log_dir
}}"
-
"
{{
elasticsearch_log_dir
}}"
-
"
{{
elasticsearch_cfg_dir
}}"
-
"
{{
elasticsearch_cfg_dir
}}"
tags
:
-
install
-
install:base
-
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
tags
:
-
install
-
install:configuration
-
name
:
drop the elasticsearch config
-
name
:
drop the elasticsearch config
template
:
>
template
:
>
src=edx/etc/elasticsearch/elasticsearch.yml.j2 dest={{ elasticsearch_cfg_dir }}/elasticsearch.yml
src=edx/etc/elasticsearch/elasticsearch.yml.j2 dest={{ elasticsearch_cfg_dir }}/elasticsearch.yml
mode=0744
mode=0744
tags
:
-
install
-
install:configuration
-
name
:
drop the elasticsearch logging config
-
name
:
drop the elasticsearch logging config
template
:
>
template
:
>
src=edx/etc/elasticsearch/logging.yml.j2 dest={{ elasticsearch_cfg_dir }}/logging.yml
src=edx/etc/elasticsearch/logging.yml.j2 dest={{ elasticsearch_cfg_dir }}/logging.yml
mode=0744
mode=0744
tags
:
-
install
-
install:configuration
-
name
:
Ensure elasticsearch is enabled and started
-
name
:
Ensure elasticsearch is enabled and started
service
:
name=elasticsearch state=started enabled=yes
service
:
name=elasticsearch state=started enabled=yes
tags
:
-
manage
-
manage:start
-
name
:
Restart elastic when there has been an upgrade
-
name
:
Restart elastic when there has been an upgrade
service
:
name=elasticsearch state=restarted enabled=yes
service
:
name=elasticsearch state=restarted enabled=yes
when
:
elasticsearch_reinstall.changed
when
:
elasticsearch_reinstall.changed
tags
:
-
manage
-
manage:restart
-
install
This diff is collapsed.
Click to expand it.
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