testing and deploying couchbase mobile – couchbase connect 2016

Post on 23-Jan-2018

280 Views

Category:

Software

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

©2016 Couchbase Inc.

Deploy: installing, upgrading andscaling

1

©2016 Couchbase Inc. 2

James NocentiniTechnical Writer

jamesn@couchbase.com

@jamiltz

IMAGE GOES HERE

©2016 Couchbase Inc. 3

Traun LeydenSoftware Engineer

tleyden@couchbase.com

@tleydn

IMAGE GOES HERE

©2016 Couchbase Inc.©2016 Couchbase Inc.

Agenda

4

• Overall System Overview

• Deploying on Operating Systems / Virtual Machines• Overview

• Demo on VirtualBox cluster

• Deploying on Containers• Overview

• Deploying on PaaS – Platform as a Service• PaaS landscape overview

• Demo on Docker Cloud

©2016 Couchbase Inc.©2016 Couchbase Inc.

Deployed System Overview

5

©2016 Couchbase Inc. 6

Deploying on Operating Systems / Virtual Machines

Containers

PaaS Providers

©2016 Couchbase Inc. 7

Supported Backend Platforms

• Operating Systems / Virtual Machines• Linux: RedHat / CentOS / Ubuntu

• Windows

• OSX

©2016 Couchbase Inc.©2016 Couchbase Inc.

Deployment Stages for VMs

8

1. Start Virtual Machines

2. Provisioning Couchbase Server and Sync Gateway

3. Configuration Changes

4. Scaling

©2016 Couchbase Inc. 9

Demo

©2016 Couchbase Inc.©2016 Couchbase Inc.

Install

10

1. Install Couchbase Server

2. Configure Couchbase Server

3. Install Sync Gateway

4. Configure Sync Gateway (Connect to CBS)

5. Configure Ngninx

©2016 Couchbase Inc.©2016 Couchbase Inc.

Rolling Upgrade

11

1. Remove SG on VM2 from NginxRotation

2. Upgrade SG on VM2

3. Re-add SG on VM2 to Nginxrotation

©2016 Couchbase Inc.©2016 Couchbase Inc.

Rolling Upgrade

12

1. Repeat steps for SG on VM3

©2016 Couchbase Inc.©2016 Couchbase Inc.

Scaling

13

1. Configure SG to connect to Couchbase Server

2. Add new SG to Nginx rotation

©2016 Couchbase Inc.©2016 Couchbase Inc.

Demo Recap

• Install Couchbase Server

• Configure Couchbase Cluster

• Install Sync Gateway

• Configure Sync Gateway

• Configure NGINX

• Rolling Upgrades

• Auto-scaling

• Configuration changes

14

©2016 Couchbase Inc. 15

Operating Systems / Virtual Machines

Deploying on ContainersPaaS Providers

©2016 Couchbase Inc. 16

Supported Backend Platforms

• Containers• Docker

©2016 Couchbase Inc. 17

Containers (Docker)

Advantages

• Quick to start/restart

• Portability

• Isolation

• Resource allocation and scheduling

Challenges

• Data persistence

• Additional networking complexity

• Microservice Overhead

©2016 Couchbase Inc.©2016 Couchbase Inc.

Container Persistent Data challenges

• Container file systems are based on UnionFS and not appropriate for high IO throughput

• Volumes let you mount host directories into container – data persists beyond container instance

• Kubernetes Container Orchestration• By default, will schedule containers on any node and your host directory probably won’t be there

• PetSets were recently introduced to solve this issue

18

©2016 Couchbase Inc.©2016 Couchbase Inc.

Container networking challenges

• Containers communicating across hosts• Workaround: host only networking – container runs directly on host’s network interface

• Right way: Use Overlay Networking

• Set it up yourself with Weave (Hard)

• Use Kubernetes

• Use Docker Swarm

• Couchbase Server sensitive to change in IP address• Problem: restart a container and it gets a new IP address and tries to rejoin, cluster won’t recognize

• Workaround: configure with stable routable DNS names

19

©2016 Couchbase Inc. 20

Operating Systems / Virtual MachinesContainers

Deploying on PaaS Providers

©2016 Couchbase Inc.©2016 Couchbase Inc.

Couchbase Images on DockerHub – officially supported

21

©2016 Couchbase Inc. 22

Supported Backend Platforms

• PaaS Providers• AWS

• Azure

• Google Container Engine (GKE)

• Docker Cloud

• OpenStack3 (coming soon)

©2016 Couchbase Inc.©2016 Couchbase Inc.

Deployment Stages for Docker Cloud

23

1. Provisioning Nodes

2. Creating the Services

3. Deploying Containers

4. Scaling Services

©2016 Couchbase Inc.©2016 Couchbase Inc.

Docker Cloud – (Dev Mode) 5 containers striped across 2 nodes

24

Node1 - EC2 Instance

Node2 - EC2 Instance

CouchbaseService

Sync GatewayService

HAProxyService

Sync Gateway1Container

Sync Gateway2Container

Couchbase1Container

Couchbase2Container

HAProxyContainer

©2016 Couchbase Inc.©2016 Couchbase Inc.

Docker Cloud – (Production Mode) Dedicated node per container

25

Node5 - EC2 Instance

Node4 - EC2 Instance

Node3 - EC2 Instance

Node1 - EC2 Instance

Node2 - EC2 Instance

CouchbaseService

Sync GatewayService

HAProxyService

Sync Gateway1Container

Sync Gateway2Container

Couchbase1Container

Couchbase2Container

HAProxyContainer

©2016 Couchbase Inc. 26

Demo

©2016 Couchbase Inc.©2016 Couchbase Inc.

Docker Cloud Demo Recap

27

1. Start 2 Nodes (pre-demo)2. Start Couchbase Server Service with 2 Containers3. Configure Couchbase Server cluster4. Start Sync Gateway Service with 2 Containers5. Verify Sync Gateway6. Start HAProxy load balancer Service with 1 Container7. Verify Sync Gateway via HAProxy

Setup

1. Start new Node2. Scale Sync Gateway Service to add another container (3 total)3. Send Requests to HAProxy and verify logs in Sync Gateway Container 3

Scale

©2016 Couchbase Inc.

Thank You!

28

top related