Already have Elasticsearch hosted with AWS OpenSearch, Elastic Cloud or planning to hosting it yourself?
You can now access all of Appbase.io features such as search preview, actionable analytics and granular security with an Elasticsearch cluster hosted anywhere with the Bring Your Own Cluster
deployment mode.
This diagram highlights how Appbase.io works. It directly interacts with an underlying Elasticsearch cluster and acts as an API gateway for clients to interact with. Appbase.io supercharges your Elasticsearch cluster with a streamlined development experience, out of the box search analytics and fine-grained security features.
Quickstart Recipes
You can install Appbase.io on any server environment. We have created quickstart recipes to make the installation process seamless for the following platforms:
Using Appbase.io
Appbase.io dashboard offers the most seamless experience for running Appbase.io with your own Elasticsearch cluster.
Step 1 - Go to the Create Cluster Link. You will be redirected to sign up or login if you aren't already logged in.
You should see the above screen.
Step 2 - Select the pricing plan. Read more about pricing plans over here.
Step 3 - Select the region to add Appbase.io to. It is recommended that you pick a region closest to where your Elasticsearch cluster is running.
Step 4 - Enter a name for your Appbase.io instance. And enter the Elasticsearch URL. Use the Verify Connection
button to ensure that this URL is accessible.
Note: We recommend either having an open Elasticsearch access policy or one based on Basic Authentication till the Appbase.io instance is deployed.
Step 5 - Hit Create Cluster button and hang tight till your cluster is deployed.
That's all! It take around 5-10 mins for your Appbase.io instance to be deployed. Once the deployment is complete, you will be able to see it in your Clusters List with a Bring your own cluster
tag.
Note: If you have IP based restriction for your cluster, now you can whitelist the Appbase.io Cluster IP and restrict direct access to your cluster. Read More
Accessing Appbase.io Dashboard
Now that the Appbase.io Cluster is deployed, we can access the Dashboard using the Explore Cluster Action on the Clusters Details page.
This will give you access to all the Appbase.io features such as:
- Better dev tools: Data importer, data browser, logs view, and search relevancy tester
- Actionable search and click analytics
- Fine-grained security permissions
Accessing Elasticsearch Data using REST API
You can access the Elasticsearch REST APIs via the Appbase.io Instance URL. You can either use the master credentials or create additional API keys with fine-grained access permissions.
Changing Elasticsearch URL
You can update your Elasticsearch cluster URL at any point using the Appbase.io dashboard. All you need to do is just enter new URL and hit Update Cluster Settings
.
Note: Make sure your new Elasticsearch cluster URL has open access till the deployment is completed.
Sharing Cluster
With Appbase.io Dashboard, you can easily share the cluster with your team members. Each user can have a Viewer or an Admin role.
Using AMI
You can deploy Appbase.io using Amazon Machine Image (AMI) on the AWS Marketplace. With the AMI, you can install Appbase.io with one click on an AWS EC2 instance.
Here are the steps that you can follow to install Appbase.io using AMI
Step 1 - Create an Appbase.io instance.
Step 2 - Select Appbase.io AMI from AWS Marketplace
Step 3 - Select an EC2 Instance for Deploying Appbase.io. We recommend using the t2 medium instance size.
That's all you need to follow in order to deploy an Appbase.io cluster 🚀. Once the EC2 machine is created and running successfully, you can get Public DNS / IP address from the EC2 dashboard. This URL becomes your end point for accessing the Appbase.io services. You can also point your domain to this DNS or IP.
Note: We highly recommend using the cluster with TLS security enabled, as Appbase.io is intended to be used as a frontend for Elasticsearch.
Adding TLS Certificate
For setting up TLS, you may also want to point EC2 public DNS to your domain. For more information on how to register/point domain to EC2 instance you can check docs.
Now, let's add TLS certificate to EC2 public DNS / custom domain
Step 1- Get TLS certificate with .pem
& .key
file.
Note: You can obtain a free certificate using https://letsencrypt.org/ or use a self-signed certificate as well.
Step 2- Access your EC2 instance using ssh
. From EC2 dashboard you can select instance and click on Connect to get ssh
login details about your machine.
Step 3- Copy .pem
file content to /etc/nginx/server.crt
using vim
/nano
editor
# Open the file
sudo vim /etc/nginx/server.crt
# Paste the code
cmd/ctrl + v
# Save the file
:wq
Step 4- Copy .key
file content to/etc/nginx/server.key
using similar approach mentioned above.
Step 5- Open sudo vim /etc/nginx/nginx.conf
.
Step 6- Configuration for TLS is already present in nginx.conf
in commented form. You can uncomment it.
- Uncomment lines
L125
-L213
. - Comment out or remove the server listening for PORT 80.
Step 7- Restart nginx service using following command
sudo systemctl restart nginx
Configuring Appbase.io
Once your EC2 machine is up and running, you can open the EC2 public DNS. You might come across following page initially.
You can start configuring Appbase.io by clicking on configure page link OR opening http://public-dns/configure
URI directly.
Step 1: Setup Appbase.io credentials. This are the master credentials that will be used for accessing the Appbase.io Service from the Dashboard. Your initial user name is ec2-user
and your initial password is your EC2 instance id.
Step 2: Once you login, you can reset your username and password. Enter the your Elasticsearch URL, APPBASE_ID obtained while setting Appbase.io instance and save the details.
Hold tight for 5-10s till the Appbase.io service restarts with your new configurations.
Getting Appbase.io URL
Once EC2 machine is up and running, your EC2 public DNS becomes the Appbase.io URL. This can be used with the configured USERNAME
and PASSWORD
to test the Appbase.io connection.
Example
curl -u="USERNAME:PASSWORD" http://EC2-PUBLIC-[IP/DNS]
Accessing Appbase.io Dashboard
Now that all our configurations are complete, in order to access all the Appbase.io Services, let us sign in to the Appbase.io dashboard.
- Step 1 - Sign in into Appbase.io dashboard using your EC2 Public IP / Domain with Username and Password configured above.
🔥 Hurray! You can now start accessing all the Appbase.io services using Appbase.io Dashboard.
Using Docker
Run appbase.io via a single docker compose file. This setup enables you to run appbase.io and Elasticsearch together with single command, i.e. docker-compose up -d
. 😎
The dockerized setup is composed of the following services:
appbase.io
Allows you to access all appbase.io features like search preview, actionable analytics and granular security with any Elasticsearch cluster hosted anywhere.
Note: Make sure your appbase.io container has complete access to Elasticsearch. You can use Elasticsearch URL with Basic Auth in configuring dashboard or IP restricted Elasticsearch URL where IP of your appbase.io cluster hosted using docker setup is white listed.
Configure
This service comes with simple user interface which allows you to set credentials and other environment variables. Also it watches for environment variable file changes: if any variable in the file is changed, it can hot-reload the appbase.io service.
Nginx
This service helps in setting up reverse proxy for Appbase.io Service and serving Configuration service. It also helps in serving data using with TLS certificate, which is recommended for production.
Elasticsearch
An open-source single-node Elasticsearch cluster is run. This is optional: You can use the docker compose file here to run without Elasticsearch.
The steps described here assumes that you have Docker already installed on your system.
-
Step 1: Get Appbase ID following the steps mentioned here
-
Step 2: Clone the repository
git clone https://github.com/appbaseio/arc-dockerized.git && cd arc-dockerized
-
Step 3: Build and run docker containers
We highly recommend using Appbase.io with TLS so that we can easily bind this with the Appbase.io Dashboard. To simplify the process of docker build, test and deployment, we have created 2 versions:
1 - Install Appbase.io + Nginx with TLS setup (Recommended for production)
- Change TLS certificate and keys with production files. Please obtain TLS certificate and key for your domain using Let's Encrypt or any other provider. Update the files in nginx/certs.
- In case you are using different name than mentioned in nginx/certs folder, please update them in the
docker-compose.yaml
file as well.
Also, make sure you update the file names in the nginx/default.conf file.
docker-compose up -d
2 - Install Appbase.io + Elasticsearch (If you want to deploy appbase.io Along with Elasticsearch.)
docker-compose -f docker-compose-with-elasticsearch.yaml up -d
🔥 Thats all, our containers should be up and running. Next, let us configure the environment variables required by Appbase.io service.
-
Step 4: Open configuration service URL in your browser, i.e. http://localhost (or https://your-domain.com as configured in your nginx settings).
Note: If you are running this setup on an virtual machine, make sure ports
80
and443
are set in your inbound rules for the cluster. -
Step 5: Set username and password credentials.
-
Step 6: Configure Elasticsearch URL and Appbase ID obtained above.
Note: Once you save the configuration, it may take 5-10s to restart the appbase.io service.
-
Step 7: Start using Appbase.io Services using Appbase.io Dashboard. Here you will have to input Appbase.io Cluster URL which will be of the form http(s)://localhost_OR_cluster_url. Enter the username and password values that you configured in Step 5.
Using Kubernetes
Add appbase.io to your Kubernetes environment with our Helm chart.
Installing appbase.io with Helm
Add the appbase.io Helm chart repository first:
helm repo add appbase https://opensource.appbase.io/helm-charts/
We're now good to install it: helm install appbaseio appbase/appbaseio --set <variables>
The following variables are mandatory:
elasticsearch.scheme
(e.g. http or https),elasticsearch.host
(e.g. my-search.com),elasticsearch.port
(e.g. 9200) define the upstream Elasticsearch cluster. We also supportelasticsearch.username
andelasticsearch.password
variables for Basic Auth enabled clusters but these are optional.appbase.id
is the appbase.io instance ID that is used to track subscription status and can be obtained from dash.appbase.io/install.appbase.username
andappbase.password
are user-defined values for providing the initial root user access via the appbase.io API gateway.
For a full list of supported variables, check out our project README.
How to create Appbase.io instance?
Creating an Appbae.io instance will enable you to access Appbase.io Dashboard. While following instance creation process, you will get an APPBASE_ID
. This will be helpful while configuring Appbase.io, with any of the deployment options listed below.
Follow the steps listed below to successfully create an Appbase.io instance.
Step 1 - Go to Appbase.io Dashboard.
Step 2 - Enter your email address
Step 3 - You will receive an OTP on entered email address. Enter OTP to verify the email address
Step 4 - You will receive an email with APPBASE_ID
which can be used with Appbase.io configuration.