NOTE: This repository is for people working on (developing) StackStorm. End users and people who just want to quickly try out and test StackStorm using Vagrant should use https://github.com/StackStorm/st2vagrant.
For more information, please refer to https://docs.stackstorm.com/install/vagrant.html.
To quickly get bootstrapped run the following:
- Clone your StackStorm/st2 git repo fork which you will use to develop and test on to ../st2
(
git clone https://github.com/StackStorm/st2.git ../st2
) - Clone this repo
- Execute
vagrant up
inside repo - Execute
vagrant ssh
inside repo - Execute
cd ~/st2
inside virtual machine - Execute
make requirements
inside~/st2
- Execute
source virtualenv/bin/activate
inside~/st2
- Execute
make cli
inside~/st2
- Execute
./tools/launchdev.sh start -x
inside~/st2
You will likely from here want to share your local st2
repo with the vagrant image to migrate code
more quickly. To sync your changes execute vagrant rsync
from within this repo. vagrant rsync
command
assumes that the local st2
repo is accessible as ../st2
.
As an alternative (per example in Vagrantfile), you can also use nfs mount where changes are automatically reflected inside the virtual machine immediately after you make them on host.
Note: Make sure to run step 5 (make requirements
) inside ~/st2
to have the PYTHONPATH
point to the modules inside ~/st2
.
By default, the image is provisioned using Python 3.6 and Mongo DB 4.0 on Ubuntu 18.04.
If you want to use a different distro, Python or MOngoDB version, you can do that by editing
corresponding variables in Vagrantfile
before running vagrant up
/ vagrant provision
.
For example:
...
# For Ubuntu 18.04 (default)
VM_BOX = "ubuntu/bionic64"
# For Ubuntu 20.04
VM_BOX = "ubuntu/focal64"
PYTHON_VERSION = "3.8"
MONGODB_VERSION = "4.4"
...
Keep in mind that re-provisioning an existing VM with a different version of Python or MongoDB is not supported.
If you want to change the version or develop on multiple different versions, you should just create a new vagrant VM.
If you want to enable ansible debug logging for the provision step, you can do that by setting
ANSIBLE_DEBUG
environment variable as shown below.
ANSIBLE_DEBUG=1 vagrant provision
Right now the following versions of software are installed during provisioning:
- Python 3.6
- RabbitMQ 3.8
- Erlang 24
- MongoDB 4.0
- Redis 6.0
- Nginx 1.10