-
-
Save kennydude/61c6468ed1fd899f1ac6971e56d801a7 to your computer and use it in GitHub Desktop.
salt broken config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn: | |
pkgrepo.managed: | |
- humanname: yarnpkg | |
- name: deb https://dl.yarnpkg.com/debian/ stable main | |
- file: /etc/apt/sources.list.d/yarn.list | |
- key_url: salt://yarn.pub | |
- require_in: | |
- pkg: yarn | |
pkg.installed: | |
- refresh: yes | |
- require: | |
- pkgrepo: yarn | |
cmd.run: | |
- cwd: {{ pillar['project']['target'] }}/crm/css | |
- user: {{ pillar['user'] }} | |
- group: {{ pillar['group'] }} | |
- require: | |
- pkg: yarn | |
/usr/bin/node: | |
file.symlink: | |
- target: /usr/bin/nodejs | |
- require: | |
- pkg: packages | |
packages: | |
pkg.installed: | |
- pkgs: | |
- git | |
- build-essential | |
- python3.5 | |
- python3-venv | |
- python3-dev | |
- python3-pip | |
- gcc | |
- g++ | |
- libpq-dev | |
- postgresql-client | |
- libgdal-dev | |
- nodejs | |
- npm | |
{{ pillar['project']['log'] }}: | |
file.directory: | |
- user: {{ pillar['user'] }} | |
- group: {{ pillar['group'] }} | |
- require: | |
- user: www_user | |
{{ pillar['project']['repository'] }}: | |
git.latest: | |
- rev: {{ pillar['project']['branch'] }} | |
- target: {{ pillar['project']['target'] }} | |
- user: {{ pillar['user'] }} | |
- identity: /home/{{ pillar['user'] }}/.ssh/id_rsa | |
- force: yes | |
- require: | |
- pkg: packages | |
- user: www_user | |
- ssh_known_hosts: github.com | |
- file: /home/{{ pillar['user'] }}/.ssh/id_rsa | |
- file: {{ pillar['project']['log'] }} | |
build_css: | |
cmd.run: | |
- cwd: {{ pillar['project']['target'] }}/crm/css | |
- user: {{ pillar['user'] }} | |
- name: npm run dev | |
- group: {{ pillar['group'] }} | |
- require: | |
- cmd: yarn | |
yarn_jsapp: | |
cmd.run: | |
- cwd: {{ pillar['project']['target'] }}/crm/jsapp | |
- user: {{ pillar['user'] }} | |
- group: {{ pillar['group'] }} | |
- yarn | |
- require: | |
- pkg: yarn | |
build_jsapp: | |
cmd.run: | |
- name: npm run build | |
- cwd: {{ pillar['project']['target'] }}/crm/jsapp | |
- user: {{ pillar['user'] }} | |
- group: {{ pillar['group'] }} | |
- require: | |
- cmd: yarn_jsapp | |
{{ pillar['settings']['path'] }}: | |
file.managed: | |
- user: {{ pillar['user'] }} | |
- group: {{ pillar['group'] }} | |
- mode: 755 | |
- source: salt://settings.py | |
- template: jinja | |
- require: | |
- git: {{ pillar['project']['repository'] }} | |
{{ pillar['project']['venv'] }}: | |
virtualenv.managed: | |
- venv_bin: pyvenv | |
- user: {{ pillar['user'] }} | |
- requirements: {{ pillar['project']['target'] }}/requirements.txt | |
- require: | |
- user: www_user | |
- git: {{ pillar['project']['repository'] }} | |
migrate: | |
cmd.run: | |
- name: {{ pillar['project']['venv'] }}/bin/python manage.py migrate --noinput --settings={{ pillar['settings']['import'] }} | |
- user: {{ pillar['user'] }} | |
- group: {{ pillar['group'] }} | |
- cwd: {{ pillar['project']['target'] }} | |
- require: | |
- file: {{ pillar['settings']['path'] }} | |
- virtualenv: {{ pillar['project']['venv'] }} | |
collectstatic: | |
cmd.run: | |
- name: {{ pillar['project']['venv'] }}/bin/python manage.py collectstatic --noinput --settings={{ pillar['settings']['import'] }} | |
- user: {{ pillar['user'] }} | |
- group: {{ pillar['group'] }} | |
- cwd: {{ pillar['project']['target'] }} | |
- require: | |
- file: {{ pillar['settings']['path'] }} | |
- virtualenv: {{ pillar['project']['venv'] }} | |
/etc/systemd/system/crm.service: | |
file.managed: | |
- source: salt://appserver.service | |
- template: jinja | |
- user: root | |
- group: root | |
- mode: 644 | |
- require: | |
- git: {{ pillar['project']['repository'] }} | |
crm: | |
service.running: | |
- require: | |
- file: /etc/systemd/system/crm.service | |
- cmd: collectstatic | |
- cmd: migrate | |
- watch: | |
- git: {{ pillar['project']['repository'] }} | |
- file: {{ pillar['settings']['path'] }} | |
/etc/systemd/system/rq.service: | |
file.managed: | |
- source: salt://rq.service | |
- template: jinja | |
- user: root | |
- group: root | |
- mode: 644 | |
- require: | |
- git: {{ pillar['project']['repository'] }} | |
rq: | |
service.running: | |
- require: | |
- file: /etc/systemd/system/rq.service | |
- cmd: collectstatic | |
- cmd: migrate | |
- watch: | |
- git: {{ pillar['project']['repository'] }} | |
- file: {{ pillar['settings']['path'] }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment