Skip to content

Commit 12edd6d

Browse files
committed
fist commit after design integration
1 parent 78c8618 commit 12edd6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1982
-298
lines changed

.github/workflows/documentation.yml .github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: documentation
1+
name: publish
22

33
on:
44
pull_request:

docs/create/cloud/images/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# images

docs/create/cloud/images/activate.png

161 KB
Loading

docs/create/cloud/images/aws.png

148 KB
Loading
163 KB
Loading
151 KB
Loading

docs/create/cloud/images/plan.png

186 KB
Loading

docs/create/cloud/images/region.png

368 KB
Loading
83.9 KB
Loading

docs/create/cloud/index-cloud.mdx

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
id: index-cloud
3+
title: Using Redis Enterprise Cloud
4+
sidebar_label: Redis Cloud
5+
slug: /create/cloud
6+
---
7+
8+
9+
### Create a database using Redis Enterprise Cloud
10+
11+
1. You will have to create Redis Cloud account by visiting [link](https://redislabs.com/try-redis-modules-for-free) below. Once you click on “Get Started”, you will receive an email with a link to activate your account and complete your signup process.
12+
13+
14+
15+
2. Next, you will have to add Redis Enterprise Cloud Essentials subscription. In the Redis Enterprise Cloud menu, click Subscriptions. At the bottom of the page, click the “+” sign.
16+
17+
![My Image](images/subscription.png)
18+
19+
20+
21+
22+
3. For the cloud provider, select Amazon AWS
23+
24+
![My Image](images/aws.png)
25+
26+
27+
4. For the region where you want to use the subscription, select ap-south-1. Please note that it’s currently available only in the AWS/Mumbai
28+
29+
![My Image](images/region.png)
30+
31+
32+
5. In the Redis Enterprise Cloud service levels, select the Redis Cloud Essentials 30MB/1 Database level
33+
34+
![My Image](images/plan.png)
35+
36+
6. Click Create. After you create a subscription, you can create a database:
37+
38+
![My Image](images/createdatabase.png)
39+
40+
7. Enter a name for the database of your choice
41+
42+
![My Image](images/choosemodule.png)
43+
44+
8. Click "Activate" and wait for few seconds till it gets activated. Once fully activated, you will see the database endpoints as shown below:
45+
46+
![My Image](images/activate.png)
47+
48+

docs/create/docker/index-docker.mdx

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
id: index-docker
3+
title: Using Docker
4+
sidebar_label: Docker
5+
slug: /create/docker
6+
---
7+
8+
9+
### Create a database using Docker Container
10+
11+
### Pre-requisite
12+
13+
- Ensure that Docker is installed in your system.
14+
If you're new, refer https://docs.docker.com/docker-for-mac/install/ to install Docker on Mac.
15+
16+
### Run the container
17+
18+
To pull and start the Redis Enterprise Software Docker container, run this docker run command in the terminal or command-line for your operating system.
19+
20+
Note: On Windows, make sure Docker is configured to run Linux-based containers.
21+
22+
```
23+
docker run -d --cap-add sys_resource --name rp -p 8443:8443 -p 9443:9443 -p 12000:12000 redislabs/redis
24+
```
25+
26+
The Docker container with RS runs on your localhost with port 8443 open for HTTPS connections, 9443 for REST API connections, and port 12000 open for redis client connections. You can publish other ports with -p <host_port>:<container_port>.
27+
28+
29+
30+
31+

docs/create/index-create.mdx

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
id: index-create
3+
title: Create Database
4+
sidebar_label: Create Database
5+
slug: /create/
6+
---
7+
8+
import useBaseUrl from '@docusaurus/useBaseUrl';
9+
10+
The following links provides your the different options to create a new Redis database either on the Cloud or using local software. (Docker, Redis Enterprise, from Soruces)
11+
12+
<div className="row text--center">
13+
<div className=" col text--center " >
14+
<div className="ri-container text--center">
15+
<div className="ri-description-short text--center ">
16+
<div className="ri-icon"><span className="fe fe-zap" /></div>
17+
<div className="ri-detail text--center ">
18+
<div className="ri-title text--center "><a href={useBaseUrl('/create/cloud')}>Redis Enterprise Cloud</a></div>
19+
<div className="ri-description text--center">
20+
<a href={useBaseUrl('/create/cloud')}>
21+
<img src={useBaseUrl('/img/logos/cloud.png')} width="100"/>
22+
</a>
23+
</div>
24+
</div>
25+
</div>
26+
</div>
27+
</div>
28+
29+
<div className=" col text--center" >
30+
<div className="ri-container">
31+
<div className="ri-description-short ">
32+
<div className="ri-icon"><span className="fe fe-zap" /></div>
33+
<div className="ri-detail ">
34+
<div className="ri-title"><a href={useBaseUrl('/create/docker')}>Docker</a></div>
35+
<div className="ri-description text--center">
36+
<a href={useBaseUrl('/create/docker')}>
37+
<img src={useBaseUrl('/img/logos/docker.png')} width="100"/>
38+
</a>
39+
</div>
40+
</div>
41+
</div>
42+
</div>
43+
</div>
44+
</div>
45+
46+
<div className="row text--center">
47+
48+
<div className=" col " >
49+
<div className="ri-container">
50+
<div className="ri-description-short ">
51+
<div className="ri-icon"><span className="fe fe-zap" /></div>
52+
<div className="ri-detail">
53+
<div className="ri-title"><a href={useBaseUrl('/create/resoftware')}>Redis Enterprise Software</a></div>
54+
<div className="ri-description text--center ">
55+
<a href={useBaseUrl('/create/resoftware')}>
56+
<img src={useBaseUrl('/img/logos/resoftware.png')} width="85" />
57+
</a>
58+
</div>
59+
</div>
60+
</div>
61+
</div>
62+
</div>
63+
64+
<div className=" col " >
65+
<div className="ri-container">
66+
<div className="ri-description-short ">
67+
<div className="ri-icon"><span className="fe fe-zap" /></div>
68+
<div className="ri-detail">
69+
<div className="ri-title"><a href="https://docs.redislabs.com/latest/platforms/">Redis Enterprise & Kubernetes</a></div>
70+
<div className="ri-description text--center ">
71+
<a href="https://docs.redislabs.com/latest/platforms/">
72+
<img src={useBaseUrl('/img/logos/kubernetes.png')} width="150" />
73+
</a>
74+
</div>
75+
</div>
76+
</div>
77+
</div>
78+
</div>
79+
80+
</div>
81+
82+
83+
84+
85+
86+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
id: index-software
3+
title: Using Redis Enterprise Software
4+
sidebar_label: Redis Enterprise
5+
slug: /create/resoftware
6+
---
7+
8+
9+
# Create a database using Redis Enterprise Software
10+
11+
12+
### Install Redis Enterprise Software
13+
14+
You can download the binaries from the [Redis Enterprise Download Center](https://www.redislabs.com/redis-enterprise-software/download-center/software/) and copy the download package to machine with a Linux-based OS. To untar the image:
15+
16+
```
17+
tar vxf <downloaded tar file name>
18+
```
19+
20+
Once the tar command completes, install RS with the install.sh script in the current directory.
21+
22+
```
23+
sudo ./install.sh -y
24+
```
25+
26+
### Setting up a cluster
27+
28+
In the web browser on the host machine, go to https://localhost:8443 to see the Redis Enterprise Software web console.
29+
30+
Note: Depending on your browser, you may see a certificate error. You can safely continue to the web console.
31+
If you see an error from nginx, try again after a few minutes.
32+
Click Setup to start the node configuration steps.
33+
34+
35+
In the Node Configuration settings, enter a cluster FQDN such as cluster.local. Then click Next button.
36+
37+
Enter your license key, if you have one. If not, click the Next button to use the trial version.
38+
39+
Enter an email and password for the admin account for the web console.
40+
41+
These credentials are also used for connections to the REST API.
42+
43+
Click OK to confirm that you are aware of the replacement of the HTTPS SSL/TLS certificate on the node, and proceed through the browser warning.
44+
45+
### Create a database
46+
47+
Select “redis database” and the “single region” deployment, and click Next.
48+
49+
Enter a database name such as database1 and click Activate to create your database.
50+
51+
You now have a Redis database!
52+
53+
54+
55+
56+
57+

docs/develop/golang/index-golang.mdx

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
id: index-golang
3+
title: Go and Redis
4+
sidebar_label: Go
5+
slug: /develop/golang/
6+
---
7+
8+
import Tabs from '@theme/Tabs';
9+
import TabItem from '@theme/TabItem';
10+
import useBaseUrl from '@docusaurus/useBaseUrl';
11+
import RedisCard from '@site/src/components/RedisCard';
12+
13+
Find tutorials, examples and technical articles that will help you to develop with Redis and Golang.
14+
15+
## Getting Started
16+
17+
Golang community has built many client libraries that you can find [here](https://redis.io/clients#go).
18+
For your first steps with Golang and Redis, this article will show how to use the recommended library: [redigo](https://github.com/gomodule/redigo).
19+
20+
21+
<Tabs
22+
defaultValue="redigo"
23+
values={[
24+
{label: 'Redigo', value: 'redigo'},
25+
]}>
26+
<TabItem value="redigo">
27+
28+
### Getting Started with redigo
29+
30+
31+
The `redigo` library is located in the `https://github.com/gomodule/redigo` that you must import in your application.
32+
33+
34+
1. Import the `redigo` module
35+
36+
```bash
37+
go get github.com/gomodule/redigo/redis
38+
```
39+
40+
```go
41+
import (
42+
"fmt"
43+
"context"
44+
"github.com/gomodule/redigo/redis"
45+
)
46+
```
47+
48+
1. Create a connection pool
49+
50+
```go
51+
func newPool() *redis.Pool {
52+
return &redis.Pool{
53+
MaxIdle: 80,
54+
MaxActive: 12000,
55+
Dial: func() (redis.Conn, error) {
56+
c, err := redis.Dial("tcp", ":6379")
57+
if err != nil {
58+
panic(err.Error())
59+
}
60+
return c, err
61+
},
62+
}
63+
}
64+
```
65+
66+
1. Write your application code
67+
68+
```go
69+
package main
70+
71+
import (
72+
"fmt"
73+
74+
"github.com/gomodule/redigo/redis"
75+
)
76+
77+
var pool = newPool()
78+
79+
func main() {
80+
81+
client := pool.Get()
82+
defer client.Close()
83+
84+
_, err := client.Do("SET", "mykey", "Hello from redigo!")
85+
if err != nil {
86+
panic(err)
87+
}
88+
89+
value, err := client.Do("GET", "mykey")
90+
if err != nil {
91+
panic(err)
92+
}
93+
94+
fmt.Printf("%s \n", value)
95+
96+
_, err = client.Do("ZADD", "vehicles", 4, "car")
97+
if err != nil {
98+
panic(err)
99+
}
100+
_, err = client.Do("ZADD", "vehicles", 2, "bike")
101+
if err != nil {
102+
panic(err)
103+
}
104+
105+
vehicles, err := client.Do("ZRANGE", "vehicles", 0, -1, "WITHSCORES")
106+
if err != nil {
107+
panic(err)
108+
}
109+
fmt.Printf("%s \n", vehicles)
110+
111+
112+
}
113+
114+
func newPool() *redis.Pool {
115+
return &redis.Pool{
116+
MaxIdle: 80,
117+
MaxActive: 12000,
118+
Dial: func() (redis.Conn, error) {
119+
c, err := redis.Dial("tcp", ":6379")
120+
if err != nil {
121+
panic(err.Error())
122+
}
123+
return c, err
124+
},
125+
}
126+
}
127+
```
128+
129+
Find more information about Golang & Redis connections in the "[Redis Connect](https://github.com/redis-developer/redis-connect/tree/master/golang/redigo)".
130+
131+
132+
</TabItem>
133+
</Tabs>

0 commit comments

Comments
 (0)