More ubuntu fixes

Added the concept of build stages to ensure database is running before
other resources.