# Linux OS

{% hint style="info" %}
**Note**: Please check the   [Installation](https://docs.cloudfabrix.io/rda/installation/..#prerequisites) Prerequisites before you proceed.
{% endhint %}

Run the below commands to verify currently installed RDA prerequisites.

{% hint style="warning" %}
**Note**: Please make sure the below commands are in the PATH variable in the user's login profile.
{% endhint %}

```
docker --version
```

```
docker-compose --version
```

```
python3 --version
```

```
pip3 --version
```

**Step 1**: Request software by contacting <support@cloudfabrix.com>. The following procedure assumes you received the download link.

Download the '**rda-docker-compose-with-ssl.tar**' software package.

```
wget https://macaw-amer.s3.amazonaws.com/rda/rda-docker-compose-with-ssl.tar
```

**Step 2**: Extract the '**rda-docker-compose-with-ssl.tar**' software package under the user's home directory or some other directory.

```
tar -xvf rda-docker-compose-with-ssl.tar
```

![RDA related files](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MYN2YFUXyGSDwjspl5x%2F-MYNJg4-GKfOjCbQQqJC%2FScreen%20Shot%202021-04-15%20at%206.36.29%20PM.png?alt=media\&token=10367775-a2df-4bde-947d-f29c997771cd)

**Step 3**: Run setup.py python script as shown below.

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MYN2YFUXyGSDwjspl5x%2F-MYNL9vsyBN3T7EbPSKo%2FScreen%20Shot%202021-04-15%20at%206.42.59%20PM.png?alt=media\&token=1954b09e-dcab-4cf5-b9be-14e15ad32b9e)

{% hint style="info" %}
**Note:** The setup.py creates a directory called '**cfx**' under user's home directory for configuration files and exported files. (Ex: /home/macaw/cfx)
{% endhint %}

Below are the '**RDA**' directory locations and their purpose.

**/home/macaw/cfx/cfxdx/config -->** Location of the **conf.yml** file where many datasource credentials and other settings are configured.

**/home/macaw/cfx/cfxdx/output -->** Location of the exported CSV / Excel / JSON files

**Step 4**: To access 'RDA' interface, open up a browser and enter the URL as **<https://ipaddress:9998>**

Note: If firewall service is running, enable port 9998/tcp to access RDA service through a browser.

{% hint style="warning" %}
**Note**: If firewall service is running, enable port 9998/tcp to access RDA service through a browser.
{% endhint %}

**CentOS:**

```
sudo firewall-cmd --add-port=9998/tcp --permanent
```

```
sudo firewall-cmd --reload
```

**Ubuntu:**

This section provides additional steps to deploy RDA on Ubuntu OS (Certified on 18.04).&#x20;

Using the currently logged-in user, run the following commands to make sure the user has sufficient permissions.&#x20;

```
macaw@ubuntu-test-box: sudo groupadd docker
macaw@ubuntu-test-box: sudo gpasswd -a $USER docker
```

```
macaw@ubuntu-test-box: docker ps 
```

* If the above command throws an error 'permission denied error',  run the following command to provide sufficient privileges to the currently logged-in user to run docker (Skip this step if the command does not throw permission denied error or the user has sufficient privileges/permissions).

```
macaw@ubuntu-test-box: sudo chmod 666 /var/run/docker.sock
```

* Run the following commands to install docker-compose for the currently logged-in user.

```
 macaw@ubuntu-test-box: sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
 macaw@ubuntu-test-box: sudo chmod +x /usr/local/bin/docker-compose
 macaw@ubuntu-test-box: sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
```

```
macaw@ubuntu-test-box: sudo ufw allow 9998/tcp
```

{% hint style="info" %}
Note:  Access RDA using https\://\<rda-ip-address>:9998/

The default user name is rdademo and the password is rdademo1234&#x20;
{% endhint %}

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MYNLHdz5WZfHSYW_DbO%2F-MYNMC4YMBEUnLOQYPKW%2FScreen%20Shot%202021-04-15%20at%206.47.40%20PM.png?alt=media\&token=d485579f-13a6-4350-9042-93d062683d30)

{% hint style="info" %}
Note:  Default username/password can be changed from docker-compose.yml file under RDA install directory.
{% endhint %}

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MYNLHdz5WZfHSYW_DbO%2F-MYNNWNe1IYe8mY802Ht%2FScreen%20Shot%202021-04-15%20at%206.53.25%20PM.png?alt=media\&token=67123c03-ae70-40b0-81c1-19170d230d67)

**Step 4**:  Accessing RDA Page

