Attempting to get old inventory working with new, but its not yet resolving for hosts. Not sure why. Also reducing node docker image down.

This commit is contained in:
Samuel Clay 2021-02-19 19:58:11 -05:00
parent a4e18295d7
commit 32eb8539c1
9 changed files with 47 additions and 36 deletions

View file

@ -2,7 +2,7 @@
host_key_checking = False host_key_checking = False
remote_user = sclay remote_user = sclay
retry_files_enabled = False retry_files_enabled = False
inventory = /srv/newsblur/ansible/inventories/digital_ocean.old.ini, /srv/newsblur/ansible/inventories/digital_ocean.old.yml inventory = /srv/newsblur/ansible/inventories/digital_ocean.old.ini, /srv/newsblur/ansible/inventories/digital_ocean.ini, /srv/newsblur/ansible/inventories/digital_ocean.yml, /srv/newsblur/ansible/inventories/digital_ocean.old.yml, /srv/newsblur/ansible/inventories/all.yml
private_key_file = /srv/secrets-newsblur/keys/newsblur.key private_key_file = /srv/secrets-newsblur/keys/newsblur.key
publickey = /srv/secrets-newsblur/keys/newsblur.key.pub publickey = /srv/secrets-newsblur/keys/newsblur.key.pub
remote_tmp = ~/.ansible/tmp remote_tmp = ~/.ansible/tmp

View file

@ -13,3 +13,9 @@
repo: https://github.com/samuelclay/NewsBlur.git repo: https://github.com/samuelclay/NewsBlur.git
dest: /srv/newsblur/ dest: /srv/newsblur/
version: dashboard3 version: dashboard3
register: pulled
- name: Reload gunicorn
become: yes
command: "docker kill --signal=HUP newsblur_web"
when: pulled.changed

View file

@ -7,8 +7,9 @@ import subprocess
import digitalocean import digitalocean
OLD = False OLD = False
# Uncomment below line to use existing servers # Set env var OLD=1 to use existing servers
# OLD = True if os.environ.get('OLD', False):
OLD = True
if OLD: if OLD:
TOKEN_FILE = "/srv/secrets-newsblur/keys/digital_ocean.readprod.token" TOKEN_FILE = "/srv/secrets-newsblur/keys/digital_ocean.readprod.token"

View file

@ -0,0 +1,3 @@
[oldandnew]
NewsBlur
NewsBlur_Docker

View file

@ -11,5 +11,5 @@ groups:
elasticsearch: inventory_hostname.startswith('db-elasticsearch') elasticsearch: inventory_hostname.startswith('db-elasticsearch')
redis: inventory_hostname.startswith('db-redis') redis: inventory_hostname.startswith('db-redis')
postgres: inventory_hostname.startswith('db01') postgres: inventory_hostname.startswith('db01')
mongo: inventory_hostname.startswith('db-mongo') mongo: inventory_hostname in ['db20d', 'db22', 'db23a', 'db30']
consul: inventory_hostname.startswith('db-consul') consul: inventory_hostname.startswith('db-consul')

View file

@ -4,9 +4,9 @@ strict: False
groups: groups:
web: inventory_hostname.startswith('app') web: inventory_hostname.startswith('app')
app: inventory_hostname.startswith('app') app: inventory_hostname.startswith('app')
work: inventory_hostname.startswith('work') work: inventory_hostname.startswith('work') and inventory_hostname != "work"
node: inventory_hostname.startswith('node') node: inventory_hostname.startswith('node')
debug: inventory_hostname.startswith('debug') # debug: inventory_hostname.startswith('debug')
db: inventory_hostname.startswith('db') db: inventory_hostname.startswith('db')
task: inventory_hostname.startswith('task') task: inventory_hostname.startswith('task')
search: inventory_hostname.startswith('db-elasticsearch') search: inventory_hostname.startswith('db-elasticsearch')

View file

@ -17,6 +17,7 @@
name: newsblur_web name: newsblur_web
image: newsblur/newsblur_python3 image: newsblur/newsblur_python3
container_default_behavior: no_defaults container_default_behavior: no_defaults
pull: yes
env: env:
DOCKERBUILD: "" DOCKERBUILD: ""
state: started state: started

View file

@ -25,7 +25,7 @@ Fabric>=1.14.0,<2
Fabric2==2.5.0 Fabric2==2.5.0
feedparser>=6,<7 feedparser>=6,<7
flask==1.1.2 flask==1.1.2
gunicorn==20.0.4 gunicorn==19.7.1
hiredis==1.1.0 hiredis==1.1.0
httplib2==0.18.1 httplib2==0.18.1
image==1.5.33 image==1.5.33
@ -57,7 +57,7 @@ redis==3.5.3
requests==2.25.0 requests==2.25.0
scipy==1.5.4 scipy==1.5.4
seacucumber==1.5.2 seacucumber==1.5.2
sentry-sdk==0.19.4 sentry-sdk==0.20.3
sgmllib3k==1.0.0 sgmllib3k==1.0.0
simplejson==3.17.2 simplejson==3.17.2
six==1.15.0 six==1.15.0

View file

@ -1,34 +1,34 @@
FROM node:14.4.0 FROM node:14.4.0
WORKDIR /usr/src/app WORKDIR /usr/src/app
RUN set -ex \ # RUN set -ex \
&& rundDeps=' \ # && rundDeps=' \
libpq5 \ # libpq5 \
libjpeg62 \ # libjpeg62 \
libxslt1.1 \ # libxslt1.1 \
' \ # ' \
&& buildDeps=' \ # && buildDeps=' \
patch \ # patch \
python-dev \ # python-dev \
gfortran \ # gfortran \
lib32ncurses5-dev \ # lib32ncurses5-dev \
libblas-dev \ # libblas-dev \
libffi-dev \ # libffi-dev \
libjpeg-dev \ # libjpeg-dev \
default-libmysqlclient-dev \ # default-libmysqlclient-dev \
libpq-dev \ # libpq-dev \
libreadline6-dev \ # libreadline6-dev \
liblapack-dev \ # liblapack-dev \
libxml2-dev \ # libxml2-dev \
libxslt1-dev \ # libxslt1-dev \
ncurses-dev \ # ncurses-dev \
zlib1g-dev \ # zlib1g-dev \
' \ # ' \
&& apt-get update \ # && apt-get update \
&& apt-get install -y $rundDeps $buildDeps --no-install-recommends \ # && apt-get install -y $rundDeps $buildDeps --no-install-recommends \
&& apt-get purge -y --auto-remove ${buildDeps} \ # && apt-get purge -y --auto-remove ${buildDeps} \
&& rm -rf /var/lib/apt/lists/* # && rm -rf /var/lib/apt/lists/*
COPY ./node/package.json /usr/src/app/package.json COPY ./node/package.json /usr/src/app/package.json
COPY ./node/package-lock.json /usr/src/app/package-lock.json COPY ./node/package-lock.json /usr/src/app/package-lock.json
RUN npm install RUN npm install
COPY ./node . COPY ./node .