Setting up OpenStack dev environment the hard way

As you may already know, OpenStack is a big software project that running on stacks of servers so you cannot just folk it to your computer and run. Fortunately, the OpenStack community had built a minimal version of the OpenStack called devstack that help you have a developing environment without using a lot of resources. But, devstack still eats lots of CPU and memory of your computer so in my opinion, it's better to have a dedicated machine for running devstack (mine is a computer with 16GB). So the last things you need to do to start working on your patches are:

1. SSH to the devstack server

2. Make sure that the service outputs logs to some files (such as /opt/stack/logs/tacker.log)

For Tacker or services that have settings file under /etc/<service name>/<service name>.conf, you can change the parameter to output logs to file

3. Using tmux or byobu to have multiple ssh console screens that you can easily switch to and for

4. Use VI or NANO to make changes on one tmux/byobu's screen, and another screen for logs.

Use this to looking at the logs live, for example, you can check the tacker's logs:

tail -n 200 -f /opt/stack/logs/tacker.log



Many other OpenStack developers prefer using modern IDEs that support remote debugging like Pycharm but for me, VI or NANO is enough. You may find it not so convenient but my setup is fast and can get you right away to the coding instead of spending time thinking about the IDE's license, and set up remote debugging etc...

Anyway, enjoy!