Monthly Archives: March 2016

Couchbase Weekly, Mar 28, 2016

Learn what’s latest in the Couchbase Community.
Couchbase Developer Community

Let us know if we missed anything at @couchbasedev, @couchbase or #Couchbase.

Couchbase Weekly

Highlights

Events

  • March 31: Couchbase Day Minneapolis

Announcements

  • Couchbase is participating in the 10th annual Future of Open Source Survey sponsored by North Bridge and Black Duck. Please make sure to participate in the survey: https://www.surveymonkey.com/r/2016FoOSCouchbase

Couchbase Weekly

News

Media Mentions

  • Benzinga: LeadFerret Builds Directory of NoSQL Experts
  • Business 2 Community: 5 Ways the Internet of Things Will Change Big Data
  • Datanami: Rethinking Operational Anaytics on Relational DBs
  • ComputerWork UK: How Couchbase wants to power the digital economy, from startups like Seenit to the enterprise
  • I Programmer: Next Generation Databases: NoSQL NewSQL, and Big Data

Blogs

  • NetBeans Plugin for Couchbase Part 7 – Coffee on Couchbase — Arun Gupta
  • Couchase ASP.NET Integration Beta 3 released! — Jeff Morris
  • Official YUM and APT Repos for Couchbase Now Available — Anil Kumar
  • Couchbase Weekly, Mar 22, 2016 — Arun Gupta

Couchbase Weekly 3

Upcoming Events

  • March 31: Couchbase Day Minneapolis
  • April 20 – 22: Devoxx, Paris
  • April 24 – 28: Xamarin Evolve, Orlando
  • April 27: Mobile Web Dev Conference, San Francisco (Speaking)
  • April 28: Great Indian Developer Summit, Bangalore (Speaking)
  • April 26: Virtual JUG

Webinars

  • March 18 – April 20: Building a full stack application with NoSQL, Go, and Angular 2
    US Registration
    EMEA Registration

    • 201 – Bootstrapping an application using Couchbase and Go
    • 202 – Application logic, data model, and validation
    • 203 – Build a responsive front end with Angular 2.0 & Bootstrap
    • 204 – Built-in URL permalinking & minification
    • 205 – Mobile-first development with Nativescript
  • March 31: Data Modeling, Data Querying, and NoSQL: A Deep Dive
  • April 5: NoSQL — No (Security) Problem
  • April 14: Build Better Mobile Apps with NoSQL
    • US Registration
    • EMEA Registration

twitter-logo

  • Tweet This: Want to build a #NetBeans plugin for #Couchbase? Learn how with this multi-part webinar: http://ow.ly/100qqE
  • Learn how #Couchbase powers new startups entering the #DigitalEconomy: http://ow.ly/100pyh via @computerworlduk
  • $30M raised for #NoSQL #Database Leader #Couchbase bit.ly/1TTEpaI
  • Passionate about #opensource? Help shape the next 10 years by taking the 2016 #FutureOSS survey here: http://ow.ly/100okW
  • DEVELOP with AGILITY and OPERATE at any SCALE. Get started with #Couchbase! ow.ly/XSBsQ #NoSQL #Database

Source: http://blog.couchbase.com/2016/march/couchbase-weekly-mar28-2016

NetBeans Plugin for Couchbase Part 7 – Coffee on Couchbase

coffee-on-couchbase

This is part 7of Coffee on Couchbase series where we are building a NetBeans plugin for Couchbase. This multi-part webinar series is a discussion with Geertjan Wielenga (@GeertjanW) and Eben Haber (@ebenhaber).

As part of this series, you’ll also learn how to build a NetBeans plugin from scratch and learn the awesomeness behind NetBeans platform.

During this episode, two useful links about NetBeans platform were shared:

  • NetBeans API List
  •  NetBeans Platform Sample Code

Here is what we’ve covered so far:

  • Part 1
    • GitHub repository for the plugin
    • Started a new NetBeans plugin – discussed Ant vs Maven approach for starting a plugin
    • Couchbase node configured in NetBeans
  • Part 2
    • Show NetBeans users how to install Couchbase and configure it with a sample bucket
    • Run a simple Java EE application that queries the documents stored in Couchbase sample bucket
    • Migrating the NetBeans plugin from Ant to Maven
    • Show a message in popup help menu
    • Double clicking on the Couchbase node connects to Couchbase server and displays a message in status window
  • Part 3
    • Login to Couchbase server
    • See Bucket list
    • See Documents in Bucket
    • Query data from buckets (basic queries, N1QL queries coming later)
    • Compare Documents (NetBeans Diff Viewer)
    • Open Documents (in JSON editor, not savable back to Couchbase)
    • Multiple Couchbase hosts can be configured
  • Part 4
    • Entry point of a NetBeans plugin
    • Learn about NetBeans platform node hierarchy
    • Property sheet for each node
    • Keeping code organized for the plugin
    • Creating menus for different nodes
  • Part 5
    • Showcase features that have been created in the plugin so far
    • Show different icons for indexed and non-indexed buckets in Couchbase
  • Part 6
    • Add a new menu “Create Primary Index” for non-indexed buckets
    • Started work on refreshing the name and description of a bucket after indexing
    • Started work on optimizing the number of documents retrieved for a bucket

