|
| 1 | +# Redis Cloud Grafana Kickstarter for AWS |
| 2 | + |
| 3 | +The Redis Cloud Grafana Kickstarter automates the deployment of a complete observability stack for your Redis Cloud Pro databases on Amazon Web Services. This Terraform configuration creates the necessary infrastructure and sets up a monitoring solution with custom domain and SSL encryption, perfect for getting started with Redis monitoring, demos, and development environments. |
| 4 | + |
| 5 | +## What This Kickstarter Does |
| 6 | + |
| 7 | +- **Network Infrastructure**: Creates a new VPC and subnet in AWS (or uses existing ones if provided) |
| 8 | +- **VPC Peering**: Establishes secure peering between your AWS VPC and Redis Cloud Pro subscription (If you bring your own VPC it's assumed it's already peered) |
| 9 | +- **Monitoring Stack**: Deploys an EC2 instance with Prometheus and Grafana pre-configured for Redis monitoring |
| 10 | +- **Dashboard Integration**: Automatically installs Redis Cloud dashboards from this repository |
| 11 | +- **SSL & Domain Setup**: Configures nginx reverse proxy with Let's Encrypt SSL certificates |
| 12 | +- **DNS Management**: Creates Route53 DNS records for secure HTTPS access to your Grafana instance |
| 13 | + |
| 14 | +## Prerequisites |
| 15 | + |
| 16 | +Before running this kickstarter, ensure you have: |
| 17 | + |
| 18 | +### Redis Cloud Requirements |
| 19 | +- Redis Cloud Pro subscription with at least one database |
| 20 | +- Redis Cloud API credentials (API Key and Secret Key) |
| 21 | +- Subscription ID and database name |
| 22 | + |
| 23 | +### AWS Requirements |
| 24 | +- AWS account with appropriate permissions |
| 25 | +- Terraform installed locally |
| 26 | +- AWS credentials configured (via AWS CLI or environment variables) |
| 27 | +- A Route53 hosted zone for your domain |
| 28 | +- SSH key pair for EC2 access |
| 29 | + |
| 30 | +### Required AWS Permissions |
| 31 | +Ensure your AWS credentials have permissions for: |
| 32 | +- EC2 (instances, VPCs, subnets, security groups, key pairs) |
| 33 | +- Route53 (hosted zones, DNS records) |
| 34 | +- IAM (if using roles) |
| 35 | + |
| 36 | +## Configuration |
| 37 | + |
| 38 | +### 1. Create Variables File |
| 39 | + |
| 40 | +Create a `terraform.tfvars` file in this directory with your configuration: |
| 41 | + |
| 42 | +```hcl |
| 43 | +# Redis Cloud Configuration |
| 44 | +redis_cloud_api_key = "your-redis-cloud-api-key" |
| 45 | +redis_cloud_account_key = "your-redis-cloud-account-key" |
| 46 | +subscription_id = "12345" |
| 47 | +db_name = "your-database-name" |
| 48 | +
|
| 49 | +# AWS Configuration |
| 50 | +aws_account_id = "123456789012" |
| 51 | +aws_region = "us-east-1" |
| 52 | +aws_username = "ubuntu" |
| 53 | +aws_key_pair_name = "your-key-pair-name" |
| 54 | +
|
| 55 | +# SSH Configuration |
| 56 | +ssh_key_file = "path/to/your/private-key" |
| 57 | +
|
| 58 | +# DNS Configuration |
| 59 | +zone_dns_name = "yourdomain.com" |
| 60 | +subdomain = "grafana" |
| 61 | +
|
| 62 | +# Optional: Use Existing Infrastructure |
| 63 | +# existing_vpc_id = "vpc-12345678" |
| 64 | +# existing_subnet_id = "subnet-12345678" |
| 65 | +# existing_vpc_cidr = "10.0.0.0/16" |
| 66 | +# existing_security_group_id = "sg-12345678" |
| 67 | +``` |
| 68 | + |
| 69 | +### 2. Infrastructure Options |
| 70 | + |
| 71 | +The kickstarter supports two deployment modes: |
| 72 | + |
| 73 | +#### Option A: Create New Infrastructure (Default) |
| 74 | +Leave the `existing_*` variables commented out. The kickstarter will create: |
| 75 | +- New VPC (`redispeer-test-vpc`) |
| 76 | +- New subnet (`redispeer-test-subnet`) |
| 77 | +- Security groups for SSH, HTTP, HTTPS, and Grafana access |
| 78 | +- Internet gateway and route tables |
| 79 | + |
| 80 | +#### Option B: Use Existing Infrastructure |
| 81 | +Uncomment and configure the `existing_*` variables to use your existing VPC, subnet, and security group. |
| 82 | + |
| 83 | +## Deployment Steps |
| 84 | + |
| 85 | +### 1. Initialize Terraform |
| 86 | +```bash |
| 87 | +terraform init |
| 88 | +``` |
| 89 | + |
| 90 | +### 2. Review the Plan |
| 91 | +```bash |
| 92 | +terraform plan |
| 93 | +``` |
| 94 | + |
| 95 | +### 3. Deploy the Infrastructure |
| 96 | +```bash |
| 97 | +terraform apply |
| 98 | +``` |
| 99 | + |
| 100 | +The deployment process will: |
| 101 | +1. Create or configure network infrastructure |
| 102 | +2. Set up VPC peering with Redis Cloud |
| 103 | +3. Launch and configure the monitoring EC2 instance |
| 104 | +4. Install Docker, Python, and monitoring tools |
| 105 | +5. Deploy Prometheus and Grafana with Redis dashboards |
| 106 | +6. Configure nginx with SSL certificates |
| 107 | +7. Set up Route53 DNS records |
| 108 | + |
| 109 | +**Note**: The complete deployment takes approximately 10-15 minutes. |
| 110 | + |
| 111 | +### 4. Access Your Grafana Instance |
| 112 | + |
| 113 | +Once deployment completes, access your Grafana instance at: |
| 114 | +``` |
| 115 | +https://your-subdomain.yourdomain.com |
| 116 | +``` |
| 117 | + |
| 118 | +Default Grafana credentials: |
| 119 | +- **Username**: `admin` |
| 120 | +- **Password**: `admin` (you'll be prompted to change this on first login) |
| 121 | + |
| 122 | +## What You Get |
| 123 | + |
| 124 | +After successful deployment, you'll have: |
| 125 | + |
| 126 | +- **Secure Access**: HTTPS-enabled Grafana instance with Let's Encrypt SSL certificates |
| 127 | +- **Pre-configured Dashboards**: Redis Cloud monitoring dashboards automatically imported |
| 128 | +- **Prometheus Integration**: Metrics collection from your Redis Cloud databases |
| 129 | +- **Custom Domain**: Professional URL for your monitoring solution |
| 130 | +- **Auto-renewal**: SSL certificates automatically renewed via cron job |
| 131 | + |
| 132 | +## Available Dashboards |
| 133 | + |
| 134 | +The kickstarter installs the following Redis Cloud dashboards: |
| 135 | +- **Active-Active Dashboard**: Multi-region database monitoring |
| 136 | +- **Database Dashboard**: Core database metrics and performance |
| 137 | +- **Proxy Dashboard**: Redis Cloud proxy performance metrics |
| 138 | +- **Cluster Dashboard**: Overall cluster health and status |
| 139 | + |
| 140 | +## Production Considerations |
| 141 | + |
| 142 | +This kickstarter is designed to get you up and running quickly with Redis monitoring. For production workloads requiring high availability, data persistence, and enterprise-grade reliability, consider these alternatives: |
| 143 | + |
| 144 | +- **Grafana Cloud**: Fully managed Grafana service with built-in high availability |
| 145 | +- **Amazon Managed Grafana**: AWS managed Grafana service with enterprise features |
| 146 | +- **Amazon Managed Service for Prometheus**: Fully managed Prometheus service |
| 147 | +- **Kubernetes Deployment**: Deploy Prometheus and Grafana using Helm charts with persistent storage, clustering, and backup strategies |
| 148 | +- **Enterprise Solutions**: Redis Insight, Datadog, New Relic, or other enterprise monitoring platforms |
| 149 | + |
| 150 | +The kickstarter provides an excellent foundation for understanding your Redis metrics and can serve as a reference for building more robust monitoring infrastructure. |
| 151 | + |
| 152 | +## Troubleshooting |
| 153 | + |
| 154 | +### Common Issues |
| 155 | + |
| 156 | +**DNS Propagation**: If SSL certificate generation fails, wait 5-10 minutes for DNS propagation and re-run `terraform apply`. |
| 157 | + |
| 158 | +**SSH Connection Issues**: Ensure your SSH key has appropriate permissions (`chmod 600 path/to/private-key`) and that the key pair exists in AWS. |
| 159 | + |
| 160 | +**API Rate Limits**: If you encounter Redis Cloud API rate limits, wait a few minutes and retry. |
| 161 | + |
| 162 | +**AWS Key Pair**: Make sure your AWS key pair exists in the specified region before running terraform. |
| 163 | + |
| 164 | +### Accessing Logs |
| 165 | + |
| 166 | +SSH into the EC2 instance to check service status: |
| 167 | +```bash |
| 168 | +# Connect to EC2 instance |
| 169 | +ssh -i path/to/private-key ubuntu@ec2-public-ip |
| 170 | + |
| 171 | +# Check Grafana status |
| 172 | +sudo docker ps |
| 173 | + |
| 174 | +# View Grafana logs |
| 175 | +sudo docker logs grafana |
| 176 | + |
| 177 | +# Check nginx status |
| 178 | +sudo systemctl status nginx |
| 179 | +``` |
| 180 | + |
| 181 | +## Cleanup |
| 182 | + |
| 183 | +To remove all created resources: |
| 184 | +```bash |
| 185 | +terraform destroy |
| 186 | +``` |
| 187 | + |
| 188 | +**Warning**: This will permanently delete all infrastructure created by this kickstarter. |
| 189 | + |
| 190 | +## Support |
| 191 | + |
| 192 | +For issues and questions: |
| 193 | +- Review the [main repository documentation](../../../../README.adoc) |
| 194 | +- Check [Redis Cloud documentation](https://docs.redis.com/latest/rc/) |
| 195 | +- Open an issue in the repository |
| 196 | + |
| 197 | +--- |
| 198 | + |
| 199 | +*This kickstarter is part of the Redis Enterprise Observability toolkit. For more monitoring solutions and dashboards, explore the complete repository.* |
0 commit comments