App Search, Self Managed, Installation
App Search has some requirements when hosting yourself...
Supported platforms:
- Linux: x86_64 only
- MacOS X: High Sierra 10.13 - 10.1x (64 bit only)
- Windows: Not supported
View the full support matrix on Elastic.co.
Minimum hardware:
- ~2GB of free RAM or 4GB if Elasticsearch is running on the same machine.
- 2GB for App Server.
- 50Mb for Filebeat and other processes.
- 5GB of disk space available.
Dependencies:
- Install Java 8 or Java 11.
- Licensed Elasticsearch 7.6.x.
Elasticsearch License:
- Elasticsearch must have at least a Basic license.
- A free Basic license is included when downloading Elasticsearch from Elastic.co.
If the requirements are satisfied, you can:
- Run App Search
- Run App Search as a Systemd Service
- Run App Search as a Docker container
- Develop App Search with Docker Compose
Upgrading? Read the upgrade overview!
Run App Search
Ensure a compatible Elasticsearch cluster is running:
bin/elasticsearch
Run curl http://localhost:9200/
to confirm you can reach Elasticsearch:
{
// ....
},
"tagline" : "You Know, for Search"
}
Next, configure how App Search will interact with Elasticsearch.
Choose one of the following options:
Allow App Search to modify cluster settings. Add the following line to App Search's
config/app-search.yml
:allow_es_settings_modification: true
Allow Elasticsearch to create indexes automatically. Add the following line to Elasticsearch's
elasticsearch.yml
or within your Elasticsearch cluster settings:action.auto_create_index: ".app-search-*-logs-*,-.app-search-*,+*"
After that, enter the App Search directory and run...
bin/app-search
Wait until App Search has started, then visit http://localhost:3002.
App Search Default Credentials
Security Disabled
If your Elasticsearch instance does not have security enabled, you won't need credentials to log into App Search.
Visit http://localhost:3002 to get started.
Security Enabled
With security enabled in your Elasticsearch instance, App Search will require credentials to log in.
The default login credentials are:
- Username: app_search
- Password: [RANDOMLY_GENERATED_PASSWORD]
A password is generated for you on first boot.
You can also pass an environment variable with your own default password:
APP_SEARCH_DEFAULT_PASSWORD=password bin/app-search
And now? Explore the documentation and start building.
Run App Search as a Systemd Service
Alternatively, you can run App Search as a service on your unix system through systemd.
Construct an App Search service for systemd and activate it via script. Ensure the file is named as described if you choose to apply this example.
app-search.service
: The service for App Search.
[Unit]
Description=Elastic App Search
[Service]
Type=simple
WorkingDirectory=/opt/app-search-7.6.0
User=app-search
Group=app-search
ExecStart=/opt/app-search-7.6.0/bin/app-search
Restart=on-failure
RestartSec=1s
[Install]
# Start on boot
# If you deploy App Search alongside Elasticsearch on the same server,
# comment out multi-user.target and uncomment elasticsearch.service after
# Elasticsearch has started.
WantedBy=multi-user.target
# WantedBy=elasticsearch.service
app-search.service
: The service for App Search.
[Unit]
Description=Elastic App Search
[Service]
Type=simple
WorkingDirectory=/opt/app-search-7.6.0
User=app-search
Group=app-search
ExecStart=/opt/app-search-7.6.0/bin/app-search
Restart=on-failure
RestartSec=1s
[Install]
Start on boot
If you deploy App Search alongside Elasticsearch on the same server,
comment out multi-user.target and uncomment elasticsearch.service after
Elasticsearch has started.
WantedBy=multi-user.target
WantedBy=elasticsearch.service
app-search.service
: The service for App Search.
[Unit]
Description=Elastic App Search
[Service]
Type=simple
WorkingDirectory=/opt/app-search-7.6.0
User=app-search
Group=app-search
ExecStart=/opt/app-search-7.6.0/bin/app-search
Restart=on-failure
RestartSec=1s
[Install]
Start on boot
If you deploy App Search alongside Elasticsearch on the same server,
comment out multi-user.target and uncomment elasticsearch.service after
Elasticsearch has started.
WantedBy=multi-user.target
WantedBy=elasticsearch.service
app-search.service
: The service for App Search.
[Unit]
Description=Elastic App Search
[Service]
Type=simple
WorkingDirectory=/opt/app-search-7.6.0
User=app-search
Group=app-search
ExecStart=/opt/app-search-7.6.0/bin/app-search
Restart=on-failure
RestartSec=1s
[Install]
Start on boot
If you deploy App Search alongside Elasticsearch on the same server,
comment out multi-user.target and uncomment elasticsearch.service after
Elasticsearch has started.
WantedBy=multi-user.target
WantedBy=elasticsearch.service
app-search.service
: The service for App Search.
[Unit]
Description=Elastic App Search
[Service]
Type=simple
WorkingDirectory=/opt/app-search-7.6.0
User=app-search
Group=app-search
ExecStart=/opt/app-search-7.6.0/bin/app-search
Restart=on-failure
RestartSec=1s
[Install]
Start on boot
If you deploy App Search alongside Elasticsearch on the same server,
comment out multi-user.target and uncomment elasticsearch.service after
Elasticsearch has started.
WantedBy=multi-user.target
WantedBy=elasticsearch.service
app-search.service
: The service for App Search.
[Unit]
Description=Elastic App Search
[Service]
Type=simple
WorkingDirectory=/opt/app-search-7.6.0
User=app-search
Group=app-search
ExecStart=/opt/app-search-7.6.0/bin/app-search
Restart=on-failure
RestartSec=1s
[Install]
Start on boot
If you deploy App Search alongside Elasticsearch on the same server,
comment out multi-user.target and uncomment elasticsearch.service after
Elasticsearch has started.
WantedBy=multi-user.target
WantedBy=elasticsearch.service
The file should live in /etc/systemd/system/
.
You can write a bash script to enable, restart, and disable the service.
It might be made up of these elements:
#!/bin/sh
sudo cp app-search.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable app-search
sudo systemctl start app-search
sudo systemctl restart app-search
sudo systemctl disable app-search
#!/bin/sh
sudo cp app-search.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable app-search
sudo systemctl start app-search
sudo systemctl restart app-search
sudo systemctl disable app-search
#!/bin/sh
sudo cp app-search.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable app-search
sudo systemctl start app-search
sudo systemctl restart app-search
sudo systemctl disable app-search
#!/bin/sh
sudo cp app-search.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable app-search
sudo systemctl start app-search
sudo systemctl restart app-search
sudo systemctl disable app-search
#!/bin/sh
sudo cp app-search.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable app-search
sudo systemctl start app-search
sudo systemctl restart app-search
sudo systemctl disable app-search
#!/bin/sh
sudo cp app-search.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable app-search
sudo systemctl start app-search
sudo systemctl restart app-search
sudo systemctl disable app-search
Run App Search as a Docker container
A Docker image for Elastic App Search is available from the Elastic Docker registry.
The base image is centos:7
.
You can download the image from the Elastic Docker registry or use Docker pull:
docker pull docker.elastic.co/app-search/app-search:7.6.0
You can configure the image using environment variables when you start the container.
Any option within config/app-search.yml
can be added via environment variables.
docker run -ti \
-e elasticsearch.host=http://elasticsearch:9200 \
-e secret_session_key=supersecretsessionkey \
docker.elastic.co/app-search/app-search:7.6.0
Develop App Search with Docker Compose
Setup a local development environment with Docker Compose.
Make sure your local Docker VM is allocated at least 4G of memory, to comfortably support running App Search and Elasticsearch on the same instance.
Create the following docker-compose.yml
:
version: '2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
environment:
- "node.name=es-node"
- "discovery.type=single-node"
- "cluster.name=app-search-docker-cluster"
- "bootstrap.memory_lock=true"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
appsearch:
image: docker.elastic.co/app-search/app-search:7.6.0
environment:
- "elasticsearch.host=http://elasticsearch:9200"
- "allow_es_settings_modification=true"
- "JAVA_OPTS=-Xms2g -Xmx2g"
ports:
- 3002:3002
Bring it up:
docker-compose up
Access App Search at http://localhost:3002/.
Visit http://appsearch:3002 to configure other docker-compose services.
Requires API Keys! Find the API keys within the Credentials menu of the dashboard.
Note: Not for production use. Authentication is disabled. App Search relies on only one Elasticsearch node.
Stuck? Looking for help? Contact support or check out the App Search community forum!