The recording from part 7 is now available:

This episode covers:

  • Discussion around modal window vs status bar when creating bucket
  • Icons for newly created buckets are shown correctly as non-indexed
  • Change the menu name from “Set Primary Index” to “Create Primary Index”
  • Discussion around properties panel vs menu items design pattern
  • “Explore from here” for nodes and buckets
  • Default error handling (by NetBeans platform) while editing JSON document
  • Rename buckets (only in NetBeans view, not in database)
  • Discussion around REST endpoint code generator using a bucket
  • Displayed a dialog when JSON document is edited/saved

All the code is evolving at: github.com/arun-gupta/couchbase-netbeans-plugin.

Let us know by filing bugs on features that you’d like to see in this plugin.

We’d love to see your tweets containing snapshots of your document in NetBeans. Use  #NetBeans #Couchbase to let us know :)

NetBeans Couchbase Part 7

Enjoy!

Source: http://blog.couchbase.com/2016/march/netbeans-plugin-couchbase-part7-coffee-on-couchbase

Couchbase Weekly, Mar 22, 2016

Learn what’s latest in the Couchbase Community.
Couchbase Developer Community

Let us know if we missed anything at @couchbasedev, @couchbase or #Couchbase.

Couchbase Weekly

  • March 25: Breizh Camp, Rennes
  • March 22: Couchbase Denver (Meetup)

Couchbase Weekly

News

Couchbase Press Releases

  • Press Release: Couchbase, the Database Company for the Digital Economy, Secures $30 Million in Funding Led by Sorenson Capital
  • Press Release: Sorenson Capital Leads $30 Million Series F Funding Round in NoSQL Database Leader Couchbase

Media Mentions

  • Wall Street Journal: Couchbase Takes $30 Million in Down Round Despite Customer Gains
  • The Register (UK): F-me! Couchbase yoinks $30m in yet another fundraising round
  • Silicon Angle: Couchbase gets $30M from VCs to expand the adoption of its document store
  • PE HUB Network: Sorenson Capital leads $30 mln round for Couchbase
  • Growth Business (UK): Couchbase secures $30m in its last round before IPO
  • DBTA: Couchbase Secures $30 Million in Funding Led by Sorenson Capital
  • TechRockies: Sorenson Capital Leads $30M Investment in Couchbase
  • Red Herring: Skyport Systems Secures $30m Series C
  • Re/Code: Capital Gains: Knock, Knock. Who’s There? Smart Doorbells.
  • CIO: Target CIO adds custom apps, fresh talent to fortify supply chain
  • Wall Street Journal: The Morning Download: Oracle Cloud Revenue Rises Amid Corporate Migration
  • Fortune: Term Sheet — Tuesday, March 15

Blogs

  • Get to Know Our Couchbase Community – Vlado Atanasov — Laura Czajkowski
  • Making the most of your Arrays… with Array Indexing — Prasad Varakur
  • Visual Studio Code, the Integrated SQL Editor and N1QL Query Execution— Cihan Biyikoglu
  • Getting Started with Couchbase and Spark on Apache Zeppelin — Laurent Doguin
  • Get to Know Our Couchbase Community – Meet Joel Ruisi — Laura Czajkowski
  • Getting Started with Docker Cloud — Arun Gupta
  • Couchbase Weekly, Mar 14, 2015 — Arun Gupta

New Customer Stories

  • CenterEdge Software
  • Cox Enterprises
  • Gannett
  • KDDI
  • Marriott
  • Nielsen
  • DIRECTV
  • GE
  • SGN

Couchbase Weekly 3

Upcoming Events

  • March 22: Couchbase Denver
  • March 25: Breizh Camp, Rennes
  • March 31: Couchbase Day Minneapolis

