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

Cross link docs #102

Merged
merged 8 commits into from
Jul 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# KubeDB
Running production quality database in Kubernetes can be tricky to say the least. In the early days of Kubernetes, replication controllers were used to run a single pod for a database. With the introduction of StatefulSet, it became easy to run a docker container for any database. But what about monitoring, taking periodic backups, restoring from backups or cloning from an existing database? KubeDB by AppsCode is a framework for writing operators for any database that support the following operational requirements:
Running production quality database in Kubernetes can be tricky to say the least. In the early days of Kubernetes, replication controllers were used to run a single pod for a database. With the introduction of StatefulSet, it became easy to run a docker container for any database. But what about monitoring, taking periodic backups, restoring from backups or cloning from an existing database? KubeDB is a framework for writing operators for any database that support the following operational requirements:

- Create a database declaratively using TPR
- Take one-off backups or period backups to various cloud stores, eg,, S3, GCS, etc.
Expand All @@ -9,7 +9,7 @@ Running production quality database in Kubernetes can be tricky to say the least
- Keep track of deleted databases, cleanup prior snapshots with a single command.
- Use cli to manage databases like kubectl for Kubernetes.

Currently we include a complete implementation for Postgres and ElasticSearch database based on KubeDB framework.
KubeDB is developed at AppsCode Inc. to run their SAAS platform on Kubernetes. Currently we include a complete implementations for Postgres and ElasticSearch database based on K8sdb framework.

## Supported Versions
Kubernetes 1.5+
Expand All @@ -18,7 +18,7 @@ Kubernetes 1.5+
To install KubeDB, please follow the guide [here](/docs/install.md).

## Using KubeDB
Want to learn how to use KubeDB? Please start [here](/docs/tutorial.md).
Want to learn how to use KubeDB? Please start [here](/docs/tutorials/README.md).

