GithubHelp home page GithubHelp logo

dnflow-ansible's People

Contributors

edsu avatar ianmilligan1 avatar kayiwa avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dnflow-ansible's Issues

rq worker fails

rq worker throws an exception when pulling search jobs off the queue.

'module' object has no attribute 'run'

/login 502 error

On a new workstation when I deploy w/ Vagrant+Ansible the login throws a 502 error. I didn't see this on my laptop at home yesterday so it must be some environmental type of thing.

Search input not registering search

I've been trying to get this up and running locally. However, I can get to this stage, logged in and authenticated in Twitter:
screen shot 2016-08-31 at 11 14 50 am
But if I enter a query and click 'add,' nothing happens.

What kind of information would you like to see where I've gone wrong?

docnow service start failure

Ansible is unable to start the uwsgi service on Ubuntu 16.04.1.

ubuntu@ip-172-30-1-27:/etc/init$ sudo service docnow start
Failed to start docnow.service: Unit docnow.service not found.

I guess the upstart config needs to be tweaked in some way?

missing database

HI,

The search feature wasn't working at all. PUzzling through it with Ed, it seems as if the database wasn't formed correctly (vagrant, on a Mac). There was no data directory created:

vagrant@vagrant-ubuntu-trusty-64:/home/docnow/dnflow$ ls
db.sqlite3           __init__.py  queue_tasks.py    static
dnflow.cfg           LICENSE      README.md         summarize.py
dnflow.cfg.template  luigi.cfg    requirements.txt  templates
docnow.ini           __pycache__  schema.sql        ui.py

I cd /home/docnow/dnflow and then sqlite3 db.sqlite3 with the result:
sqlite> SELECT * FROM searches; Error: no such table: searches

so we:

sudo -u docnow -s ; sqlite3 db.sqlite3 < schema.sql

but I had to re-enter the sqlite3 db.sqlite3 < schema.sql to get it to take. And then the search in the webapp performed as expected.

db stomping

It would be nice if there was a way to run the playbook without wiping out the database.

dnflow code in /vagrant?

It would simplify development if the dnflow repo was available in /vagrant so that it could be edited live from the host operating system.

remove redis configuration

It doesn't look like redis.yml is used anymore -- since it's covered in docnow. Can it be removed to keep things simple?

"Failed to set permissions on the temporary files," AWS error

Hi folks – when running the steps here, a change to Ansible 2.1+ now leads to a failure. Here's the error:


TASK [db to track searches] ****************************************************
fatal: [default]: FAILED! => {"failed": true, "msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chown: changing ownership of ‘/tmp/ansible-tmp-1505919437.39-193639852573128/’: Operation not permitted\nchown: changing ownership of ‘/tmp/ansible-tmp-1505919437.39-193639852573128/command.py’: Operation not permitted\n}). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}
	to retry, use: --limit @/vagrant/docnow.retry

PLAY RECAP *********************************************************************
default                    : ok=33   changed=29   unreachable=0    failed=1

The solution is if you trust your remote provider, to change the ansible.cfg file to include:

allow_world_readable_tmpfiles = true

Like so:

[defaults]
host_key_checking = False
allow_world_readable_tmpfiles = true

[ssh_connection]
pipelining = True
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o StrictHostKeyChecking=no

Not sure if this is worth adding or not.

Vagrant Build failing on AWS

Hi folks –

I've been trying to get this deployed on AWS for longer than I'm willing to admit now (I'll hopefully push some tweaks to your README.md file). But I'm finally hitting the wall here on an issue related to #8.

Build fails on AWS with:

TASK [remove nginx default virtual host] ***************************************
changed: [default]

TASK [copy nginx virtualhost] **************************************************
fatal: [default]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: {{ ansible_eth1.ipv4.address }}: 'ansible_eth1' is undefined"}
	to retry, use: --limit @/vagrant/docnow.retry

PLAY RECAP *********************************************************************
default                    : ok=23   changed=20   unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

My group_vars/all is as follows, with keys removed but everything else the same:


---
hostname: "{{ ansible_eth1.ipv4.address }}"
twitter_consumer_key: JSp5BzLifNopFcmPdpzKcYSUC
twitter_consumer_secret: bNwef7erMVbdmj8fDNW6kuVgyoYBCJpeWWsd1zMo4ruyc5nH1Q
http_basicauth_user:
http_basicauth_pass:
#google_analytics: blah

I know the problem is in there somewhere.. Thanks all.

config issue maybe?

Hi folks,

I get to this:

TASK [copy nginx virtualhost] **************************************************
fatal: [default]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'http_basicauth_user' is undefined"}

NO MORE HOSTS LEFT *************************************************************
 [WARNING]: Could not create retry file 'docnow.retry'.         [Errno 2] No
such file or directory: ''

my 'all' file:

hostname: "{{ ansible_eth0.ipv4.address }}"
twitter_consumer_key:
twitter_consumer_secret:

http_basicauth_user:

http_basicauth_pass:

... I'm missing something quite basic, right?

Difficulty accessing AWS instance

Me again. I have managed to get a successful build (perhaps resolving #14 although I will leave that open until fixed). I am at the step where we edit /home/docnow/dnflow/dnflow.cfg and /etc/nginx/sites-enabled/docnow to provide hostname and servername. But after stopping and starting docnow, I can't get through.

Is this a security group issue w/ AWS (I only have SSH on port 22) or with the two files?

I'll provide them below.

dnflow.cfg

HOSTNAME = 'ec2-35-161-208-251.us-west-2.compute.amazonaws.com'
DEBUG = True
DATABASE = 'db.sqlite3'
SECRET_KEY = 'a super secret key'
STATIC_URL_PATH = '/static'
DATA_DIR = 'data'
MAX_TIMEOUT = 2 * 60 * 60  # two hours should be long enough
REDIS_HOST = 'localhost'
REDIS_PORT = 6379
REDIS_DB = 4
TWITTER_CONSUMER_KEY = 'KEY IAN ADDED HERE'
TWITTER_CONSUMER_SECRET = 'SECRETKEY IAN ADDED HERE'


HTTP_BASICAUTH_USER = 'TWITTER LOGIN HERE'
HTTP_BASICAUTH_PASS = 'TWITTER PASSWORD HERE'

docnow

server {
  listen 80;
  listen [::]:80 default_server ipv6only=on;
  server_name ec2-35-161-208-251.us-west-2.compute.amazonaws.com;
  location / {
    include uwsgi_params;
    uwsgi_pass 127.0.0.1:8001;
        auth_basic "Speak, Friend and Enter";
    auth_basic_user_file /etc/nginx/.htpasswd;
      }
  location /static {
    alias /home/docnow/dnflow/static;
        auth_basic "Speak, Friend and Enter";
    auth_basic_user_file /etc/nginx/.htpasswd;
      }
}

server {
  listen 8080 default_server;
  listen [::]:8080 default_server ipv6only=on;
  location / {
    proxy_pass http://localhost:8082;
        auth_basic "Speak, Friend and Enter";
    auth_basic_user_file /etc/nginx/.htpasswd;
      }
}

Thanks team. My goal is to give back by adding some more instructions for regular users like me. 😄

403 Forbidden

Here's a fun error for when you have users with butterfingers like me. When logging into the local version (http://192.168.60.14), if the user presses enter before entering their password, it brings them to a 403 Forbidden page.

There doesn't seem to be robust error handling for typos, etc. My hacky workaround was vagrant destroy && vagrant up but there is surely a better way. 😁

ETA: maybe I should leave the username and password blank in the all config?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.