Skip to content

Commit

Permalink
update readme to support running fusion on local kind k8s cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
mllu committed Feb 14, 2020
1 parent eabec09 commit b2ba580
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
23 changes: 23 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,29 @@ aks_<cluster>_<release>_upgrade_fusion.sh

If you're not running on managed K8s platform such as GKE, AKS, or EKS, you can use Helm to install the Fusion chart to an existing Kubernetes cluster.

For eample, you can run local https://kind.sigs.k8s.io/docs/user/quick-start/[`kind`^] k8s cluster on mac with the following commands.

To install Fusion locally, you should have a node with at least 12GB of memory, 100GB of disk and 4 CPU cores. The recommended setup is 16GB (or more) of memory and 8+ CPU cores.
```
# assume you have https://brew.sh/[`brew`^] installed
brew install kind
kind create cluster
```

Then run the https://github.com/lucidworks/fusion-cloud-native/blob/master/setup_f5_k8s.sh.sh[`setup_f5_k8s.sh`^] script to install Fusion 5.x into local k8s cluster.
```
./setup_f5_gke.sh -c <cluster_name> -r <release> -n <namespace> --helm-chart fusion-5.0.3-2.tgz
```

Make sure all the pods are healthy and running by watching the cluster rollout using: `kubectl get pods --watch`

Hit ctrl-c once all the pods are running.

Run the following commands to access Fusion locally on http://localhost:6764
```
kubectl port-forward svc/proxy 6764:6764
```

[[helm-only]]
=== Use Helm v3 to Install Fusion

Expand Down
Binary file added fusion-5.0.3-2.tgz
Binary file not shown.
18 changes: 17 additions & 1 deletion setup_f5_k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ FORCE=0
CUSTOM_MY_VALUES=()
MY_VALUES=()
DRY_RUN=""
HELM_CHART=""
SOLR_REPLICAS=1
SOLR_DISK_GB=50
NODE_POOL=""

Expand All @@ -40,6 +42,7 @@ function print_usage() {
echo -e " defaults to 'install' which installs Prometheus and Grafana from the stable Helm repo,"
echo -e " 'provided' enables pod annotations on Fusion services to work with Prometheus but does not install anything\n"
echo -e " --version Fusion Helm Chart version; defaults to the latest release from Lucidworks, such as ${CHART_VERSION}\n"
echo -e " --helm-chart Custom fusion helm chart to install to k8s cluster\n"
echo -e " --values Custom values file containing config overrides; defaults to gke_<cluster>_<namespace>_fusion_values.yaml"
echo -e " (can be specified multiple times to add additional yaml files, see example-values/*.yaml)\n"
echo -e " --upgrade Perform a Helm upgrade on an existing Fusion installation\n"
Expand Down Expand Up @@ -116,6 +119,14 @@ if [ $# -gt 0 ]; then
CHART_VERSION="$2"
shift 2
;;
--helm-chart)
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
print_usage "$SCRIPT_CMD" "Missing value for the --node-pool parameter!"
exit 1
fi
HELM_CHART="$2"
shift 2
;;
--values)
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
print_usage "$SCRIPT_CMD" "Missing value for the --values parameter!"
Expand Down Expand Up @@ -491,7 +502,12 @@ if [ "$is_helm_v3" != "" ]; then
kubectl create namespace "${NAMESPACE}"
fi
# looks like Helm V3 doesn't like the -n parameter for the release name anymore
helm install "${RELEASE}" ${lw_helm_repo}/fusion --timeout=240s --namespace "${NAMESPACE}" ${VALUES_STRING} --version "${CHART_VERSION}"
if [ "${HELM_CHART}" == "" ]; then
helm install "${RELEASE}" ${lw_helm_repo}/fusion --timeout=240s --namespace "${NAMESPACE}" ${VALUES_STRING} --version "${CHART_VERSION}"
else
# only support helm3 for local k8s cluster
helm install "${RELEASE}" "${HELM_CHART}" --timeout=240s --namespace "${NAMESPACE}" ${VALUES_STRING} --version "${CHART_VERSION}"
fi
else
helm install ${lw_helm_repo}/fusion --timeout 240 --namespace "${NAMESPACE}" -n "${RELEASE}" ${VALUES_STRING} --version "${CHART_VERSION}"
fi
Expand Down

0 comments on commit b2ba580

Please sign in to comment.