From e18427bfafd885597ff1d6a37d1acb7f0b5f6d86 Mon Sep 17 00:00:00 2001 From: Matthew Scragg Date: Thu, 16 Jan 2014 16:04:44 -0600 Subject: [PATCH] salt changes --- realms/config/__init__.py | 2 -- srv/salt/postgres/init.sql | 28 ++---------------------- srv/salt/rethinkdb/init.sls | 41 ------------------------------------ srv/salt/rethinkdb/rdb0.conf | 10 --------- 4 files changed, 2 insertions(+), 79 deletions(-) delete mode 100644 srv/salt/rethinkdb/init.sls delete mode 100644 srv/salt/rethinkdb/rdb0.conf diff --git a/realms/config/__init__.py b/realms/config/__init__.py index bbc066b..5190452 100644 --- a/realms/config/__init__.py +++ b/realms/config/__init__.py @@ -29,12 +29,10 @@ MODULES = [ ] if ENV is 'PROD': - #SERVER_NAME = 'realms.io' PORT = 80 DOMAIN = 'realms.io' else: DEBUG = True ASSETS_DEBUG = True - #SERVER_NAME = 'realms.dev:8000' DOMAIN = 'realms.dev' PORT = 8000 \ No newline at end of file diff --git a/srv/salt/postgres/init.sql b/srv/salt/postgres/init.sql index 08acf81..a1afd32 100644 --- a/srv/salt/postgres/init.sql +++ b/srv/salt/postgres/init.sql @@ -1,26 +1,2 @@ -DROP TABLE IF EXISTS users; -CREATE TABLE users ( - id SERIAL, - username VARCHAR(100), - password VARCHAR(255), - email VARCHAR(255), - joined TIMESTAMP -); - -DROP TABLE IF EXISTS sites; -CREATE TABLE sites ( - name VARCHAR(255), - pages INT, - views INT, - created TIMESTAMP -); - -DROP TABLE IF EXISTS pages; -CREATE TABLE pages ( - id VARCHAR(255), -- / - edits INT, - views INT, - author INT, - created TIMESTAMP, - modified TIMESTAMP -); \ No newline at end of file +CREATE USER deploy WITH PASSWORD 'dbpassword'; +GRANT ALL PRIVILEGES ON DATABASE "realms" to deploy; \ No newline at end of file diff --git a/srv/salt/rethinkdb/init.sls b/srv/salt/rethinkdb/init.sls deleted file mode 100644 index 2c1b2c6..0000000 --- a/srv/salt/rethinkdb/init.sls +++ /dev/null @@ -1,41 +0,0 @@ -rethinkdb-repo: - pkgrepo.managed: - - name: 'deb http://ppa.launchpad.net/rethinkdb/ppa/ubuntu precise main' - -rethinkdb: - pkg.installed: - - require: - - pkgrepo.managed: rethinkdb-repo - -rethinkdb-user: - user.present: - - name: rethinkdb - - shell: /bin/bash - - home: /home/rethinkdb - -rethinkdb-pip: - pip: - - name: rethinkdb - - installed - - require: - - pkg: python-pip - - pkg: rethinkdb - - pkg: build-essential - -/home/rethinkdb/rdb0: - file.directory: - - user: rethinkdb - - group: rethinkdb - - makedirs: True - -/etc/rethinkdb/instances.d/rdb0.conf: - file.managed: - - source: salt://rethinkdb/rdb0.conf - -rethinkdb-service: - service.running: - - name: rethinkdb - - enable: True - - reload: True - - watch: - - file.managed: /etc/rethinkdb/instances.d/rdb0.conf \ No newline at end of file diff --git a/srv/salt/rethinkdb/rdb0.conf b/srv/salt/rethinkdb/rdb0.conf deleted file mode 100644 index 26f1ea9..0000000 --- a/srv/salt/rethinkdb/rdb0.conf +++ /dev/null @@ -1,10 +0,0 @@ -runuser=rethinkdb -rungroup=rethinkdb -pid-file=/home/rethinkdb/rdb0/rethinkdb.pid -directory=/home/rethinkdb/rdb0 -bind=all -driver-port=28015 -cluster-port=29015 -port-offset=0 -http-port=20000 -cores=2 \ No newline at end of file