virtualenv.sls 1.36 KB
Newer Older
Guba Sándor committed
1 2 3
include:
  - common

Bach Dániel committed
4 5 6 7 8 9 10 11 12 13 14 15
# m2crypto workaround
# /usr/include/openssl/opensslconf.h:31: Error: CPP #error
# ""This openssl-devel package does not work your architecture?"".
# Use the -cpperraswarn option to continue swig processing.

{% if grains['os_family'] == 'RedHat' %}
m2crypto_swig_env:
  environ.setenv:
    - name: SWIG_FEATURES
    - value: -D__x86_64__
{% endif %}

Guba Sándor committed
16 17 18
virtualenv_manager:
  virtualenv.managed:
    - name: /home/{{ pillar['user'] }}/.virtualenvs/circle
19
    - requirements: /home/{{ pillar['user'] }}/circle/requirements/{{ pillar['deployment_type'] }}.txt
Guba Sándor committed
20 21 22 23 24
    - runas: {{ pillar['user'] }}
    - cwd: /home/{{ pillar['user'] }}/circle/
    - no_chown: true
    - require:
      - git: gitrepo
Bach Dániel committed
25 26 27
      {% if grains['os_family'] == 'RedHat' %}
      - environ: m2crypto_swig_env
      {% endif %}
Guba Sándor committed
28 29 30 31 32

salt://manager/files/syncdb.sh:
  cmd.script:
    - template: jinja
    - user: {{ pillar['user'] }}
Bach Dániel committed
33
    - stateful: true
Guba Sándor committed
34 35 36 37 38 39 40 41 42
    - require:
      - virtualenv: virtualenv_manager
      - file: /home/{{ pillar['user'] }}/.virtualenvs/circle/bin/postactivate
      - user: {{ pillar['user'] }}

salt://manager/files/compile.sh:
  cmd.script:
    - template: jinja
    - user: {{ pillar['user'] }}
Bach Dániel committed
43
    - stateful: true
Guba Sándor committed
44 45 46 47
    - require:
      - virtualenv: virtualenv_manager
      - file: /home/{{ pillar['user'] }}/.virtualenvs/circle/bin/postactivate
      - user: {{ pillar['user'] }}