docker session 7.1 bdc - copy

15
Use this title slide only with an image Part 8 BDC Couchbase Server Dawood Sayyed/GLDS June 21st , 2016 Internal

Upload: dawood-ms

Post on 15-Apr-2017

29 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Docker Session 7.1 BDC  - Copy

Use this title slide only with an image

Part 8 BDC Couchbase ServerDawood Sayyed/GLDS June 21st , 2016 Internal

Page 2: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 2Internal

Few questions before we start

What is fixed schema and Dynamic schema?

What is SQL dB ?

What is NoSQL dB ?

Any advantages of No SQL dB over SQL dB ?

Which dominates SQL or no SQL ?

What is Keyspace ,Document ,graph and column family ?

Page 3: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 3Internal

SQL vs NoSQL

Page 4: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 4Internal

SQL dominates then WHY NoSQL ?

Page 5: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 5Internal

Five Trends Create New Technical Challenges that NoSQL Addresses

• More customers are going online

• The Internet is connecting everything

• Big Data is getting bigger

• Applications are moving to the cloud

• The world has gone mobile

http://www.couchbase.com/nosql-resources/why-nosql

Page 6: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 6Internal

Couchbase Server

Couchbase Server is a distributed NoSQL database. Couchbase is a JSON (JavaScript Object Notation) based document store.

Couchbase, like other NoSQL datastores, does not have a fixed schema for data storage.

Couchbase differs from MongoDB in that MongoDB is based on the BSON (binary JSON) document data model.

Couchbase provides a Web Console for accessing the Couchbase server from a graphical user interface (GUI).

Couchbase also provides a command-line interface (CLI) including several tools to run inthe CLI.

Couchbase server in a Docker container.

Page 7: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 7Internal

Setting the Environment

Starting Couchbase

Accessing Couchbase Web Console

Configuring Couchbase Server

Adding Documents

Starting Interactive Terminal

Running Couchbase CLI Tools

Stopping Couchbase Server

Page 8: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 8Internal

Starting Couchbase

Download the official Couchbase Docker image called “couchbase”.

sudo docker pull couchbase

sudo docker run --name couchbasedb -d -p 8091:8091 couchbase

Page 9: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 9Internal

Accessing Couchbase Web Console

http://<monsooninstance IP>:8091

http://10.97.135.207:8091

Page 10: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 10Internal

Couchbase server could require non-default ulimit settings.

Docker container stores all persistent data in the /opt/couchbase/var directory, which could be

mounted from the host using the –v command parameter.

The –ulimit command parameter is used to set the docker run command.

Page 11: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 11Internal

Docker command with volume parameter and ulimit

sudo docker run --name couchbasedb -v ~/couchbase/data:/opt/couchbase/var -d --ulimit

nofile=40960:40960 --ulimit core=100000000:100000000 --ulimit memlock=100000000:100000000 -p

8091:8091 couchbase

Output the logs for the container with the docker logs command.

sudo docker logs couchbasedb

Or can be check with WEB UI

Page 12: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 12Internal

Data Buckets and Flush in couchbasedb

Couchbase server stores data in data buckets.

In the Sample Buckets section the sample buckets are listed.

A sample bucket is not required to be selected.

Click on Next. In the Create Default Bucket screen the

Bucket Name is pre-specified as “default”.

Select Bucket Type as “Couchbase”. Select the default Memory

Size & Replicas settings.

Also select the default Disk I/O Optimization setting

To be able to flush (delete) data from a bucket, ‘Flush’ must be enabled.

Page 13: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 13Internal

Creating your document in Couchbase

{

"journal": "Docker Magazine",

"publisher": "Docker Publishing",

"edition": "November-December 2016",

"title": "Quintessential and Collaborative",

"author": "Dawood Sayyed"

}

Page 14: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 14Internal

Starting Interactive Terminal

sudo docker exec -it couchbasedb bash

OR

sudo docker exec -it bff916e55a52 bash

>exit

sudo docker stop couchbasedb

cbtransfer http://10.97.135.207/:8091/ stdout:

Page 15: Docker Session 7.1 BDC  - Copy

© 2015 SAP SE or an SAP affiliate company. All rights reserved. 15Internal

Summary

Official Docker image for Couchbase Server to run a Couchbase Server instance

in a Docker container. Couchbase Sever from the Couchbase Console

Added JSON document