Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker documentation #2623

Merged
merged 45 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7f34361
Create install-on-aws
ViktarStarastsenka Dec 11, 2023
f9df4d7
adding description for RedisInsight on Docker
ViktarStarastsenka Dec 11, 2023
7f86a53
Update configuration.md
ViktarStarastsenka Dec 29, 2023
484ed2c
Update configuration.md
ViktarStarastsenka Dec 29, 2023
9958abe
Update configuration.md
ViktarStarastsenka Jan 22, 2024
b8c984d
Update install-on-aws.md
ViktarStarastsenka Jan 22, 2024
9eec825
Update install-on-aws.md
ViktarStarastsenka Jan 22, 2024
c332236
Update install-on-aws.md
ViktarStarastsenka Jan 22, 2024
e76ff63
Update install-on-docker.md
ViktarStarastsenka Jan 22, 2024
2c59756
Update install-on-aws.md
ViktarStarastsenka Jan 22, 2024
457e473
Update install-on-docker.md
ViktarStarastsenka Jan 22, 2024
72b9c98
Update install-on-k8s.md
ViktarStarastsenka Jan 22, 2024
7452bd6
Update configuration.md
ViktarStarastsenka Jan 22, 2024
bbce8ea
Update and rename configuration.md to env_variables.md
ViktarStarastsenka Jan 23, 2024
979f966
Update env_variables.md
ViktarStarastsenka Jan 23, 2024
380769e
Update and rename env_variables.md to env-variables.md
ViktarStarastsenka Jan 23, 2024
171ce40
Update env-variables.md
ViktarStarastsenka Jan 24, 2024
d6fd712
Update install-on-aws.md
ViktarStarastsenka Jan 24, 2024
ca35837
Update install-on-docker.md
ViktarStarastsenka Jan 24, 2024
93f02a0
Update install-on-k8s.md
ViktarStarastsenka Jan 24, 2024
70588d0
Update install-on-k8s.md
ViktarStarastsenka Jan 24, 2024
57987a7
Update install-on-docker.md
ViktarStarastsenka Jan 26, 2024
55087a5
Update install-on-aws.md
ViktarStarastsenka Jan 26, 2024
7e816b9
Update env-variables.md
ViktarStarastsenka Jan 26, 2024
d2defe8
Update env-variables.md
ViktarStarastsenka Jan 26, 2024
055933c
Update install-on-docker.md
ViktarStarastsenka Jan 26, 2024
9f9b730
Update install-on-aws.md
ViktarStarastsenka Jan 26, 2024
7c68ac6
Update install-on-docker.md
ViktarStarastsenka Jan 26, 2024
2fe9084
Update install-on-k8s.md
ViktarStarastsenka Jan 26, 2024
d8889b9
Update install-on-k8s.md
ViktarStarastsenka Jan 29, 2024
073d22e
Updating RedisInsight on Docker
ViktarStarastsenka Jan 29, 2024
dcc33b0
Updating RedisInsight on Docker
ViktarStarastsenka Jan 29, 2024
9bd7485
Update install-on-aws.md
ViktarStarastsenka Jan 29, 2024
e538373
Update install-on-aws.md
ViktarStarastsenka Jan 29, 2024
4c8521d
Update install-on-k8s.md
ViktarStarastsenka Jan 29, 2024
5527771
Update env-variables.md
ViktarStarastsenka Jan 29, 2024
9d9403c
Update install-on-k8s.md
ViktarStarastsenka Jan 29, 2024
be00de1
Update env-variables.md
ViktarStarastsenka Jan 29, 2024
b34d426
Update install-on-docker.md
ViktarStarastsenka Jan 29, 2024
5b2abb5
Update install-on-aws.md
ViktarStarastsenka Jan 29, 2024
8391ec8
Update install-on-docker.md
ViktarStarastsenka Jan 29, 2024
bad1fb7
Update install-on-docker.md
ViktarStarastsenka Jan 29, 2024
8ce0001
Update install-on-aws.md
ViktarStarastsenka Jan 29, 2024
4b23f19
Update install-on-docker.md
ViktarStarastsenka Jan 31, 2024
9563f33
Update env-variables.md
ViktarStarastsenka Jan 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/install/install-redisinsight/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Install RedisInsight"
linkTitle: "Install RedisInsight"
weight: 3
description: >
Install RedisInsite on AWS, Docker, and Kubernetes
---