![](https://gblobscdn.gitbook.com/assets%2F-MAygHzNCQ33zRR43qxF%2F-MU5fW7ACtSz0eFXwN_R%2F-MU5hvJLvlR70BiHpRus%2FScreen%20Shot%202021-02-21%20at%202.30.48%20PM.png?alt=media\&token=e686c01f-6347-4a08-b180-64b325bc040d)

![](https://gblobscdn.gitbook.com/assets%2F-MAygHzNCQ33zRR43qxF%2F-MU5fW7ACtSz0eFXwN_R%2F-MU5igvt250LEDag7g3y%2FScreen%20Shot%202021-02-21%20at%202.34.14%20PM.png?alt=media\&token=26e84ec8-5d6d-407a-be03-538f6824652a)

### Install RDA Datanetwork Components (Optional)

The following steps explain how to install Kafka/Zookeeper components needed for RDA Data network bots.\
\
Download  [docker-compose](https://macaw-amer.s3.amazonaws.com/rda/rda-components/kafka-zookeeper/docker-compose.yml) file required to install Kafka/Zookeeper and use the below steps to start Kafka/zookeeper docker instances (these instances in turn will be used by RDA runtime)\
\
bash# cd  /home/macaw/\
bash# mkdir -p **kafka-zookeeper** \
bash# cd kafka-zookeeper\
bash# wget \<docker-compose-file>\
bash# \<edit the file and add the ipaddress or FQDN of  RDA machine>\
bash# docker-compose pull\
bash# docker-compose up -d  \
\
In addition to the above steps, make sure you enable the following ports

```
sudo firewall-cmd --add-port=2181/tcp --permanent
sudo firewall-cmd --add-port=9092/tcp --permanent
```

```
sudo firewall-cmd --reload
```

### Upgrade RDA&#x20;

Step 1:  Make sure the docker (desktop) environment is intact as per RDA installation prereqs. Also, docker-compose is available to the user (as shown in the below screenshot).

![docker-compose along with docker-compose.yml is available in user environment](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McQ9EdURVirHadh2PQN%2F-McQAicqiFZbC3xCFd5T%2FScreen%20Shot%202021-06-17%20at%2011.14.36%20AM.png?alt=media\&token=65e16f19-2692-45f7-9e80-a11c779637b9)

Step 2:  Go to the directory where RDA was previously installed.&#x20;

![Directory location where RDA was installed (earlier)](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McQB1Q1T6RBtrmSK334%2F-McQBNsLxkX6pmeOEg4m%2FScreen%20Shot%202021-06-17%20at%2011.17.42%20AM.png?alt=media\&token=22192c56-f62e-4611-b343-3f477bf42201)

Step 3: Make sure RDA is up and running. This can be verified by running the docker command as shown in the below screen shot.

![RDA instance (cfxdx) is up and running](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McQC-iPu2rav8oJj1L-%2F-McQDNV0TKmUUlr3VpqD%2FScreen%20Shot%202021-06-17%20at%2011.26.21%20AM.png?alt=media\&token=0786ecd6-d8b4-4d30-a846-5f6172994b9c)

Step 4:  Go to the directory where RDA is installed and also, docker-compose.yml is available (as shown in the below screenshot).

![docker-compose.yml file is needed to upgrade RDA (as shown above)](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McQDasjqciCMBNkojNw%2F-McQDdb4SJgQfYYU43Qm%2Fimage.png?alt=media\&token=4bed5f80-4785-4bfd-bc12-0ec9feeb67c8)

Step 5:  Using the docker-compose command 'docker-compose down' and bring down the RDA instances that are running in your environment as shown in the below screenshot.

![docker-compose will bring the services down as shown](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McQDsQ1V2X5u1hn19gX%2F-McQGzMNVPQ7tr92fulw%2FScreen%20Shot%202021-06-17%20at%2011.42.13%20AM.png?alt=media\&token=5c444666-ce35-4d56-b0e2-cc6160e9823b)

Step 6: Using the docker-compose command, upgrade RDA using the 'docker-compose pull' command as shown in the below screenshot.

![docker-compose pull will pull the latest images from docker registry and install that.](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McQHD6wI779lyVKvK5w%2F-McQHWZbqXX-0MySaa3M%2FScreen%20Shot%202021-06-17%20at%2011.44.33%20AM.png?alt=media\&token=a75eabbe-9550-493e-ada9-ea43569fe66b)

Step 7: Start RDA upgraded instance using 'docker-compose up -d' as shown in the below screen shot.

![docker-compose will start the latest containers as shown above](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McQILLVxJhBRnHwkUZg%2F-McQIMt_SeA3LgkPvWD1%2FScreen%20Shot%202021-06-17%20at%2011.47.59%20AM.png?alt=media\&token=7785df47-f7ae-4945-9a25-f743b904d9b5)

Step 8: Verify the RDA docker instances to be up-and-running using the 'docker ps -a' command as shown below screenshot.

![docker ps -a will show the status of RDA (cfxdx) containers to be up and running after upgrade](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McQIe4wPSGRQyAH1Zdq%2F-McQJ4lAxDycMXpHndP5%2FScreen%20Shot%202021-06-17%20at%2011.51.25%20AM.png?alt=media\&token=4aed07da-d449-4549-848a-e87882ee515b)

Access RDA using **https\://\<IPAddress>:9998** and verify the latest version.

###
