Install on AWS EC2
Creating an IAM Role
You must create an IAM role for MQLess before you can use MQLess.
To create an IAM role using the IAM console
- Open the IAM console
- In the navigation pane, choose Policies, Create Policy.
- Choose the Lambda service
- Expand the Write section and check InvokeFunction
- Expand Resources, check Specific and check Any
- Click Review Policy, name it (like InvokeLambda) and click Create Policy.
- In the navigation pane, choose Roles, Create role.
- Choose the EC2 service and click Next: Permissions
- Check the policy we just created and click Next: Tags
- Click Next: Review, name the new role (like MQLessRole), give it a description and click Create Role
Creating the EC2 Instance
- Create a new EC2 instance, and pick Ubuntu Server 18.041
- Choose the size of the instance, start small and increase it with your demand. MQLess saves all pending messages in memory, so pick a machine with enough memory and click next.
- MQLess should be used within a VPC. Choose a VPC network and subnet.
- Choose the IAM role you created earlier.
- Add storage, MQLess is not using the storage (yet), so it will only be for the operating system and page file.
- Create a security group for MQLess. MQLess is using port 34543 by default, so open that port for other security groups that will be allowed to send messages to the actors. Also, consider opening your own IP for testing purposes.
- Click Review and Done and create the machine.
Connect to the machine through ssh and run the following:
sudo apt update sudo apt install -y libtool automake autoconf pkg-config build-essential libnsspem libcurl4-nss-dev libmicrohttpd-dev libzmq3-dev libjansson-dev git clone https://github.com/zeromq/czmq.git cd czmq ./autogen.sh ./configure make sudo make install cd .. #install mqless git clone https://github.com/mqless/mqless cd mqless ./autogen.sh ./configure --with-systemd-units make sudo make install sudo ldconfig sudo systemctl daemon-reload
To run MQLess from console run
To install and run MQLess as a service run:
sudo systemctl enable mqless sudo systemctl start mqless