Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: shirady <[email protected]>
  • Loading branch information
shirady committed Nov 30, 2023
1 parent 127c1fe commit 3ed4c2f
Showing 1 changed file with 109 additions and 60 deletions.
169 changes: 109 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![slack](https://img.shields.io/badge/slack-noobaa-brightgreen.svg?logo=slack)](https://www.noobaa.io/community)
[![slack](https://img.shields.io/badge/slack-noobaa-brightgreen.svg?logo=slack)](https://noobaa.slack.com/channels/general)
[![noobaa-core](https://img.shields.io/github/v/release/noobaa/noobaa-core?label=noobaa-core)](https://github.com/noobaa/noobaa-core/releases/latest)
[![noobaa-operator](https://img.shields.io/github/v/release/noobaa/noobaa-operator?label=noobaa-operator)](https://github.com/noobaa/noobaa-operator/releases/latest)
<div id="top"></div>
Expand All @@ -7,9 +7,11 @@

NooBaa is an object data service for hybrid and multi cloud environments. NooBaa runs on kubernetes, provides an S3 object store service (and Lambda with bucket triggers) to clients both inside and outside the cluster, and uses storage resources from within or outside the cluster, with flexible placement policies to automate data use cases.

# Usage
NooBaa operator (the Operator) watches for NooBaa changes and reconciles them to apply the desired state.

Install latest operator CLI
## Usage

Install the latest operator CLI
(or pick from the [releases page](https://github.com/noobaa/noobaa-operator/releases)):

```bash
Expand Down Expand Up @@ -46,18 +48,24 @@ noobaa install
noobaa status
```

### NooBaa CLI
The CLI helps with most management tasks and focuses on ease of use for manual operations or scripts.

Notes:
- Help: `noobaa --help`
- kubeconfig: - same as kubectl - The CLI operates on the current context from kubeconfig which can be changed with `export KUBECONFIG=/path/to/custom/kubeconfig` or use the --kubeconfig and --namespace flags.
- minikube: use `noobaa install --mini` in order to allocate less resources.
- Help: `noobaa --help`, use `noobaa <command> --help` for more information about any command.
- kubeconfig - same as kubectl - The CLI operates on the current context from kubeconfig which can be changed with `export KUBECONFIG=/path/to/custom/kubeconfig` or use the --kubeconfig and --namespace flags.
- local clusters (minikube, rancher desktop): use `noobaa install --mini` or `--dev`in order to allocate less resources.
- Uninstalling: `noobaa uninstall`

The CLI helps with most management tasks and focuses on ease of use for manual operations or scripts.

### Examples:
Here is the top level usage:

#### 1) Help menu
```bash
$ noobaa --help
$ noobaa help
```

```
._ _ ______
| \ | | | ___ \
| \| | ___ ___ | |_/ / __ _ __ _
Expand All @@ -66,86 +74,127 @@ $ noobaa --help
\_| \_/\___/ \___/\____/ \__,_|\__,_|
Install:
install Install the operator and create the noobaa system
uninstall Uninstall the operator and delete the system
status Status of the operator and the system
install Install the operator and create the noobaa system
upgrade Upgrade the system, its components and CRDS
uninstall Uninstall the operator and delete the system
status Status of the operator and the system
Manage:
backingstore Manage backing stores
bucketclass Manage bucket classes
obc Manage object bucket claims
diagnose Collect diagnostics
ui Open the NooBaa UI
backingstore Manage backing stores
namespacestore Manage namespace stores
bucketclass Manage bucket classes
account Manage noobaa accounts
obc Manage object bucket claims
cosi Manage cosi resources
diagnostics diagnostics of items in noobaa system
Advanced:
operator Deployment using operator
system Manage noobaa systems
api Make api call
bucket Manage noobaa buckets
pvstore Manage noobaa pv store
crd Deployment of CRDs
olm OLM related commands
operator Deployment using operator
system Manage noobaa systems
api Make api call
bucket Manage noobaa buckets
pvstore Manage noobaa pv store
crd Deployment of CRDs
olm OLM related commands
Other Commands:
completion Generates bash completion scripts
options Print the list of global flags
version Show version
completion Generates bash completion scripts
options Print the list of global flags
version Show version
Use "noobaa <command> --help" for more information about a given command.

```

```
#### 2) Option menu
In case you would like to add flags that are not specific for a certain command.

```bash
$ noobaa options
```

```
The following options can be passed to any command:
--db-image='centos/mongodb-36-centos7': The database container image
--db-storage-class='': The database volume storage class name
--db-volume-size-gb=0: The database volume size in GB
--image-pull-secret='': Image pull secret (must be in same namespace)
--kubeconfig='': Paths to a kubeconfig. Only required if out-of-cluster.
--master='': The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if
out-of-cluster.
--mini=false: Signal the operator that it is running in a low resource environment
-n, --namespace='noobaa': Target namespace
--noobaa-image='noobaa/noobaa-core:5.6.0': NooBaa image
--operator-image='noobaa/noobaa-operator:5.6.0': Operator image
--pv-pool-default-storage-class='': The default storage class name for BackingStores of type pv-pool

--admission=false: Install the system with admission validation webhook
--autoscaler-type='': The type of autoscaler (hpav2, keda)
--cosi-driver-path='/var/lib/cosi/cosi.sock': unix socket path for COSI
--cosi-sidecar-image='gcr.io/k8s-staging-sig-storage/objectstorage-sidecar/objectstorage-sidecar:v20221117-v0.1.0-22-g0e67387': The cosi side car container image
--db-image='centos/mongodb-36-centos7': The database container image
--db-storage-class='': The database volume storage class name
--db-type='postgres': The type of database container image (mongodb, postgres)
--db-volume-size-gb=0: The database volume size in GB
--debug-level='default_level': The type of debug sets that the system prints (all, nsfs, warn, default_level)
--dev=false: Set sufficient resources for dev env
--disable-load-balancer=false: Set the service type to ClusterIP instead of LoadBalancer
--image-pull-secret='': Image pull secret (must be in same namespace)
--kubeconfig='': Paths to a kubeconfig. Only required if out-of-cluster.
--manual-default-backingstore=false: allow to delete the default backingstore
--mini=false: Signal the operator that it is running in a low resource environment
--mongodb-url='': url for mongodb
-n, --namespace='default': Target namespace
--noobaa-image='noobaa/noobaa-core:master-20230920': NooBaa image
--operator-image='noobaa/noobaa-operator:5.15.0': Operator image
--pg-ssl-cert='': ssl cert for postgres (client-side cert - need to be signed by external pg accepted CA)
--pg-ssl-key='': ssl key for postgres (client-side cert - need to be signed by external pg accepted CA)
--pg-ssl-required=false: Force noobaa to work with ssl (external postgres - server-side) [if server cert is self-signed, needs to add --ssl-unauthorized]
--pg-ssl-unauthorized=false: Allow the client to work with self-signed ssl (external postgres - server-side)
--postgres-url='': url for postgresql
--prometheus-namespace='': namespace with installed prometheus for autoscaler
--pv-pool-default-storage-class='': The default storage class name for BackingStores of type pv-pool
--s3-load-balancer-source-subnets=[]: The source subnets for the S3 service load balancer
--show-secrets=false: Show the secrets in the status output
--sts-load-balancer-source-subnets=[]: The source subnets for the STS service load balancer
--test-env=false: Install the system with test env minimal resources
```
```shell
3) Current version
When you want to print the current CLI version and images:
```bash
$ noobaa version
```

```
INFO[0000] CLI version: 5.15.0
INFO[0000] noobaa-image: noobaa/noobaa-core:5.15.0
INFO[0000] noobaa-image: noobaa/noobaa-core:master-20230920
INFO[0000] operator-image: noobaa/noobaa-operator:5.15.0

```

# Troubleshooting
## Troubleshooting
- Verify that there are enough resources for noobaa pods:
- `kubectl describe pod | less`
- `kubectl get events --sort-by .metadata.creationTimestamp`
- Make sure that there is a single **default** storage class:
- `kubectl get sc`
- or specify which storage class to use with `noobaa install --db-storage-class XXX --pv-pool-default-storage-class YYY`

# Documentation
- [About NooBaa](doc/about-noobaa.md)
## Documentation
1) You can find documentation related to noobaa operator and noobaa components in k8s in [doc](doc) directory.
For example:
- [NooBaa](doc/about-noobaa.md) - Basic terminology and links to videos.
- CRDs
- [NooBaa](doc/noobaa-crd.md) - The basic CRD to deploy a NooBaa system.
- [BackingStore](doc/backing-store-crd.md) - Storage resources.
- [NamespaceStore](doc/namespace-store-crd.md) - Data resources.
- [BucketClass](doc/bucket-class-crd.md) - Policies applied to a class of buckets.
- [OBC Provisioner](doc/obc-provisioner.md) - Method to claim a new/existing bucket.
# Developing
- Fork and clone the repo: `git clone https://github.com/<username>/noobaa-operator`
- Use minikube: `minikube start`
- [NooBaaSystem](doc/noobaa-crd.md) - The basic CRD to deploy a NooBaa system.
- [BackingStore](doc/backing-store-crd.md) - Storage resources. These storage targets are used to store deduplicated, compressed and encrypted chunks of data.
- [NamespaceStore](doc/namespace-store-crd.md) - Data resources. These storage targets are used to store and read plain data.
- [BucketClass](doc/bucket-class-crd.md) - Policies applied to a class of buckets, defines bucket policies relating to data placement
- Bucket Claim:
- [OBC Provisioner](doc/obc-provisioner.md) - Although it using a library that is not active, we still have this option in out system.
- [COSI Provisioner](doc/obc-cosi-provisioner.md) - Using an active library.
- DB:
- THe default DB is postgres, internal in the cluster.
- [External Postgresql DB support](doc/external-postgres.md)
- Other:
- [Account](doc/noobaa-account-crd.md) - We use the account to receive new credentials set for accessing different noobaa services.
- [HA controller](doc/high-availability-controller.md) - High Availability controller improves NooBaa pods recovery in the case of a node failure.
-[Admission Controller](doc/noobaa-admission.md) - The utilize k8s admission webhook feature to validate various NooBaa custom resource definitions.
2) Additional information can be found in:
- [noobaa/noobaa-core](https://github.com/noobaa/noobaa-core) repository.
- [noobaa wiki](https://github.com/noobaa/noobaa-core/wiki).


## Developing
- Fork and clone the repo: `git clone https://github.com/<username>/noobaa-operator` (see [here](https://github.com/noobaa/noobaa-core/wiki/Git-Pull-Request-Guide) the full needed procedure when contributing code in Github)
- Use a [local cluster](doc/deply_noobaa_on_minikube_or_rancher_desktop.md):
- Minikube (`minikube start`)
- Rancher Desktop
- Use your package manager to install `go` and `python3`.
- Source the devenv into your shell: `. devenv.sh`
- Build the project: `make`
Expand Down

0 comments on commit 3ed4c2f

Please sign in to comment.