This post is a quick step by step guide on running a single EventStore https://geteventstore.com/ node on a free EC2 micro Aws instance. You can spin up quite easily this in order to start using the EventStore Web console and play with it for testing. In a real scenario, you must set a larger EC2 instance type as a single node or as a cluster of nodes behind a proxy and load-balancer.
There is this document in the EventStore documentation that you can follow. This micro-article is just a variation of it.
Launch a AWS instance
- Open AWS Web console and select the “Launch instance” action
- Select “Ubuntu Server …” from the Quick Start list
- Select t2.micro free tier
- Click next until the “Configure Security Group”
- Add the following rules
22 (SSH) 0.0.0.0/0 1113 0.0.0.0/0 2113 0.0.0.0/0
- Select “Review and Launch” and “Launch”
- Choose an existing Key Pair or create a new one. You will use this later to connect with the instance. Select “Launch” to finally launch the instance.
Install and Run EventStore
In order to connect with the AWS ubuntu instance you can select the instance from the list in your EC2 Web console and select the “Connect” action. This will open a windows with the link that can be used from a command line. I’m using windows and I have Git installed in my machine so I can use Git Bash command line and ssh.
- Open Git Bash on the foleder where your Key Pair key is stored
- To connect with your instance, select your running instance in the aws web console, open the Connection window and copy and paste the SSH Example connection link in your bash command line
- Get the latest OSS EventStore binaries. You can find the link to the latest from the GetEventStore website Downloads page. At the moment of this writing the Ubuntu link is EventStore-OSS-Ubuntu-14.04-v3.9.3.tar.gz . Copy this link address and in your connected bash command line run the following command to download the tar.gz with the EventStore binaries
> wget http://download.geteventstore.com/binaries/EventStore-OSS-Ubuntu-14.04-v3.9.3.tar.gz
Run the following command to unpack the tar.gz
> tar xvzf *.tar.gz
cd EventStore and start the single EvenStore node with a parameter to bound the service listening to all ip’s
> ./run-node.sh --ext-ip 0.0.0.0
Now you can connect to your public dns instance address on port 2113 and see the EventStore Web Console