# Installation

The Hydrosphere platform can be installed in the following orchestrator's:

1. [Docker Compose](#docker-installation)
2. [Kubernetes](#kubernetes-installation)

## Docker installation

To install Hydrosphere using `docker-compose`, you should have the following prerequisites installed on your machine.

* [Docker 18.0+](https://docs.docker.com/install/)
* [Docker Compose 1.23+](https://docs.docker.com/compose/install/#install-compose)

### Install from releases

1. Download the latest **released\_version** release from the [releases page](https://github.com/Hydrospheredata/hydro-serving/releases):

```bash
export HYDROSPHERE_RELEASE=__released_version__
wget -O hydro-serving-${HYDROSPHERE_RELEASE}.tar.gz https://github.com/Hydrospheredata/hydro-serving/archive/${HYDROSPHERE_RELEASE}.tar.gz
```

1. Unpack the tar ball:

```bash
tar -xvf hydro-serving-${HYDROSPHERE_RELEASE}.tar.gz
```

1. Set up an environment:

```bash
cd hydro-serving-${HYDROSPHERE_RELEASE}
docker-compose up
```

### Install from source

1. Clone the serving repository:

   ```bash
   git clone https://github.com/Hydrospheredata/hydro-serving
   ```
2. Set up an environment:

   ```bash
   cd hydro-serving
   docker-compose up -d
   ```

To check the installation, open <http://localhost/>. By default, Hydrosphere UI is available at port **80**.

## Kubernetes installation

{% hint style="warning" %}
By default, Hydrosphere spins up a minimal installation applicable only for **testing** purposes. Consult [this](https://docs.hydrosphere.io/master/quickstart/installation/configuring-helm-charts) document for details about deploying **production-ready** Hydrosphere instance.
{% endhint %}

To install Hydrosphere on the Kubernetes cluster you should have the following prerequisites fulfilled.

* [Helm 3.0+](https://docs.helm.sh/using_helm/#install-helm)
* [Kubernetes 1.16+ with v1 API](https://kubernetes.io/docs/setup/)
* PV support on the underlying infrastructure (if persistence is required)
* Docker registry with pull/push access (if the built-in one is not used)

### Install from charts repository

1. Add the Hydrosphere charts repository:

   ```bash
   helm repo add hydrosphere https://hydrospheredata.github.io/hydro-serving/helm
   ```
2. Install the chart from repo to the cluster:

   ```bash
   helm install --name serving --namespace hydrosphere hydrosphere/serving
   ```

### Install from source

1. Clone the repository:

   ```bash
   git clone https://github.com/Hydrospheredata/hydro-serving.git
   cd hydro-serving/helm
   ```
2. Build dependencies:

   ```bash
   helm dependency build serving
   ```
3. Install the chart:

   ```bash
   helm install --namespace hydrosphere serving
   ```

After the chart has been installed, you have to expose the `ui` component outside of the cluster. For the sake of simplicity, we will just port-forward it locally.

```bash
kubectl port-forward -n hydrosphere svc/serving-ui 8080:9090
```

To check the installation, open <http://localhost:8080/>.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hydrosphere.io/master/quickstart/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
