create provision script, removed salt states
This commit is contained in:
parent
564bde872d
commit
1492448448
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -9,3 +9,4 @@ config.json
|
|||
realms/static/vendor
|
||||
realms/static/assets/*
|
||||
wiki.db
|
||||
npm-debug.log
|
||||
|
|
17
provision.sh
17
provision.sh
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Provision script created for Ubuntu 14.04
|
||||
APP_DIR=/vagrant
|
||||
|
||||
echo "Provisioning..."
|
||||
|
@ -40,5 +41,17 @@ source .venv/bin/activate
|
|||
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Dev server http://127.0.0.1:5000
|
||||
# python realms.py runserver
|
||||
cat << EOF > /usr/local/bin/realms-wiki
|
||||
#!/bin/bash
|
||||
${APP_DIR}/.venv/bin/python ${APP_DIR}/manage.py "\$@"
|
||||
EOF
|
||||
chmod +x /usr/local/bin/realms-wiki
|
||||
|
||||
cat << EOF > /etc/init/realms-wiki.conf
|
||||
description "Realms Wiki"
|
||||
author "scragg@gmail.com"
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [!2345]
|
||||
respawn
|
||||
exec /usr/local/bin/realms-wiki run
|
||||
EOF
|
|
@ -4,4 +4,4 @@ assets.register('editor',
|
|||
'js/ace/ace.js',
|
||||
'js/ace/mode-markdown.js',
|
||||
'vendor/keymaster/keymaster.js',
|
||||
'js/dillinger.js')
|
||||
'js/editor.js')
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/*
|
||||
Source is modified version of http://dillinger.io/
|
||||
*/
|
||||
$(function () {
|
||||
|
||||
var url_prefix = "";
|
|
@ -1,2 +0,0 @@
|
|||
master: localhost
|
||||
file_client: local
|
|
@ -1,36 +0,0 @@
|
|||
redis-lea-repo:
|
||||
pkgrepo.managed:
|
||||
- ppa: chris-lea/redis-server
|
||||
- required_in: redis-server
|
||||
|
||||
nodejs-lea-repo:
|
||||
pkgrepo.managed:
|
||||
- ppa: chris-lea/node.js
|
||||
|
||||
python-redis-lea-repo:
|
||||
pkgrepo.managed:
|
||||
- ppa: chris-lea/python-redis
|
||||
|
||||
common-pkgs:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- python
|
||||
- build-essential
|
||||
- git
|
||||
- libpcre3-dev
|
||||
- libevent-dev
|
||||
- python-software-properties
|
||||
- python-pip
|
||||
- python-virtualenv
|
||||
- python-dev
|
||||
- pkg-config
|
||||
- curl
|
||||
- libxml2-dev
|
||||
- libxslt1-dev
|
||||
- zlib1g-dev
|
||||
- libffi-dev
|
||||
- nodejs
|
||||
- require:
|
||||
- pkgrepo: nodejs-lea-repo
|
||||
- pkgrepo: redis-lea-repo
|
||||
- pkgrepo: python-redis-lea-repo
|
|
@ -1,44 +0,0 @@
|
|||
python-dev:
|
||||
pkg.installed
|
||||
|
||||
build-essential:
|
||||
pkg.installed
|
||||
|
||||
python-pip:
|
||||
pkg.installed
|
||||
|
||||
virtualenvwrapper:
|
||||
pip.installed:
|
||||
- require:
|
||||
- pkg: python-pip
|
||||
|
||||
bower:
|
||||
npm.installed:
|
||||
- user: root
|
||||
- require:
|
||||
- pkg: common-pkgs
|
||||
|
||||
uglify-js:
|
||||
npm.installed:
|
||||
- user: root
|
||||
- require:
|
||||
- pkg: common-pkgs
|
||||
|
||||
create_virtualenv:
|
||||
virtualenv.managed:
|
||||
- name: /home/deploy/virtualenvs/realms
|
||||
- requirements: /home/deploy/realms/requirements.txt
|
||||
- cwd: /home/deploy/realms
|
||||
- user: root
|
||||
|
||||
vagrant_ownership:
|
||||
cmd.run:
|
||||
- name: chown -R vagrant.vagrant /home/deploy
|
||||
- onlyif: test -d /vagrant
|
||||
- user: root
|
||||
|
||||
deploy_ownership:
|
||||
cmd.run:
|
||||
- name: chown -R vagrant.vagrant /home/deploy
|
||||
- unless: test -d /vagrant
|
||||
- user: root
|
|
@ -1,9 +0,0 @@
|
|||
redis-server:
|
||||
pkg:
|
||||
- installed
|
||||
service:
|
||||
- running
|
||||
- enable: True
|
||||
- reload: True
|
||||
- require:
|
||||
- pkg: redis-server
|
|
@ -1,6 +0,0 @@
|
|||
base:
|
||||
'*':
|
||||
- common
|
||||
- users
|
||||
- redis
|
||||
- realms
|
|
@ -1,2 +0,0 @@
|
|||
source /usr/local/bin/virtualenvwrapper.sh
|
||||
WORKON_HOME=/home/deploy/virtualenvs
|
|
@ -1,46 +0,0 @@
|
|||
deploy:
|
||||
user.present:
|
||||
- shell: /bin/bash
|
||||
- home: /home/deploy
|
||||
- fullname: Deploy
|
||||
|
||||
sudo:
|
||||
pkg:
|
||||
- installed
|
||||
|
||||
/etc/sudoers.d/mysudoers:
|
||||
file.managed:
|
||||
- source: salt://users/mysudoers
|
||||
- mode: 440
|
||||
- user: root
|
||||
- group: root
|
||||
- require:
|
||||
- pkg: sudo
|
||||
|
||||
/home/deploy:
|
||||
file.directory:
|
||||
- user: deploy
|
||||
- group: deploy
|
||||
|
||||
/home/deploy/.bash_profile:
|
||||
file.managed:
|
||||
- source: salt://users/.bash_profile
|
||||
- mode: 440
|
||||
- user: deploy
|
||||
- group: deploy
|
||||
- require:
|
||||
- file: /home/deploy
|
||||
|
||||
/home/deploy/.bashrc:
|
||||
file.copy:
|
||||
- mode: 440
|
||||
- user: deploy
|
||||
- group: deploy
|
||||
- source: /etc/skel/.bashrc
|
||||
|
||||
bashrc-append:
|
||||
file.append:
|
||||
- name: /home/deploy/.bashrc
|
||||
- text: . ~/.bash_profile
|
||||
- user: deploy
|
||||
- group: deploy
|
|
@ -1 +0,0 @@
|
|||
deploy ALL=(ALL) NOPASSWD:ALL
|
Loading…
Reference in a new issue