Add Elasticsearch Cloudron package files
This commit is contained in:
parent
ed9f6fee3a
commit
696c93287a
37
elasticsearch-cloudron/CloudronManifest.json
Normal file
37
elasticsearch-cloudron/CloudronManifest.json
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"id": "io.elasticsearch.cloudron",
|
||||||
|
"title": "Elasticsearch",
|
||||||
|
"author": "Elastic and Cloudron Community",
|
||||||
|
"description": "Elasticsearch is a distributed, open source search and analytics engine for all types of data. This package is designed for internal use only.",
|
||||||
|
"tagline": "Distributed search and analytics engine",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"healthCheckPath": "/",
|
||||||
|
"httpPort": 9200,
|
||||||
|
"manifestVersion": 2,
|
||||||
|
"website": "https://www.elastic.co/elasticsearch/",
|
||||||
|
"documentationUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html",
|
||||||
|
"contactEmail": "support@cloudron.io",
|
||||||
|
"icon": "logo.png",
|
||||||
|
"addons": {
|
||||||
|
"localstorage": {
|
||||||
|
"localDir": "/data"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"elasticsearch",
|
||||||
|
"search",
|
||||||
|
"analytics",
|
||||||
|
"database"
|
||||||
|
],
|
||||||
|
"minBoxVersion": "7.0.0",
|
||||||
|
"forceBindLocalhost": true,
|
||||||
|
"memoryLimit": 1073741824,
|
||||||
|
"postInstallMessage": "Elasticsearch is now installed and available for internal use only. You can access it using http://localhost:9200 from within other Cloudron apps.",
|
||||||
|
"multiDomain": false,
|
||||||
|
"tcpPorts": {
|
||||||
|
"transport": {
|
||||||
|
"port": 9300,
|
||||||
|
"description": "Elasticsearch transport port"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
27
elasticsearch-cloudron/Dockerfile
Normal file
27
elasticsearch-cloudron/Dockerfile
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
FROM cloudron/base:4.0.0
|
||||||
|
|
||||||
|
# Install Docker
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
apt-transport-https \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
gnupg-agent \
|
||||||
|
software-properties-common \
|
||||||
|
unzip
|
||||||
|
|
||||||
|
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
|
||||||
|
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||||
|
RUN apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.io
|
||||||
|
|
||||||
|
# Copy app files
|
||||||
|
COPY .env /app/.env
|
||||||
|
COPY start.sh /app/start.sh
|
||||||
|
COPY stop.sh /app/stop.sh
|
||||||
|
|
||||||
|
# Make scripts executable
|
||||||
|
RUN chmod +x /app/start.sh /app/stop.sh
|
||||||
|
|
||||||
|
# Set up data directory
|
||||||
|
RUN mkdir -p /app/data
|
||||||
|
|
||||||
|
CMD ["/app/start.sh"]
|
44
elasticsearch-cloudron/INSTALL.md
Normal file
44
elasticsearch-cloudron/INSTALL.md
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# Elasticsearch Cloudron Package Installation
|
||||||
|
|
||||||
|
This guide explains how to install the Elasticsearch package on your Cloudron instance.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- A Cloudron instance (version 7.0.0 or later)
|
||||||
|
- Administrative access to your Cloudron
|
||||||
|
|
||||||
|
## Installation Steps
|
||||||
|
|
||||||
|
### Method 1: Using the Cloudron App Store (When Available)
|
||||||
|
|
||||||
|
1. Log in to your Cloudron dashboard
|
||||||
|
2. Go to the App Store
|
||||||
|
3. Search for "Elasticsearch"
|
||||||
|
4. Click Install
|
||||||
|
5. Follow the on-screen instructions
|
||||||
|
|
||||||
|
### Method 2: Manual Installation
|
||||||
|
|
||||||
|
1. Download the latest package from the releases page
|
||||||
|
2. Log in to your Cloudron dashboard
|
||||||
|
3. Go to Settings -> Apps -> Install with File
|
||||||
|
4. Select the downloaded package file
|
||||||
|
5. Follow the on-screen instructions
|
||||||
|
|
||||||
|
## Post-Installation
|
||||||
|
|
||||||
|
After installation:
|
||||||
|
|
||||||
|
1. Check the app logs to ensure Elasticsearch has started correctly
|
||||||
|
2. Update the default password in the app's environment settings
|
||||||
|
3. Configure your other Cloudron apps to connect to Elasticsearch using `localhost:9200`
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
- If Elasticsearch fails to start, check the app logs for error messages
|
||||||
|
- Ensure your Cloudron has sufficient resources available
|
||||||
|
- If you encounter disk space issues, consider increasing the app's storage allocation
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
For support, please create an issue on the package's GitHub repository or contact the package maintainer.
|
57
elasticsearch-cloudron/README.md
Normal file
57
elasticsearch-cloudron/README.md
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# Elasticsearch for Cloudron
|
||||||
|
|
||||||
|
This package provides Elasticsearch for Cloudron, configured for internal use only. It is not exposed to the web and is intended to be used by other apps within your Cloudron instance.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Elasticsearch 8.17.3 (configurable)
|
||||||
|
- Single-node configuration optimized for Cloudron
|
||||||
|
- Security enabled with basic authentication
|
||||||
|
- Internal access only
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
After installation, Elasticsearch will be available at the following URLs:
|
||||||
|
|
||||||
|
- HTTP API: `http://localhost:9200` (from within other Cloudron apps)
|
||||||
|
- Transport port: `localhost:9300` (for Elasticsearch clients)
|
||||||
|
|
||||||
|
### Authentication
|
||||||
|
|
||||||
|
Default credentials:
|
||||||
|
- Username: `elastic`
|
||||||
|
- Password: `cloudron`
|
||||||
|
|
||||||
|
It's recommended to change the default password after installation by updating the `.env` file and restarting the app.
|
||||||
|
|
||||||
|
### Connection from other Cloudron apps
|
||||||
|
|
||||||
|
To connect to Elasticsearch from another Cloudron app, you can use the following connection details:
|
||||||
|
|
||||||
|
```
|
||||||
|
Host: localhost
|
||||||
|
Port: 9200
|
||||||
|
Username: elastic
|
||||||
|
Password: <your password from .env>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
You can modify the configuration by editing the `.env` file in the app's data directory and restarting the app.
|
||||||
|
|
||||||
|
Available configuration options:
|
||||||
|
|
||||||
|
- `ELASTIC_PASSWORD`: Password for the 'elastic' user
|
||||||
|
- `STACK_VERSION`: Version of Elasticsearch to use
|
||||||
|
- `CLUSTER_NAME`: Name of the Elasticsearch cluster
|
||||||
|
- `LICENSE`: License type ('basic' or 'trial')
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
- This package is for internal use only and is not exposed to the web
|
||||||
|
- It's configured as a single-node cluster for simplicity
|
||||||
|
- Memory is limited to 1GB (configurable in CloudronManifest.json)
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
For support, please create an issue on the package's GitHub repository or contact the package maintainer.
|
25
elasticsearch-cloudron/logo.svg
Normal file
25
elasticsearch-cloudron/logo.svg
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg enable-background="new 0 0 550 250" viewBox="77,83,410,90" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="m178 102.5h313v41h-313z" fill="none"/>
|
||||||
|
<g enable-background="new">
|
||||||
|
<path d="m193.3 139.4c-4 0-7.2-1.2-9.5-3.5s-3.4-5.6-3.4-9.7c0-4.2 1.1-7.6 3.2-10s5-3.6 8.7-3.6c3.4 0 6.1 1 8.1 3.1s3 4.9 3 8.6v3h-17.3c.1 2.5.8 4.4 2 5.8s3.1 2 5.4 2c1.5 0 3-.1 4.3-.4s2.7-.8 4.3-1.4v4.5c-1.3.6-2.7 1.1-4.1 1.4s-3 .2-4.7.2zm-1.1-22.6c-1.8 0-3.2.6-4.2 1.7s-1.7 2.7-1.9 4.9h11.8c0-2.1-.5-3.8-1.5-4.9s-2.4-1.7-4.2-1.7z"/>
|
||||||
|
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4 .5z"/>
|
||||||
|
<path d="m476.3 139h-5.5v-16c0-2-.4-3.5-1.2-4.5s-2.1-1.5-3.8-1.5c-2.3 0-4 .7-5.1 2.1s-1.6 3.7-1.6 6.9v13h-5.5v-36.5h5.5v9.3c0 1.5-.1 3.1-.3 4.8h.4c.8-1.2 1.8-2.2 3.1-2.9s2.9-1 4.7-1c6.3 0 9.4 3.2 9.4 9.5v16.8z"/>
|
||||||
|
</g>
|
||||||
|
<path d="m141.8 115.5h-20.9c.1.5.3 1 .4 1.4.7 2.4 1.1 4.9 1.3 7.5.1 1 .1 2.1.1 3.1s0 2.1-.1 3.1c-.2 2.6-.6 5.1-1.3 7.5-.1.5-.3 1-.4 1.4h20.9c6.6 0 11.9-5.4 11.9-12s-5.3-12-11.9-12z" fill="#00a9e5"/>
|
||||||
|
<path d="m122.6 130.6c.1-1 .1-2.1.1-3.1s0-2.1-.1-3.1c-.2-2.6-.6-5.1-1.3-7.5-.1-.5-.3-1-.4-1.4h-32.3c-1.2 3.8-1.8 7.8-1.8 12s.6 8.2 1.8 12h32.3c.1-.5.3-1 .4-1.4.7-2.4 1.1-4.9 1.3-7.5z" fill="#353535"/>
|
||||||
|
<path d="m145.4 143.5h-26c-.8 1.8-1.7 3.5-2.7 5.1-1.5 2.5-3.3 4.7-5.3 6.8-.7.7-1.4 1.3-2.1 2-1.4 1.3-3 2.4-4.6 3.5 6.3 4.2 13.9 6.6 22 6.6 13.9 0 26.1-7.1 33.3-17.8-3.7-3.8-8.9-6.2-14.6-6.2z" fill="#00bfb3"/>
|
||||||
|
<path d="m116.7 148.6c1-1.6 1.9-3.3 2.7-5.1h-29.3c3.1 7.1 8.2 13.2 14.7 17.4 1.6-1.1 3.1-2.2 4.6-3.5.7-.6 1.4-1.3 2.1-2 1.9-2 3.7-4.3 5.2-6.8z" fill="#019b8f"/>
|
||||||
|
<path d="m111.4 99.6c-.7-.7-1.4-1.3-2.1-2-1.4-1.3-3-2.4-4.6-3.5-6.4 4.2-11.5 10.3-14.7 17.4h29.3c-.8-1.8-1.7-3.5-2.7-5.1-1.4-2.5-3.2-4.8-5.2-6.8z" fill="#f9b110"/>
|
||||||
|
<path d="m126.7 87.5c-8.1 0-15.7 2.4-22 6.6 1.6 1.1 3.1 2.2 4.6 3.5.7.6 1.4 1.3 2.1 2 2 2.1 3.8 4.3 5.3 6.8 1 1.6 1.9 3.3 2.7 5.1h26c5.7 0 10.9-2.4 14.6-6.2-7.2-10.7-19.4-17.8-33.3-17.8z" fill="#fed10a"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
15
elasticsearch-cloudron/package.sh
Executable file
15
elasticsearch-cloudron/package.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Create a temporary directory for packaging
|
||||||
|
mkdir -p build
|
||||||
|
rm -rf build/*
|
||||||
|
|
||||||
|
# Copy all files to the build directory
|
||||||
|
cp -r CloudronManifest.json Dockerfile .env start.sh stop.sh README.md logo.svg build/
|
||||||
|
|
||||||
|
# Create the package
|
||||||
|
cd build
|
||||||
|
cloudron package
|
||||||
|
|
||||||
|
echo "Package created successfully!"
|
69
elasticsearch-cloudron/start.sh
Normal file
69
elasticsearch-cloudron/start.sh
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source environment variables
|
||||||
|
source /app/.env
|
||||||
|
|
||||||
|
# Set default variables if not provided
|
||||||
|
ELASTIC_PASSWORD=${ELASTIC_PASSWORD:-cloudron}
|
||||||
|
STACK_VERSION=${STACK_VERSION:-8.17.3}
|
||||||
|
CLUSTER_NAME=${CLUSTER_NAME:-cloudron-cluster}
|
||||||
|
LICENSE=${LICENSE:-basic}
|
||||||
|
|
||||||
|
# Ensure data directories exist
|
||||||
|
mkdir -p /app/data/elasticsearch
|
||||||
|
mkdir -p /app/data/certs
|
||||||
|
|
||||||
|
# Set permissions
|
||||||
|
chmod -R 777 /app/data
|
||||||
|
|
||||||
|
# Check if certificates exist, if not create them
|
||||||
|
if [ ! -f /app/data/certs/ca.crt ]; then
|
||||||
|
echo "Creating certificates..."
|
||||||
|
# Create temporary container to generate certificates
|
||||||
|
docker run --rm \
|
||||||
|
-v /app/data/certs:/usr/share/elasticsearch/config/certs \
|
||||||
|
--name es_certs \
|
||||||
|
docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} \
|
||||||
|
/bin/bash -c "
|
||||||
|
elasticsearch-certutil ca --silent --pem -out config/certs/ca.zip &&
|
||||||
|
unzip config/certs/ca.zip -d config/certs &&
|
||||||
|
elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key --name es01 --dns es01,localhost --ip 127.0.0.1 &&
|
||||||
|
unzip config/certs/certs.zip -d config/certs
|
||||||
|
"
|
||||||
|
echo "Certificates created."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start Elasticsearch
|
||||||
|
echo "Starting Elasticsearch..."
|
||||||
|
docker run \
|
||||||
|
-d \
|
||||||
|
--restart=always \
|
||||||
|
--name elasticsearch \
|
||||||
|
-v /app/data/elasticsearch:/usr/share/elasticsearch/data \
|
||||||
|
-v /app/data/certs:/usr/share/elasticsearch/config/certs \
|
||||||
|
-e node.name=es01 \
|
||||||
|
-e cluster.name=${CLUSTER_NAME} \
|
||||||
|
-e discovery.type=single-node \
|
||||||
|
-e ELASTIC_PASSWORD=${ELASTIC_PASSWORD} \
|
||||||
|
-e bootstrap.memory_lock=true \
|
||||||
|
-e xpack.security.enabled=true \
|
||||||
|
-e xpack.security.http.ssl.enabled=false \
|
||||||
|
-e xpack.license.self_generated.type=${LICENSE} \
|
||||||
|
-e xpack.ml.use_auto_machine_memory_percent=true \
|
||||||
|
-e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
|
||||||
|
--ulimit memlock=-1:-1 \
|
||||||
|
-p 127.0.0.1:9200:9200 \
|
||||||
|
-p 127.0.0.1:9300:9300 \
|
||||||
|
docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
|
||||||
|
|
||||||
|
# Wait for Elasticsearch to be up
|
||||||
|
echo "Waiting for Elasticsearch to start..."
|
||||||
|
until $(curl --output /dev/null --silent --head --fail http://localhost:9200); do
|
||||||
|
printf '.'
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
echo "Elasticsearch is up and running!"
|
||||||
|
|
||||||
|
# Keep script running
|
||||||
|
exec tail -f /dev/null
|
9
elasticsearch-cloudron/stop.sh
Normal file
9
elasticsearch-cloudron/stop.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Stop Elasticsearch container
|
||||||
|
echo "Stopping Elasticsearch..."
|
||||||
|
docker stop elasticsearch || true
|
||||||
|
docker rm elasticsearch || true
|
||||||
|
|
||||||
|
echo "Elasticsearch stopped."
|
Loading…
x
Reference in New Issue
Block a user