-
Notifications
You must be signed in to change notification settings - Fork 0
Setup EventStore on Windows Azure
This wiki is no longer maintained and should not be used. Read the Event Store docs at docs.geteventstore.com.
- Windows Azure account
- Basic knowledge of create virtual machine on Azure
- Basic knowledge of Linux
This guideline is using a small instance of Ubuntu Server 14.04 LTS virtual machine.
The DNS name in this part is important, please write it down as you are going to use it later.
By default, new virtual machine only setup an endpoint for SSH. You need to add two new entries for EventStore, TCP port 2113 and 1113.
Use the following commands to add an user and a group called eventStore
sudo groupadd eventStore
sudo useradd -m -g eventStore -s /bin/bash eventStore
sudo passwd eventStoreIf you want to persist EventStore data, it is recommended to add a new data disk to the virtual machine. The following guideline should help you in this situation: http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-how-to-attach-disk/
After following the guideline, you should end up with a mount /datadrive. Grant ownership of the /datadrive directory to the eventStore user, so Event Store can create all necessary directories when it runs:
sudo chown -R eventStore:eventStore /datadriveNginx will be used as a reverse proxy server to proxy traffics between client and event store.
-
Install Nginx:
sudo apt-get install nginx
-
Delete nginx default config
sudo rm /etc/nginx/sites-available/default sudo rm /etc/nginx/sites-enabled/default
-
Create the logging directory
sudo mkdir -p /var/log/www/get-event-store/log/
-
Create an
get-event-storeconfig file with following content in/etc/nginx/sites-available/directory:
server { listen 80; server_name get-event-store.cloudapp.net;
access_log /var/log/www/get-event-store/log/nginx.access.log;
error_log /var/log/www/get-event-store/log/nginx.error.log;
location / {
proxy_pass http://127.0.0.1:2113;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
5. Link the config file created to sites-available:
```bash
sudo ln -s /etc/nginx/sites-available/get-event-store /etc/nginx/sites-enabled/get-event-store
- Verify configuration and reload
sudo nginx -t sudo service nginx reload
-
Download EventStore Binaries
su - eventStore cd /datadrive wget http://download.geteventstore.com/binaries/EventStore-OSS-Linux-v3.0.1.tar.gz tar -xzvf EventStore-OSS-Linux-v3.0.1.tar.gz rm EventStore-OSS-Linux-v3.0.1.tar.gz cd EventStore-OSS-Linux-v3.0.1
-
Update EvenStore configuration. Fire up your favourite editor and create a eventStore.config with following content:
#Database and logs path Db: /datadrive/eventStore/db Log: /datadrive/eventStore/logs #Run all projections RunProjections: All
Exit the session running as user eventStore from the previous two steps, and create /etc/init/event-store.conf with following content:
description "Event Store"
start on (filesystem and net-device-up eth0)
stop on runlevel [!2345]
# Path to Event Store installation
env EVENTSTORE_DIR='/datadrive/EventStore-OSS-Linux-v3.0.1/'
# Path to Event Store Configuration file
env EVENTSTORE_CONFIG='/datadrive/EventStore-OSS-Linux-v3.0.1/eventStore.config'
# Path to v8 and js1
env LD_LIBRARY_PATH='/datadrive/EventStore-OSS-Linux-v3.0.1/'
# Name (and local user) to run Event Store as
setuid eventStore
# Keep the process alive, limit to 5 restarts in 60s
respawn
respawn limit 5 60
# Start
chdir /datadrive/EventStore-OSS-Linux-v3.0.1
exec ${EVENTSTORE_DIR}clusternodeThen issue command sudo start event-store
Now visit http://your_dns/ and you should see the EvenStore admin interface. Enjoy the new UI!

