# Automated Remote Deployment Script

> Automated remote deployment script that initializes a Looker instance on the Insights Windows machine using files from LookerPreinstallationTool.exe.

## Overview

The following script takes the Looker files from `LookerPreinstallationTool.exe` and initializes the Looker instance on the Insights Windows Machine.

:::important
Generating the GPG key is not possible using this automation script. If you initialize Looker on this instance, the password will be generated from the Windows machine and stored in the `C:\ProgramData\UiPath Insights` folder. You can retrieve the password using the `Unprotect-CmsMessage -Path "$ENV:ProgramData\UiPath Insights\LookerSecret` command. If you manually initialize the Looker instance, you can generate the GPG key using the `gpg --generate-key` command and store it in the Linux VM.
:::

## Prerequisites

* Download the [Automated Remote Deployment Script](https://raw.githubusercontent.com/UiPath/Insights-Customer/master/Scripts/OnPrem/22.10/Deploy-Looker.ps1).
* Check the [Linux Machine requirements](https://docs.uipath.com/insights/standalone/2024.10/user-guide/insights-hardware-and-software-requirements#insights-linux-machine).
* [Prepare the Linux VM (see section For details on preparing a Linux machine)](https://docs.uipath.com/insights/standalone/2024.10/user-guide/insights-installation#prepare-the-insights-windows-machine-and-the-insights-linux-machine).

## Script Parameters

To get help, type: `Get-Help .\Deploy-Looker.ps1 -Detailed`.

 <colgroup>
  <col/>
  <col/>
  <col/>
 </colgroup>
 
  
    Parameter 
    Type 
    Description 
  
 
 
  
    -ComputerName 
    Required 
    The IP address or DNS Name of the Linux VM. 
  
  
    -Username 
    Required 
    The username of the Linux VM. 
  
  
    -Password 
    Required if you use a password. Otherwise it's optional. 
    The password to login to the Linux VM.
:::note
If you use an SSH public key to authenticate, this parameter is used to enter the passphrase.
:::

  
  
    -Port 
    Optional 
    Default port number value is <code>22</code> . 
  
  
    -KeyfilePath 
    Required if you use a key. 
    Specify the path to the file here if you use the key-pair authentication. 
  
  
    -SudoPass 
    Optional 
    Specify the password for sudo in the remote Linux VM. 
  
  
    -LookerZipFilePath 
    Required 
    The path to the Insights_lookerfile.zip generated by LookerPreInstallation Tool 
  
  
    -LookerImageFilePath : Optional. 
    Optional 
    Specify the offline Looker image for installation the air-gapped environment. 
  
  
    -OfflineBundleFilePath : Optional. 
    Optional 
    Specify the offline bundle ZIP file for the air-gapped environment. 
  
 

## Examples

### 1 Use PEM Key (Azure)

```
Deploy-Looker.ps1 -ComputerName 20.83.215.1 -Username azureuser -KeyfilePath
"C:\Users\username\Downloads\testing" -LookerZipFilePath C:\Users\username\AppData\Local\Temp\Insights_Lookerfiles_20220610102005.zip
```

### 2 Use Password Authentication (Azure)

```
Deploy-Looker.ps1 -ComputerName 20.3.144.237 -Username uipath -Password secretpassword -LookerZipFilePath C:\Users\username\AppData\Local\Temp\Insights_Lookerfiles_20220610102005.zip
```

### 3 Air-gapped Environment

If you want to install Insights offline you can use this example.

```
Deploy-Looker.ps1 -ComputerName 20.3.144.237 -Username uipath -Password secretpassword -LookerZipFilePath C:\Users\username\AppData\Local\Temp\Insights_Lookerfiles_20220610102005.zip -OfflineBundleFilePath "C:\Users\username\Downloads\2210_installer\offline-bundle-rhel9.zip" -LookerImageFilePath "C:\Users\username\Downloads\2210_installer\looker_image.tar.zip"
```
