mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Moving to new redis ports.
This commit is contained in:
parent
c2d6c2f22e
commit
dc59b019a3
9 changed files with 26 additions and 15 deletions
|
@ -9,6 +9,9 @@
|
|||
- name: Extract part of hostname to determine container name
|
||||
set_fact:
|
||||
redis_role: "{{ inventory_hostname.split('-')[2] }}"
|
||||
tags:
|
||||
- never
|
||||
- replicaofnoone
|
||||
|
||||
- name: Turning off secondary for redis by deleting redis_replica.conf
|
||||
copy:
|
||||
|
@ -19,7 +22,7 @@
|
|||
- replicaofnoone
|
||||
|
||||
- name: Setting Redis REPLICAOF NO ONE
|
||||
shell: docker exec redis redis-cli REPLICAOF NO ONE
|
||||
shell: docker exec redis-{{ redis_role }} redis-cli REPLICAOF NO ONE
|
||||
tags:
|
||||
- never
|
||||
- replicaofnoone
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
- {role: 'docker', tags: 'docker'}
|
||||
- {role: 'repo', tags: ['repo', 'pull']}
|
||||
- {role: 'dnsmasq', tags: 'dnsmasq'}
|
||||
- {role: 'consul', tags: 'consul'}
|
||||
- {role: 'consul-client', tags: 'consul'}
|
||||
# - {role: 'consul', tags: 'consul'}
|
||||
# - {role: 'consul-client', tags: 'consul'}
|
||||
- {role: 'node-exporter', tags: ['node-exporter', 'metrics']}
|
||||
- {role: 'redis', tags: 'redis'}
|
||||
- {role: 'flask_metrics', tags: ['flask-metrics', 'metrics', 'flask_metrics']}
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
- name: pg_ctl promote
|
||||
become: yes
|
||||
command:
|
||||
docker exec -it postgres su - postgres -c "/usr/lib/postgresql/13/bin/pg_ctl -D /var/lib/postgresql/data promote"
|
||||
docker exec postgres su - postgres -c "/usr/lib/postgresql/13/bin/pg_ctl -D /var/lib/postgresql/data promote"
|
||||
# when: (inventory_hostname | regex_replace('[0-9]+', '')) in ['db-postgres-secondary']
|
||||
tags:
|
||||
- never
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
---
|
||||
- name: Set facts for secondary elasticsearch servers
|
||||
set_fact:
|
||||
elasticsearch_secondary: no
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Set facts for secondary elasticsearch servers
|
||||
set_fact:
|
||||
elasticsearch_secondary: yes
|
||||
# when: inventory_hostname not in ["db-elasticsearch"]
|
||||
when: inventory_hostname not in ["hdb-elasticsearch"]
|
||||
when: inventory_hostname not in ["hdb-elasticsearch-1"]
|
||||
tags:
|
||||
- always
|
||||
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
---
|
||||
- name: Set mongo_analytics_secondary
|
||||
set_fact:
|
||||
mongo_analytics_secondary: no
|
||||
tags:
|
||||
- consul
|
||||
- always
|
||||
|
||||
- name: Set mongo_analytics_secondary
|
||||
set_fact:
|
||||
mongo_analytics_secondary: yes
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
- name: Extract part of hostname to determine container name
|
||||
set_fact:
|
||||
redis_role: "{{ inventory_hostname.split('-')[2] }}"
|
||||
redis_secondary: no
|
||||
# redis_port: 6379
|
||||
redis_ports:
|
||||
story: 6380
|
||||
|
|
|
@ -254,7 +254,7 @@ backend db_redis_sessions
|
|||
backend db_redis_pubsub
|
||||
option httpchk GET /db_check/redis_pubsub
|
||||
default-server check inter 2000ms resolvers consul resolve-prefer ipv4 resolve-opts allow-dup-ip init-addr none
|
||||
server db-redis-pubsub db-redis-pubsub.node.nyc1.consul:5579
|
||||
server hdb-redis-pubsub hdb-redis-pubsub.node.nyc1.consul:5579
|
||||
|
||||
backend db_elasticsearch
|
||||
option httpchk GET /db_check/elasticsearch
|
||||
|
|
|
@ -15,13 +15,13 @@ aps -l hdb-postgres-1 -t pg_promote
|
|||
# Mongo
|
||||
|
||||
sshdo db-mongo-primary1
|
||||
sudo exec -it mongo mongo
|
||||
sudo docker exec -it mongo mongo
|
||||
rs.config()
|
||||
rs.reconfig()
|
||||
|
||||
# Move mongo analytics
|
||||
# Edit mongo/tasks/main.yml: mongo_analytics_secondary
|
||||
aps -l db-mongo-analytics,hdb-mongo-analytics -t consul
|
||||
aps -l db-mongo-analytics2,hdb-mongo-analytics-1 -t consul
|
||||
|
||||
# Redis
|
||||
|
||||
|
@ -35,7 +35,7 @@ apd -l hdb-redis-user-1,hdb-redis-session-1,hdb-redis-story-1,hdb-redis-pubsub -
|
|||
# Elasticsearch
|
||||
|
||||
# Edit elasticsearch/tasks/main.yml: elasticsearch_secondary
|
||||
aps -l hdb-elasticsearch-1 -t elasticsearch
|
||||
aps -l db-elasticsearch1,hdb-elasticsearch-1 -t consul
|
||||
# Eventually MUserSearch.remove_all()
|
||||
|
||||
# Test hwww.newsblur.com
|
||||
|
|
|
@ -769,16 +769,10 @@ if DOCKERBUILD:
|
|||
REDIS_SESSION_PORT = 6579
|
||||
REDIS_PUBSUB_PORT = 6579
|
||||
else:
|
||||
REDIS_PORT = 6379
|
||||
REDIS_STORY_PORT = 6380
|
||||
REDIS_USER_PORT = 6381
|
||||
REDIS_SESSION_PORT = 6382
|
||||
REDIS_PUBSUB_PORT = 6383
|
||||
# Until redis moves to hetzner, use old ports
|
||||
REDIS_STORY_PORT = REDIS_PORT
|
||||
REDIS_USER_PORT = REDIS_PORT
|
||||
REDIS_SESSION_PORT = REDIS_PORT
|
||||
REDIS_PUBSUB_PORT = REDIS_PORT
|
||||
|
||||
if REDIS_USER is None:
|
||||
# REDIS has been renamed to REDIS_USER.
|
||||
|
|
Loading…
Add table
Reference in a new issue