This is a an installation guide. You'll learn how to install RedisInsight on Amazon Web Services (AWS), Docker, and Kubernetes.
19 changes: 19 additions & 0 deletions docs/install/install-redisinsight/env-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Environment variables"
linkTitle: "Environment variables"
weight: 1
description: >
RedisInsight supported environment variables
---
You can configure RedisInsight with the following environment variables.

| Variable | Purpose | Default | Additional info |
| --- | --- | --- | --- |
| RI_APP_PORT | The port that RedisInsight listens on | <ul><li> Docker: 5540 <li> desktop: 5530 </ul> | See [Express Documentation](https://expressjs.com/en/api.html#app.listen)|
| RI_APP_HOST | The host that RedisInsight connects to | <ul><li> Docker: 0.0.0.0 <li> desktop: 127.0.0.1 </ul> | See [Express Documentation](https://expressjs.com/en/api.html#app.listen)|
| RI_SERVER_TLS_KEY | Private key for HTTPS | n/a | Private key in [PEM format](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/#ftoc-heading-3). Can be a path to a file or a string in PEM format.|
| RI_SERVER_TLS_CERT | Certificate for supplied private key | n/a | Public certificate in [PEM format](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/#ftoc-heading-3). Can be a path to a file or a string in PEM format.|
| RI_ENCRYPTION_KEY | Key to encrypt data with | n/a | Available only for Docker. <br> Redisinsight stores sensitive information (database passwords, Workbench history, etc.) locally (using [sqlite3](https://github.com/TryGhost/node-sqlite3)). This variable allows you to store sensitive information encrypted using the specified encryption key. <br />Note: The same encryption key should be provided for subsequent `docker run` commands with the same volume attached to decrypt the information. |
| RI_LOG_LEVEL | Configures the log level of the application. | `info` | Supported logging levels are prioritized from highest to lowest: <ul> <li>error<li> warn<li>info<li> http<li> verbose<li> debug<li> silly</ul> |
| RI_FILES_LOGGER | Log to file | `true` | By default, you can find log files in the following folders: <ul> <li> Docker: `/data/logs` <li> desktop: `<user-home-dir>/.refisinsight-app/logs` </ul>|
| RI_STDOUT_LOGGER | Log to STDOUT | `true` | |
92 changes: 92 additions & 0 deletions docs/install/install-redisinsight/install-on-aws.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
title: "Install on AWS EC2"
linkTitle: "Install on AWS EC2"
weight: 3
description: >
How to install RedisInsight on AWS EC2
---
This tutorial shows you how to install RedisInsight on an AWS EC2 instance and manage ElastiCache Redis instances using RedisInsight. To complete this tutorial you must have access to the AWS Console and permissions to launch EC2 instances.

Step 1: Create a new IAM Role (optional)
--------------

RedisInsight needs read-only access to S3 and ElastiCache APIs. This is an optional step.

1. Log in to the AWS Console and navigate to the IAM screen.
1. Create a new IAM Role.
1. Under *Select type of trusted entity*, choose EC2. The role is used by an EC2 instance.
1. Assign the following permissions:
* AmazonS3ReadOnlyAccess
* AmazonElastiCacheReadOnlyAccess

Step 2: Launch EC2 Instance
--------------

Next, launch an EC2 instance.

1. Navigate to EC2 under AWS Console.
1. Click Launch Instance.
1. Choose 64-bit Amazon Linux AMI.
1. Choose at least a t2.medium instance. The size of the instance depends on the memory used by your ElastiCache instance that you want to analyze.
1. Under Configure Instance:
* Choose the VPC that has your ElastiCache instances.
* Choose a subnet that has network access to your ElastiCache instances.
* Ensure that your EC2 instance has a public IP Address.
* Assign the IAM role that you created in Step 1.
1. Under the storage section, allocate at least 100 GiB storage.
1. Under security group, ensure that:
* Incoming traffic is allowed on port 5540
* Incoming traffic is allowed on port 22 only during installation
1. Review and launch the ec2 instance.

Step 3: Verify permissions and connectivity
----------

Next, verify that the EC2 instance has the required IAM permissions and can connect to ElastiCache Redis instances.

1. SSH into the newly launched EC2 instance.
1. Open a command prompt.
1. Run the command `aws s3 ls`. This should list all S3 buckets.
1. If the `aws` command cannot be found, make sure your EC2 instance is based of Amazon Linux.
1. Next, find the hostname of the ElastiCache instance you want to analyze and run the command `echo info | nc <redis host> 6379`.
1. If you see some details about the ElastiCache Redis instance, you can proceed to the next step.
1. If you cannot connect to redis, you should review your VPC, subnet, and security group settings.

Step 4: Install Docker on EC2
-------

Next, install Docker on the EC2 instance. Run the following commands:

1. `sudo yum update -y`
1. `sudo yum install -y docker`
1. `sudo service docker start`
1. `sudo usermod -a -G docker ec2-user`
1. Log out and log back in again to pick up the new docker group permissions.
1. To verify, run `docker ps`. You should see some output without having to run `sudo`.

Step 5: Run RedisInsight in the Docker container
-------

Finally, install RedisInsight using one of the options described below.

1. If you do not want to persist your RedisInsight data:

```bash
docker run -d --name redisinsight -p 5540:5540 redis/redisinsight:latest
```
2. If you want to persist your RedisInsight data, first attach the Docker volume to the `/data` path and then run the following command:

```bash
docker run -d --name redisinsight -p 5540:5540 redis/redisinsight:latest -v redisinsight:/data
```

If the previous command returns a permission error, ensure that the user with `ID = 1000` has the necessary permission to access the volume provided (`redisinsight` in the command above).

Find the IP Address of your EC2 instances and launch your browser at `http://<EC2 IP Address>:5540`. Accept the EULA and start using RedisInsight.

RedisInsight also provides a health check endpoint at `http://<EC2 IP Address>:5540/api/health/` to monitor the health of the running container.

Summary
------

In this guide, we installed RedisInsight on an AWS EC2 instance running Docker. As a next step, you should add an ElastiCache Redis Instance and then run the memory analysis.
34 changes: 34 additions & 0 deletions docs/install/install-redisinsight/install-on-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "Install on Docker"
linkTitle: "Install on Docker"
weight: 2
description: >
How to install RedisInsight on Docker
---
This tutorial shows how to install RedisInsight on [Docker](https://www.docker.com/) so you can use RedisInsight in development.
See a separate guide for installing [RedisInsight on AWS](/docs/install/install-redisinsight/install-on-aws/).

## Install Docker

The first step is to [install Docker for your operating system](https://docs.docker.com/install/).

## Run RedisInsight Docker image

You can install RedisInsight using one of the options described below.

1. If you do not want to persist your RedisInsight data:

```bash
docker run -d --name redisinsight -p 5540:5540 redis/redisinsight:latest
```
2. If you want to persist your RedisInsight data, first attach the Docker volume to the `/data` path and then run the following command:

```bash
docker run -d --name redisinsight -p 5540:5540 redis/redisinsight:latest -v redisinsight:/data
```

If the previous command returns a permission error, ensure that the user with `ID = 1000` has the necessary permissions to access the volume provided (`redisinsight` in the command above).

Next, point your browser to `http://localhost:5540`.

RedisInsight also provides a health check endpoint at `http://localhost:5540/api/health/` to monitor the health of the running container.
Loading
Loading