Webinars

  • March 18 – April 20: Building a full stack application with NoSQL, Go, and Angular 2
    US Registration
    EMEA Registration

    • 201 – Bootstrapping an application using Couchbase and Go
    • 202 – Application logic, data model, and validation
    • 203 – Build a responsive front end with Angular 2.0 & Bootstrap
    • 204 – Built-in URL permalinking & minification
    • 205 – Mobile-first development with Nativescript
  • March 24: How to leverage NoSQL to deliver great eCommerce customer experiences (EMEA)
  • March 24: How to leverage NoSQL to deliver great eCommerce customer experiences (US)

twitter-logo

  • Learn how DirecTV leverages #Couchbase – delivering reliability for 38 million customers on 3,000 channels: http://ow.ly/ZLEsd
  • Watch #Couchbase & @Vormetric discuss common #security issues w/ #bigdata & how to avoid them w/ #NoSQL on 4/5. Reg: http://ow.ly/Z30cp
  • Learn how to build a full stack application using #Couchbase. Register for the webinar on 3/23 at 2:00 pm (GMT): ow.ly/ZGSOQ
  • Does your company contribute to open source projects? Tell us why in the #FutureOSS survey: svy.mk/1UCWoR2 #Couchbase
  • Looking for an alternative to #oracle and #mysql? Modernize your infrastructure with #NoSQL. Learn more: ow.ly/YTvlW #Couchbase

Source: http://blog.couchbase.com/2016/march/couchbase-weekly-mar-22-2016

NetBeans Plugin for Couchbase Part 6 – Coffee on Couchbase

coffee-on-couchbase

This is part 6 (part 5, part 4, part 3, part 2, part 1) of Coffee on Couchbase series where we are building a NetBeans plugin for Couchbase. This multi-part webinar series is a discussion with Geertjan Wielenga (@GeertjanW) and Eben Haber (@ebenhaber).

As part of this series, you’ll also learn how to build a NetBeans plugin from scratch and learn the awesomeness behind NetBeans platform.

The recording from part 6 is now available:

In this episode, you’ll learn:

  • Add a new menu “Create Primary Index” for non-indexed buckets
  • Started work on refreshing the name and description of a bucket after indexing
  • Started work on optimizing the number of documents retrieved for a bucket

All the code is evolving at: github.com/arun-gupta/couchbase-netbeans-plugin.

You can use the NetBeans plugin module file (NBM) from episode 5.

Let us know by filing bugs on features that you’d like to see in this plugin.

We’d love to see your tweets containing snapshots of your document in NetBeans. Use  #NetBeans #Couchbase to let us know :)

Enjoy!

Source: http://blog.couchbase.com/2016/march/netbeans-plugin-couchbase-part6-coffee-on-couchbase

Getting Started with Docker Cloud

Deploying Docker to Amazon using Tutum explained how to deploy a Docker image to Docker Tutum. Tutum is now Docker Cloud.

Read Announcing Docker Cloud for more details.

Docker Cloud Logo

The key features of Docker Cloud are:

  • Authentication using Docker ID
  • Integration with Docker Hub
  • Support for Docker official repositories
  • Commercially supported Docker Engine
  • Ability to deploy and scale your applications using GUI, API and CLI

This blog will show:

  • Key concepts of Docker Cloud
  • How to create a new Docker Cloud Node
  • How to install Docker Cloud CLI
  • How to create a new Docker Cloud Service
  • Access Couchbase Server in Docker Cloud
  • How to terminate the Docker Cloud Service and Node

And finally it’ll leave with some references for Docker Cloud docs.

The blog will use Couchbase Server – an open source, highly scalable,  JSON document database for the Docker image.

Docker Cloud TL;DR

Here are the quick commands to run a Docker image using Docker Cloud in Amazon:

More details below.

Key Concepts of Docker Cloud

Let’s understand the core concepts of Docker Cloud:

  • Nodes are individual Linux hosts/VMs used to deploy and run your applications. New nodes can be provisioned to increase the capacity. Docker Cloud does not provide hosting services. Nodes are provisioned using physical servers, virtual machine or cloud providers.
  • Node Clusters are logical groups of nodes of the same type. Node Clusters allow to scale the infrastructure easily by provisioning more nodes.
  • Services are logical groups of containers from the same image. Services make it simple to scale your application across different nodes.

Docker Cloud can be managed with Web, CLI or REST API. This blog will use the Docker Cloud CLI to perform all the commands.

Install Docker Cloud CLI

Install Docker Cloud CLI:

Complete installation instructions are at Installing CLI.

Check version:

Complete set of commands are:

Save the login credentials:

Create new Docker Cloud Node

Register your cloud provider credentials with Docker Cloud Web UI as explained in Link to a Cloud Service Provider. Amazon, Digital Ocean, Azure, and other cloud providers are supported.

Create a new node cluster with a single node:

