Skip to content

Commit

Permalink
Merge pull request #426 from asifdxtreme/syncer
Browse files Browse the repository at this point in the history
Update the documentation related to Soda Container DR Solution
  • Loading branch information
kumarashit authored Jun 28, 2021
2 parents 425a2f4 + 626078a commit 1e04dc7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build/
.idea*
nvme-cli-*
nvmecli-*
*.DS*
42 changes: 20 additions & 22 deletions csi-plug-n-play/sidecars/soda-proxy/Readme.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
## soda-proxy

soda-proxy is a simple http server which helps to call the api's of SodaFoundation in a simpler way, it bypasses the authentication and directly helps to connect the osdsapi-server using the client provided by sodafoundation/api.
soda-proxy is a simple http server which helps to call the api's of SodaFoundation Components in a simpler way, it uses the authentication and directly helps to connect the osdsapi-server using the client provided by sodafoundation/api.

### Build
Please follow the below steps to build and run the proxy
### Quick Start Guide

Simplest way to use soda-proxy is to get the latest image from [here](https://hub.docker.com/repository/docker/sodafoundation/soda-proxy)

After getting the image please download the deployment yaml for soda-porxy from [here](https://github.com/sodafoundation/nbp/blob/master/csi-plug-n-play/sidecars/soda-proxy/deploy/sodaProxy.yaml)
```go
go get github.com/sodafoundation/nbp
wget https://github.com/sodafoundation/nbp/blob/master/csi-plug-n-play/sidecars/soda-proxy/deploy/sodaProxy.yaml

cd $GOPATH/src/github.com/sodafoundation/nbp/csi-plug-n-play/sidecars/soda-proxy
```
Please edit the Sodafoundation env variables in the above yaml, for reference you can visit this [link](https://docs.sodafoundation.io/soda-gettingstarted/installation-using-ansible/#how-to-test-soda-projects-cluster)

go build -o soda-proxy cmd/proxy.go
After editing you can follow the below guide to start the soda-proxy
```go
kubectl create -f sodaProxy.yaml
```

Before running soda-proxy you need to update the below variables in `scripts/start.sh`.(These are the same env variables which are required by osdsctl, for more reference you can see [this](https://docs.sodafoundation.io/soda-gettingstarted/installation-using-ansible/#how-to-test-soda-projects-cluster))
### Build the image through code
If you want to try our latest and greatest one then you can follow the below guide

```go
go get github.com/sodafoundation/nbp

export OPENSDS_ENDPOINT=http://{your_host_ip}:50040
export OPENSDS_AUTH_STRATEGY=keystone
export OS_AUTH_URL=http://{your_host_ip}/identity
export OS_USERNAME=admin
export OS_PASSWORD=opensds@123
export OS_TENANT_NAME=admin
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_ID=default
cd $GOPATH/src/github.com/sodafoundation/nbp/csi-plug-n-play/sidecars/soda-proxy

go build -o soda-proxy cmd/proxy.go
```
Once the code is build, then next step will be to build the docker images

```go
./scripts/start.sh

docker build -t sodafoundation/soda-proxy:dev .
```

By default soda-proxy runs on `0.0.0.0:50029`

Cleanup
```go
./scripts/stop.sh
```
Once the image is build then you can follow the above Quick start guide to run the soda-proxy
3 changes: 2 additions & 1 deletion soda-syncer/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Flow :
2. soda-csi-provisioner fetches the profile details from [soda-proxy](https://github.com/sodafoundation/nbp/tree/master/csi-plug-n-play/sidecars/soda-proxy)
3. soda-proxy connects to soda-api server with proper authentication to get the profile details.
4. Using the profile details soda-csi-provisioner picks the backend the CSI driver and provisions the volume.
5. soda-csi-provisioner sends the consistent snapshot request to soda-syncer based on the profile configuration received in Step 2.
5. soda-csi-provisioner sends the consistent snapshot request to soda-proxy.
6. soda-proxy gets the Profile detalis and fetches the snapshot policy and sends request to soda-syncer at current node to backup.
6. soda-syncer at configured intervals invokes restic to do the cloud backup.


Expand Down
Binary file modified soda-syncer/static/assets/consistent-snapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1e04dc7

Please sign in to comment.