2
votes

I have some questions about saltstack.

I'm trying to deploy my Django project with saltstack and made that minion install required packages with pip by setting it's bin_env. (django lib, etc...)

But when I run a command (python manage.py something) It says there's no django and to activate virtual environment.

I read salt docs about venv module(state) but the only thing in there was creating venv.

How can I activate the minion's venv?

thank you.

1
as a sidenote, remember that the django webserver is not meant for production, and it's not as secure as a proper webserver + WSGI wrapper. - Alberto Chiusole
@AlbertoChiusole I'm using gunicorn and nginx. :) - Dalek Sec
Then you shouldn't need to run python manage.py at all. - Alberto Chiusole
I just needed to run collectstatic and all problems solved. thank you. - Dalek Sec
In case you are going to deploy your site to production, I suggest following these advises: docs.djangoproject.com/en/2.0/howto/deployment/checklist - Alberto Chiusole

1 Answers

0
votes

$ source /(directory path you put for bin_env)/bin/activate