New In Marketplace: Event Store Functional Database

Another recent addition to the ContainerShip Cloud click to deploy marketplace is Event Store, a highly available functional database with complex event processing capabilities in JavaScript.

Event Store is implemented in C# but runs under Linux using mono. In this post we'll show how to deploy Event Store to a ContainerShip cluster, how to scale up and down, and provide a brief overview of the basic functionality. 

What this integration includes

  • Event Store: configured to scale up and down automatically as new hosts are added, or existing hosts are removed from the cluster.
  • ContainerShip load balancer: Nginx based load balancing that will automatically adjust configuration as hosts are added/removed or containers are scaled.
  • Volume management: Event Store writes data to disk and ContainerShip is pre-configured to manage the data volumes which will allow you to snapshot your setup and clone it to a new cluster, or even a different provider altogether.

Deploying the integration

First you need to setup a ContainerShip cluster so that you have some server capacity to run the integration on. You should launch a cluster with follower hosts with at least 2GB of RAM. If you would like a walkthrough of launching your first cluster, you can check out this video.

Once your cluster is up and running, go to Applications -> Launch New Application -> Marketplace.

Once you're in the Marketplace, click on Event Store.



You'll then have the option to adjust resource settings for Event Store but the defaults should work well for testing.


Once you're happy, just click Add Application, and ContainerShip Cloud will stand everything up for you on your cluster.


Accessing Your Event Store Setup

Every application in ContainerShip Cloud has a DNS entry generated for it automatically to make accessing it externally simple. To find the DNS entry for your Event Store setup, simply click on the application, and look for the "DNS entry".


At this point you should be all set to start playing with Event Store. Click on the DNS entry to open up the Event Store web dashboard, and login with the default username admin and password changeit


Once logged in you will be presented with the dashboard overview. 


Getting Your Hands Dirty

At this point you are now ready to start creating and reading events. The documentation has some quick getting started tutorials that step you through the process, and we'll work through those below. 

Writing Events to an Event Stream

  • Open up your favorite text editor and paste in the following code and save it as event.txt
    "eventId": "fbf4a1a1-b4a3-4dfe-a01f-ec52c34e16e4",
    "eventType": "event-type",
    "data": {
  </span><span class="nt">"a"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="w">
</span><span class="p">}</span><span class="w">


  • Execute the following cURL command to write the event to Event Store. Be sure to use the correct DNS address for your specific cluster.
curl -i -d @event.txt "" -H "Content-Type:application/"

If everything worked properly you should get back a 201 response letting you know that the event was created. 

Screen Shot 2017-02-21 at 2.42.52 PM.png

If you visit the Event Store dashboard, you will see the stream that was just created in the Streams Browser.

Screen Shot 2017-02-21 at 2.49.45 PM.png

Reading from a stream

To read data from the stream we just created, we can run the following cURL command which will return the data as at atom feed.

curl -i -H "Accept:application/atom+xml" ""

Screen Shot 2017-02-21 at 2.56.15 PM.png

There is plenty more to learn when it comes to Event Store and the available features. You can also easily simulate failure scenarios by deleting one of the containers in the ContainerShip UI to watch master failover take place.


What next?

Now that you're up and running and creating and reading events like a true pro, you may want to utilize our streaming logs to aide in debugging, or our prometheus based metrics to see how your services are performing. Once everything is dialed in perfectly, you can take a snapshot of the entire cluster so that you can easily stand the entire fully configured setup up anywhere you like.

ContainerShip is a hosted containers as a service platform with support for 11 different providers, easy scaling, github and bitbucket integration, build system, out of the box high availability, 5 different docker registry providers, team management, and tons more. Get started on the free forever tier, or try a 30-day free trial of any of our plans.

Show Comments