# Installation

### ⚙️ Bare Metal or Virtual Machine(VM)  Installation Guide

This section provides a step-by-step guide to install **ShyftSearch** on either a **bare metal** or **virtual machine (VM)** environment, such as **AWS EC2**, **Azure VM**, or **VMware**, covering all essential steps to set up, configure, and initialize the system components.

#### Parameter Definitions

When running the installation commands, replace the placeholder values with your actual configuration details:

* **`<EXTRACTED_DIRECTORY_PATH>`** — The full path to the directory where the `shyftsoft.tgz` package has been extracted.\
  \&#xNAN;*Example:* `/home/user/shyftsoft`
* **`<MACHINE_IP>`** — The IP address of the machine on which ShyftSearch is being installed.\
  \&#xNAN;*Example:* `172.31.41.203`
* **`<MASTER_PORT>`** — The port number assigned to the **Master Node**, which manages core services and orchestrates worker operations.\
  \&#xNAN;*Example:* `8001`
* **`<WORKER_PORT>`** — The port number assigned to the **Worker Node**, responsible for executing background tasks and processing workloads.\
  \&#xNAN;*Example:* `8002`

{% stepper %}
{% step %}

#### **Step 1: Extract the Installation Package**

Extract the contents of the `shyftsoft.tgz` archive into your desired installation directory.

```
tar -xvf shyftsoft.tgz
cd shyftsoft
```

{% endstep %}

{% step %}

#### **Step 2: Run the Installation Script**

Execute the installation command with the appropriate parameters:

```
bash install.sh <EXTRACTED_DIRECTORY_PATH> <MACHINE_IP>:<MASTER_PORT> 127.0.0.1:6379 https://<MACHINE_IP>:<MASTER_PORT>/ <MACHINE_IP>:<WORKER_PORT>
```

**Example:**

```
bash install.sh /home/user/shyftsoft 172.31.41.203:8001 127.0.0.1:6379 https://172.31.41.203:8001/ 172.31.41.203:8002
```

{% endstep %}

{% step %}

#### **Step 3: Run Post-Installation Script for Master**

Execute the post-installation script for the **Master** node to finalize setup:

```
bash post_install_master.sh <EXTRACTED_DIRECTORY_PATH>
```

**Example:**

```
bash post_install_master.sh /home/user/shyftsoft
```

{% endstep %}

{% step %}

#### **Step 4: Run Post-Installation Script for Worke**

Execute the post-installation script for the **Worker** node to complete the worker configuration:

```
bash post_install_worker.sh <EXTRACTED_DIRECTORY_PATH>
```

**Example:**

```
bash post_install_worker.sh /home/user/shyftsoft
```

{% endstep %}

{% step %}

#### **Step 5: Restart All Services**

After installation and configuration, restart all related ShyftSearch services:

```
cd /home/user/shyftsoft/systemd
sudo systemctl restart shyft-django.service shyft-master-celery.service shyft-master-task-manager.service shyft-worker-server.service shyft-worker.service
```

{% endstep %}
{% endstepper %}


---

# 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://supercloudnow.gitbook.io/supercloudnow-docs/undefined/installation-guide/bare-metal-or-virtual-machine-vm/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.
