Part 1: Run Fusion and Create an App
Movie Search
.
App to search for movies
.
Part 2: Get Data In
ml-latest-small.zip
file.
Fusion can parse .zip
files, but for simplicity we will index just one file from the archive (movies.csv
).
movies.csv
file contains a list of 9,125 movie titles, plus a header row. Here is a truncated listing:admin
, and then click Log in.
Movie_Search
is selected in the collection picker. This is the default collection for the Movie Search app, and where Fusion will place index data.
movies.csv
file, select it, and then click Open.
movies_csv-Movie_Search
and the default file ID movies.csv
. These default values are fine.
Movies CSV file
.
movies.csv
file, and then displays a preview of how they would be indexed.
You have finished configuring the datasource. At the bottom of the page, click Cancel.
genres
became genres_t
(the text_general
field type) and genres_s
(the string
field type). String fields are useful for faceting and sorting, while text fields are for full-text search. At this point, Fusion does not know whether you intend to use this field for faceting and sorting, for full-text search, or for both.title
became title_t
and title_s
for the same reason.movieId
became movieId_t
and movieId_s
for the same reason. This might seem odd, because the original field contains numbers. But, at this stage, Fusion creates text_general
and string
fields. To use the contents of this field as an integer, you would map the field to an integer field._lw
. These fields contain data that Fusion creates for its own housekeeping. You can ignore them.
These fields are created by the Solr Dynamic Field Name Mapping stage in the default index pipeline. This stage attempts to automatically detect field types, and renames fields accordingly. For this tutorial, you will manually configure the fields instead.
genres
, movieId
, and title
.
genres
field into multiple values so each value can be used as a facet in Part 3 of this tutorial.genres
.
genres_ss
.
The field suffix _ss
means that this field is a multi-valued string field.
genres
field; it only has genres_ss
.
genres
to genres_ss
:
Before | After |
![]() | ![]() |
movieId
field is a unique document identifier. It should be copied into the document’s id
field.title
should be searchable as a text field, so you move it to the field title_txt
.Before | After |
![]() | ![]() |
genres_ss
field has been parsed as a single-value field, but you can see that it is really a pipe-delimited array of values. To split this field into its constituent values, you will add a Regex Field Extraction stage to your index pipeline. This stage uses regular expressions to extract data from specific fields. It can append or overwrite existing fields with the extracted data, or use the data to populate new fields.[...]
under Source Fields, and then click Edit genres_ss
, and then click Apply.
genres_ss
.
input_string
.
genres_ss
field:
Before | After |
![]() | ![]() |
genres_ss
field, expand it and values
under it by clicking the right triangle title_txt
field also contains the year in which the movie was released. Instead of including the year in your full-text search field, it would be more useful as a separate field that you can use for faceting. This is another job for the Regex Field Extraction stage.[...]
under Source Fields, and then click Edit title_txt
, and then click Apply.
year_i
.
The _i
suffix indicates an integer point field (specifically, that the field is a dynamic field with a pint
field type). Fusion will create this new field whenever the regular expression matches the contents of the source field.
title_txt
value:
1
. This lets the index pipeline stage transfer the year into the year_i
field.
year_i
field:
Before | After |
![]() | ![]() |
title_txt
field still includes the year of the film’s release, which you have extracted into its own field, year_i
. Let us trim that information from the title_txt
values so that only the title text remains.title_txt
, and then click Apply.
title_txt
.
overwrite
.
title_txt
value:
1
.
title_txt
field with only the title string:
Before | After |
![]() | ![]() |
movies.csv
file, using the configuration you just saved.
Your datasource job is finished when the Index Workbench displays Status: success
in the upper left. If the status does not change, go back to the launcher and relaunch your app.
_lw_data_source_s
field. For various reasons, you may wish to remove all documents associated with a datasource from a collection before using CrawlDB to add relevant documents back to the collection. This process is known as reindexing.To accomplish this, navigate to Indexing _lw_data_source_s
field. After the documents are removed from the collection, you can repeat [the steps above”/> to reindex the data.Before | After |
![]() | ![]() |
genres_ss
and year_i
fields so that users can easily filter their search results.Part 3: Get Data Out
genres_ss
. A list of one or more genre labelstitle_txt
. The name of the movieyear_i
. The movie’s year of release_ss
(multi-valued string fields) contain one or more strings values.
String fields require an exact match between the query string and the
string value stored in that field.
_txt
(text fields) contain text.
Text fields allow for free text search over the field contents.
For example, because the movie titles are stored in a text field, a search on
the word “Star” will match movies titled “Star”, “A Star is Born”, all movies in the
Star Wars and Star Trek franchises, as well as “Dark Star”, “Lone Star”, and “Star Kid”.
_i
(point integer fields) contain integer values.
Numeric fields allow range matches as well as exact matches, and point integer fields allow efficient comparisons between the field’s values and the search criteria.
\*:*
), which returns all documents in the collection. You will enter a different search query to get started with facet configuration.star
, and then press Enter or click Search movie-search
.
To see more of the default output, you can perform other searches if you like.\*:*
to return all documents, and then press Enter or click Search genres_ss
and year_i
. For example, a user could search for science fiction of the 1950s in just a few clicks.genres_ss
field is ready for faceting as-is.genres_ss
field.
Sci-Fi
for genres_ss
:
index
(alphabetical ascending order) or count
(number of documents). Or you can add field facets by configuring the Field Facet stage.year_i
field as you did above for the genres_ss
field, you would get one facet per year, which is not very useful.But the year_i
field will be more usable if you configure range faceting. Range faceting is a way of grouping values together so that the user can select a value range instead of one specific value. For example, range facets are commonly used with pricing (100) or ratings (4 stars or higher). Here, we group years by decade.Range faceting requires sending an additional query parameter to Fusion’s Solr core. You can configure this with the Additional Query Parameters stage. In this case, you will use several of Solr’s range facet query parameters.Use the Additional Query Parameters stage to configure range faceting for the year_i
field:Parameter Name | Parameter Value |
facet.range | year_i |
facet.range.start | 1900 |
facet.range.end | 2020 |
facet.range.gap | 10 |
facet.range.include | outer |
append
is fine.
year_i
field, for example, by using a text field or dropdown list.id
field, but users do not care about this field.
You will use the Query Fields stage to specify the fields that users really care about.
title_txt
.
year_i
.
Part 4: Improve Relevancy
localhost:8764
.
admin
, and then click Login.
The Fusion launcher appears.
title_txt
. You can filter the list of possible values to help you.
id
.
star wars
.
The top results are not your favorite titles:
star wars
.
Movie_Search_signals
).
COLLECTION_NAME_signals
for raw signals and COLLECTION_NAME_signals_aggr
for aggregated signals (in this case, Movie_Search_signals
and Movie_Search_signals_aggr
). Just as you did with your primary collection, you can use Query Workbench to explore the data in the _signals
collection.type:click
.
count_i
field shows the number of click signals you generated for this event. For example, given the corresponding doc_id
for Star Wars: Episode IV - A New Hope, the count_i
equals 4000.doc_id_s
field in the Movie_Search_signals
collection is the same as the contents of the id
field in your Movies_Search
collection, that is, the ID of the document that you clicked in Query Workbench, or for which you specified a number of clicks, and then clicked Simulate*.
** The query_orig_s
field in the Movie_Search_signals
collection contains the original query string that produced this search result.
doc_id
.
count_i
.
Movie_Search_click_signals_aggregation
from the job list.Movie_Search_signals_aggr
collection.doc_id
.
aggr_count_i
.
aggr_count_i
. Number of signals that have been aggregated (in this case, 3000)aggr_id_s
. Name of the aggregation jobaggr_job_id_s
. Job IDaggr_type_s
. Aggregation typeMovie_Search
).
star wars
.
Now, “Star Wars: Episode IV - A New Hope” is the first search result, followed by Episode V and then VI. These search results are automatically boosted by the default configuration of the
Boost with Signals query pipeline stage,
which boosts on the id
field.
Movie_Search
) with and without the Boost with Signals stage enabled.
Deploy Fusion 5 on Azure Kubernetes Service (AKS)
setup_f5_aks.sh
script in the fusion-cloud-native
repository.setup_f5_aks.sh
script is the basic foundation for getting started and proof-of-concept purposes. For information about custom values in a production-ready environment, see Custom values YAML file.helm
as it is required to install Fusion for any K8s platform.
On MacOS, you can do:3.0.0
; check your Helm version by running helm version --short
.install-roles
directory.kubectl
, e.g.:role.yaml
and cluster-role.yaml
files to that namespacehelm install
command as the <install_user>
fusion-cloud-native-master
directory.The https://github.com/lucidworks/fusion-cloud-native/blob/master/setup_f5_aks.sh script provided in this repo is strictly optional.
The script is mainly to help those new to Kubernetes and/or Fusion get started quickly.
If you’re already familiar with K8s, Helm, and AKS, then you use Helm directly to install Fusion into an existing cluster or one you create yourself using the process described <<helm-only,here>>
.If you’re new to Azure, then please visit https://azure.microsoft.com/en-us/free/search/ to set up an account.kubectl
and az
using the links provided below:Required AKS Command-line Tools:kubectl
: https://kubernetes.io/docs/tasks/tools/install-kubectl/az
: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latestaz login
command (az login –help
to see available options).westus2
. For a list of locations you can choose, see https://azure.microsoft.com/en-us/global-infrastructure/locations/.Use the Azure console in your browser to create a resource group, or simply do:azure-cli
(az
) command-line tools installed.az
login working.-c
parameter.Use the --help
option to see full script usage.By default, our script installs Fusion into the default namespace; think of a K8s namespace as a virtual cluster within a physical cluster. You can install multiple instances of Fusion in the same cluster in separate namespaces. However, please do not install more than one Fusion release in the same namespace.You can override the namespace using the -n
option. In addition, our script uses f5 for the Helm release name; you can customize this using the -r
option. Helm uses the release name you provide to track a specific instance of an installation, allowing you to perform updates and rollback changes for that specific release only.You can also pass the --preview
option to the script, which enables soon-to-be-released features for AKS, such as deploying a multi-zone cluster across 3 availability zones for higher availability guarantees. For more information about the Availability Zone feature, see https://docs.microsoft.com/en-us/azure/aks/availability-zones.It takes a while for AKS to spin up the new cluster. The cluster will have three Standard_D4_v3 nodes which have 4 CPU cores and 16 GB of memory. Behind the scenes, our script calls the az aks create
command.setup_f5_aks.sh
script installs Helm’s tiller
component into your AKS cluster with the cluster admin role. If you don’t want this, then please upgrade to Helm v3.setup_f5_aks.sh
script, proceed to <<verifying,Verifying the Fusion Installation>>
.setup_f5_aks.sh
script exposes the Fusion proxy service on an external IP over HTTP. This is done for demo or getting started purposes. However, you’re strongly encouraged to configure a K8s Ingress with TLS termination in front of the proxy service.Use the -t
and -h <hostname>
options to have our script create an Ingress with a TLS certificate issued by Let’s Encrypt.-t -h <hostname>
options when installing your cluster, our script created an additional values yaml file named tls-values.yaml
.To make things easier for you when upgrading, you should add the settings from this file into your main custom values yaml file. For example:tls-values.yaml
file when upgrading.\https://<fusion-host>:6764/admin/
.kubectl
if not using the default:-n
with every command.Get a list of running pods: k get pods
Get logs for a pod using a label: k logs –l app.kubernetes.io/component=query-pipeline
Get pod deployment spec and details: k get pods <pod_id> -o yaml
Get details about a pod events: k describe po <pod_id>
Port forward to a specific pod: k port-forward <pod_id> 8983:8983
SSH into a pod: k exec -it <pod_id> -- /bin/bash
CPU/Memory usage report for pods: k top pods
Forcefully kill a pod: k delete po <pod_id> --force --grace-period 0
Scale up (or down) a deployment: k scale deployment.v1.apps/<id> --replicas=N
Get a list of pod versions: k get po -o jsonpath='{..image}' | tr -s '[[:space:]]' '\n' | sort | uniq
kubectl logs <pod_id>
to see the logs for that pod; to see the logs for previous versions of a pod, use: kubectl logs <pod_id> -p
.
You can also look at the actions Kubernetes performed on the pod using kubectl describe po <pod_id>
.To see a list of Fusion services, do:--upgrade
option with our setup scripts in this repo.The scripts in this repo automatically pull in the latest chart updates from our Helm repository and deploy any updates needed by doing a diff of your current installation and the latest release from Lucidworks.
To see what would be upgraded, you can pass the --dry-run
option to the script.kubectl get services --namespace <namespace>
to determine when the load balancer is setup and its IP address. Direct your browser to http://<GrafanaIP>:3000
and enter the username admin@localhost
and the password that was returned in the previous step.This will log you into the application. It is recommended that you create another administrative user with a more desirable password.The dashboards and datasoure will be setup for you in grafana, simply navigate to Dashboards
-> Manage
to view the vailable dashboardsDeploy Fusion 5 on Amazon Elastic Kubernetes Service (EKS)
setup_f5_eks.sh
script in the fusion-cloud-native
repository.In addition, this topic provides information about how to configure IAM roles for the service account.helm
as it is required to install Fusion for any K8s platform.
On MacOS, you can do:3.0.0
; check your Helm version by running helm version --short
.install-roles
directory.kubectl
, e.g.:role.yaml
and cluster-role.yaml
files to that namespacehelm install
command as the <install_user>
fusion-cloud-native-master
directory.The https://github.com/lucidworks/fusion-cloud-native/blob/master/setup_f5_eks.sh setup_f5_eks.sh
script provided in this repo is strictly optional.
The script is mainly to help those new to Kubernetes and/or Fusion get started quickly.
If you’re already familiar with K8s, Helm, and EKS, then you use Helm directly to install Fusion into an existing cluster or one you create yourself using the process described <<helm-only,here>>
.If you’re new to Amazon Web Services (AWS), then please visit the Amazon Web Services https://aws.amazon.com/getting-started/ to set up an account.If you’re new to Kubernetes and EKS, then we recommend going through Amazon’s https://eksworkshop.com/introduction/ before proceeding with Fusion.kubectl
, aws
, eksctl
, aws-iam-authenticator
using the links provided below:Required AWS Command-line Tools:aws configure
to configure a profile for authenticating to AWS. You’ll use the profile name you configure in this step, which defaults to default
, as the -p
argument to the setup_f5_eks.sh
script in the next section.setup_f5_eks.sh
script to install Fusion 5.x in an EKS cluster.my-eks-cluster
, profile-name
, and fusion-namespace
with your cluster, profile, and namespace values.--create
option with either demo
or multi_az
.cluster-name
with the name of the cluster you already created.profile-name
with the name of your profile.default
if you ran the AWS configure command without giving the profile a name.Use the --help
option to see full script usage.setup_f5_eks.sh
script installs Helm’s tiller
component into your EKS cluster with the cluster admin role. If you don’t want this, then please upgrade to Helm v3.setup_f5_eks.sh
script creates a service account that provides S3 read-only permissions to the created pods.setup_f5_eks.sh
script, proceed to the <<verifying,Verifying the Fusion Installation>>
section below.eksctl
(https://eksctl.io/). By default it will setup the following resources in your AWS account:192.168.0.0/16
/19
CIDR range, along with the corresponding route tables.m5.2xlarge
, with 3 instances spanning the public subnets.setup_f5_eks.sh
script exposes the Fusion proxy service on an external DNS name provided by an ELB over HTTP. This is done for demo or getting started purposes. However, you’re strongly encouraged to configure a K8s Ingress with TLS termination in front of the proxy service.
See: https://aws.amazon.com/premiumsupport/knowledge-center/terminate-https-traffic-eks-acm/Our EKS script creates a classic ELB for exposing fusion proxy service. In case you need to change this behavior and use https://github.com/kubernetes-sigs/aws-load-balancer-controller instead you can use the following parameters when running the setup_f5_eks.sh
script:kube-system
namespace is being used for installing the aws-load-balancer-controller
because pods priorityClassName
is set to system-cluster-critical
.In case you need to deploy an internal ALB you can use the --internal-alb
option. This will create the nodes in the internal subnets. Fusion will be reachable from an AWS instance located in any of the external subnets on the same VPC. To use an ALB also an ingress with a DNS name is required, you can use the -h
option to create an ingress with the required DNS name.Finally, use Route 53 or your DNS provider for creating an A ALIAS DNS record for your DNS name pointing to the ingress ADRESS. You can get the address listing the ingress using the command kubectl get ing
.\https://<fusion-host>:6764/admin/
.kubectl
if not using the default:-n
with every command.Get a list of running pods: k get pods
Get logs for a pod using a label: k logs –l app.kubernetes.io/component=query-pipeline
Get pod deployment spec and details: k get pods <pod_id> -o yaml
Get details about a pod events: k describe po <pod_id>
Port forward to a specific pod: k port-forward <pod_id> 8983:8983
SSH into a pod: k exec -it <pod_id> -- /bin/bash
CPU/Memory usage report for pods: k top pods
Forcefully kill a pod: k delete po <pod_id> --force --grace-period 0
Scale up (or down) a deployment: k scale deployment.v1.apps/<id> --replicas=N
Get a list of pod versions: k get po -o jsonpath='{..image}' tr -s '[[:space:]]' '\n' sort uniq
kubectl logs <pod_id>
to see the logs for that pod; to see the logs for previous versions of a pod, use: kubectl logs <pod_id> -p
.
You can also look at the actions Kubernetes performed on the pod using kubectl describe po <pod_id>
.To see a list of Fusion services, do:--upgrade
option with our setup scripts in this repo.The scripts in this repo automatically pull in the latest chart updates from our Helm repository and deploy any updates needed by doing a diff of your current installation and the latest release from Lucidworks.
To see what would be upgraded, you can pass the --dry-run
option to the script.kubectl get services --namespace <namespace>
to determine when the load balancer is setup and its IP address. Direct your browser to http://<GrafanaIP>:3000
and enter the username admin@localhost
and the password that was returned in the previous step.This will log you into the application. It is recommended that you create another administrative user with a more desirable password.The dashboards and datasoure will be setup for you in grafana, simply navigate to Dashboards
-> Manage
to view the vailable dashboardsadmin
permissions or IAM:FullAccess
. Complete the following steps:f5-connector-plugin
service account and annotates it with the IAM role.policy/AmazonS3ReadOnlyAccess
policy.Deploy Fusion 5 on Google Kubernetes Engine (GKE)
setup_f5_gke.sh
script in the fusion-cloud-native
repository.helm
as it is required to install Fusion for any K8s platform.
On MacOS, you can do:3.0.0
; check your Helm version by running helm version --short
.install-roles
directory.kubectl
, e.g.:role.yaml
and cluster-role.yaml
files to that namespacehelm install
command as the <install_user>
fusion-cloud-native-master
directory.helm
as it is required to install Fusion for any K8s platform.
On MacOS, you can do:3.0.0
; check your Helm version by running helm version --short
.install-roles
directory.kubectl
, e.g.:role.yaml
and cluster-role.yaml
files to that namespacehelm install
command as the <install_user>
fusion-cloud-native-master
directory.The https://github.com/lucidworks/fusion-cloud-native/blob/master/setup_f5_gke.sh setup_f5_gke.sh
script provided in this repo is strictly optional.
The script is mainly to help those new to Kubernetes and/or Fusion get started quickly.
If you’re already familiar with K8s, Helm, and GKE, then you can skip the script and just use Helm directly to install Fusion into an existing cluster or one you create yourself using the process described <<helm-only,here>>
.gcloud
command-line tools, you can skip to <<cluster-create,Create a Fusion cluster in GKE>>
.These steps set up your local Google Cloud SDK environment so that you’re ready to use the command-line tools to manage your Fusion deployment.Usually, you only need to perform these setup steps once. After that, you’re ready to create a cluster.For a nice getting started tutorial for GKE, see: https://cloud.google.com/kubernetes-engine/docs/deploy-app-clusterHow to set up the Google Cloud SDK:gcloud auth login
gcloud config set compute/zone <zone-name>
If you are working with regional clusters instead of zone clusters, use gcloud config set compute/region <region-name>
instead.gcloud config set core/account <email address>
gcloud projects create <new-project-name>
If you have already created a project, for example in https://console.cloud.google.com/, then skip to the next step.gcloud config set project <project-name>
kubectl
using:setup_f5_gke.sh
script to install Fusion 5.x in a GKE cluster. To create a new, single-node demo cluster and install Fusion, simply do:--help
option to see script usage. If you want the script to create a cluster for you, then you need to pass the --create
option with either demo
or multi_az
. If you don’t want the script to create a cluster, then you need to create a cluster before running the script and simply pass the name of the existing cluster using the -c
parameter.If you pass --create demo
to the script, then we create a single node GKE cluster (defaults to using n1-standard-8
node type). The minimum node type you’ll need for a 1 node cluster is an n1-standard-8
(on GKE) which has 8 CPU and 30 GB of memory. This is cutting it very close in terms of resources as you also need to host all of the Kubernetes system pods on this same node. Obviously, this works for kicking the tires on Fusion 5.1 but is not sufficient for production workloads.You can change the instance type using the -i
parameter; see: https://cloud.google.com/compute/docs/regions-zones/#available for an list of which machine types are available in your desired region.gke_<cluster>_<namespace>_fusion_values.yaml
which you can use to customize the Fusion chart.__setup_f5_gke.sh
script installs Helm’s tiller
component into your GKE cluster with the cluster admin role. If you don’t want this, then please upgrade to Helm v3.If you see an error similar to the following, then wait a few seconds and try running the setup_f5_gke.sh
script again with the same arguments as this is usually a transient issue:setup_f5_gke.sh
script, proceed to the <<verifying,Verifying the Fusion Installation>>
section below.When you’re ready to deploy Fusion to a production-like environment, see more information at Fusion 5 Survival Guide.<cluster>
value should be the name of a non-existent cluster; the script will create the new cluster.<project>
must match the name of an existing project in GKE. Run gcloud config get-value project
to get this value.<namespace>
Kubernetes namespace to install Fusion into, defaults to default
with release f5
<region-name>
value should be the name of a GKE region, defaults to us-west1
. Run gcloud config get-value compute/zone
to get this value.solr_zone
system property set to the zone it is running in, such as -Dsolr_zone=us-west1-a
.After running the setup_f5_gke.sh
script, proceed to the <<verifying,Verifying the Fusion Installation>>
section below.When you’re ready to deploy Fusion to a production-like environment, see more information at Fusion 5 Survival Guide.setup_f5_gke.sh
supports creating an Ingress with an TLS cert for a domain you own by passing: -t -h <hostname>
After the script runs, you need to create an A record in GCP’s DNS service to map your domain name to the Ingress IP. Once this occurs, our script setup uses https://letsencrypt.org/ to issue a TLS cert for your Ingress.To see the status of the Let’s Encrypt issued certificate, do:externalTrafficPolicy
of the proxy
service to Local
. This preserves the client
source IP and avoids a second hop for LoadBalancer and NodePort type services, but risks potentially
imbalanced traffic spreading. Although when running in a cluster with a dedicated pool for spark jobs
that can scale up and down freely it can prevent unwanted request failures. This behaviour can be
altered with the api-gateway.service.externalTrafficPolicy
value, which is set to Local
if the example values
file is used.You must use externalTrafficPolicy
=Local
for the Trusted HTTP Realm to work correctly.If you are already using a custom ‘values.yaml’ file, create an entry for externalTrafficPolicy
under api-gateway
service.nginx
ingress controller to fulfil your ingress definitions there are a couple
of options that are recommended to be set in the configmap:example-values
folder.
These can be passed to the install script using the --values
option, for example:--values
option can be passed multiple times, if the same configuration property is contained within multiple values
files then the values from the latest file passed as a --values
option are used.connector-plugin
section under pluginValues
. The pluginValues
section is a list of plugins and its resources. The following sample shows an example.<1>
The plugin ID. The plugin ID must match the plugin ID on the plugin ZIP file. without the lucidworks.
prefix. For example, if the plugin ID on the plugin ZIP file is lucidworks.sharepoint-optimized
, the plugin ID is sharepoint-optimized
.<2>
The resources settings. You may specify the limits, the requests, and the CPU and memory for each.<3>
The number of replicas per connector. This value is 1 by default.connector-plugin
section, you must reinstall the affected connector.-t -h <hostname>
options when installing your cluster, our script created an additional values yaml file named tls-values.yaml
.tls-values.yaml
file when upgrading.\https://<fusion-host>:6764/admin/
.kubectl
if not using the default:-n
with every command.Get a list of running pods: k get pods
Get logs for a pod using a label: k logs –l app.kubernetes.io/component=query-pipeline
Get pod deployment spec and details: k get pods <pod_id> -o yaml
Get details about a pod events: k describe po <pod_id>
Port forward to a specific pod: k port-forward <pod_id> 8983:8983
SSH into a pod: k exec -it <pod_id> -- /bin/bash
CPU/Memory usage report for pods: k top pods
Forcefully kill a pod: k delete po <pod_id> --force --grace-period 0
Scale up (or down) a deployment: k scale deployment.v1.apps/<id> --replicas=N
Get a list of pod versions: k get po -o jsonpath='{..image}' | tr -s '[[:space:]]' '\n' | sort | uniq
kubectl logs <pod_id>
to see the logs for that pod; to see the logs for previous versions of a pod, use: kubectl logs <pod_id> -p
.
You can also look at the actions Kubernetes performed on the pod using kubectl describe po <pod_id>
.To see a list of Fusion services, do:--upgrade
option with our setup scripts in this repo.The scripts in this repo automatically pull in the latest chart updates from our Helm repository and deploy any updates needed by doing a diff of your current installation and the latest release from Lucidworks.
To see what would be upgraded, you can pass the --dry-run
option to the script.kubectl get services --namespace <namespace>
to determine when the load balancer is setup and its IP address. Direct your browser to http://<GrafanaIP>:3000
and enter the username admin@localhost
and the password that was returned in the previous step.This will log you into the application. It is recommended that you create another administrative user with a more desirable password.The dashboards and datasoure will be setup for you in grafana, simply navigate to Dashboards
-> Manage
to view the vailable dashboardsFusion 5 Upgrades
Deployment type | Platform |
---|---|
Azure Kubernetes Service (AKS) | aks |
Amazon Elastic Kubernetes Service (EKS) | eks |
Google Kubernetes Engine (GKE) | gke |
<platform>_<cluster>_<release>_upgrade_fusion.sh
upgrade script file for editing.CHART_VERSION
to your target Fusion version, and save your changes.<platform>_<cluster>_<release>_upgrade_fusion.sh
script. The <release>
value is the same as your namespace, unless you overrode the default value using the -r
option.kubectl get pods
to see the changes applied to your cluster. It may take several minutes to perform the upgrade, as new Docker images are pulled from DockerHub. To see the versions of running pods, do:RollingUpdate
update policy:OnDelete
to avoid changing critical stateful pods in the Fusion deployment. To apply changes to Zookeeper after performing the upgrade (uncommon), you need to manually delete the pods. For example:updateStrategy
under the zookeeper
section in your "${MY_VALUES}"
file:setup_f5_<platform>.sh
script that matches your Kubernetes platform.
--upgrade
option.
--dry-run
option to the script.customize_fusion_values.sh
script. The upgrade script hard-codes the parameters and eases the need to remember which parameters to pass to the script. This is helpful when working with multiple K8s clusters. Make sure you check the script into version control alongside your custom values YAML files.Whenever you change the custom values YAML files for your cluster, you need to run the upgrade script to apply the changes. The script calls helm upgrade
with the correct parameters and --values
options.helm upgrade
without passing the custom values YAML files, the deployment will revert to using chart defaults, which you never want to do.kubeconfig
is pointing to the correct cluster and you’re using Heml v3. If not, the upgrade fails. Select the correct kubeconfig
before running the script.