## Contribution guidelines
Want to help improve KubeDB? Please start [here](/CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Kubernetes 1.5+
To install KubeDB, please follow the guide [here](/docs/install.md).

## Using KubeDB
Want to learn how to use KubeDB? Please start [here](/docs/tutorial.md).
Want to learn how to use KubeDB? Please start [here](/docs/tutorials/README.md).

## Contribution guidelines
Want to help improve KubeDB? Please start [here](/CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/elasticsearch.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> New to KubeDB? Please start [here](/docs/tutorial.md).
> New to KubeDB? Please start [here](/docs/tutorials/README.md).

# Elasticsearch

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/monitoring.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> New to KubeDB? Please start [here](/docs/tutorial.md).
> New to KubeDB? Please start [here](/docs/tutorials/README.md).

# Monitoring KubeDB

Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/postgres.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
> New to KubeDB? Please start [here](/docs/tutorial.md).
> New to KubeDB? Please start [here](/docs/tutorials/README.md).

# Postgreses
# Postgres

## What is Postgres
A `Postgres` is a Kubernetes `Third Party Object` (TPR). It provides declarative configuration for [PostgreSQL](https://www.postgresql.org/) in a Kubernetes native way. You only need to describe the desired database configuration in a Postgres object, and the KubeDB operator will create Kubernetes objects in the desired state for you.
Expand Down
55 changes: 3 additions & 52 deletions docs/concepts/snapshot.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
> New to KubeDB? Please start [here](/docs/tutorial.md).
> New to KubeDB? Please start [here](/docs/tutorials/README.md).

# Snapshots
# Snapshot

## What is Snapshot
A `Snapshot` is a Kubernetes `Third Party Object` (TPR). It provides declarative configuration for database snapshots in a Kubernetes native way.
Expand Down Expand Up @@ -34,7 +34,7 @@ spec:
cpu: "500m"
```

The `.spec` section supports the following different cloud providers to store snapshot data:
The `.spec` section supports the following different storage providers for storing snapshot data:

### Local
`Local` backend refers to a local path inside snapshot job container. Any Kubernetes supported [persistent volume](https://kubernetes.io/docs/concepts/storage/volumes/) can be used here. Some examples are: `emptyDir` for testing, NFS, Ceph, GlusterFS, etc.
Expand Down Expand Up @@ -422,52 +422,3 @@ spec:
memory: "128Mi"
cpu: "500m"
```


## Taking one-off Backup
To initiate backup process, first create a Snapshot object. A valid Snapshot object must contain the following fields:

- metadata.name
- metadata.namespace
- metadata.labels[kubedb.com/kind]
- spec.databaseName
- spec.storageSecretName
- spec.local | spec.s3 | spec.gcs | spec.azure | spec.swift

Before starting backup process, KubeDB operator will validate storage secret by creating an empty file in specified bucket using this secret.

Using `kubedb`, create a Snapshot object from `snapshot.yaml`.

```console
$ kubedb create -f ./docs/examples/elasticsearch/snapshot.yaml

snapshot "snapshot-xyz" created
```

Use `kubedb get` to check snap0shot status.

```console
$ kubedb get snap snapshot-xyz -o wide

NAME DATABASE BUCKET STATUS AGE
snapshot-xyz es/elasticsearch-db s3:snapshot Succeeded 24m
```


## Schedule Backups
Scheduled backups are supported for all types of databases. To schedule backups, add the following `BackupScheduleSpec` in `spec` of a database tpr.
All snapshot storage backends are supported for scheduled backup.

```yaml
spec:
backupSchedule:
cronExpression: "@every 6h"
storageSecretName: "secret-for-bucket"
s3:
endpoint: 's3.amazonaws.com'
bucket: kubedb-qa
```

`spec.backupSchedule.schedule` is a [cron expression](https://github.com/robfig/cron/blob/v2/doc.go#L26) that indicates how often backups are taken.

When `spec.backupSchedule` section is added, KubeDB operator immediately takes a backup to validate this information. After that, at each tick kubeDB operator creates a Snapshot object. This triggers operator to create a Job to take backup.
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> New to KubeDB? Please start [here](/docs/tutorial.md).
> New to KubeDB? Please start [here](/docs/tutorials/README.md).

# Installation Guide

Expand Down Expand Up @@ -60,7 +60,7 @@ Now, to confirm TPR groups have been registered by the operator, run the followi
$ kubectl get thirdpartyresources -l app=kubedb
```

Now, you are ready to [create your first database](/docs/tutorial.md) using KubeDB.
Now, you are ready to [create your first database](/docs/tutorials/README.md) using KubeDB.

## Upgrade KubeDB
To upgrade KubeDB cli, just replace the old cli with the new version.
Expand Down
13 changes: 0 additions & 13 deletions docs/tutorial.md

This file was deleted.

9 changes: 8 additions & 1 deletion docs/tutorials/cli.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> New to KubeDB? Please start [here](/docs/tutorial.md).
> New to KubeDB? Please start [here](/docs/tutorials/README.md).

# Manage KubeDB objects using CLIs

Expand Down Expand Up @@ -308,3 +308,10 @@ $ kubectl get postgres.kubedb.com
# Delete objects
$ kubectl delete postgres <name>
```


## Next Steps
- Learn how to use KubeDB to run a PostgreSQL database [here](/docs/tutorials/postgres.md).
- Learn how to use KubeDB to run an Elasticsearch database [here](/docs/tutorials/elasticsearch.md).
- Wondering what features are coming next? Please visit [here](/ROADMAP.md).
- Want to hack on Stash? Check our [contribution guidelines](/CONTRIBUTING.md).
9 changes: 9 additions & 0 deletions docs/tutorials/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,3 +606,12 @@ $ kubectl delete ns demo
```

If you would like to uninstall KubeDB operator, please follow the steps [here](/docs/uninstall.md).


## Next Steps
- Learn about the details of Elasticsearch tpr [here](/docs/concepts/elasticsearch.md).
- See the list of supported storage providers for snapshots [here](/docs/concepts/snapshot.md).
- Thinking about monitoring your database? KubeDB works [out-of-the-box with Prometheus](/docs/tutorials/monitoring.md).
- Learn how to use KubeDB in a [RBAC](/docs/concepts/rbac.md) enabled cluster.
- Wondering what features are coming next? Please visit [here](/ROADMAP.md).
- Want to hack on Stash? Check our [contribution guidelines](/CONTRIBUTING.md).
8 changes: 8 additions & 0 deletions docs/tutorials/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,11 @@ $ kubectl delete ns demo
```

If you would like to uninstall KubeDB operator, please follow the steps [here](/docs/uninstall.md).


## Next Steps
- Learn about the details of monitoring support [here](/docs/concepts/monitoring.md).
- Learn how to use KubeDB to run a PostgreSQL database [here](/docs/tutorials/postgres.md).
- Learn how to use KubeDB to run an Elasticsearch database [here](/docs/tutorials/elasticsearch.md).
- Wondering what features are coming next? Please visit [here](/ROADMAP.md).
- Want to hack on Stash? Check our [contribution guidelines](/CONTRIBUTING.md).
9 changes: 9 additions & 0 deletions docs/tutorials/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,3 +648,12 @@ $ kubectl delete ns demo
```

If you would like to uninstall KubeDB operator, please follow the steps [here](/docs/uninstall.md).


## Next Steps
- Learn about the details of Postgres tpr [here](/docs/concepts/postgres.md).
- See the list of supported storage providers for snapshots [here](/docs/concepts/snapshot.md).
- Thinking about monitoring your database? KubeDB works [out-of-the-box with Prometheus](/docs/tutorials/monitoring.md).
- Learn how to use KubeDB in a [RBAC](/docs/concepts/rbac.md) enabled cluster.
- Wondering what features are coming next? Please visit [here](/ROADMAP.md).
- Want to hack on Stash? Check our [contribution guidelines](/CONTRIBUTING.md).
7 changes: 7 additions & 0 deletions docs/tutorials/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,10 @@ $ kubectl delete ns demo
```

If you would like to uninstall KubeDB operator, please follow the steps [here](/docs/uninstall.md).


## Next Steps
- Learn how to use KubeDB to run a PostgreSQL database [here](/docs/tutorials/postgres.md).
- Learn how to use KubeDB to run an Elasticsearch database [here](/docs/tutorials/elasticsearch.md).
- Wondering what features are coming next? Please visit [here](/ROADMAP.md).
- Want to hack on Stash? Check our [contribution guidelines](/CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion docs/uninstall.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> New to KubeDB? Please start [here](/docs/tutorial.md).
> New to KubeDB? Please start [here](/docs/tutorials/README.md).

# Uninstall KubeDB
Please follow the steps below to uninstall KubeDB:
Expand Down