This node cluster has a single node (-t 1) and uses the tag “couchbase” (--tag couchbase). Last four parameters are nodecluster name (couchbase-node, provider (aws, region (us-west-1 and nodetype (m3.large).

Each node in this node cluster will be given the assigned tag. This will be used later to assign services to a specific node or node cluster.

Status of this node cluster can be checked:

The dashboard at cloud.docker.com is updated to show:

Docker Cloud Node Created Dashboard

More information about each node can be seen as well:

Docker Cloud Created Node

Create a new Docker Cloud Service

Create a Docker Cloud Service:

If multiple node clusters exists, then --tag is used to assign a service to a node cluster.

docker-cli#10 is filed to ensure multiple ports can be exposed using -p 8091-8093:8091-8093 format. This will be aligned with the docker CLI.

Docker image used here is arungupta/couchbase. This image is based on the official couchbase image at Docker Hub and pre-configures it for different services.

Start the Docker Cloud Service:

The updated dashboard looks like:

Docker Cloud Service StartedGet the Docker Cloud Service logs:

The log shows output from the Couchbase REST API invoked to configure the Couchbase server.

Access Couchbase Server in Docker Cloud

Inspect the Docker Cloud service for the exposed container ports:

To be more specific, exact URI for the Couchbase Web Console can be obtained as:

Access the Couchbase Web Console at http://couchbase-b9132b42.936dbe58.svc.dockerapp.io:8091/ to see the Couchbase Web Console login screen. Enter the password credentials of Administrator and password.

Docker Cloud Couchbase Login Page

And the Couchbase Web Console looks like:

Docker Cloud Couchbase Web Console

Terminate the Docker Cloud Service and Node

Check the list of Docker Cloud services running:

Terminate the service:

Check the list of nodes:

Terminate the node as:

Docker Cloud References

  • Getting Started with Docker Cloud
  • Docker Cloud Tutorials
  • Docker Cloud API
  • Questions on Docker Forums

In this blog, you learned:

  • Key concepts of Docker Cloud
  • How to create a new Docker Cloud Node
  • How to install Docker Cloud CLI
  • How to create a new Docker Cloud Service
  • Access Couchbase Server in Docker Cloud
  • How to terminate the Docker Cloud Service and Node

Enjoy!

Source: http://blog.couchbase.com/2016/march/getting-started-docker-cloud

 

Couchbase Weekly, Mar 14, 2016

Learn what’s latest in the Couchbase Community.
Couchbase Developer Community

Let us know if we missed anything at @couchbasedev, @couchbase or #Couchbase.

Couchbase Weekly

  • March 15: Couchbase Day Waltham
  • March 16: Couchbase Day London (First Non-US Couchbase Day in EMEA)
  • March 17 – 18: SF Droidcon, San Francisco

Couchbase Weekly

Media Mentions

  • Information Management: Open Source Software: Riding the Innovation Wave
  • MySanAntonio: Better Buy: IBM vs. Oracle
  • IT ProPortal: How to choose a database for your mobile apps
  • InfoQ: All Things Containers From Solaris Zones to Docker
  • DZone: Communicating With Couchbase via a Dockerfile Script and Docker
  • MySanAntonio: How Risky Is Oracle Corporation Stock?
  • IProgrammer: Scalable Big Data Architecture
  • ComputerWorld UK: How LateRooms.com used APIS to stop sending faxes
  • SiliconANGLE: Hortonworks bids for Spark leadership

Blogs

  • Docker Tooling in Eclipse Video — Arun Gupta
  • Developer Preview of new Sub-document API included w/2.2.6 release of Couchbase .NET SDK — Jeff Morris
  • NetBeans Plugin for Couchbase Part 5 – Coffee on Couchbase — Arun Gupta
  • Couchbase is Going to Droidcon San Francisco 2016 — Nic Raboy
  • Excel and Couchbase Server v4 with N1QL – No ODBC Required! — Cihan Biyikoglu
  • Get to Know Our Couchbase Community – Meet Brant Burnett — Laura Czajkowski
  • Couchbase Mobile at O’Reilly Fluent Conference 2016 — Nic Raboy
  • Kubernetes Namespaces, Resource Quota, and Limits for QoS in Cluster — Arun Gupta
  • NetBeans Plugin for Couchbase Part 4 – Coffee on Couchbase — Arun Gupta
  • Kubernetes Cluster on Google Cloud and Expose Couchbase Service — Arun Gupta
  • Communicating with Couchbase via a Dockerfile Script and Docker — Nic Raboy
  • Kubernetes Cluster on Amazon and Expose Couchbase Service — Arun Gupta
  • Fluent 2016: Learn Crucial Mobile Tools for the Web — William Hoang
  • Getting Leaner with SubDocument and the Java SDK — Simon Baslé
  • Getting Started with Beacons and Couchbase Lite Android — Laurent Doguin
  • Couchbase Weekly Feb 29, 2016 — Arun Gupta

Couchbase Weekly 3

Upcoming Events

  • March 15: Couchbase Day Waltham
  • March 16: Couchbase Day London
  • March 17 – 18: SF Droidcon, San Francisco
  • March 18 – 19: Codemotion, Rome
  • March 22: Couchbase Denver
  • March 29: Couchbase Paris — Coming Soon
  • March 31: Couchbase Day Minneapolis

Webinars

  • March 18 – April 20: Building a full stack application with NoSQL, Go, and Angular 2
    US Registration
    EMEA Registration

    • 201 – Bootstrapping an application using Couchbase and Go
    • 202 – Application logic, data model, and validation
    • 203 – Build a responsive front end with Angular 2.0 & Bootstrap
    • 204 – Built-in URL permalinking & minification
    • 205 – Mobile-first development with Nativescript
  • March 24: How to leverage NoSQL to deliver great eCommerce customer experiences (EMEA)
  • March 24: How to leverage NoSQL to deliver great eCommerce customer experiences (US)

twitter-logo

  • Build a full stack application using #Couchbase! Register for the step-by-step webinar on 3/18 to get started (US): http://ow.ly/YZJRH
  • #Couchbase Server 4.5 Developer Preview is ready! Built-in query editor & schema browser, full-text search, and more http://ow.ly/YTsz4
  • Interested in running #Couchbase in the #Cloud? Explore the different configurations such as #AWS #Docker plus more ow.ly/Xg1YL
  • Enterprises like Nielsen are picking #Couchbase the “more mature” database over #MongoDB for document store: ow.ly/YUaGQ #NoSQL
  • #Couchbase Mobile reduces admin headaches & accelerates implementation time with new mgmt controls bit.ly/1VIHqaE #NoSQL #database

Source: http://blog.couchbase.com/2015/march/couchbase-weekly-mar-14-2016

Docker Tooling in Eclipse Video

Eclipse Mars provides integrated tooling for Docker. What can you do?

  • Pull/Push/Build Docker images
  • Run/Start/Stop/Kill Docker containers
  • Customize views

The video below shows how to get started with and try out some of the features:

Couchbase Docker Container is used to showcase different features.

Here are some snapshots from Eclipse to give you a quick feel.

Docker Tooling PerspectiveDocker Eclipse Mars Docker Perspective

Docker Explorer, Images and ContainersDocker Eclipse Mars Docker Explorer Default View

Run, Start, Stop, Kill Containers

Docker Eclipse Mars Container Properties

Complete instructions are available at https://wiki.eclipse.org/Linux_Tools_Project/Docker_Tooling/User_Guide

If you have suggestions or find bugs, please open these in the Linux Tools project in Eclipse under Docker.

Source: http://blog.couchbase.com/2016/march/docker-tooling-eclipse-video

NetBeans Plugin for Couchbase Part 5 – Coffee on Couchbase

coffee-on-couchbase

This is part 5 (part 4, part 3, part 2, part 1) of Coffee on Couchbase series where we are building a NetBeans plugin for Couchbase. This multi-part webinar series is a discussion with Geertjan Wielenga (@GeertjanW) and Eben Haber (@ebenhaber).

As part of this series, you’ll also learn how to build a NetBeans plugin from scratch and learn the awesomeness behind NetBeans platform.

The recording from part 5 is now available:

In this episode, you’ll learn:

  • Showcase features that have been created in the plugin so far
  • Show different icons for indexed and non-indexed buckets in Couchbase

All the code is evolving at: github.com/arun-gupta/couchbase-netbeans-plugin.

You can use the NetBeans plugin module file (NBM) from episode 5.

Let us know by filing bugs on features that you’d like to see in this plugin.

We’d love to see your tweets containing snapshots of your document in NetBeans. Use  #NetBeans #Couchbase to let us know :)

Here is mine:

NetBeans Couchbase Indexed Buckets

Enjoy!

Source: http://blog.couchbase.com/2016/march/netbeans-plugin-couchbase-part5-coffee-on-couchbase

Kubernetes Namespaces, Resource Quota, and Limits for QoS in Cluster

Kubernetes Logo

By default, all resources in Kubernetes cluster are created in a default namespace. A pod will run with unbounded CPU and memory requests/limits.

A Kubernetes namespace allows to partition created resources into a logically named group. Each namespace provides:

  • a unique scope for resources to avoid name collisions
  • policiesto ensure appropriate authority to trusted users
  • ability to specify constraints for resource consumption

This allows a Kubernetes cluster to share resources by multiple groups and provide different levels of QoS each group.

Resources created in one namespace are hidden from other namespaces. Multiple namespaces can be created, each potentially with different constraints.

Default Kubernetes Namespace

By default, each resource created by user in Kubernetes cluster runs in a default namespace, called default.

Any pod, service or replication controller will be created in this namespace. kube-system namespace is reserved for resources created by the Kubernetes cluster.

More details about the namespace can be seen:

This description shows resource quota (if present), as well as resource limit ranges.

So let’s create a Couchbase replication controller as:

Check the existing replication controller:

By default, only resources in user namespace are shown. Resources in all namespaces can be shown using --all-namespaces option:

As you can see, the arungupta/couchbase image runs in the default namespace. All other resources run in the kube-system namespace.

Lets check the context of this replication controller:

Look for contexts.context.name attribute to see the existing context. This will be manipulated later.

Create a Resource in New Kubernetes Namespace

Lets create a new namespace first. This can be done using the following configuration file:

Namespace is created as:

Then querying for all the namespaces gives:

A new replication controller can be created in this new namespace by using --namespace option:

List of resources in all namespaces looks like:

As seen, there are two replication controllers with arungupta/couchbase image – one in default namespace and another in development namespace.

Set Kubernetes Namespace For an Existing Resource

If a resource is already created then it can be assigned a namespace.

On a previously created resource, new context can be set in the namespace:

Viewing the context now shows:

The second attribute in contexts.context array shows that a new context has been created. It also shows that the current context is still couchbase-on-kubernetes_kubernetes. Since no namespace is specified in that context, it belongs to the default namespace.

Change the context:

See the list of replication controllers:

Obviously, no replication controllers are running in this context. Lets create a new replication controller in this new namespace:

And see the list of replication controllers in all namespaces:

Now you can see two arungupta/couchbase replication controllers running in two difference namespaces.

Delete a Kubernetes Resource in Namespace

A resource can be deleted by fully-qualifying the resource name:

Similarly the other replication controller can be deleted as:

Finally, see the list of all replication controllers in all namespaces:

This confirms that all user created replication controllers are deleted.

Resource Quota and Limit using Kubernetes Namespace

Each namespace can be assigned resource quota.

By default, a pod will run with unbounded CPU and memory requests/limits. Specifying quota allows to restrict how much of cluster resources can be consumed across all pods in a namespace.

Resource quota can be specified using a configuration file:

The following resources are supported by the quota system:

Resource Description
cpu Total requested cpu usage
memory Total requested memory usage
pods Total number of active pods where phase is pending or active.
services Total number of services
replicationcontrollers Total number of replication controllers
resourcequotas Total number of resource quotas
secrets Total number of secrets
persistentvolumeclaims Total number of persistent volume claims

This resource quota can be created in a namespace:

The created quota can be seen as:

Now, if you try to create the replication controller that works:

But describing the quota again shows:

We expected a new pod to be created as part of this replication controller but it’s not there. So lets describe our replication controller:

By default, pod consumes all the cpu and memory available. With resource quotas applied, an explicit value must be specified. Alternatively a default value for the pod can be specified using the following configuration file:

This restricts the CPU and memory that can be consumed by a pod. Lets apply these limits as:

Now when you describe the replication controller again, it shows:

This shows successful creation of the pod.

And now when you describe the quota, it shows correct values as well:

Resource Quota provide more details about how to set/update these values.

Creating another quota gives the following error:

Specifying Limits During Pod Creation

Limits can be specified during pod creation as well:

If memory limit for each pod is restricted to 1g, then a valid pod definition would be:

This is because the pod request 0.5G of memory only. And an invalid pod definition would be:

This is because the pod requests 2G of memory. Creating such a pod gives the following error:

Hope you can apply namespaces, resource quotas, and limits for sharing your clusters across different environments.

Source: http://blog.couchbase.com/2016/march/kubernetes-namespaces-resource-quota-limits-qos-cluster

NetBeans Plugin for Couchbase Part 4 – Coffee on Couchbase

coffee-on-couchbase

This is part 4 (part 3, part 2, part 1) of Coffee on Couchbase series where we are building a NetBeans plugin for Couchbase. This multi-part webinar series is a discussion with Geertjan Wielenga (@GeertjanW) and Eben Haber (@ebenhaber).

As part of this series, you’ll also learn how to build a NetBeans plugin from scratch and learn the awesomeness behind NetBeans platform.

The recording from part 4 is now available:

In this episode, you’ll learn:

  • Entry point of a NetBeans plugin
  • Learn about NetBeans platform node hierarchy
  • Property sheet for each node
  • Keeping code organized for the plugin
  • Creating menus for different nodes

All the code is evolving at: github.com/arun-gupta/couchbase-netbeans-plugin.

You can use the NetBeans plugin module file (NBM) from previous episode.

Let us know by filing bugs on features that you’d like to see in this plugin.

We’d love to see your tweets containing snapshots of your document in NetBeans. Use  #NetBeans #Couchbase to let us know :)

Enjoy!

Source: http://blog.couchbase.com/2016/march/netbeans-plugin-couchbase-part-4-coffee-on-couchbase

Devoxx4Kids at Red Hat Summit and Dev Nation 2016

RedHat Summit LogoDevNation Logo Devoxx4Kids

Once again, Red Hat and Devoxx4Kids are partnering to foster the next generation of technologists. If you are speaking or attending Red Hat Summit or DevNation, then this is your opportunity to help them!

You can be an instructor for the workshop or volunteer with an instructor.

Are you interested in teaching 6-16 years old kids about STEM? Do you have any existing workshop that would be useful? Pick one of existing Devoxx4Kids workshop and deliver it? Do you want to create a new workshop?

We’d love to have you submit workshops!

Date: June 26, 2016
Venue: San Francisco, CA
Teach: Submit your workshops
Volunteer: Sign up as volunteer

Check out some pictures from last year:

Read Devoxx4Kids at Red Hat Summit 2015 report for more details.

Kubernetes Cluster on Google Cloud and Expose Couchbase Service

kubernetes-logo

This blog is part of a multi-part blog series that shows how to run your applications on Kubernetes. It will use the Couchbase, an open source NoSQL distributed document database, as the  Docker container.

The first part (Couchbase on Kubernetes) explained how to start the Kubernetes cluster using Vagrant. The second part (Kubernetes on Amazon) explained how run that setup on Amazon Web Services.

This third part will show:

  • How to setup and start the Kubernetes cluster on Google Cloud
  • Run Docker container in the Kubernetes cluster
  • Expose Pod on Kubernetes as Service
  • Shutdown the cluster

Here is a quick overview:

Kubernetes Cluster on Google Cloud

Let’s get into details!

Getting Started with Google Compute Engine provide detailed instructions on how to setup Kubernetes on Google Cloud.

Download and Configure Google Cloud SDK

There is a bit of setup required if you’ve never accessed Google Cloud on your machine. This was a bit overwhelming and wish can be simplified.

  • Create a billable account on Google Cloud
  • Install Google Cloud SDK
  • Configure credentials: gcloud auth login
  • Create a new Google Cloud project and name it couchbase-on-kubernetes
  • Set the project: gcloud config set project couchbase-on-kubernetes
  • Set default zone: gcloud config set compute/zone us-central1-a
  • Create an instance: gcloud compute instances create example-instance --machine-type n1-standard-1 --image debian-8
  • SSH into the instance: gcloud compute ssh example-instance
  • Delete the instance: gcloud compute instances delete example-instance

Setup Kubernetes Cluster on Google Cloud

Kubernetes cluster can be created on Google Cloud as:

Make sure KUBERNETES_PROVIDER is either set to gce or not set at all.

By default, this provisions a 4 node Kubernetes cluster with one master. This means 5 Virtual Machines are created.

If you downloaded Kubernetes from github.com/kubernetes/kubernetes/releases, then all the values can be changed in cluster/aws/config-default.sh.

Starting Kubernetes on Google Cloud shows the following log. Google Cloud SDK was behaving little weird but taking the defaults seem to work:

There are a couple of unbound variables and a WARNING message, but that didn’t seem to break the script.

Google Cloud Console shows:

Google Cloud Compute Instances On Kubernetes Cluster

Five instances are created as shown – one for master node and four for worker nodes.

Run Docker Container in Kubernetes Cluster on Google Cloud

Now that the cluster is up and running, get a list of all the nodes:

It shows four worker nodes.

Create a Couchbase pod:

Notice, how the image name can be specified on the CLI. This command creates a Replication Controller with a single pod. The pod uses arungupta/couchbase Docker image that provides a pre-configured Couchbase server. Any Docker image can be specified here.

Get all the RC resources:

This shows the Replication Controller that is created for you.

Get all the Pods:

The output shows the Pod that is created as part of the Replication Controller.

Get more details about the Pod:

Expose Pod on Kubernetes as Service

Now that our pod is running, how do I access the Couchbase server?

You need to expose it outside the Kubernetes cluster.

The kubectl expose command takes a pod, service or replication controller and expose it as a Kubernetes Service. Let’s expose the replication controller previously created and expose it:

Get more details about Service:

The Loadbalancer Ingress attribute gives you the IP address of the load balancer that is now publicly accessible.

Wait for 3 minutes to let the load balancer settle down. Access it using port 8091 and the login page for Couchbase Web Console shows up:

Google Cloud Kubernetes Couchbase Login Page

Enter the credentials as “Administrator” and “password” to see the Web Console:

Google Cloud Kubernetes Couchbase Web Console

And so you just accessed your pod outside the Kubernetes cluster.

Shutdown Kubernetes Cluster

Finally, shutdown the cluster using cluster/kube-down.sh script.

Enjoy!

Source: http://blog.couchbase.com/2016/march/kubernetes-cluster-google-cloud-expose-service

Kubernetes Cluster on Amazon and Expose Couchbase Service

This blog is part of a multi-part blog series that shows how to run your applications on Kubernetes. It will use the Couchbase, an open source NoSQL distributed document database, as the  Docker container.

The first part (Couchbase on Kubernetes) explained how to start the Kubernetes cluster using Vagrant. That is a simple and easy way to develop, test, and deploy Kubernetes cluster on your local machine. But this could be of limited use rather soon as the resources are constrained by the local machine. So what do you do?

Kubernetes cluster can be installed on Amazon as well. This second part will show:

  • How to setup and start the Kubernetes cluster on Amazon Web Services
  • Run Docker container in the Kubernetes cluster
  • Expose Pod on Kubernetes as Service
  • Shutdown the cluster

Here is a quick overview:

Kubernetes Cluster on Amazon with Couchbase

Let’s dig into the details!

Setup Kubernetes Cluster on Amazon Web Services

Getting Started on AWS EC2 provide complete instructions to start Kubernetes cluster on Amazon. Make sure to have the pre-requisites (AWS account, AWS CLI, Full EC2 access) met before you follow these instructions.

Kubernetes cluster can be created on Amazon as:

By default, this provisions a new VPC and a 4 node Kubernetes cluster in us-west-2a (Oregon) with t2.micro instances running on Ubuntu. This means 5 AMIs (one for master and 4 for the worker nodes) are created. Some properties that are worth updating:

  • Set NUM_MINIONS environment variable to whatever number of nodes are required in the cluster. Set it to 2 if you want only two worker nodes to be created.
  • Each instance size is 1.1.x is t2.micro. Set MASTER_SIZE and MINION_SIZE environment variables to m3.medium otherwise the nodes are going to crawl.

If you downloaded Kubernetes from github.com/kubernetes/kubernetes/releases, then all the values can be changed in cluster/aws/config-default.sh.

Starting Kubernetes on Amazon shows the following log:

Amazon Console shows:

Kubernetes Cluster on Amazon

Three instances are created as shown – one for master node and two for worker nodes.

Username and password for the Kubernetes master are stored in /Users/arungupta/.kube/config. Look for a section like:

Run Docker container in Kubernetes Cluster on Amazon

Now that the cluster is up and running, get a list of all the nodes:

It shows two worker nodes.

Create a new Couchbase pod:

Notice, how the image name can be specified on the CLI. This command creates a Replication Controller with a single pod. The pod uses arungupta/couchbase Docker image that provides a pre-configured Couchbase server. Any Docker image can be specified here.

Get all the RC resources:

This shows the Replication Controller that is created for you.

Get all the Pods:

The output shows the Pod that is created as part of the Replication Controller.

Get more details about the Pod:

Expose Pod on Kubernetes as Service

Now that our pod is running, how do I access the Couchbase server?

You need to expose it outside the Kubernetes cluster.

The kubectl expose command takes a pod, service or replication controller and expose it as a Kubernetes Service. Let’s expose the replication controller previously created and expose it:

Get more details about the Service:

The Loadbalancer attribute Ingress gives you the address of the load balancer that is now publicly accessible.

Wait for 3 minutes to let the load balancer settle down. Access it using port 8091 and the login page for Couchbase Web Console shows up:

Kubernetes on Amazon - Couchbase Login Page

Enter the credentials as “Administrator” and “password” to see the Web Console:

Kubernetes on Amazon - Couchbase Web Console

And so you just accessed your pod outside the Kubernetes cluster.

Shutdown Kubernetes Cluster

Finally, shutdown the cluster using cluster/kube-down.sh script.

For a complete clean up, you still need to explicitly delete the S3 bucket where Kubernetes binaries are stored.

Enjoy!

Source: http://blog.couchbase.com/2016/march/kubernetes-cluster-amazon-expose-service